compiler.*: fix the tests that broke because i removed the stack-frame variable
parent
eba939c0f2
commit
80ea6b8997
|
@ -1,5 +1,5 @@
|
||||||
USING: accessors alien.c-types arrays bit-arrays classes.struct
|
USING: accessors alien.c-types arrays bit-arrays classes.struct compiler.cfg
|
||||||
compiler.cfg.instructions compiler.cfg.stack-frame
|
compiler.cfg.instructions compiler.cfg.stack-frame compiler.cfg.utilities
|
||||||
compiler.codegen.gc-maps compiler.codegen.relocation cpu.architecture
|
compiler.codegen.gc-maps compiler.codegen.relocation cpu.architecture
|
||||||
cpu.x86 byte-arrays make namespaces kernel layouts math sequences
|
cpu.x86 byte-arrays make namespaces kernel layouts math sequences
|
||||||
specialized-arrays system tools.test ;
|
specialized-arrays system tools.test ;
|
||||||
|
@ -78,12 +78,16 @@ M: linux-x86.64 reserved-stack-space 0 ;
|
||||||
M: linux-x86.64 gc-root-offset
|
M: linux-x86.64 gc-root-offset
|
||||||
n>> spill-offset cell + cell /i ;
|
n>> spill-offset cell + cell /i ;
|
||||||
|
|
||||||
|
: cfg-w-spill-area-base ( base -- cfg )
|
||||||
|
stack-frame new swap >>spill-area-base
|
||||||
|
{ } insns>cfg swap >>stack-frame ;
|
||||||
|
|
||||||
cpu x86.64? [
|
cpu x86.64? [
|
||||||
linux-x86.64 \ cpu set
|
linux-x86.64 \ cpu set
|
||||||
|
|
||||||
! gc-root-offsets
|
! gc-root-offsets
|
||||||
{ { 1 3 } } [
|
{ { 1 3 } } [
|
||||||
T{ stack-frame { spill-area-base 0 } } stack-frame [
|
0 cfg-w-spill-area-base cfg [
|
||||||
T{ gc-map
|
T{ gc-map
|
||||||
{ gc-roots {
|
{ gc-roots {
|
||||||
T{ spill-slot { n 0 } }
|
T{ spill-slot { n 0 } }
|
||||||
|
@ -94,7 +98,7 @@ cpu x86.64? [
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
{ { 6 10 } } [
|
{ { 6 10 } } [
|
||||||
T{ stack-frame { spill-area-base 32 } } stack-frame [
|
32 cfg-w-spill-area-base cfg [
|
||||||
T{ gc-map
|
T{ gc-map
|
||||||
{ gc-roots {
|
{ gc-roots {
|
||||||
T{ spill-slot { n 8 } }
|
T{ spill-slot { n 8 } }
|
||||||
|
@ -106,7 +110,7 @@ cpu x86.64? [
|
||||||
|
|
||||||
! scrub-d scrub-r gc-roots
|
! scrub-d scrub-r gc-roots
|
||||||
{ { 0 0 5 } } [
|
{ { 0 0 5 } } [
|
||||||
T{ stack-frame { spill-area-base 0 } } stack-frame [
|
0 cfg-w-spill-area-base cfg [
|
||||||
T{ gc-map
|
T{ gc-map
|
||||||
{ gc-roots {
|
{ gc-roots {
|
||||||
T{ spill-slot { n 0 } }
|
T{ spill-slot { n 0 } }
|
||||||
|
@ -119,7 +123,7 @@ cpu x86.64? [
|
||||||
|
|
||||||
! scrub-d scrub-r gc-roots
|
! scrub-d scrub-r gc-roots
|
||||||
{ { 0 0 9 } } [
|
{ { 0 0 9 } } [
|
||||||
T{ stack-frame { spill-area-base 32 } } stack-frame [
|
32 cfg-w-spill-area-base cfg [
|
||||||
T{ gc-map
|
T{ gc-map
|
||||||
{ gc-roots {
|
{ gc-roots {
|
||||||
T{ spill-slot { n 0 } }
|
T{ spill-slot { n 0 } }
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
USING: accessors compiler.cfg.instructions compiler.cfg.stack-frame
|
USING: accessors compiler.cfg compiler.cfg.instructions
|
||||||
cpu.architecture cpu.x86 kernel layouts math namespaces system tools.test ;
|
compiler.cfg.stack-frame compiler.cfg.utilities cpu.architecture
|
||||||
|
cpu.x86 kernel layouts math namespaces system tools.test ;
|
||||||
IN: cpu.architecture.tests
|
IN: cpu.architecture.tests
|
||||||
|
|
||||||
|
: cfg-w-spill-area-base ( base -- cfg )
|
||||||
|
stack-frame new swap >>spill-area-base
|
||||||
|
{ } insns>cfg swap >>stack-frame ;
|
||||||
|
|
||||||
: expected-gc-root-offset ( slot-number spill-area-base -- offset )
|
: expected-gc-root-offset ( slot-number spill-area-base -- offset )
|
||||||
[ spill-slot boa ] [ stack-frame new swap >>spill-area-base ] bi*
|
[ spill-slot boa ] [ cfg-w-spill-area-base ] bi*
|
||||||
stack-frame [
|
cfg [
|
||||||
gc-root-offset reserved-stack-space cell / -
|
gc-root-offset reserved-stack-space cell / -
|
||||||
] with-variable ;
|
] with-variable ;
|
||||||
|
|
||||||
|
|
|
@ -36,17 +36,14 @@ QUALIFIED: opencl
|
||||||
|
|
||||||
! Like word>gc-info but uses the compiler
|
! Like word>gc-info but uses the compiler
|
||||||
: word>gc-info-expected ( word -- seq/f )
|
: word>gc-info-expected ( word -- seq/f )
|
||||||
test-regs first dup stack-frame>> stack-frame
|
test-regs first cfg>gc-maps tally-gc-maps ;
|
||||||
[ cfg>gc-maps tally-gc-maps ] with-variable ;
|
|
||||||
|
|
||||||
: same-gc-info? ( compiler-gc-info gc-info -- ? )
|
: same-gc-info? ( compiler-gc-info gc-info -- ? )
|
||||||
[ struct-slot-values = ]
|
[ struct-slot-values = ]
|
||||||
[ [ not ] dip return-address-count>> 0 = and ] 2bi or ;
|
[ [ not ] dip return-address-count>> 0 = and ] 2bi or ;
|
||||||
|
|
||||||
: base-pointer-groups-expected ( word -- seq )
|
: base-pointer-groups-expected ( word -- seq )
|
||||||
test-regs first dup stack-frame>> stack-frame [
|
test-regs first cfg>gc-maps [ derived-root-offsets { } like ] { } map-as ;
|
||||||
cfg>gc-maps [ derived-root-offsets { } like ] { } map-as
|
|
||||||
] with-variable ;
|
|
||||||
|
|
||||||
: base-pointer-groups-decoded ( word -- seq )
|
: base-pointer-groups-decoded ( word -- seq )
|
||||||
word>gc-maps [
|
word>gc-maps [
|
||||||
|
|
Loading…
Reference in New Issue