fix a few compilation mishaps

cvs
Slava Pestov 2005-09-03 22:34:50 +00:00
parent 74430b8b18
commit 6617d6e2d3
7 changed files with 10 additions and 5 deletions

View 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> ;

View 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.

View 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 ;

View 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 -- )

View 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

View 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

View 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 t ] ifte ;
! Associates a port with a list of continuations waiting on the
! port to finish I/O