layouts: Add 32bit? and 64bit? words.
parent
2b4d2a4a13
commit
3a5533dc44
|
@ -225,7 +225,7 @@ M: float detect-float ;
|
|||
{ shift fixnum-shift } inlined?
|
||||
] unit-test
|
||||
|
||||
cell-bits 32 = [
|
||||
32bit? [
|
||||
[ t ] [
|
||||
[ { fixnum fixnum } declare 1 swap 31 bitand shift ]
|
||||
\ shift inlined?
|
||||
|
|
|
@ -492,7 +492,7 @@ IN: compiler.tree.propagation.tests
|
|||
[ { fixnum } declare 1 swap 7 bitand >bignum shift ] final-classes
|
||||
] unit-test
|
||||
|
||||
cell-bits 32 = [
|
||||
32bit? [
|
||||
[ V{ integer } ] [
|
||||
[ { fixnum } declare 1 swap 31 bitand shift ]
|
||||
final-classes
|
||||
|
|
|
@ -48,6 +48,10 @@ SYMBOL: header-bits
|
|||
|
||||
: cell-bits ( -- n ) 8 cells ; inline
|
||||
|
||||
: 32bit? ( -- ? ) cell-bits 32 = ; inline
|
||||
|
||||
: 64bit? ( -- ? ) cell-bits 64 = ; inline
|
||||
|
||||
: bootstrap-cell ( -- n ) \ cell get cell or ; inline
|
||||
|
||||
: bootstrap-cells ( m -- n ) bootstrap-cell * ; inline
|
||||
|
|
Loading…
Reference in New Issue