From 750c0b86b768a22d21e3d935b3aef0c7b8c69ea3 Mon Sep 17 00:00:00 2001 From: slava Date: Fri, 21 Apr 2006 20:51:01 +0000 Subject: [PATCH] Remove debugging code, fix typo in x86 backend --- library/compiler/templates.factor | 2 +- library/compiler/x86/generator.factor | 2 +- library/test/compiler/templates.factor | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/library/compiler/templates.factor b/library/compiler/templates.factor index fa0093132c..ea018a4c7a 100644 --- a/library/compiler/templates.factor +++ b/library/compiler/templates.factor @@ -90,7 +90,7 @@ SYMBOL: phantom-r : lazy-load ( value loc -- value ) over ds-loc? pick cs-loc? or [ dupd = [ - >r alloc-reg dup r> %peek , ! drop f + drop f ] [ >r alloc-reg dup r> %peek , ] if diff --git a/library/compiler/x86/generator.factor b/library/compiler/x86/generator.factor index 317aa8d5d8..1d272a03be 100644 --- a/library/compiler/x86/generator.factor +++ b/library/compiler/x86/generator.factor @@ -73,7 +73,7 @@ M: %type generate-node ( vop -- ) 0 scratch object-tag CMP "f" get JE ! The pointer is not equal to 3. Load the object header. - 0 output-operand ECX object-tag neg [+] MOV + 0 output-operand 0 scratch object-tag neg [+] MOV ! Mask off header tag, making a fixnum. 0 output-operand object-tag XOR "end" get JMP diff --git a/library/test/compiler/templates.factor b/library/test/compiler/templates.factor index 54862ae6eb..dadaf1650d 100644 --- a/library/test/compiler/templates.factor +++ b/library/test/compiler/templates.factor @@ -18,6 +18,9 @@ math-internals namespaces test ; [ 2 3 4 ] [ 3 [ 2 swap 4 ] compile-1 ] unit-test +[ { 1 2 3 } { 1 4 3 } 3 3 ] +[ { 1 2 3 } { 1 4 3 } [ over tag over tag ] compile-1 ] + [ { 1 2 3 } { 1 4 3 } 8 8 ] [ { 1 2 3 } { 1 4 3 } [ over type over type ] compile-1 ] unit-test