]> gitweb.factorcode.org Git - factor.git/commitdiff
layouts: Add 32bit? and 64bit? words.
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 22 Jul 2018 16:34:29 +0000 (11:34 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 22 Jul 2018 16:46:01 +0000 (11:46 -0500)
basis/compiler/tree/cleanup/cleanup-tests.factor
basis/compiler/tree/propagation/propagation-tests.factor
core/layouts/layouts.factor

index 53a4ce8fdabbde178b298aeb326af67dd85620ee..1e6f85f92e7a0a9d9bc5674478b4cacb7d854179 100644 (file)
@@ -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?
index a63364f10eb2aadb0f896d7a0fef77c7d90cb862..37460dffc064de2454a3c8a727ac98c7593510e2 100644 (file)
@@ -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
index 9f5b7b95ba219b75a0296ebcdc552de4ee0676dd..f72bb3bcd4a541261c8b13594928b37c41a09276 100644 (file)
@@ -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