Cleanup: drop support for old block ABI jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 24 Apr 2018 12:23:14 +0100
branchjv
changeset 23103 1a0d5755718e
parent 23102 574962856f04
child 23104 749efed883b6
Cleanup: drop support for old block ABI in favour of new ABI passing an instance of `Block` as an argument. Old block calling scheme is no longer supported.
Array.st
Block.st
SmallInteger.st
WeakArray.st
--- a/Array.st	Fri Apr 13 09:37:08 2018 +0100
+++ b/Array.st	Tue Apr 24 12:23:14 2018 +0100
@@ -703,15 +703,7 @@
 #endif
 		) {
 
-#ifdef NEW_BLOCK_CALL
 #                   define BLOCK_ARG        aBlock
-#else
-#                   define BLOCK_ARG        rHome
-		    REGISTER OBJ rHome;
-
-		    rHome = __BlockInstPtr(aBlock)->b_home;
-		    if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-#endif
 		    {
 
 			    /*
@@ -821,14 +813,8 @@
 	     * it could be recompiled or flushed
 	     */
 #           undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #           define BLOCK_ARG        aBlock
 #           define IBLOCK_ARG       nil
-#else
-#           define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#           define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
 	    for (; index < nIndex; index++) {
 		REGISTER OBJFUNC codeVal;
 
@@ -930,15 +916,7 @@
 		     && (! ((INT)(__BlockInstPtr(__aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
 #endif
 		    ) {
-#ifdef NEW_BLOCK_CALL
 #                       define BLOCK_ARG        aBlock
-#else
-#                       define BLOCK_ARG        rHome
-			REGISTER OBJ rHome;
-
-			rHome = __BlockInstPtr(__aBlock)->b_home;
-			if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-#endif
 			{
 			    REGISTER OBJ el;
 
@@ -1094,14 +1072,8 @@
 		 * it could be recompiled or flushed
 		 */
 #               undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #               define BLOCK_ARG        aBlock
 #               define IBLOCK_ARG       nil
-#else
-#               define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#               define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
 		while (n > 0) {
 		    REGISTER OBJFUNC codeVal;
 		    OBJ el;
@@ -1188,13 +1160,8 @@
 	    if (__isBlockLike(aBlock)
 	     && (__BlockInstPtr(aBlock)->b_nargs == __mkSmallInteger(1))) {
 #               undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #               define BLOCK_ARG        aBlock
 #               define IBLOCK_ARG       nil
-#else
-#               define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#               define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
 
 		for (index=indexHigh; index >= indexLow; index--) {
 		    REGISTER OBJFUNC codeVal;
@@ -1281,15 +1248,7 @@
 #endif
 		    ) {
 
-#ifdef NEW_BLOCK_CALL
 #                       define BLOCK_ARG        aBlock
-#else
-#                       define BLOCK_ARG        rHome
-			REGISTER OBJ rHome;
-
-			rHome = __BlockInstPtr(aBlock)->b_home;
-			if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-#endif
 			{
 			    OBJ el;
 
@@ -1316,14 +1275,8 @@
 		 * it could be recompiled or flushed
 		 */
 #               undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #               define BLOCK_ARG        aBlock
 #               define IBLOCK_ARG       nil
-#else
-#               define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#               define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
 		while (index < actualSize) {
 		    REGISTER OBJFUNC codeVal;
 		    OBJ el;
@@ -1449,14 +1402,8 @@
 	    if (__isBlockLike(aBlock)
 	     && (__BlockInstPtr(aBlock)->b_nargs == __mkSmallInteger(1))) {
 #               undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #               define BLOCK_ARG        aBlock
 #               define IBLOCK_ARG       nil
-#else
-#               define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#               define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
 		for (index=nIndex-1; index >= endIndex; index--) {
 		    REGISTER OBJFUNC codeVal;
 
--- a/Block.st	Fri Apr 13 09:37:08 2018 +0100
+++ b/Block.st	Tue Apr 24 12:23:14 2018 +0100
@@ -973,7 +973,6 @@
 # endif
 
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    /* compiled machine code */
 	    RETURN ( (*thecode)(self) );
@@ -984,19 +983,6 @@
 #  else
 	RETURN ( __interpret(self, 0, nil, nil, nil, nil) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    /* compiled machine code */
-	    RETURN ( (*thecode)(home) );
-	}
-	/* interpreted code */
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 0, nil, home, nil, nil) );
-#  else
-	RETURN ( __interpret(self, 0, nil, home, nil, nil) );
-#  endif
-# endif
     }
 #endif /* not SCHTEAM */
 %}.
@@ -1022,7 +1008,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg) );
 	}
@@ -1032,18 +1017,6 @@
 #  else
 	RETURN ( __interpret(self, 1, nil, nil, nil, nil, arg) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg) );
-	}
-	/* interpreted code */
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 1, nil, home, nil, nil, &arg) );
-#  else
-	RETURN ( __interpret(self, 1, nil, home, nil, nil, arg) );
-#  endif
-# endif
     }
 #endif /* not SCHTEAM */
 %}.
@@ -1211,7 +1184,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2) );
 	}
