Merge git://factorcode.org/git/factor

db4
Doug Coleman 2008-01-12 17:44:15 -10:00
commit aa08a1f5f6
4 changed files with 13 additions and 3 deletions

View File

@ -17,7 +17,7 @@ IN: bootstrap.compiler
"cpu." cpu append require
nl
"Compiling some words to speed up bootstrap..." write
"Compiling some words to speed up bootstrap..." write flush
! Compile a set of words ahead of the full compile.
! This set of words was determined semi-empirically

View File

@ -450,6 +450,14 @@ cell 8 = [
16 -3 [ fixnum-shift-fast ] compile-call
] unit-test
[ 2 ] [
16 [ -3 fixnum-shift-fast ] compile-call
] unit-test
[ 8 ] [
1 3 [ fixnum-shift-fast ] compile-call
] unit-test
[ 8 ] [
1 [ 3 fixnum-shift-fast ] compile-call
] unit-test

View File

@ -172,7 +172,8 @@ IN: cpu.ppc.intrinsics
\ fixnum-shift-fast {
{
[
"out" operand "x" operand "y" get neg SRAWI
"out" operand "x" operand "y" get
dup 0 < [ neg SRAWI ] [ swapd SLWI ] if
! Mask off low bits
"out" operand dup %untag
] H{
@ -199,6 +200,7 @@ IN: cpu.ppc.intrinsics
{ +input+ { { f "x" } { f "y" } } }
{ +scratch+ { { f "out" } } }
{ +output+ { "out" } }
{ +clobber+ { "x" "y" } }
}
}
} define-intrinsics

View File

@ -120,7 +120,7 @@ HELP: fixnum-shift ( x y -- z )
{ $description "Primitive version of " { $link shift } ". The result may overflow to a bignum." }
{ $warning "This word does not perform type checking, and passing objects of the wrong type can crash the runtime. User code should call the generic word " { $link shift } " instead." } ;
HELP: fixnum-shift-shift ( x y -- z )
HELP: fixnum-shift-fast ( x y -- z )
{ $values { "x" fixnum } { "y" fixnum } { "z" fixnum } }
{ $description "Primitive version of " { $link shift } ". Unlike " { $link fixnum-shift } ", does not perform an overflow check, so the result may be incorrect." }
{ $warning "This word does not perform type checking, and passing objects of the wrong type can crash the runtime. User code should call the generic word " { $link shift } " instead." } ;