diff --git a/basis/compiler/cfg/builder/builder-tests.factor b/basis/compiler/cfg/builder/builder-tests.factor index 9ed7c592ce..b8fde7fef6 100644 --- a/basis/compiler/cfg/builder/builder-tests.factor +++ b/basis/compiler/cfg/builder/builder-tests.factor @@ -11,8 +11,8 @@ FROM: alien.c-types => int ; IN: compiler.cfg.builder.tests ! Just ensure that various CFGs build correctly. -: unit-test-cfg ( quot -- ) - '[ _ test-cfg [ [ optimize-cfg check-cfg ] with-cfg ] each ] [ ] swap unit-test ; +: unit-test-builder ( quot -- ) + '[ _ test-builder [ [ optimize-cfg check-cfg ] with-cfg ] each ] [ ] swap unit-test ; : blahblah ( nodes -- ? ) { fixnum } declare [ @@ -105,7 +105,7 @@ IN: compiler.cfg.builder.tests set-string-nth-fast ] } [ - unit-test-cfg + unit-test-builder ] each : test-1 ( -- ) test-1 ; @@ -116,7 +116,7 @@ IN: compiler.cfg.builder.tests test-1 test-2 test-3 -} [ unit-test-cfg ] each +} [ unit-test-builder ] each { byte-array @@ -134,8 +134,8 @@ IN: compiler.cfg.builder.tests alien-float alien-double } [| word | - { class } word '[ _ declare 10 _ execute ] unit-test-cfg - { class fixnum } word '[ _ declare _ execute ] unit-test-cfg + { class } word '[ _ declare 10 _ execute ] unit-test-builder + { class fixnum } word '[ _ declare _ execute ] unit-test-builder ] each { @@ -146,22 +146,22 @@ IN: compiler.cfg.builder.tests set-alien-unsigned-2 set-alien-unsigned-4 } [| word | - { fixnum class } word '[ _ declare 10 _ execute ] unit-test-cfg - { fixnum class fixnum } word '[ _ declare _ execute ] unit-test-cfg + { fixnum class } word '[ _ declare 10 _ execute ] unit-test-builder + { fixnum class fixnum } word '[ _ declare _ execute ] unit-test-builder ] each - { float class } \ set-alien-float '[ _ declare 10 _ execute ] unit-test-cfg - { float class fixnum } \ set-alien-float '[ _ declare _ execute ] unit-test-cfg + { float class } \ set-alien-float '[ _ declare 10 _ execute ] unit-test-builder + { float class fixnum } \ set-alien-float '[ _ declare _ execute ] unit-test-builder - { float class } \ set-alien-double '[ _ declare 10 _ execute ] unit-test-cfg - { float class fixnum } \ set-alien-double '[ _ declare _ execute ] unit-test-cfg + { float class } \ set-alien-double '[ _ declare 10 _ execute ] unit-test-builder + { float class fixnum } \ set-alien-double '[ _ declare _ execute ] unit-test-builder - { pinned-c-ptr class } \ set-alien-cell '[ _ declare 10 _ execute ] unit-test-cfg - { pinned-c-ptr class fixnum } \ set-alien-cell '[ _ declare _ execute ] unit-test-cfg + { pinned-c-ptr class } \ set-alien-cell '[ _ declare 10 _ execute ] unit-test-builder + { pinned-c-ptr class fixnum } \ set-alien-cell '[ _ declare _ execute ] unit-test-builder ] each : count-insns ( quot insn-check -- ? ) - [ test-mr [ instructions>> ] map ] dip + [ test-regs [ instructions>> ] map ] dip '[ _ count ] map-sum ; inline : contains-insn? ( quot insn-check -- ? ) diff --git a/basis/compiler/cfg/gc-checks/gc-checks-tests.factor b/basis/compiler/cfg/gc-checks/gc-checks-tests.factor index de5e35aaa4..496954de2c 100644 --- a/basis/compiler/cfg/gc-checks/gc-checks-tests.factor +++ b/basis/compiler/cfg/gc-checks/gc-checks-tests.factor @@ -184,14 +184,11 @@ V{ } 2 test-bb V{ - T{ ##phi f 3 } + T{ ##phi f 3 H{ { 1 1 } { 2 2 } } } T{ ##allot f 1 64 byte-array } T{ ##branch } } 3 test-bb -1 get 1 2array -2 get 2 2array 2array 3 get instructions>> first (>>inputs) - 0 { 1 2 } edges 1 3 edge 2 3 edge diff --git a/basis/compiler/cfg/liveness/ssa/ssa-tests.factor b/basis/compiler/cfg/liveness/ssa/ssa-tests.factor index 945d49272c..5413c65b32 100644 --- a/basis/compiler/cfg/liveness/ssa/ssa-tests.factor +++ b/basis/compiler/cfg/liveness/ssa/ssa-tests.factor @@ -24,14 +24,10 @@ V{ } 3 test-bb V{ - T{ ##phi f 2 } + T{ ##phi f 2 H{ { 2 0 } { 3 1 } } } T{ ##branch } } 4 test-bb -2 get 0 2array -3 get 1 2array 2array -4 get instructions>> first (>>inputs) - V{ T{ ##branch } } 5 test-bb diff --git a/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor b/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor index f22fe0d147..cc1bde36f1 100644 --- a/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor +++ b/basis/compiler/cfg/representations/coalescing/coalescing-tests.factor @@ -26,16 +26,13 @@ V{ } 2 test-bb V{ - T{ ##phi f 3 } + T{ ##phi f 3 H{ { 1 0 } { 2 1 } } } } 3 test-bb 0 { 1 2 } edges 1 3 edge 2 3 edge -1 get 0 2array -2 get 1 2array 2array 3 get instructions>> first (>>inputs) - [ ] [ test-scc ] unit-test [ t ] [ 0 vreg>scc 1 vreg>scc = ] unit-test diff --git a/basis/compiler/cfg/representations/representations-tests.factor b/basis/compiler/cfg/representations/representations-tests.factor index 3f406660ca..f4728bc7e7 100644 --- a/basis/compiler/cfg/representations/representations-tests.factor +++ b/basis/compiler/cfg/representations/representations-tests.factor @@ -251,7 +251,7 @@ V{ } 2 test-bb V{ - T{ ##phi f 3 } + T{ ##phi f 3 H{ { 1 1 } { 2 2 } } } T{ ##replace f 3 D 0 } T{ ##branch } } 3 test-bb @@ -261,9 +261,6 @@ V{ T{ ##return } } 4 test-bb -1 get 1 2array -2 get 2 2array 2array 3 get instructions>> first (>>inputs) - 0 { 1 2 } edges 1 3 edge 2 3 edge @@ -298,7 +295,7 @@ V{ } 2 test-bb V{ - T{ ##phi f 4 } + T{ ##phi f 4 H{ { 1 2 } { 2 3 } } } T{ ##replace f 4 D 0 } T{ ##branch } } 3 test-bb @@ -308,9 +305,6 @@ V{ T{ ##return } } 4 test-bb -1 get 2 2array -2 get 3 2array 2array 3 get instructions>> first (>>inputs) - 0 { 1 2 } edges 1 3 edge 2 3 edge @@ -371,7 +365,7 @@ cpu x86.32? [ } 3 test-bb V{ - T{ ##phi f 4 } + T{ ##phi f 4 H{ { 2 2 } { 3 3 } } } T{ ##peek f 5 D 0 } T{ ##add-float f 6 4 5 } T{ ##replace f 6 D 0 } @@ -385,9 +379,6 @@ cpu x86.32? [ test-diamond 4 5 edge - 2 get 2 2array - 3 get 3 2array 2array 4 get instructions>> first (>>inputs) - [ ] [ test-representations ] unit-test [ t ] [ 2 get instructions>> first ##load-double? ] unit-test diff --git a/basis/compiler/cfg/value-numbering/value-numbering-tests.factor b/basis/compiler/cfg/value-numbering/value-numbering-tests.factor index 0b1b8ab0fe..b7084fb2d8 100644 --- a/basis/compiler/cfg/value-numbering/value-numbering-tests.factor +++ b/basis/compiler/cfg/value-numbering/value-numbering-tests.factor @@ -2302,14 +2302,11 @@ V{ } 3 test-bb V{ - T{ ##phi f 3 } + T{ ##phi f 3 H{ { 2 1 } { 3 2 } } } T{ ##replace f 3 D 0 } T{ ##return } } 4 test-bb -2 get 1 2array -3 get 2 2array 2array 4 get instructions>> first (>>inputs) - test-diamond [ ] [ @@ -2341,7 +2338,7 @@ V{ } 2 test-bb V{ - T{ ##phi f 3 V{ } } + T{ ##phi f 3 H{ { 1 1 } { 2 0 } } } T{ ##branch } } 3 test-bb @@ -2350,9 +2347,6 @@ V{ T{ ##return } } 4 test-bb -1 get 1 2array -2 get 0 2array 2array 3 get instructions>> first (>>inputs) - test-diamond [ ] [