compiler.codegen.*: removing the init-gc-maps word

char-rename
Björn Lindqvist 2016-09-09 18:57:57 +02:00
parent 2f71e91dce
commit faaa898975
4 changed files with 17 additions and 19 deletions

View File

@ -81,7 +81,8 @@ M: ##dispatch generate-insn
: with-fixup ( quot -- code )
'[
init-relocation
init-gc-maps
V{ } clone return-addresses set
V{ } clone gc-maps set
init-fixup
[
@

View File

@ -15,7 +15,8 @@ M: fake-cpu gc-root-offset ;
[
init-relocation
init-gc-maps
V{ } clone return-addresses set
V{ } clone gc-maps set
50 <byte-array> %

View File

@ -68,10 +68,6 @@ SYMBOLS: return-addresses gc-maps ;
return-addresses get length emit-uint
] B{ } make ;
: init-gc-maps ( -- )
V{ } clone return-addresses set
V{ } clone gc-maps set ;
: emit-gc-maps ( -- )
serialize-gc-maps [
length compiled-offset +

View File

@ -1,8 +1,9 @@
USING: compiler.cfg.instructions compiler.cfg.registers
compiler.codegen.gc-maps compiler.codegen.relocation compiler.test
cpu.architecture cpu.x86 cpu.x86.assembler cpu.x86.assembler.operands
cpu.x86.features kernel kernel.private layouts literals make math
math.libm namespaces sequences system tools.test ;
compiler.codegen compiler.codegen.gc-maps compiler.codegen.relocation
compiler.test cpu.architecture cpu.x86 cpu.x86.assembler
cpu.x86.assembler.operands cpu.x86.features kernel kernel.private
layouts literals make math math.libm namespaces sequences system
tools.test ;
IN: cpu.x86.tests
{ } [
@ -39,23 +40,22 @@ cpu x86.64? [
! %alien-invoke
{ 1 } [
init-relocation init-gc-maps [
[
f { } { } { } { } 0 0 { } "dll" T{ gc-map { scrub-d V{ 0 } } } %alien-invoke
] B{ } make drop
gc-maps get length
] with-fixup drop gc-maps get length
] unit-test
! %call-gc
{ V{ } } [
init-relocation init-gc-maps
[ T{ gc-map { scrub-d V{ } } } %call-gc ] B{ } make drop
gc-maps get
[
T{ gc-map { scrub-d V{ } } } %call-gc
] with-fixup drop gc-maps get
] unit-test
{ 1 } [
init-relocation init-gc-maps
[ T{ gc-map { scrub-d V{ 0 0 } } } %call-gc ] B{ } make drop
gc-maps get length
[
T{ gc-map { scrub-d V{ 0 0 } } } %call-gc
] with-fixup drop gc-maps get length
] unit-test
! %clear