--- a/Object.st Thu Dec 14 20:19:39 1995 +0100
+++ b/Object.st Thu Dec 14 23:14:39 1995 +0100
@@ -43,7 +43,7 @@
!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.76 1995-12-14 16:36:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.77 1995-12-14 22:14:39 cg Exp $'
!
documentation
@@ -516,22 +516,22 @@
myClass = __qClass(self);
nbytes = __qSize(self)
- OHDR_SIZE
- - __OBJS2BYTES__(_intVal(_ClassInstPtr(myClass)->c_ninstvars));
-
- flags = _intVal(_ClassInstPtr(myClass)->c_flags) & ARRAYMASK;
+ - __OBJS2BYTES__(__intVal(_ClassInstPtr(myClass)->c_ninstvars));
+
+ flags = __intVal(_ClassInstPtr(myClass)->c_flags) & ARRAYMASK;
/*
* replaced switch by open-if; this is slightly faster since
* it avoids the range check and also checks the most common case first
*/
if ((flags == POINTERARRAY)
|| (flags == WKPOINTERARRAY)) {
- RETURN ( _MKSMALLINT(__BYTES2OBJS__(nbytes)) );
+ RETURN ( __MKSMALLINT(__BYTES2OBJS__(nbytes)) );
}
if (flags == BYTEARRAY) {
- RETURN ( _MKSMALLINT(nbytes / sizeof(char)) );
+ RETURN ( __MKSMALLINT(nbytes / sizeof(char)) );
}
if (flags == FLOATARRAY) {
- RETURN ( _MKSMALLINT(nbytes / sizeof(float)) );
+ RETURN ( __MKSMALLINT(nbytes / sizeof(float)) );
}
if (flags == DOUBLEARRAY) {
#ifdef NEED_DOUBLE_ALIGN
@@ -540,13 +540,13 @@
*/
nbytes -= sizeof(FILLTYPE);
#endif
- RETURN ( _MKSMALLINT(nbytes / sizeof(double)) );
+ RETURN ( __MKSMALLINT(nbytes / sizeof(double)) );
}
if (flags == LONGARRAY) {
- RETURN ( _MKSMALLINT(nbytes / sizeof(long)) );
+ RETURN ( __MKSMALLINT(nbytes / sizeof(long)) );
}
if (flags == WORDARRAY) {
- RETURN ( _MKSMALLINT(nbytes / sizeof(short)) );
+ RETURN ( __MKSMALLINT(nbytes / sizeof(short)) );
}
%}.
^ 0
@@ -1418,7 +1418,7 @@
* better distribution (i.e. bigger empty spaces) in hashed collection.
* we could shift it up to the 30 bit limit - not making it negative.
*/
- RETURN ( _MKSMALLINT(hash << __HASH_SHIFT__) );
+ RETURN ( __MKSMALLINT(hash << __HASH_SHIFT__) );
}
%}.
^ 0 "never reached, since redefined in UndefinedObject and SmallInteger"
@@ -2256,7 +2256,6 @@
OBJ *op;
/* int nInstBytes, nInstVars, flags; */
REGISTER int n;
- extern OBJ _MKLARGEINT();
/*
@@ -2266,8 +2265,8 @@
*/
if (__isSmallInteger(index)) {
myClass = __qClass(self);
- indx = _intVal(index) - 1;
- n /* nInstVars */ = _intVal(_ClassInstPtr(myClass)->c_ninstvars);
+ indx = __intVal(index) - 1;
+ n /* nInstVars */ = __intVal(_ClassInstPtr(myClass)->c_ninstvars);
n /* nInstBytes */ = OHDR_SIZE + __OBJS2BYTES__(n /* nInstVars */);
nbytes = __qSize(self) - n /* nInstBytes */;
pFirst = (char *)(_InstPtr(self)) + n /* nInstBytes */;
@@ -2276,7 +2275,7 @@
* replaced switch by open-coded if; this is slightly faster
* since it avoids the range check and also handles the most common case first
*/
- n = _intVal(_ClassInstPtr(myClass)->c_flags) & ARRAYMASK;
+ n = __intVal(_ClassInstPtr(myClass)->c_flags) & ARRAYMASK;
if ((n == POINTERARRAY) || (n == WKPOINTERARRAY)) {
if ((indx >= 0) && (indx < (__BYTES2OBJS__(nbytes)))) {
op = (OBJ *)pFirst + indx;
@@ -2285,7 +2284,7 @@
} else if (n == BYTEARRAY) {
if ((indx >= 0) && (indx < (nbytes / sizeof(char)))) {
cp = (unsigned char *)pFirst + indx;
- RETURN ( _MKSMALLINT(*cp & 0xFF) );
+ RETURN ( __MKSMALLINT(*cp & 0xFF) );
}
} else if (n == FLOATARRAY) {
if ((indx >= 0) && (indx < (nbytes / sizeof(float)))) {
@@ -2311,13 +2310,13 @@
if ((indx >= 0) && (indx < (nbytes / sizeof(long)))) {
lp = (long *)pFirst + indx;
if ((*lp >= _MIN_INT) && (*lp <= _MAX_INT))
- RETURN ( _MKSMALLINT(*lp) );
- RETURN ( _MKLARGEINT(*lp) );
+ RETURN ( __MKSMALLINT(*lp) );
+ RETURN ( __MKLARGEINT(*lp) );
}
} else if (n == WORDARRAY) {
if ((indx >= 0) && (indx < (nbytes / sizeof(short)))) {
sp = (unsigned short *)pFirst + indx;
- RETURN ( _MKSMALLINT(*sp & 0xFFFF) );
+ RETURN ( __MKSMALLINT(*sp & 0xFFFF) );
}
}
}
@@ -2359,14 +2358,14 @@
and SmallInteger */
if (__isSmallInteger(index)) {
- indx = _intVal(index) - 1;
+ indx = __intVal(index) - 1;
myClass = __qClass(self);
- n /* ninstvars */ = _intVal(_ClassInstPtr(myClass)->c_ninstvars);
+ n /* ninstvars */ = __intVal(_ClassInstPtr(myClass)->c_ninstvars);
n /* nInstBytes */ = OHDR_SIZE + __OBJS2BYTES__(n /* ninstvars */);
nbytes = __qSize(self) - n /* nInstBytes */;
pFirst = (char *)(_InstPtr(self)) + n /* nInstBytes */;
- n = _intVal(_ClassInstPtr(myClass)->c_flags) & ARRAYMASK;
+ n = __intVal(_ClassInstPtr(myClass)->c_flags) & ARRAYMASK;
if ((n == POINTERARRAY) || (n == WKPOINTERARRAY)) {
if ((indx >= 0) && (indx < (__BYTES2OBJS__(nbytes)))) {
op = (OBJ *)pFirst + indx;
@@ -2376,7 +2375,7 @@
}
} else if (n == BYTEARRAY) {
if (__isSmallInteger(anObject)) {
- val = _intVal(anObject);
+ val = __intVal(anObject);
if ((val & ~0xFF) == 0 /* i.e. (val >= 0) && (val <= 255) */) {
if ((indx >= 0) && (indx < (nbytes / sizeof(char)))) {
cp = pFirst + indx;
@@ -2395,7 +2394,7 @@
RETURN ( anObject );
}
if (__isSmallInteger(anObject)) {
- *fp = (float) _intVal(anObject);
+ *fp = (float) __intVal(anObject);
RETURN ( anObject );
}
}
@@ -2415,7 +2414,7 @@
RETURN ( anObject );
}
if (__isSmallInteger(anObject)) {
- *dp = (double) _intVal(anObject);
+ *dp = (double) __intVal(anObject);
RETURN ( anObject );
}
}
@@ -2423,7 +2422,7 @@
if (__isSmallInteger(anObject)) {
if ((indx >= 0) && (indx < (nbytes / sizeof(long)))) {
lp = (long *)pFirst + indx;
- *lp = _intVal(anObject);
+ *lp = __intVal(anObject);
RETURN ( anObject );
}
}
@@ -2433,7 +2432,7 @@
*/
} else if (n == WORDARRAY) {
if (__isSmallInteger(anObject)) {
- val = _intVal(anObject);
+ val = __intVal(anObject);
if ((val >= 0) && (val <= 0xFFFF)) {
if ((indx >= 0) && (indx < (nbytes / sizeof(short)))) {
sp = (short *)pFirst + indx;
@@ -2491,7 +2490,7 @@
if (__isSmallInteger(index)) {
myClass = __Class(self);
- idx = _intVal(index) - 1;
+ idx = __intVal(index) - 1;
/*
* do not allow return of non-object fields.
* if subclass did not make privisions for that,
@@ -2502,7 +2501,7 @@
RETURN ( nil )
}
}
- ninstvars = _intVal(_ClassInstPtr(myClass)->c_ninstvars);
+ ninstvars = __intVal(_ClassInstPtr(myClass)->c_ninstvars);
if ((idx >= 0) && (idx < ninstvars)) {
RETURN ( _InstPtr(self)->i_instvars[idx] );
}
@@ -2527,8 +2526,8 @@
if (__isSmallInteger(index)) {
myClass = __Class(self);
- idx = _intVal(index) - 1;
- ninstvars = _intVal(_ClassInstPtr(myClass)->c_ninstvars);
+ idx = __intVal(index) - 1;
+ ninstvars = __intVal(_ClassInstPtr(myClass)->c_ninstvars);
/*
* do not allow setting of non-object fields.
* if subclass did not make privisions for that,
@@ -3068,7 +3067,7 @@
#endif
if (__isSmallInteger(numberOfArgs)) {
- nargs = _intVal(numberOfArgs);
+ nargs = __intVal(numberOfArgs);
if (nargs == 0) {
if (aSelector != last0) {
ilc0.ilc_func = _SEND0;
@@ -3089,7 +3088,7 @@
} else {
argP = (OBJ *)(&a1);
for (i=1; i <= nargs; i++) {
- *argP++ = __AT_(argArray, CON_COMMA _MKSMALLINT(i));
+ *argP++ = __AT_(argArray, CON_COMMA __MKSMALLINT(i));
}
}
switch (nargs) {
@@ -3353,7 +3352,7 @@
static struct inlineCache ilc15 = _DUMMYILC15;
if (__isSmallInteger(numberOfArgs)) {
- nargs = _intVal(numberOfArgs);
+ nargs = __intVal(numberOfArgs);
if (nargs == 0) {
RETURN (_SEND0(self, aSelector, CON_COMMA aClass, &ilc0));
}
@@ -3365,7 +3364,7 @@
}
} else {
for (i=1; i <= nargs; i++) {
- *argP++ = __AT_(argArray, CON_COMMA _MKSMALLINT(i));
+ *argP++ = __AT_(argArray, CON_COMMA __MKSMALLINT(i));
}
}
switch (nargs) {