@@ -1220,17 +1192,6 @@
 #  else
 	RETURN ( __interpret(self, 2, nil, nil, nil, nil, arg1, arg2) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2) );
-	}
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 2, nil, home, nil, nil, &arg1) );
-#  else
-	RETURN ( __interpret(self, 2, nil, home, nil, nil, arg1, arg2) );
-#  endif
-# endif
     }
 #endif /* not SCHTEAM */
 %}.
@@ -1266,7 +1227,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3) );
 	}
@@ -1275,17 +1235,6 @@
 #  else
 	RETURN ( __interpret(self, 3, nil, nil, nil, nil, arg1, arg2, arg3) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3) );
-	}
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 3, nil, home, nil, nil, &arg1) );
-#  else
-	RETURN ( __interpret(self, 3, nil, home, nil, nil, arg1, arg2, arg3) );
-#  endif
-# endif
     }
 #endif /* not SCHTEAM */
 %}.
@@ -1321,7 +1270,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4) );
 	}
@@ -1330,17 +1278,6 @@
 #  else
 	RETURN ( __interpret(self, 4, nil, nil, nil, nil, arg1, arg2, arg3, arg4) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4) );
-	}
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 4, nil, home, nil, nil, &arg1) );
-#  else
-	RETURN ( __interpret(self, 4, nil, home, nil, nil, arg1, arg2, arg3, arg4) );
-#  endif
-# endif
     }
 #endif
 %}.
@@ -1366,7 +1303,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5) );
 	}
@@ -1375,17 +1311,6 @@
 #  else
 	RETURN ( __interpret(self, 5, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5) );
-	}
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 5, nil, home, nil, nil, &arg1) );
-#  else
-	RETURN ( __interpret(self, 5, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5) );
-#  endif
-# endif
     }
 #endif /* not SCHTEAM */
 %}.
@@ -1411,7 +1336,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6) );
 	}
@@ -1420,17 +1344,6 @@
 #  else
 	RETURN ( __interpret(self, 6, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6) );
-	}
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 6, nil, home, nil, nil, &arg1) );
-#  else
-	RETURN ( __interpret(self, 6, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6) );
-#  endif
-# endif
     }
 #endif /* not SCHTEAM */
 %}.
@@ -1456,7 +1369,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 # endif
 	thecode = __BlockInstPtr(self)->b_code;
-# ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7) );
 	}
@@ -1465,17 +1377,6 @@
 #  else
 	RETURN ( __interpret(self, 7, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7) );
 #  endif
-# else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6, arg7) );
-	}
-#  ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 7, nil, home, nil, nil, &arg1) );
-#  else
-	RETURN ( __interpret(self, 7, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7) );
-#  endif
-# endif
     }
 #endif
 %}.
@@ -1497,7 +1398,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 #endif
 	thecode = __BlockInstPtr(self)->b_code;
-#ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) );
 	}
@@ -1506,17 +1406,6 @@
 # else
 	RETURN ( __interpret(self, 8, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) );
 # endif
