]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.codegen.*: removing the init-gc-maps word
authorBjörn Lindqvist <bjourne@gmail.com>
Fri, 9 Sep 2016 16:57:57 +0000 (18:57 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Fri, 9 Sep 2016 16:57:57 +0000 (18:57 +0200)
basis/compiler/codegen/codegen.factor
basis/compiler/codegen/gc-maps/gc-maps-tests.factor
basis/compiler/codegen/gc-maps/gc-maps.factor
basis/cpu/x86/x86-tests.factor

index 27e1c1d1c9a41c8d28c7af74a79d9147a0e5a638..2dcb25fe2e05c32da08eebd894d79c9a2fc0eb68 100755 (executable)
@@ -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
         [
             @
index d7f79e4d8fceabf0dcb67c625b5127f50f54f0ca..7b86f8dbba93cbf1b8823f1b53e96fcacfa52366 100644 (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> %
 
index e78e0d04b7d984bb4c9d80ce43765ab6b6d438f9..35f8d8e10ce790618d5400d9f2fe1ce806d20348 100644 (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 +
index 5c3efd11c5ab5b04da6bd1f1167a37c11e61356d..61206f4c51c49eb8c0ce76f38672041b00ecc9f9 100644 (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