]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.codegen.fixup: remove unused variable
authorSlava Pestov <slava@factorcode.org>
Mon, 10 May 2010 04:42:03 +0000 (00:42 -0400)
committerSlava Pestov <slava@factorcode.org>
Mon, 10 May 2010 04:45:48 +0000 (00:45 -0400)
basis/compiler/codegen/codegen-tests.factor
basis/compiler/codegen/codegen.factor
basis/compiler/codegen/fixup/fixup.factor

index 43473ebcbb20bcf05bcc760ce63b56ae236fef26..a02462dc084a8c30ae34cf0a91f789c8460ddd53 100644 (file)
@@ -2,13 +2,13 @@ USING: compiler.codegen.fixup tools.test cpu.architecture math kernel make
 compiler.constants words ;
 IN: compiler.codegen.tests
 
-[ ] [ gensym [ ] with-fixup drop ] unit-test
-[ ] [ gensym [ \ + %call ] with-fixup drop ] unit-test
+[ ] [ [ ] with-fixup drop ] unit-test
+[ ] [ [ \ + %call ] with-fixup drop ] unit-test
 
-[ ] [ gensym [ <label> dup define-label dup resolve-label %jump-label ] with-fixup drop ] unit-test
-[ ] [ gensym [ <label> dup define-label dup resolve-label B{ 0 0 0 0 } % rc-absolute-cell label-fixup ] with-fixup drop ] unit-test
+[ ] [ [ <label> dup define-label dup resolve-label %jump-label ] with-fixup drop ] unit-test
+[ ] [ [ <label> dup define-label dup resolve-label B{ 0 0 0 0 } % rc-absolute-cell label-fixup ] with-fixup drop ] unit-test
 
 ! Error checking
-[ gensym [ <label> dup define-label %jump-label ] with-fixup ] must-fail
-[ gensym [ <label> dup define-label B{ 0 0 0 0 } % rc-relative label-fixup ] with-fixup ] must-fail
-[ gensym [ <label> dup define-label B{ 0 0 0 0 } % rc-absolute-cell label-fixup ] with-fixup ] must-fail
+[ [ <label> dup define-label %jump-label ] with-fixup ] must-fail
+[ [ <label> dup define-label B{ 0 0 0 0 } % rc-relative label-fixup ] with-fixup ] must-fail
+[ [ <label> dup define-label B{ 0 0 0 0 } % rc-absolute-cell label-fixup ] with-fixup ] must-fail
index a106e55e8183293abd1adf1500170ed414a9010c..01db9ac97ba73aa8c3a0915ef4a048714b59c286 100755 (executable)
@@ -82,7 +82,7 @@ M: ##dispatch generate-insn
     ] tri ;
 
 : generate ( cfg -- code )
-    dup label>> [
+    [
         H{ } clone labels set
         linearization-order
         [ number-blocks ] [ [ generate-block ] each ] bi
index 4bae4f96dae7a6501580b0edeed7b80b13c2cabb..518efc8055e3d54f852615f8fe81f61555a3c6d2 100644 (file)
@@ -12,9 +12,6 @@ IN: compiler.codegen.fixup
     [ length ] [ B{ 0 0 0 0 } swap push-all ] [ underlying>> ] tri
     swap set-alien-unsigned-4 ;
 
-! Owner
-SYMBOL: compiling-word
-
 ! Parameter table
 SYMBOL: parameter-table
 
@@ -115,8 +112,7 @@ MEMO: cached-string>symbol ( symbol -- obj ) string>symbol ;
     [ [ compute-relative-label ] map concat ]
     bi* ;
 
-: init-fixup ( word -- )
-    compiling-word set
+: init-fixup ( -- )
     V{ } clone parameter-table set
     V{ } clone literal-table set
     V{ } clone label-table set
@@ -140,7 +136,7 @@ MEMO: cached-string>symbol ( symbol -- obj ) string>symbol ;
 : emit-binary-literals ( -- )
     binary-literal-table get [ emit-data ] assoc-each ;
 
-: with-fixup ( word quot -- code )
+: with-fixup ( quot -- code )
     '[
         init-fixup
         @