--- a/SmallInteger.st Thu May 12 04:07:15 1994 +0200
+++ b/SmallInteger.st Tue May 17 12:09:46 1994 +0200
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.11 1994-03-30 09:34:02 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.12 1994-05-17 10:09:08 claus Exp $
'!
!SmallInteger class methodsFor:'documentation'!
@@ -675,12 +675,14 @@
static struct inlineCache val = _ILC5;
OBJ aLarge;
- aLarge = (*val.ilc_func)(LargeInteger, _sign_value16_value16_value16_value16_, CON_COMMA nil, &val,
- negative ? _MKSMALLINT(-1) : _MKSMALLINT(1),
- _MKSMALLINT(lowBits(productLow)),
- _MKSMALLINT(hiBits(productLow)),
- _MKSMALLINT(lowBits(productHi)),
- _MKSMALLINT(hiBits(productHi)) );
+ aLarge = (*val.ilc_func)(LargeInteger,
+ @symbol(sign:value16:value16:value16:value16:),
+ CON_COMMA nil, &val,
+ negative ? _MKSMALLINT(-1) : _MKSMALLINT(1),
+ _MKSMALLINT(lowBits(productLow)),
+ _MKSMALLINT(hiBits(productLow)),
+ _MKSMALLINT(lowBits(productHi)),
+ _MKSMALLINT(hiBits(productHi)) );
RETURN(aLarge);
}
#endif
@@ -1162,9 +1164,11 @@
#endif
}
}
-%}
-.
- self primitiveFailed
+%}.
+ index > 0 ifFalse:[
+ self primitiveFailed
+ ].
+ ^ 0
"(16r12345678 digitAt:1) printStringRadix:16"
"(16r12345678 digitAt:3) printStringRadix:16"
@@ -1293,7 +1297,7 @@
and the argument, stop.
Reimplemented for speed"
- |home index|
+ |home|
%{
REGISTER INT tmp;
INT final;
@@ -1314,7 +1318,7 @@
(*code)(aBlock, CON_COMMA _MKSMALLINT(tmp));
tmp++;
}
-#else
+#else /* old BLOCK_CALL */
/*
* arg is a compiled block -
* directly call it without going through "Block-value"
@@ -1337,16 +1341,18 @@
tmp++;
}
}
-#endif
+#endif /* NEW_BLOCK_CALL */
} else {
/*
- * arg is something else - call it with Block-value"
+ * arg is something else - call it with value"
*/
while (tmp <= final) {
if (InterruptPending != nil) interrupt(CONARG);
- (*blockVal.ilc_func)(aBlock, _value_, CON_COMMA nil, &blockVal,
- _MKSMALLINT(tmp));
+ (*blockVal.ilc_func)(aBlock,
+ @symbol(value:),
+ CON_COMMA nil, &blockVal,
+ _MKSMALLINT(tmp));
tmp++;
}
}
@@ -1362,7 +1368,7 @@
to:stop by:incr do:aBlock
"reimplemented for speed"
- |home index|
+ |home|
%{
REGISTER INT tmp, step;
REGISTER INT final;
@@ -1438,22 +1444,26 @@
#endif
} else {
/*
- * arg is something else - call it with Block-value"
+ * arg is something else - call it with value"
*/
if (step < 0) {
while (tmp >= final) {
if (InterruptPending != nil) interrupt(CONARG);
- (*blockVal.ilc_func)(aBlock, _value_, CON_COMMA nil, &blockVal,
- _MKSMALLINT(tmp));
+ (*blockVal.ilc_func)(aBlock,
+ @symbol(value:),
+ CON_COMMA nil, &blockVal,
+ _MKSMALLINT(tmp));
tmp += step;
}
} else {
while (tmp <= final) {
if (InterruptPending != nil) interrupt(CONARG);
- (*blockVal.ilc_func)(aBlock, _value_, CON_COMMA nil, &blockVal,
- _MKSMALLINT(tmp));
+ (*blockVal.ilc_func)(aBlock,
+ @symbol(value:),
+ CON_COMMA nil, &blockVal,
+ _MKSMALLINT(tmp));
tmp += step;
}
}