compiler.codegen.fixup: remove unused variable
parent
73ff8ffed1
commit
acfbea3865
|
@ -2,13 +2,13 @@ USING: compiler.codegen.fixup tools.test cpu.architecture math kernel make
|
||||||
compiler.constants words ;
|
compiler.constants words ;
|
||||||
IN: compiler.codegen.tests
|
IN: compiler.codegen.tests
|
||||||
|
|
||||||
[ ] [ gensym [ ] with-fixup drop ] unit-test
|
[ ] [ [ ] with-fixup drop ] unit-test
|
||||||
[ ] [ gensym [ \ + %call ] 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
|
[ ] [ [ <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 B{ 0 0 0 0 } % rc-absolute-cell label-fixup ] with-fixup drop ] unit-test
|
||||||
|
|
||||||
! Error checking
|
! Error checking
|
||||||
[ gensym [ <label> dup define-label %jump-label ] with-fixup ] must-fail
|
[ [ <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
|
[ [ <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 B{ 0 0 0 0 } % rc-absolute-cell label-fixup ] with-fixup ] must-fail
|
||||||
|
|
|
@ -82,7 +82,7 @@ M: ##dispatch generate-insn
|
||||||
] tri ;
|
] tri ;
|
||||||
|
|
||||||
: generate ( cfg -- code )
|
: generate ( cfg -- code )
|
||||||
dup label>> [
|
[
|
||||||
H{ } clone labels set
|
H{ } clone labels set
|
||||||
linearization-order
|
linearization-order
|
||||||
[ number-blocks ] [ [ generate-block ] each ] bi
|
[ number-blocks ] [ [ generate-block ] each ] bi
|
||||||
|
|
|
@ -12,9 +12,6 @@ IN: compiler.codegen.fixup
|
||||||
[ length ] [ B{ 0 0 0 0 } swap push-all ] [ underlying>> ] tri
|
[ length ] [ B{ 0 0 0 0 } swap push-all ] [ underlying>> ] tri
|
||||||
swap set-alien-unsigned-4 ;
|
swap set-alien-unsigned-4 ;
|
||||||
|
|
||||||
! Owner
|
|
||||||
SYMBOL: compiling-word
|
|
||||||
|
|
||||||
! Parameter table
|
! Parameter table
|
||||||
SYMBOL: parameter-table
|
SYMBOL: parameter-table
|
||||||
|
|
||||||
|
@ -115,8 +112,7 @@ MEMO: cached-string>symbol ( symbol -- obj ) string>symbol ;
|
||||||
[ [ compute-relative-label ] map concat ]
|
[ [ compute-relative-label ] map concat ]
|
||||||
bi* ;
|
bi* ;
|
||||||
|
|
||||||
: init-fixup ( word -- )
|
: init-fixup ( -- )
|
||||||
compiling-word set
|
|
||||||
V{ } clone parameter-table set
|
V{ } clone parameter-table set
|
||||||
V{ } clone literal-table set
|
V{ } clone literal-table set
|
||||||
V{ } clone label-table set
|
V{ } clone label-table set
|
||||||
|
@ -140,7 +136,7 @@ MEMO: cached-string>symbol ( symbol -- obj ) string>symbol ;
|
||||||
: emit-binary-literals ( -- )
|
: emit-binary-literals ( -- )
|
||||||
binary-literal-table get [ emit-data ] assoc-each ;
|
binary-literal-table get [ emit-data ] assoc-each ;
|
||||||
|
|
||||||
: with-fixup ( word quot -- code )
|
: with-fixup ( quot -- code )
|
||||||
'[
|
'[
|
||||||
init-fixup
|
init-fixup
|
||||||
@
|
@
|
||||||
|
|
Loading…
Reference in New Issue