-#else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) );
-	}
-# ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 8, nil, home, nil, nil, &arg1) );
-# else
-	RETURN ( __interpret(self, 8, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) );
-# endif
-#endif
     }
 %}.
     ^ self wrongNumberOfArguments:8
@@ -1537,7 +1426,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 #endif
 	thecode = __BlockInstPtr(self)->b_code;
-#ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) );
 	}
@@ -1546,17 +1434,6 @@
 # else
 	RETURN ( __interpret(self, 9, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) );
 # endif
-#else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) );
-	}
-# ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 9, nil, home, nil, nil, &arg1) );
-# else
-	RETURN ( __interpret(self, 9, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) );
-# endif
-#endif
     }
 %}.
     ^ self wrongNumberOfArguments:9
@@ -1577,7 +1454,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 #endif
 	thecode = __BlockInstPtr(self)->b_code;
-#ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) );
 	}
@@ -1586,17 +1462,6 @@
 # else
 	RETURN ( __interpret(self, 10, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) );
 # endif
-#else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) );
-	}
-# ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 10, nil, home, nil, nil, &arg1) );
-# else
-	RETURN ( __interpret(self, 10, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) );
-# endif
-#endif
     }
 %}.
     ^ self wrongNumberOfArguments:10
@@ -1617,7 +1482,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 #endif
 	thecode = __BlockInstPtr(self)->b_code;
-#ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) );
 	}
@@ -1626,17 +1490,6 @@
 # else
 	RETURN ( __interpret(self, 11, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) );
 # endif
-#else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) );
-	}
-# ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 11, nil, home, nil, nil, &arg1) );
-# else
-	RETURN ( __interpret(self, 11, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) );
-# endif
-#endif
     }
 %}.
     ^ self wrongNumberOfArguments:11
@@ -1657,7 +1510,6 @@
 	    __ContextInstPtr(__thisContext)->c_lineno = __ILC_LNO_AS_OBJ(__pilc);
 #endif
 	thecode = __BlockInstPtr(self)->b_code;
-#ifdef NEW_BLOCK_CALL
 	if (thecode != (OBJFUNC)nil) {
 	    RETURN ( (*thecode)(self, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) );
 	}
@@ -1666,17 +1518,6 @@
 # else
 	RETURN ( __interpret(self, 12, nil, nil, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) );
 # endif
-#else
-	home = __BlockInstPtr(self)->b_home;
-	if (thecode != (OBJFUNC)nil) {
-	    RETURN ( (*thecode)(home, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) );
-	}
-# ifdef PASS_ARG_POINTER
-	RETURN ( __interpret(self, 12, nil, home, nil, nil, &arg1) );
-# else
-	RETURN ( __interpret(self, 12, nil, home, nil, nil, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) );
-# endif
-#endif
     }
 %}.
     ^ self wrongNumberOfArguments:12
@@ -1742,56 +1583,6 @@
 
     nA = __INST(nargs);
 
-#ifndef NEW_BLOCK_CALL
-    home = __BlockInstPtr(self)->b_home;
-    if (thecode != (OBJFUNC)nil) {
-        /* the most common case (0 args) here (without a switch) */
-
-        if (nA == __mkSmallInteger(0)) {
-            RETURN ( (*thecode)(home) );
-        }
-
-        ap = __arrayVal(argArray);   /* nonNil after above test (size is known to be ok) */
-        switch ((INT)(nA)) {
-            default:
-                goto error;
-            case (INT)__mkSmallInteger(15):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11], ap[12], ap[13], ap[14]) );
-            case (INT)__mkSmallInteger(14):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11], ap[12], ap[13]) );
-            case (INT)__mkSmallInteger(13):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11], ap[12]) );
-            case (INT)__mkSmallInteger(12):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11]) );
-            case (INT)__mkSmallInteger(11):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10]) );
-            case (INT)__mkSmallInteger(10):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9]) );
-            case (INT)__mkSmallInteger(9):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8]) );
-            case (INT)__mkSmallInteger(8):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7]) );
-            case (INT)__mkSmallInteger(7):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6]) );
-            case (INT)__mkSmallInteger(6):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5]) );
-            case (INT)__mkSmallInteger(5):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4]) );
-            case (INT)__mkSmallInteger(4):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3]) );
-            case (INT)__mkSmallInteger(3):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2]) );
-            case (INT)__mkSmallInteger(2):
-                RETURN ( (*thecode)(home, ap[0], ap[1]) );
-            case (INT)__mkSmallInteger(1):
-                RETURN ( (*thecode)(home, ap[0]) );
-            case (INT)__mkSmallInteger(0):
-                RETURN ( (*thecode)(home) );
-                break;
-        }
-    }
-#endif
-
     if (nA != __mkSmallInteger(0)) {
         ap = __arrayVal(argArray);   /* nonNil after above test (size is known to be ok) */
         switch ((INT)nA) {
@@ -1832,7 +1623,6 @@
         }
     }
 
