# HG changeset patch # User Claus Gittinger # Date 854123044 -3600 # Node ID 5e3cb9e7e6823478af712730859a5a1f3d120ded # Parent 2ba9ca59f25d29d0814dcf6911b6bd078097a84a *** empty log message *** diff -r 2ba9ca59f25d -r 5e3cb9e7e682 Array.st --- a/Array.st Fri Jan 24 14:10:21 1997 +0100 +++ b/Array.st Fri Jan 24 17:24:04 1997 +0100 @@ -549,7 +549,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -744,7 +746,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -1026,7 +1030,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -2157,5 +2163,5 @@ !Array class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.85 1997-01-21 15:07:08 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.86 1997-01-24 16:23:03 cg Exp $' ! ! diff -r 2ba9ca59f25d -r 5e3cb9e7e682 SmallInt.st --- a/SmallInt.st Fri Jan 24 14:10:21 1997 +0100 +++ b/SmallInt.st Fri Jan 24 17:24:04 1997 +0100 @@ -1327,86 +1327,85 @@ if (__isBlockLike(aBlock) && (__BlockInstPtr(aBlock)->b_nargs == __MKSMALLINT(0))) { { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; /* * specially tuned version for static compiled blocks, called with * home on the stack (the most common case) */ - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { - if (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC))) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { #ifdef NEW_BLOCK_CALL -# define BLOCK_ARG aBlock +# define BLOCK_ARG aBlock #else -# define BLOCK_ARG rHome - REGISTER OBJ rHome; - rHome = __BlockInstPtr(aBlock)->b_home; - if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) +# define BLOCK_ARG rHome + REGISTER OBJ rHome; + rHome = __BlockInstPtr(aBlock)->b_home; + if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) #endif - { + { #ifdef UNROLL_LOOPS - if (0) { + if (0) { - interrupted0: + interrupted0: __interruptL(@line); goto continue0; - interrupted1: + interrupted1: __interruptL(@line); goto continue1; - interrupted2: + interrupted2: __interruptL(@line); goto continue2; - interrupted3: + interrupted3: __interruptL(@line); goto continue3; - interrupted4: + interrupted4: __interruptL(@line); goto continue4; - interrupted5: + interrupted5: __interruptL(@line); goto continue5; - interrupted6: + interrupted6: __interruptL(@line); goto continue6; - interrupted7: + interrupted7: __interruptL(@line); goto continue7; - } + } - /* - * you are not supposed to program like this - I know what I do - */ - while (tmp > 8) { - if (InterruptPending != nil) goto interrupted0; + /* + * you are not supposed to program like this - I know what I do + */ + while (tmp > 8) { + if (InterruptPending != nil) goto interrupted0; continue0: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted1; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted1; continue1: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted2; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted2; continue2: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted3; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted3; continue3: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted4; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted4; continue4: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted5; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted5; continue5: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted6; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted6; continue6: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted7; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted7; continue7: - (*code)(BLOCK_ARG); - tmp -= 8; - } + (*codeVal)(BLOCK_ARG); + tmp -= 8; + } #endif /* UNROLL_LOOPS */ - do { - if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG); - } while(--tmp); + do { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG); + } while(--tmp); - RETURN (self); - } + RETURN (self); } } } @@ -1426,16 +1425,16 @@ * it could be recompiled or flushed (in the interrupt) */ do { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG); + (*codeVal)(BLOCK_ARG); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -1494,52 +1493,58 @@ if (__isBlockLike(aBlock) && (__BlockInstPtr(aBlock)->b_nargs == __MKSMALLINT(1))) { { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; /* * specially tuned version for static compiled blocks, called with * home on the stack (the most common case) */ - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { - if (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC))) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { #ifdef NEW_BLOCK_CALL -# define BLOCK_ARG aBlock +# define BLOCK_ARG aBlock #else -# define BLOCK_ARG rHome - REGISTER OBJ rHome; - rHome = __BlockInstPtr(aBlock)->b_home; - if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) +# define BLOCK_ARG rHome + REGISTER OBJ rHome; + rHome = __BlockInstPtr(aBlock)->b_home; + if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) #endif - { - if (step < 0) { - if (step == -1) { - while (tmp >= final) { - if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); - tmp--; - } - } else { - while (tmp >= final) { - if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); - tmp += step; - } + { + if (step < 0) { + if (step == -1) { + while (tmp >= final) { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); + tmp--; } } else { - while (tmp <= final) { + while (tmp >= final) { if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); tmp += step; } - } - RETURN (self); + } else { + if (step == 1) { + while (tmp <= final) { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); + tmp++; + } + } else { + while (tmp <= final) { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); + tmp += step; + } + } } + RETURN (self); } } } @@ -1561,16 +1566,16 @@ if (step < 0) { while (tmp >= final) { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -1599,16 +1604,16 @@ } } else { while (tmp <= final) { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -1701,9 +1706,10 @@ * specially tuned version for the most common case, * where called with home on the stack */ - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock @@ -1756,34 +1762,34 @@ t8 += 8; if (InterruptPending != nil) goto interrupted0; continue0: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); if (InterruptPending != nil) goto interrupted1; continue1: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+1)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+1)); if (InterruptPending != nil) goto interrupted2; continue2: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+2)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+2)); if (InterruptPending != nil) goto interrupted3; continue3: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+3)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+3)); if (InterruptPending != nil) goto interrupted4; continue4: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+4)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+4)); if (InterruptPending != nil) goto interrupted5; continue5: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+5)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+5)); if (InterruptPending != nil) goto interrupted6; continue6: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+6)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+6)); if (InterruptPending != nil) goto interrupted7; continue7: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+7)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+7)); tmp += 8; } #endif /* UNROLL_LOOPS */ while (tmp <= final) { if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); tmp ++; } RETURN (self); @@ -1796,8 +1802,8 @@ */ while (tmp <= final) { if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) == (OBJFUNC)nil) break; - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + if ((codeVal = __BlockInstPtr(aBlock)->b_code) == (OBJFUNC)nil) break; + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); tmp ++; } @@ -1823,16 +1829,16 @@ * it could be recompiled or flushed (in the interrupt) */ while (tmp <= final) { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -2313,5 +2319,5 @@ !SmallInteger class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.66 1997-01-21 12:54:08 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Attic/SmallInt.st,v 1.67 1997-01-24 16:23:39 cg Exp $' ! ! diff -r 2ba9ca59f25d -r 5e3cb9e7e682 SmallInteger.st --- a/SmallInteger.st Fri Jan 24 14:10:21 1997 +0100 +++ b/SmallInteger.st Fri Jan 24 17:24:04 1997 +0100 @@ -1327,86 +1327,85 @@ if (__isBlockLike(aBlock) && (__BlockInstPtr(aBlock)->b_nargs == __MKSMALLINT(0))) { { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; /* * specially tuned version for static compiled blocks, called with * home on the stack (the most common case) */ - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { - if (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC))) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { #ifdef NEW_BLOCK_CALL -# define BLOCK_ARG aBlock +# define BLOCK_ARG aBlock #else -# define BLOCK_ARG rHome - REGISTER OBJ rHome; - rHome = __BlockInstPtr(aBlock)->b_home; - if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) +# define BLOCK_ARG rHome + REGISTER OBJ rHome; + rHome = __BlockInstPtr(aBlock)->b_home; + if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) #endif - { + { #ifdef UNROLL_LOOPS - if (0) { + if (0) { - interrupted0: + interrupted0: __interruptL(@line); goto continue0; - interrupted1: + interrupted1: __interruptL(@line); goto continue1; - interrupted2: + interrupted2: __interruptL(@line); goto continue2; - interrupted3: + interrupted3: __interruptL(@line); goto continue3; - interrupted4: + interrupted4: __interruptL(@line); goto continue4; - interrupted5: + interrupted5: __interruptL(@line); goto continue5; - interrupted6: + interrupted6: __interruptL(@line); goto continue6; - interrupted7: + interrupted7: __interruptL(@line); goto continue7; - } + } - /* - * you are not supposed to program like this - I know what I do - */ - while (tmp > 8) { - if (InterruptPending != nil) goto interrupted0; + /* + * you are not supposed to program like this - I know what I do + */ + while (tmp > 8) { + if (InterruptPending != nil) goto interrupted0; continue0: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted1; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted1; continue1: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted2; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted2; continue2: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted3; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted3; continue3: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted4; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted4; continue4: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted5; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted5; continue5: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted6; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted6; continue6: - (*code)(BLOCK_ARG); - if (InterruptPending != nil) goto interrupted7; + (*codeVal)(BLOCK_ARG); + if (InterruptPending != nil) goto interrupted7; continue7: - (*code)(BLOCK_ARG); - tmp -= 8; - } + (*codeVal)(BLOCK_ARG); + tmp -= 8; + } #endif /* UNROLL_LOOPS */ - do { - if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG); - } while(--tmp); + do { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG); + } while(--tmp); - RETURN (self); - } + RETURN (self); } } } @@ -1426,16 +1425,16 @@ * it could be recompiled or flushed (in the interrupt) */ do { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG); + (*codeVal)(BLOCK_ARG); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -1494,52 +1493,58 @@ if (__isBlockLike(aBlock) && (__BlockInstPtr(aBlock)->b_nargs == __MKSMALLINT(1))) { { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; /* * specially tuned version for static compiled blocks, called with * home on the stack (the most common case) */ - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { - if (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC))) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { #ifdef NEW_BLOCK_CALL -# define BLOCK_ARG aBlock +# define BLOCK_ARG aBlock #else -# define BLOCK_ARG rHome - REGISTER OBJ rHome; - rHome = __BlockInstPtr(aBlock)->b_home; - if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) +# define BLOCK_ARG rHome + REGISTER OBJ rHome; + rHome = __BlockInstPtr(aBlock)->b_home; + if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) #endif - { - if (step < 0) { - if (step == -1) { - while (tmp >= final) { - if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); - tmp--; - } - } else { - while (tmp >= final) { - if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); - tmp += step; - } + { + if (step < 0) { + if (step == -1) { + while (tmp >= final) { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); + tmp--; } } else { - while (tmp <= final) { + while (tmp >= final) { if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); tmp += step; } - } - RETURN (self); + } else { + if (step == 1) { + while (tmp <= final) { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); + tmp++; + } + } else { + while (tmp <= final) { + if (InterruptPending != nil) __interruptL(@line); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); + tmp += step; + } + } } + RETURN (self); } } } @@ -1561,16 +1566,16 @@ if (step < 0) { while (tmp >= final) { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -1599,16 +1604,16 @@ } } else { while (tmp <= final) { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -1701,9 +1706,10 @@ * specially tuned version for the most common case, * where called with home on the stack */ - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock @@ -1756,34 +1762,34 @@ t8 += 8; if (InterruptPending != nil) goto interrupted0; continue0: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); if (InterruptPending != nil) goto interrupted1; continue1: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+1)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+1)); if (InterruptPending != nil) goto interrupted2; continue2: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+2)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+2)); if (InterruptPending != nil) goto interrupted3; continue3: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+3)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+3)); if (InterruptPending != nil) goto interrupted4; continue4: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+4)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+4)); if (InterruptPending != nil) goto interrupted5; continue5: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+5)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+5)); if (InterruptPending != nil) goto interrupted6; continue6: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+6)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+6)); if (InterruptPending != nil) goto interrupted7; continue7: - (*code)(BLOCK_ARG, __MKSMALLINT(tmp+7)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp+7)); tmp += 8; } #endif /* UNROLL_LOOPS */ while (tmp <= final) { if (InterruptPending != nil) __interruptL(@line); - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); tmp ++; } RETURN (self); @@ -1796,8 +1802,8 @@ */ while (tmp <= final) { if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) == (OBJFUNC)nil) break; - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + if ((codeVal = __BlockInstPtr(aBlock)->b_code) == (OBJFUNC)nil) break; + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); tmp ++; } @@ -1823,16 +1829,16 @@ * it could be recompiled or flushed (in the interrupt) */ while (tmp <= final) { - REGISTER OBJFUNC code; + REGISTER OBJFUNC codeVal; if (InterruptPending != nil) __interruptL(@line); - if ((code = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { /* * arg is a compiled block with code - * directly call it without going through Block>>value */ - (*code)(BLOCK_ARG, __MKSMALLINT(tmp)); + (*codeVal)(BLOCK_ARG, __MKSMALLINT(tmp)); } else { if (__BlockInstPtr(aBlock)->b_bytecodes != nil) { /* @@ -2313,5 +2319,5 @@ !SmallInteger class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.66 1997-01-21 12:54:08 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.67 1997-01-24 16:23:39 cg Exp $' ! ! diff -r 2ba9ca59f25d -r 5e3cb9e7e682 WeakArr.st --- a/WeakArr.st Fri Jan 24 14:10:21 1997 +0100 +++ b/WeakArr.st Fri Jan 24 17:24:04 1997 +0100 @@ -304,7 +304,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -451,7 +453,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -580,7 +584,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -708,6 +714,6 @@ !WeakArray class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Attic/WeakArr.st,v 1.44 1997-01-22 02:18:33 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Attic/WeakArr.st,v 1.45 1997-01-24 16:24:04 cg Exp $' ! ! WeakArray initialize! diff -r 2ba9ca59f25d -r 5e3cb9e7e682 WeakArray.st --- a/WeakArray.st Fri Jan 24 14:10:21 1997 +0100 +++ b/WeakArray.st Fri Jan 24 17:24:04 1997 +0100 @@ -304,7 +304,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -451,7 +453,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -580,7 +584,9 @@ */ REGISTER OBJFUNC codeVal; - if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) { + if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) + && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))) { + #ifdef NEW_BLOCK_CALL # define BLOCK_ARG aBlock #else @@ -708,6 +714,6 @@ !WeakArray class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/WeakArray.st,v 1.44 1997-01-22 02:18:33 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/WeakArray.st,v 1.45 1997-01-24 16:24:04 cg Exp $' ! ! WeakArray initialize!