equal
deleted
inserted
replaced
1 "{ Encoding: utf8 }" |
|
2 |
|
3 " |
1 " |
4 COPYRIGHT (c) 1988 by Claus Gittinger |
2 COPYRIGHT (c) 1988 by Claus Gittinger |
5 All Rights Reserved |
3 All Rights Reserved |
6 |
4 |
7 This software is furnished under a license and may be used |
5 This software is furnished under a license and may be used |
961 7 quo: (-4/3) |
959 7 quo: (-4/3) |
962 " |
960 " |
963 ! ! |
961 ! ! |
964 |
962 |
965 |
963 |
966 |
|
967 !SmallInteger methodsFor:'bit operators'! |
964 !SmallInteger methodsFor:'bit operators'! |
968 |
965 |
969 bitAnd:anInteger |
966 bitAnd:anInteger |
970 "return the bitwise-and of the receiver and the argument, anInteger" |
967 "return the bitwise-and of the receiver and the argument, anInteger" |
971 |
968 |
1071 |
1068 |
1072 %{ /* NOCONTEXT */ |
1069 %{ /* NOCONTEXT */ |
1073 #ifdef __SCHTEAM__ |
1070 #ifdef __SCHTEAM__ |
1074 long _v1, _v2; |
1071 long _v1, _v2; |
1075 long _self = self.longValue(); |
1072 long _self = self.longValue(); |
1076 |
1073 int _cnt; |
|
1074 |
1077 _v1 = _self & 0xFFFFFFFF; |
1075 _v1 = _self & 0xFFFFFFFF; |
1078 _v1 = _v1 - ((_v1 >> 1) & 0x55555555); |
1076 _v1 = _v1 - ((_v1 >> 1) & 0x55555555); |
1079 _v1 = (_v1 & 0x33333333) + ((_v1 >> 2) & 0x33333333); |
1077 _v1 = (_v1 & 0x33333333) + ((_v1 >> 2) & 0x33333333); |
1080 _v1 = ((_v1 + (_v1 >> 4)) & 0x0F0F0F0F); |
1078 _v1 = ((_v1 + (_v1 >> 4)) & 0x0F0F0F0F); |
1081 |
1079 |