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