-#ifdef NEW_BLOCK_CALL
     if (thecode != (OBJFUNC)nil) {
         RETURN ( (*thecode)(self, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
     }
@@ -1841,17 +1631,6 @@
 # else
     RETURN ( __interpret(self, __intVal(nA), nil, nil, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
 # endif
-
-#else
-
-# ifdef PASS_ARG_POINTER
-    RETURN ( __interpret(self, __intVal(nA), nil, home, nil, nil, &a1) );
-# else
-    RETURN ( __interpret(self, __intVal(nA), nil, home, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
-# endif
-
-#endif
-
 error: ;
 %}.
     "
@@ -2013,56 +1792,6 @@
     } else {
         ap = __arrayVal(argArray);   /* nonNil after above test (size is known to be ok) */
     }
-
-#ifndef NEW_BLOCK_CALL
-    home = __BlockInstPtr(self)->b_home;
-    if (thecode != (OBJFUNC)nil) {
-        /* the most common case (0 args) here (without a switch) */
-
-        if (nA == __mkSmallInteger(0)) {
-            RETURN ( (*thecode)(home) );
-        }
-
-        switch ((INT)(nA)) {
-            default:
-                goto error;
-            case (INT)__mkSmallInteger(15):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11], ap[12], ap[13], ap[14]) );
-            case (INT)__mkSmallInteger(14):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11], ap[12], ap[13]) );
-            case (INT)__mkSmallInteger(13):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11], ap[12]) );
-            case (INT)__mkSmallInteger(12):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10], ap[11]) );
-            case (INT)__mkSmallInteger(11):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9], ap[10]) );
-            case (INT)__mkSmallInteger(10):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8], ap[9]) );
-            case (INT)__mkSmallInteger(9):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7], ap[8]) );
-            case (INT)__mkSmallInteger(8):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6], ap[7]) );
-            case (INT)__mkSmallInteger(7):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5], ap[6]) );
-            case (INT)__mkSmallInteger(6):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4], ap[5]) );
-            case (INT)__mkSmallInteger(5):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3], ap[4]) );
-            case (INT)__mkSmallInteger(4):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2], ap[3]) );
-            case (INT)__mkSmallInteger(3):
-                RETURN ( (*thecode)(home, ap[0], ap[1], ap[2]) );
-            case (INT)__mkSmallInteger(2):
-                RETURN ( (*thecode)(home, ap[0], ap[1]) );
-            case (INT)__mkSmallInteger(1):
-                RETURN ( (*thecode)(home, ap[0]) );
-            case (INT)__mkSmallInteger(0):
-                RETURN ( (*thecode)(home) );
-                break;
-        }
-    }
-#endif
-
     if (nA != __mkSmallInteger(0)) {
         ap = __arrayVal(argArray);   /* nonNil after above test (size is known to be ok) */
         switch ((INT)nA) {
@@ -2102,7 +1831,6 @@
                 break;
         }
     }
