--- a/SmallInteger.st Mon May 18 17:20:47 2015 +0200
+++ b/SmallInteger.st Mon May 18 17:23:41 2015 +0200
@@ -1466,6 +1466,30 @@
%{ /* NOCONTEXT */
#ifdef __SCHTEAM__
+ long bits = self.longValue();
+ int index = 0;
+
+ if (bits != 0) {
+ if ((bits & 0xFFFFFFFFL)==0) {
+ index += 32; bits >>= 32;
+ }
+ if ((bits & 0xFFFFL)==0) {
+ index += 16; bits >>= 16;
+ }
+ if ((bits & 0xFFL)==0) {
+ index += 8; bits >>= 8;
+ }
+ if ((bits & 0xFL)==0) {
+ index += 4; bits >>= 4;
+ }
+ if ((bits & 0x3L)==0) {
+ index += 2; bits >>= 2;
+ }
+ if ((bits & 0x1L)==0) {
+ index += 1;
+ }
+ }
+ return __c__._RETURN( STInteger._qnew( index ) );
#else
unsigned INT bits;
int index;
@@ -1514,7 +1538,7 @@
RETURN ( __mkSmallInteger(index) );
#endif /* not __SCHTEAM__ */
%}.
- ^ super lowBit
+ self primitiveFailed "/ must be implemented (or else: recursion)
"
0 lowBit
@@ -4834,11 +4858,11 @@
!SmallInteger class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.234 2015-04-26 11:30:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.235 2015-05-18 15:23:41 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.234 2015-04-26 11:30:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.235 2015-05-18 15:23:41 cg Exp $'
! !