# HG changeset patch # User Claus Gittinger # Date 1077914786 -3600 # Node ID c37917d9f8fca3dc8759d24d2dfc4e10c2ac1cd1 # Parent e80739d6c3120f1b288f915b2fa6ec0c0e1909bd max 15 args diff -r e80739d6c312 -r c37917d9f8fc Block.st --- a/Block.st Fri Feb 27 18:05:02 2004 +0100 +++ b/Block.st Fri Feb 27 21:46:26 2004 +0100 @@ -1035,7 +1035,7 @@ ArgArray must be either an Array or nil. The size of the argArray must match the number of arguments the receiver expects." - |a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12| + |a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15| (argArray notNil and:[(argArray class ~~ Array) and:[argArray isArray not]]) ifTrue:[ ^ self badArgumentArray:argArray @@ -1071,6 +1071,12 @@ switch ((INT)(nA)) { default: goto error; + case (INT)__MKSMALLINT(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)__MKSMALLINT(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)__MKSMALLINT(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)__MKSMALLINT(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)__MKSMALLINT(11): @@ -1107,6 +1113,12 @@ switch ((INT)nA) { default: goto error; + case (INT)__MKSMALLINT(15): + a15 = ap[14]; + case (INT)__MKSMALLINT(14): + a14 = ap[13]; + case (INT)__MKSMALLINT(13): + a13 = ap[12]; case (INT)__MKSMALLINT(12): a12 = ap[11]; case (INT)__MKSMALLINT(11): @@ -1138,12 +1150,12 @@ #ifdef NEW_BLOCK_CALL if (thecode != (OBJFUNC)nil) { - RETURN ( (*thecode)(self, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) ); + RETURN ( (*thecode)(self, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) ); } # ifdef PASS_ARG_POINTER RETURN ( __interpret(self, __intVal(nA), nil, nil, nil, nil, &a1) ); # else - RETURN ( __interpret(self, __intVal(nA), nil, nil, nil, nil, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) ); + 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 @@ -1151,7 +1163,7 @@ # 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) ); + 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 @@ -1159,11 +1171,11 @@ error: ; %}. " - the above code only supports up-to 12 arguments + the above code only supports up-to 15 arguments " ^ ArgumentError raiseRequestWith:self - errorString:'only blocks with up-to 12 arguments supported' + errorString:'only blocks with up-to 15 arguments supported' ! valueWithOptionalArgument:arg @@ -2052,7 +2064,7 @@ !Block class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.136 2003-10-10 16:38:05 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.137 2004-02-27 20:46:26 cg Exp $' ! ! Block initialize!