From a77efca4c1671522b9359bb8522ea0545c523dab Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 8 May 2005 02:53:01 +0000 Subject: [PATCH] fix type and arithmetic-type intrinsics --- library/compiler/intrinsics.factor | 1 + library/compiler/vops.factor | 6 ++---- library/compiler/x86/generator.factor | 4 ++-- library/test/compiler/intrinsics.factor | 8 ++++++++ library/test/test.factor | 16 ++++++++++------ native/arithmetic.c | 2 +- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/library/compiler/intrinsics.factor b/library/compiler/intrinsics.factor index 684a08da31..b0e6c7c3a1 100644 --- a/library/compiler/intrinsics.factor +++ b/library/compiler/intrinsics.factor @@ -137,6 +137,7 @@ words ; in-1 0 %arithmetic-type , 0 %tag-fixnum , + 1 %inc-d , out-1 ] "linearizer" set-word-prop diff --git a/library/compiler/vops.factor b/library/compiler/vops.factor index 47cf2c4c83..7378645858 100644 --- a/library/compiler/vops.factor +++ b/library/compiler/vops.factor @@ -135,12 +135,10 @@ VOP: %type : %type ( vreg ) dest-vop <%type> ; VOP: %arithmetic-type -: %arithmetic-type empty-vop <%arithmetic-type> ; +: %arithmetic-type dest-vop <%arithmetic-type> ; VOP: %tag-fixnum : %tag-fixnum dest-vop <%tag-fixnum> ; : check-dest ( vop reg -- ) - swap vop-dest v>operand = [ - "invalid VOP destination" throw - ] unless ; + swap vop-dest = [ "invalid VOP destination" throw ] unless ; diff --git a/library/compiler/x86/generator.factor b/library/compiler/x86/generator.factor index a4a3240013..c44baa0d5b 100644 --- a/library/compiler/x86/generator.factor +++ b/library/compiler/x86/generator.factor @@ -125,7 +125,7 @@ M: %type generate-node ( vop -- ) M: %arithmetic-type generate-node ( vop -- ) #! This one works directly with the stack. It outputs an #! UNBOXED value in vop-dest. - EAX check-dest + 0 check-dest