-#ifdef NEW_BLOCK_CALL
     if (thecode != (OBJFUNC)nil) {
         RETURN ( (*thecode)(self, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
     }
@@ -2111,17 +1839,6 @@
 # else
     RETURN ( __interpret(self, __intVal(nA), nil, nil, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
 # endif
-
-#else
-
-# ifdef PASS_ARG_POINTER
-    RETURN ( __interpret(self, __intVal(nA), nil, home, nil, nil, &a1) );
-# else
-    RETURN ( __interpret(self, __intVal(nA), nil, home, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
-# endif
-
-#endif
-
 error: ;
 %}.
     "
@@ -2195,57 +1912,6 @@
         case 1: a1 = ap[0];
         case 0: ;
     }
-
-#ifndef NEW_BLOCK_CALL
-    home = __BlockInstPtr(self)->b_home;
-    if (thecode != (OBJFUNC)nil) {
-        /* the most common case (0 args) here (without a switch) */
-
-        if (nA == __mkSmallInteger(0)) {
-            RETURN ( (*thecode)(home) );
-        }
-
-        switch ((INT)(nA)) {
-            default:
-                goto error;
-            case (INT)__mkSmallInteger(15):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
-            case (INT)__mkSmallInteger(14):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) );
-            case (INT)__mkSmallInteger(13):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) );
-            case (INT)__mkSmallInteger(12):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) );
-            case (INT)__mkSmallInteger(11):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) );
-            case (INT)__mkSmallInteger(10):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) );
-            case (INT)__mkSmallInteger(9):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8, a9) );
-            case (INT)__mkSmallInteger(8):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7, a8) );
-            case (INT)__mkSmallInteger(7):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6, a7) );
-            case (INT)__mkSmallInteger(6):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5, a6) );
-            case (INT)__mkSmallInteger(5):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4, a5) );
-            case (INT)__mkSmallInteger(4):
-                RETURN ( (*thecode)(home, a1, a2, a3, a4) );
-            case (INT)__mkSmallInteger(3):
-                RETURN ( (*thecode)(home, a1, a2, a3) );
-            case (INT)__mkSmallInteger(2):
-                RETURN ( (*thecode)(home, a1, a2) );
-            case (INT)__mkSmallInteger(1):
-                RETURN ( (*thecode)(home, a1) );
-            case (INT)__mkSmallInteger(0):
-                RETURN ( (*thecode)(home) );
-                break;
-        }
-    }
-#endif
-
-#ifdef NEW_BLOCK_CALL
     if (thecode != (OBJFUNC)nil) {
         RETURN ( (*thecode)(self, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
     }
@@ -2254,17 +1920,6 @@
 # else
     RETURN ( __interpret(self, __intVal(nA), nil, nil, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
 # endif
-
-#else
-
-# ifdef PASS_ARG_POINTER
-    RETURN ( __interpret(self, __intVal(nA), nil, home, nil, nil, &a1) );
-# else
-    RETURN ( __interpret(self, __intVal(nA), nil, home, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) );
-# endif
-
-#endif
-
 error: ;
 %}.
     "
--- a/SmallInteger.st	Fri Apr 13 09:37:08 2018 +0100
+++ b/SmallInteger.st	Tue Apr 24 12:23:14 2018 +0100
@@ -3290,22 +3290,7 @@
                  && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
 # endif
                 ) {
-
-# ifdef NEW_BLOCK_CALL
-
 #                   define BLOCK_ARG  aBlock
-
-# else
-
-#                   define BLOCK_ARG  rHome
-                    REGISTER OBJ rHome;
-
-                    /*
-                     * home on stack - no need to refetch
-                     */
-                    rHome = __BlockInstPtr(aBlock)->b_home;
-                    if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-# endif
                     {
 # ifdef __UNROLL_LOOPS__
 
@@ -3375,13 +3360,8 @@
 
 #           undef BLOCK_ARG
 
-# ifdef NEW_BLOCK_CALL
 #           define BLOCK_ARG  aBlock
 #           define IBLOCK_ARG nil
-# else
-#           define BLOCK_ARG  (__BlockInstPtr(aBlock)->b_home)
-#           define IBLOCK_ARG (__BlockInstPtr(aBlock)->b_home)
-# endif
 
             /*
              * sorry - must check for the blocks code within the loops;
@@ -3478,18 +3458,7 @@
 # endif
                 ) {
 
-# ifdef NEW_BLOCK_CALL
-
 #                   define BLOCK_ARG  aBlock
-
-# else
-
-#                   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) {
@@ -3532,13 +3501,8 @@
 
 #           undef BLOCK_ARG
 
-# ifdef NEW_BLOCK_CALL
 #           define BLOCK_ARG  aBlock
 #           define IBLOCK_ARG nil
-# else
-#           define BLOCK_ARG  (__BlockInstPtr(aBlock)->b_home)
-#           define IBLOCK_ARG (__BlockInstPtr(aBlock)->b_home)
-# endif
 
             if (step < 0) {
                 while (tmp >= final) {
@@ -3688,17 +3652,7 @@
 
                 if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) {
 
-# ifdef NEW_BLOCK_CALL
-
 #                   define BLOCK_ARG  aBlock
-
-# else
-
-#                   define BLOCK_ARG  rHome
-                    REGISTER OBJ rHome;
-                    rHome = __BlockInstPtr(aBlock)->b_home;
-                    if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-# endif
                     {
 
 # ifdef PARANOIA
@@ -3865,13 +3819,8 @@
 
 #           undef BLOCK_ARG
 
-# ifdef NEW_BLOCK_CALL
 #           define BLOCK_ARG  aBlock
 #           define IBLOCK_ARG nil
-# else
-#           define BLOCK_ARG  (__BlockInstPtr(aBlock)->b_home)
-#           define IBLOCK_ARG (__BlockInstPtr(aBlock)->b_home)
-# endif
 
             /*
              * sorry - must check for the blocks code within the loops;
--- a/WeakArray.st	Fri Apr 13 09:37:08 2018 +0100
+++ b/WeakArray.st	Tue Apr 24 12:23:14 2018 +0100
@@ -1,5 +1,6 @@
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
+ COPYRIGHT (c) 2018-now Jan Vrany
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -25,6 +26,7 @@
 copyright
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
+ COPYRIGHT (c) 2018-now Jan Vrany
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -533,15 +535,7 @@
             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
-#               define BLOCK_ARG        rHome
-                REGISTER OBJ rHome;
-
-                rHome = __BlockInstPtr(aBlock)->b_home;
-                if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-#endif
                 {
                     for (; index < nIndex; index++) {
                         if (InterruptPending != nil) __interruptL(@line);
@@ -569,14 +563,8 @@
          * it could be recompiled or flushed
          */
 #       undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #       define BLOCK_ARG        aBlock
 #       define IBLOCK_ARG       nil
-#else
-#       define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#       define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
         for (; index < nIndex; index++) {
             REGISTER OBJFUNC codeVal;
 
@@ -716,15 +704,8 @@
             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
-#               define BLOCK_ARG        rHome
-                REGISTER OBJ rHome;
-
-                rHome = __BlockInstPtr(aBlock)->b_home;
-                if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-#endif
                 {
                     for (; index < nIndex; index++) {
                         element = __InstPtr(self)->i_instvars[index];
@@ -759,14 +740,8 @@
          * it could be recompiled or flushed
          */
 #       undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #       define BLOCK_ARG        aBlock
 #       define IBLOCK_ARG       nil
-#else
-#       define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#       define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
         for (; index < nIndex; index++) {
             REGISTER OBJFUNC codeVal;
 
@@ -873,15 +848,8 @@
             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
-#               define BLOCK_ARG        rHome
-                REGISTER OBJ rHome;
-
-                rHome = __BlockInstPtr(aBlock)->b_home;
-                if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
-#endif
                 {
                     for (; index < nIndex; index++) {
                         element = __InstPtr(self)->i_instvars[index];
@@ -916,14 +884,8 @@
          * it could be recompiled or flushed
          */
 #       undef BLOCK_ARG
-#ifdef NEW_BLOCK_CALL
 #       define BLOCK_ARG        aBlock
 #       define IBLOCK_ARG       nil
-#else
-#       define BLOCK_ARG        (__BlockInstPtr(aBlock)->b_home)
-#       define IBLOCK_ARG       (__BlockInstPtr(aBlock)->b_home)
-#endif
-
         for (; index < nIndex; index++) {
             REGISTER OBJFUNC codeVal;