compiler.codegen.fixup: remove unused variable

db4
Slava Pestov 2010-05-10 00:42:03 -04:00
parent 73ff8ffed1
commit acfbea3865
3 changed files with 10 additions and 14 deletions

View 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

View File

@ -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

View 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
@