SmallInteger.st
changeset 4613 a722d598c1bb
parent 4523 28d9633c9cb4
child 4644 2003eaf6381d
--- a/SmallInteger.st	Thu Aug 19 02:12:12 1999 +0200
+++ b/SmallInteger.st	Thu Aug 19 02:14:26 1999 +0200
@@ -743,9 +743,12 @@
 
     /* anding the tags doesn't change it */
     if (__isSmallInteger(anInteger)) {
-	RETURN ( ((OBJ) ((INT)self & (INT)anInteger)) );
+        RETURN ( ((OBJ) ((INT)self & (INT)anInteger)) );
     }
 %}.
+    anInteger class == LargeInteger ifTrue:[
+        ^ anInteger bitAnd:self
+    ].
     ^ self retry:#bitAnd: coercing:anInteger
 
     "(2r001010100 bitAnd:2r00001111) radixPrintStringRadix:2"
@@ -935,9 +938,12 @@
 
     /* and all bits except tag */
     if (__isSmallInteger(aMask)) {
-	RETURN ( ((INT)self & ((INT)aMask & ~TAG_MASK)) ? true : false );
+        RETURN ( ((INT)self & ((INT)aMask & ~TAG_MASK)) ? true : false );
     }
 %}.
+    aMask class == LargeInteger ifTrue:[
+        ^ (aMask bitAnd:self) ~~ 0
+    ].
     ^ self retry:#bitTest: coercing:aMask
 !
 
@@ -2901,5 +2907,5 @@
 !SmallInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.116 1999-08-04 14:10:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.117 1999-08-19 00:14:26 cg Exp $'
 ! !