--- a/CompiledCode.st Sun May 31 11:23:08 2015 +0200
+++ b/CompiledCode.st Sun May 31 11:24:36 2015 +0200
@@ -1103,6 +1103,29 @@
YOU HAVE BEEN WARNED."
%{
+#ifdef __SCHTEAM__
+ {
+ int numArgs = 0;
+ STVector v = null;
+
+ if (argArray != STObject.Nil) {
+ v = argArray.asSTVector();
+ numArgs = v.vectorLength();
+ }
+
+ STCallable me = (STCompiledMethod)self.smalltalkCheckNumberOfArgs(1+numArgs);
+
+ __c__.push(anObject);
+ for (int i=0; i<numArgs; i++) {
+ __c__.push( v.vectorRef(i) );
+ }
+ // the selector and searchClass args are not needed/passed
+ // the virtualSender is (currently) not supported
+ // (this is cosmetics only; therefore it's done later)
+ return __c__.TAILCALL_nPUSHED( me, 1+numArgs);
+ }
+ /* NOT REACHED */
+#else
OBJFUNC code;
OBJ searchClass;
static struct inlineCache dummy = _DUMMYILC0;
@@ -1123,9 +1146,9 @@
ap = (OBJ *)0;
}
-#ifdef F_NARGS
+# ifdef F_NARGS
if (((__intVal(__INST(flags)) & F_NARGS) >> F_NARGSHIFT) == nargs)
-#endif
+# endif
{
code = __MethodInstPtr(self)->m_code;
if (aClass == nil) {
@@ -1136,9 +1159,9 @@
if (nargs <= 15) {
OBJ rslt;
-#ifdef CONTEXT_DEBUG
+# ifdef CONTEXT_DEBUG
OBJ sav = __thisContext;
-#endif
+# endif
/*
* add virtual sender (unwinding) here later,
@@ -1232,9 +1255,9 @@
}
} else {
/* interpreted code */
-#ifdef PASS_ARG_POINTER
+# ifdef PASS_ARG_POINTER
rslt = __interpret(self, nargs, anObject, aSymbol, searchClass, &dummy, ap);
-#else
+# else
switch (nargs) {
case 0:
rslt = __interpret(self, 0, anObject, aSymbol, searchClass, &dummy);
@@ -1323,9 +1346,9 @@
ap[7], ap[8], ap[9], ap[10], ap[11], ap[12], ap[13], ap[14]);
break;
}
-#endif
+# endif
}
-#ifdef CONTEXT_DEBUG
+# ifdef CONTEXT_DEBUG
if (sav != __thisContext) {
if (code) {
printf("CONTEXT BOTCH after execution of %x\n", code);
@@ -1338,11 +1361,12 @@
printf("context now:\n");
__dumpObject__(__thisContext, __LINE__);
}
-#endif
+# endif
RETURN (rslt);
}
}
badArgs: ;
+#endif /* not SCHTEAM */
%}.
(argArray isArray) ifFalse:[
(self numArgs ~~ 0
@@ -1970,11 +1994,11 @@
!CompiledCode class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.128 2015-05-28 15:08:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.129 2015-05-31 09:24:36 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.128 2015-05-28 15:08:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.129 2015-05-31 09:24:36 cg Exp $'
!
version_SVN