]> gitweb.factorcode.org Git - factor.git/commitdiff
fix a few compilation mishaps
authorSlava Pestov <slava@factorcode.org>
Sat, 3 Sep 2005 22:34:50 +0000 (22:34 +0000)
committerSlava Pestov <slava@factorcode.org>
Sat, 3 Sep 2005 22:34:50 +0000 (22:34 +0000)
library/alien/c-types.factor
library/bootstrap/image.factor
library/compiler/generator.factor
library/compiler/ppc/generator.factor
library/compiler/x86/generator.factor
library/test/compiler/intrinsics.factor
library/unix/io.factor

index 90b0ddf0f355295ec13ac81f1ed759ca1a2dadfe..4e67313de4eee2799950fe2d53fedc1294dce9d8 100644 (file)
@@ -27,6 +27,7 @@ SYMBOL: c-types
 
 : define-c-type ( quot name -- )
     >r <c-type> [ swap bind ] keep r> c-types get set-hash ;
+    inline
 
 : <c-object> ( size -- c-ptr ) cell / ceiling <byte-array> ;
 
index e035c8e371856d9f7d613eab66746c433b33dd47..a01bd70bf816de093255669e5e1b29265b06d248 100644 (file)
@@ -160,7 +160,7 @@ M: f ' ( obj -- ptr )
 
 : word-error ( word msg -- )
     [ % dup word-vocabulary % " " % word-name % ] "" make
-    throw ;
+    throw ; inline
 
 : transfer-word ( word -- word )
     #! This is a hack. See doc/bootstrap.txt.
index 2ad15605a943921831fa8d21dd754de1dc712145..f4a1ebb035e544e26549d9bd3ac8eb09100658c3 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factor.sf.net/license.txt for BSD license.
 IN: compiler-backend
 USING: assembler compiler errors inference kernel lists math
-namespaces sequences strings vectors words ;
+memory namespaces sequences strings vectors words ;
 
 ! Compile a VOP.
 GENERIC: generate-node ( vop -- )
@@ -59,6 +59,10 @@ M: %target generate-node
 
 GENERIC: v>operand
 
+M: integer v>operand tag-bits shift ;
+
+M: f v>operand address ;
+
 : dest/src ( vop -- dest src )
     dup vop-out-1 v>operand swap vop-in-1 v>operand ;
 
index d295095b680d742a08d7a176b95235f010723ef9..04ad2558956ca6fdd0c93b8abc5cd542c127ae19 100644 (file)
@@ -12,7 +12,6 @@ kernel-internals lists math memory namespaces words ;
 : compile-c-call ( symbol dll -- )
     2dup dlsym  19 LOAD32  0 1 rel-dlsym  19 MTLR  BLRL ;
 
-M: integer v>operand tag-bits shift ;
 M: vreg v>operand vreg-n 17 + ;
 
 M: %prologue generate-node ( vop -- )
index b00f88b530f64255585e86f447139905c1da6172..aa3f55dee684230bc6fc0b552847f6fc2a99190e 100644 (file)
@@ -4,7 +4,6 @@ IN: compiler-backend
 USING: alien assembler compiler inference kernel
 kernel-internals lists math memory namespaces sequences words ;
 
-M: integer v>operand tag-bits shift ;
 M: vreg v>operand vreg-n { EAX ECX EDX } nth ;
 
 ! Not used on x86
index 6896328cd6c9359b4291b01e773a7d00c6a14187..b0e74681d1550c955455f737fc74d3e732e64526 100644 (file)
@@ -163,3 +163,5 @@ math-internals test words ;
 [ t ] [ 1 20 shift neg 1 20 shift neg [ fixnum* ] compile-1 1 40 shift = ] unit-test
 
 [ 268435456 ] [ -268435456 >fixnum -1 [ fixnum/i ] compile-1 ] unit-test
+
+[ t ] [ f [ f eq? ] compile-1 ] unit-test
index 1739f68426f7aeb94f88e92427c2b0f72f79675b..f02fe715e13af7fa3378d6489114f3023b181be6 100644 (file)
@@ -83,7 +83,7 @@ M: port set-timeout ( timeout port -- )
 : defer-error ( port -- ? )
     #! Return t if it is an unrecoverable error.
     err_no dup EAGAIN = over EINTR = or
-    [ 2drop f ] [ strerror swap report-error ] ifte ;
+    [ 2drop f ] [ strerror swap report-error ] ifte ;
 
 ! Associates a port with a list of continuations waiting on the
 ! port to finish I/O