diff --git a/core/compiler/test/redefine.factor b/core/compiler/test/redefine.factor index 821daef203..4f0c18dfd2 100755 --- a/core/compiler/test/redefine.factor +++ b/core/compiler/test/redefine.factor @@ -17,7 +17,7 @@ DEFER: x-2 { x-1 } compile - \ x-2 word-xt eq? + \ x-2 word-xt = ] unit-test ] with-variable diff --git a/core/cpu/x86/architecture/architecture.factor b/core/cpu/x86/architecture/architecture.factor index 96b2dcf1ec..876c631b81 100755 --- a/core/cpu/x86/architecture/architecture.factor +++ b/core/cpu/x86/architecture/architecture.factor @@ -85,7 +85,7 @@ M: x86-backend %jump-label ( label -- ) JMP ; M: x86-backend %jump-t ( label -- ) "flag" operand f v>operand CMP JNE ; -: (%dispatch) ( -- operand ) +: (%dispatch) ( n -- operand ) ! Load jump table base. We use a temporary register ! since on AMD64 we have to load a 64-bit immediate. On ! x86, this is redundant. @@ -94,18 +94,20 @@ M: x86-backend %jump-t ( label -- ) ! Add jump table base "offset" operand HEX: ffffffff MOV rc-absolute-cell rel-here "n" operand "offset" operand ADD - "n" operand bootstrap-cell 8 = 14 9 ? [+] ; + "n" operand swap bootstrap-cell 8 = 14 9 ? + [+] ; M: x86-backend %call-dispatch ( word-table# -- ) - [ (%dispatch) CALL <label> dup JMP ] H{ + [ 5 (%dispatch) CALL <label> dup JMP ] H{ { +input+ { { f "n" } } } { +scratch+ { { f "offset" } } } + { +clobber+ { "n" } } } with-template ; M: x86-backend %jump-dispatch ( -- ) - [ %epilogue-later (%dispatch) JMP ] H{ + [ %epilogue-later 0 (%dispatch) JMP ] H{ { +input+ { { f "n" } } } { +scratch+ { { f "offset" } } } + { +clobber+ { "n" } } } with-template ; M: x86-backend %dispatch-label ( word -- ) diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index 2cb308b619..c294c23738 100755 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -1,6 +1,6 @@ USING: arrays byte-arrays kernel kernel.private math memory namespaces sequences tools.test math.private quotations -continuations prettyprint io.streams.string debugger ; +continuations prettyprint io.streams.string debugger assocs ; IN: temporary [ 0 ] [ f size ] unit-test