[Vm-dev] [commit][3367] CogVM source as per VMMaker.oscog-eem.1333

commits at squeakvm.org commits at squeakvm.org
Wed Jun 3 16:00:41 UTC 2015


Revision: 3367
Author:   eliot
Date:     2015-06-03 09:00:39 -0700 (Wed, 03 Jun 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1333

Cogit:
Fix assert-fails with absent receiver sends in Newspeak.  Have the implicit
and outer send lookup trampolines set the stacked receiver (when there is one)
when setting the implciit receiver.

Streamline send trampoline creation by refactoring trampoline name generation
so that the two limits, NumSendTrampolines - 2 and numRegArgs are treated
separately, and numArgsOrSendNumArgsReg: answers the relevant numArgs argument.
This should clear up confusion between numRegArgs (which can be 0, 1 & 2) and
NumSendTrampolines - 2, which is always 2.

Modified Paths:
--------------
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogitARMv5.c
    branches/Cog/nsspursrc/vm/cogitIA32.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogitARMv5.c
    branches/Cog/spursistasrc/vm/cogitIA32.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogitARMv5.c
    branches/Cog/spursrc/vm/cogitIA32.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogitARMv5.c
    branches/Cog/src/vm/cogitIA32.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/nsspursrc/vm/cogit.h	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -308,6 +308,7 @@
 #define NotFullyInitialized -1
 #define NSCClassTagIndex 0
 #define NSCEnclosingObjectIndex 1
+#define NSCNumArgsIndex 4
 #define NSCTargetIndex 2
 #define NumObjRefsInRuntime 0
 #define NumOopsPerNSC 6
@@ -759,7 +760,8 @@
 void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
 static sqInt spanForCleanBlockStartingAt(sqInt startPC) NoDbgRegParms;
 sqInt traceLinkedSendOffset(void);
-static char * trampolineNamenumArgs(char *routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
 static sqInt unimplementedPrimitive(void);
 static sqInt unknownBytecode(void);
 void unlinkAllSends(void);
@@ -9912,7 +9914,7 @@
 {
     sqInt classIndex;
     sqInt i;
-    usqInt pc;
+    sqInt pc;
 
 	pc = (((((usqInt)cPIC)) + firstCPICCaseOffset) + cPICCaseSize) - (jumpLongConditionalByteSize(backEnd));
 	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
@@ -11070,6 +11072,7 @@
 {
     AbstractInstruction *jumpItsTheReceiverStupid;
     AbstractInstruction *jumpMiss;
+    sqInt offset;
 
 	opcodeIndex = 0;
 	genGetInlineCacheClassTagFromintoforEntry(ReceiverResultReg, ClassReg, 0);
@@ -11087,6 +11090,26 @@
 	jumpItsTheReceiverStupid = genoperand(JumpZero, ((sqInt)0));
 	/* begin MoveR:R: */
 	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
+	if (numArgs > 2) {
+		if (numArgs >= (NumSendTrampolines - 1)) {
+
+			/* arbitrary argument count */
+
+			/* begin MoveMw:r:R: */
+			genoperandoperandoperand(MoveMwrR, NSCNumArgsIndex * BytesPerWord, SendNumArgsReg, TempReg);
+			
+			/* begin MoveR:Xwr:R: */
+			genoperandoperandoperand(MoveRXwrR, ReceiverResultReg, TempReg, SPReg);
+		}
+		else {
+
+			/* Known argument count */
+
+			/* begin MoveR:Mw:r: */
+			offset = ((0) + numArgs) * BytesPerWord;
+			genoperandoperandoperand(MoveRMwr, TempReg, offset, SPReg);
+		}
+	}
 	jmpTarget(jumpItsTheReceiverStupid, gLabel());
 	/* begin MoveMw:r:R: */
 	genoperandoperandoperand(MoveMwrR, NSCTargetIndex * BytesPerWord, SendNumArgsReg, TempReg);
@@ -14165,18 +14188,31 @@
 	return (cmNoCheckEntryOffset + (callInstructionByteSize(backEnd))) + (pushLinkRegisterByteSize(backEnd));
 }
 
+	/* Cogit>>#trampolineName:numArgs: */
+static char *
+trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs)
+{
+    char *theString;
 
-/*	Malloc a string with the contents for the trampoline table */
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= (NumSendTrampolines - 2)
+		? '0' + numArgs
+		: 'N'));
+	return theString;
+}
 
-	/* Cogit>>#trampolineName:numArgs: */
+	/* Cogit>>#trampolineName:numRegArgs: */
 static char *
-trampolineNamenumArgs(char *routinePrefix, sqInt numArgs)
+trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs)
 {
     char *theString;
 
-	
-	theString = malloc((strlen(routinePrefix)) + 6);
-	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs >= 0
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= 2
 		? '0' + numArgs
 		: 'N'));
 	return theString;
@@ -22502,7 +22538,7 @@
 	enilopmart = methodZoneBase;
 	methodZoneBase = alignUptoRoutineBoundary(endAddress);
 	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
-	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceCallPIC", numArgs), enilopmart);
+	recordGeneratedRunTimeaddress(trampolineNamenumRegArgs("ceCallPIC", numArgs), enilopmart);
 	return ((void (*)(void)) enilopmart);
 }
 
@@ -22899,7 +22935,6 @@
 	Read the class-side method trampolines for documentation on the various
 	trampolines 
  */
-/*	Slang needs these apparently superfluous asSymbol sends. */
 
 	/* StackToRegisterMappingCogit>>#generateMissAbortTrampolines */
 static void
@@ -22920,9 +22955,7 @@
 }
 
 
-/*	Self send, dynamic super send, and implicit receiver send. TODO: outer
-	send. 
- */
+/*	Self send, dynamic super send, implicit receiver send, and outer send. */
 /*	Override to generate code to push the register arg(s) for <= numRegArg
 	arity sends.
  */
@@ -22933,22 +22966,22 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		selfSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceSelfSendtonumArgs, numArgs, trampolineNamenumArgs("ceSelfSend", numArgs), ClassReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		selfSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceSelfSendtonumArgs, numArgs, trampolineNamenumArgs("ceSelfSend", numArgs), ClassReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	selfSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargarg(ceSelfSendtonumArgs, 2 + 1, trampolineNamenumArgs("ceSelfSend", -1), ClassReg, ReceiverResultReg, SendNumArgsReg));
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		dynamicSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceDynamicSuperSendtonumArgs, numArgs, trampolineNamenumArgs("ceDynSuperSend", numArgs), ClassReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		dynamicSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceDynamicSuperSendtonumArgs, numArgs, trampolineNamenumArgs("ceDynSuperSend", numArgs), ClassReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	dynamicSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargarg(ceDynamicSuperSendtonumArgs, 2 + 1, trampolineNamenumArgs("ceDynSuperSend", -1), ClassReg, ReceiverResultReg, SendNumArgsReg));
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
 		implicitReceiverSendTrampolines[numArgs] = (genNSSendTrampolineFornumArgscalled(ceImplicitReceiverSendreceiver, numArgs, trampolineNamenumArgs("ceImplicitReceiverSend", numArgs)));
 	}
-	implicitReceiverSendTrampolines[NumSendTrampolines - 1] = (genNSSendTrampolineFornumArgscalled(ceImplicitReceiverSendreceiver, 2 + 1, trampolineNamenumArgs("ceImplicitReceiverSend", -1)));
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
 		outerSendTrampolines[numArgs] = (genNSSendTrampolineFornumArgscalled(ceOuterSendreceiver, numArgs, trampolineNamenumArgs("ceOuterSend", numArgs)));
 	}
-	outerSendTrampolines[NumSendTrampolines - 1] = (genNSSendTrampolineFornumArgscalled(ceOuterSendreceiver, 2 + 1, trampolineNamenumArgs("ceOuterSend", -1)));
 }
 
 
@@ -22962,25 +22995,28 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	ordinarySendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSend", -1), ClassReg, 0, ReceiverResultReg, SendNumArgsReg));
 	generateNewspeakSendTrampolines();
 
 	
 #  if BytecodeSetHasDirectedSuperSend
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	directedSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, 2 + 1, trampolineNamenumArgs("ceDirectedSuperSend", -1), ClassReg, TempReg, ReceiverResultReg, SendNumArgsReg));
 
 #  endif /* BytecodeSetHasDirectedSuperSend */
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	superSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSuperSend", -1), ClassReg, 1, ReceiverResultReg, SendNumArgsReg));
 	firstSend = ordinarySendTrampolines[0];
 	lastSend = superSendTrampolines[NumSendTrampolines - 1];
 }
@@ -23206,9 +23242,7 @@
 	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 0, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
-		? numArgs
-		: -1)), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumRegArgs("ceMethodAbort", numArgs), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
 }
 
 
@@ -23239,9 +23273,7 @@
 {
 	opcodeIndex = 0;
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genInnerPICAbortTrampoline(trampolineNamenumArgs("cePICAbort", (numArgs <= 2
-		? numArgs
-		: -1)));
+	return genInnerPICAbortTrampoline(trampolineNamenumRegArgs("cePICAbort", numArgs));
 }
 
 	/* StackToRegisterMappingCogit>>#genPICMissTrampolineFor: */
@@ -23256,9 +23288,7 @@
 
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
-	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 2
-		? numArgs
-		: -1)), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumRegArgs("cePICMiss", numArgs), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 	return startAddress;
 }
 

Modified: branches/Cog/nsspursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitIA32.c	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/nsspursrc/vm/cogitIA32.c	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -305,6 +305,7 @@
 #define NotFullyInitialized -1
 #define NSCClassTagIndex 0
 #define NSCEnclosingObjectIndex 1
+#define NSCNumArgsIndex 4
 #define NSCTargetIndex 2
 #define NumObjRefsInRuntime 0
 #define NumOopsPerNSC 6
@@ -704,7 +705,8 @@
 void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
 static sqInt spanForCleanBlockStartingAt(sqInt startPC) NoDbgRegParms;
 sqInt traceLinkedSendOffset(void);
-static char * trampolineNamenumArgs(char *routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
 static sqInt unimplementedPrimitive(void);
 static sqInt unknownBytecode(void);
 void unlinkAllSends(void);
@@ -9841,6 +9843,7 @@
 {
     AbstractInstruction *jumpItsTheReceiverStupid;
     AbstractInstruction *jumpMiss;
+    sqInt offset;
 
 	opcodeIndex = 0;
 	genGetInlineCacheClassTagFromintoforEntry(ReceiverResultReg, ClassReg, 0);
@@ -9858,6 +9861,28 @@
 	jumpItsTheReceiverStupid = genoperand(JumpZero, ((sqInt)0));
 	/* begin MoveR:R: */
 	genoperandoperand(MoveRR, TempReg, ReceiverResultReg);
+	if (numArgs > 2) {
+		if (numArgs >= (NumSendTrampolines - 1)) {
+
+			/* arbitrary argument count */
+
+			/* begin MoveMw:r:R: */
+			genoperandoperandoperand(MoveMwrR, NSCNumArgsIndex * BytesPerWord, SendNumArgsReg, TempReg);
+			/* begin AddCq:R: */
+			genoperandoperand(AddCqR, 1, TempReg);
+
+			/* begin MoveR:Xwr:R: */
+			genoperandoperandoperand(MoveRXwrR, ReceiverResultReg, TempReg, SPReg);
+		}
+		else {
+
+			/* Known argument count */
+
+			/* begin MoveR:Mw:r: */
+			offset = ((1) + numArgs) * BytesPerWord;
+			genoperandoperandoperand(MoveRMwr, TempReg, offset, SPReg);
+		}
+	}
 	jmpTarget(jumpItsTheReceiverStupid, gLabel());
 	/* begin MoveMw:r:R: */
 	genoperandoperandoperand(MoveMwrR, NSCTargetIndex * BytesPerWord, SendNumArgsReg, TempReg);
@@ -12954,18 +12979,31 @@
 	return (cmNoCheckEntryOffset + (callInstructionByteSize(backEnd))) + (0);
 }
 
+	/* Cogit>>#trampolineName:numArgs: */
+static char *
+trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs)
+{
+    char *theString;
 
-/*	Malloc a string with the contents for the trampoline table */
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= (NumSendTrampolines - 2)
+		? '0' + numArgs
+		: 'N'));
+	return theString;
+}
 
-	/* Cogit>>#trampolineName:numArgs: */
+	/* Cogit>>#trampolineName:numRegArgs: */
 static char *
-trampolineNamenumArgs(char *routinePrefix, sqInt numArgs)
+trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs)
 {
     char *theString;
 
-	
-	theString = malloc((strlen(routinePrefix)) + 6);
-	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs >= 0
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= 2
 		? '0' + numArgs
 		: 'N'));
 	return theString;
@@ -21273,7 +21311,7 @@
 	enilopmart = methodZoneBase;
 	methodZoneBase = alignUptoRoutineBoundary(endAddress);
 	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
-	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceCallPIC", numArgs), enilopmart);
+	recordGeneratedRunTimeaddress(trampolineNamenumRegArgs("ceCallPIC", numArgs), enilopmart);
 	return ((void (*)(void)) enilopmart);
 }
 
@@ -21669,7 +21707,6 @@
 	Read the class-side method trampolines for documentation on the various
 	trampolines 
  */
-/*	Slang needs these apparently superfluous asSymbol sends. */
 
 	/* StackToRegisterMappingCogit>>#generateMissAbortTrampolines */
 static void
@@ -21690,9 +21727,7 @@
 }
 
 
-/*	Self send, dynamic super send, and implicit receiver send. TODO: outer
-	send. 
- */
+/*	Self send, dynamic super send, implicit receiver send, and outer send. */
 /*	Override to generate code to push the register arg(s) for <= numRegArg
 	arity sends.
  */
@@ -21703,22 +21738,22 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		selfSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceSelfSendtonumArgs, numArgs, trampolineNamenumArgs("ceSelfSend", numArgs), ClassReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		selfSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceSelfSendtonumArgs, numArgs, trampolineNamenumArgs("ceSelfSend", numArgs), ClassReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	selfSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargarg(ceSelfSendtonumArgs, 2 + 1, trampolineNamenumArgs("ceSelfSend", -1), ClassReg, ReceiverResultReg, SendNumArgsReg));
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		dynamicSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceDynamicSuperSendtonumArgs, numArgs, trampolineNamenumArgs("ceDynSuperSend", numArgs), ClassReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		dynamicSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargarg(ceDynamicSuperSendtonumArgs, numArgs, trampolineNamenumArgs("ceDynSuperSend", numArgs), ClassReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	dynamicSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargarg(ceDynamicSuperSendtonumArgs, 2 + 1, trampolineNamenumArgs("ceDynSuperSend", -1), ClassReg, ReceiverResultReg, SendNumArgsReg));
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
 		implicitReceiverSendTrampolines[numArgs] = (genNSSendTrampolineFornumArgscalled(ceImplicitReceiverSendreceiver, numArgs, trampolineNamenumArgs("ceImplicitReceiverSend", numArgs)));
 	}
-	implicitReceiverSendTrampolines[NumSendTrampolines - 1] = (genNSSendTrampolineFornumArgscalled(ceImplicitReceiverSendreceiver, 2 + 1, trampolineNamenumArgs("ceImplicitReceiverSend", -1)));
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
 		outerSendTrampolines[numArgs] = (genNSSendTrampolineFornumArgscalled(ceOuterSendreceiver, numArgs, trampolineNamenumArgs("ceOuterSend", numArgs)));
 	}
-	outerSendTrampolines[NumSendTrampolines - 1] = (genNSSendTrampolineFornumArgscalled(ceOuterSendreceiver, 2 + 1, trampolineNamenumArgs("ceOuterSend", -1)));
 }
 
 
@@ -21732,25 +21767,28 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	ordinarySendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSend", -1), ClassReg, 0, ReceiverResultReg, SendNumArgsReg));
 	generateNewspeakSendTrampolines();
 
 	
 #  if BytecodeSetHasDirectedSuperSend
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	directedSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, 2 + 1, trampolineNamenumArgs("ceDirectedSuperSend", -1), ClassReg, TempReg, ReceiverResultReg, SendNumArgsReg));
 
 #  endif /* BytecodeSetHasDirectedSuperSend */
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	superSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSuperSend", -1), ClassReg, 1, ReceiverResultReg, SendNumArgsReg));
 	firstSend = ordinarySendTrampolines[0];
 	lastSend = superSendTrampolines[NumSendTrampolines - 1];
 }
@@ -21974,9 +22012,7 @@
 	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 0, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
-		? numArgs
-		: -1)), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumRegArgs("ceMethodAbort", numArgs), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
 }
 
 
@@ -22007,9 +22043,7 @@
 {
 	opcodeIndex = 0;
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genInnerPICAbortTrampoline(trampolineNamenumArgs("cePICAbort", (numArgs <= 2
-		? numArgs
-		: -1)));
+	return genInnerPICAbortTrampoline(trampolineNamenumRegArgs("cePICAbort", numArgs));
 }
 
 	/* StackToRegisterMappingCogit>>#genPICMissTrampolineFor: */
@@ -22024,9 +22058,7 @@
 
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
-	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 2
-		? numArgs
-		: -1)), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumRegArgs("cePICMiss", numArgs), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 	return startAddress;
 }
 


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Tue Jun  2 11:10:08 PDT 2015
   + Wed Jun  3 08:59:25 PDT 2015

Modified: branches/Cog/spursistasrc/vm/cogit.h
===================================================================
--- branches/Cog/spursistasrc/vm/cogit.h	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/spursistasrc/vm/cogit.h	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
 
 

Modified: branches/Cog/spursistasrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/spursistasrc/vm/cogitARMv5.c	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/spursistasrc/vm/cogitARMv5.c	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
    from
-	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
-static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980 " __DATE__ ;
+static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -754,7 +754,8 @@
 void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
 static sqInt spanForCleanBlockStartingAt(sqInt startPC) NoDbgRegParms;
 sqInt traceLinkedSendOffset(void);
-static char * trampolineNamenumArgs(char *routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
 static sqInt unimplementedPrimitive(void);
 static sqInt unknownBytecode(void);
 void unlinkAllSends(void);
@@ -9822,7 +9823,7 @@
 {
     sqInt classIndex;
     sqInt i;
-    usqInt pc;
+    sqInt pc;
 
 	pc = (((((usqInt)cPIC)) + firstCPICCaseOffset) + cPICCaseSize) - (jumpLongConditionalByteSize(backEnd));
 	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
@@ -13734,18 +13735,31 @@
 	return (cmNoCheckEntryOffset + (callInstructionByteSize(backEnd))) + (pushLinkRegisterByteSize(backEnd));
 }
 
+	/* Cogit>>#trampolineName:numArgs: */
+static char *
+trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs)
+{
+    char *theString;
 
-/*	Malloc a string with the contents for the trampoline table */
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= (NumSendTrampolines - 2)
+		? '0' + numArgs
+		: 'N'));
+	return theString;
+}
 
-	/* Cogit>>#trampolineName:numArgs: */
+	/* Cogit>>#trampolineName:numRegArgs: */
 static char *
-trampolineNamenumArgs(char *routinePrefix, sqInt numArgs)
+trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs)
 {
     char *theString;
 
-	
-	theString = malloc((strlen(routinePrefix)) + 6);
-	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs >= 0
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= 2
 		? '0' + numArgs
 		: 'N'));
 	return theString;
@@ -23513,7 +23527,7 @@
 	enilopmart = methodZoneBase;
 	methodZoneBase = alignUptoRoutineBoundary(endAddress);
 	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
-	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceCallPIC", numArgs), enilopmart);
+	recordGeneratedRunTimeaddress(trampolineNamenumRegArgs("ceCallPIC", numArgs), enilopmart);
 	return ((void (*)(void)) enilopmart);
 }
 
@@ -23910,7 +23924,6 @@
 	Read the class-side method trampolines for documentation on the various
 	trampolines 
  */
-/*	Slang needs these apparently superfluous asSymbol sends. */
 
 	/* StackToRegisterMappingCogit>>#generateMissAbortTrampolines */
 static void
@@ -23941,24 +23954,27 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	ordinarySendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSend", -1), ClassReg, 0, ReceiverResultReg, SendNumArgsReg));
 	
 	
 #  if BytecodeSetHasDirectedSuperSend
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	directedSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, 2 + 1, trampolineNamenumArgs("ceDirectedSuperSend", -1), ClassReg, TempReg, ReceiverResultReg, SendNumArgsReg));
 
 #  endif /* BytecodeSetHasDirectedSuperSend */
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	superSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSuperSend", -1), ClassReg, 1, ReceiverResultReg, SendNumArgsReg));
 	firstSend = ordinarySendTrampolines[0];
 	lastSend = superSendTrampolines[NumSendTrampolines - 1];
 }
@@ -24103,9 +24119,7 @@
 	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 0, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
-		? numArgs
-		: -1)), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumRegArgs("ceMethodAbort", numArgs), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
 }
 
 
@@ -24136,9 +24150,7 @@
 {
 	opcodeIndex = 0;
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genInnerPICAbortTrampoline(trampolineNamenumArgs("cePICAbort", (numArgs <= 2
-		? numArgs
-		: -1)));
+	return genInnerPICAbortTrampoline(trampolineNamenumRegArgs("cePICAbort", numArgs));
 }
 
 	/* StackToRegisterMappingCogit>>#genPICMissTrampolineFor: */
@@ -24153,9 +24165,7 @@
 
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
-	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 2
-		? numArgs
-		: -1)), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumRegArgs("cePICMiss", numArgs), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 	return startAddress;
 }
 

Modified: branches/Cog/spursistasrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/spursistasrc/vm/cogitIA32.c	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/spursistasrc/vm/cogitIA32.c	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
    from
-	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
-static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980 " __DATE__ ;
+static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -698,7 +698,8 @@
 void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
 static sqInt spanForCleanBlockStartingAt(sqInt startPC) NoDbgRegParms;
 sqInt traceLinkedSendOffset(void);
-static char * trampolineNamenumArgs(char *routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
 static sqInt unimplementedPrimitive(void);
 static sqInt unknownBytecode(void);
 void unlinkAllSends(void);
@@ -12511,18 +12512,31 @@
 	return (cmNoCheckEntryOffset + (callInstructionByteSize(backEnd))) + (0);
 }
 
+	/* Cogit>>#trampolineName:numArgs: */
+static char *
+trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs)
+{
+    char *theString;
 
-/*	Malloc a string with the contents for the trampoline table */
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= (NumSendTrampolines - 2)
+		? '0' + numArgs
+		: 'N'));
+	return theString;
+}
 
-	/* Cogit>>#trampolineName:numArgs: */
+	/* Cogit>>#trampolineName:numRegArgs: */
 static char *
-trampolineNamenumArgs(char *routinePrefix, sqInt numArgs)
+trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs)
 {
     char *theString;
 
-	
-	theString = malloc((strlen(routinePrefix)) + 6);
-	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs >= 0
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= 2
 		? '0' + numArgs
 		: 'N'));
 	return theString;
@@ -22270,7 +22284,7 @@
 	enilopmart = methodZoneBase;
 	methodZoneBase = alignUptoRoutineBoundary(endAddress);
 	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
-	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceCallPIC", numArgs), enilopmart);
+	recordGeneratedRunTimeaddress(trampolineNamenumRegArgs("ceCallPIC", numArgs), enilopmart);
 	return ((void (*)(void)) enilopmart);
 }
 
@@ -22666,7 +22680,6 @@
 	Read the class-side method trampolines for documentation on the various
 	trampolines 
  */
-/*	Slang needs these apparently superfluous asSymbol sends. */
 
 	/* StackToRegisterMappingCogit>>#generateMissAbortTrampolines */
 static void
@@ -22697,24 +22710,27 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	ordinarySendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSend", -1), ClassReg, 0, ReceiverResultReg, SendNumArgsReg));
 	
 	
 #  if BytecodeSetHasDirectedSuperSend
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	directedSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, 2 + 1, trampolineNamenumArgs("ceDirectedSuperSend", -1), ClassReg, TempReg, ReceiverResultReg, SendNumArgsReg));
 
 #  endif /* BytecodeSetHasDirectedSuperSend */
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	superSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSuperSend", -1), ClassReg, 1, ReceiverResultReg, SendNumArgsReg));
 	firstSend = ordinarySendTrampolines[0];
 	lastSend = superSendTrampolines[NumSendTrampolines - 1];
 }
@@ -22857,9 +22873,7 @@
 	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 0, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
-		? numArgs
-		: -1)), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumRegArgs("ceMethodAbort", numArgs), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
 }
 
 
@@ -22890,9 +22904,7 @@
 {
 	opcodeIndex = 0;
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genInnerPICAbortTrampoline(trampolineNamenumArgs("cePICAbort", (numArgs <= 2
-		? numArgs
-		: -1)));
+	return genInnerPICAbortTrampoline(trampolineNamenumRegArgs("cePICAbort", numArgs));
 }
 
 	/* StackToRegisterMappingCogit>>#genPICMissTrampolineFor: */
@@ -22907,9 +22919,7 @@
 
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
-	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 2
-		? numArgs
-		: -1)), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumRegArgs("cePICMiss", numArgs), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 	return startAddress;
 }
 

Modified: branches/Cog/spursrc/vm/cogit.h
===================================================================
--- branches/Cog/spursrc/vm/cogit.h	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/spursrc/vm/cogit.h	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
 
 

Modified: branches/Cog/spursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/spursrc/vm/cogitARMv5.c	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/spursrc/vm/cogitARMv5.c	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -749,7 +749,8 @@
 void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);
 static sqInt spanForCleanBlockStartingAt(sqInt startPC) NoDbgRegParms;
 sqInt traceLinkedSendOffset(void);
-static char * trampolineNamenumArgs(char *routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
+static char * trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs) NoDbgRegParms;
 static sqInt unimplementedPrimitive(void);
 static sqInt unknownBytecode(void);
 void unlinkAllSends(void);
@@ -13370,18 +13371,31 @@
 	return (cmNoCheckEntryOffset + (callInstructionByteSize(backEnd))) + (pushLinkRegisterByteSize(backEnd));
 }
 
+	/* Cogit>>#trampolineName:numArgs: */
+static char *
+trampolineNamenumArgs(sqInt routinePrefix, sqInt numArgs)
+{
+    char *theString;
 
-/*	Malloc a string with the contents for the trampoline table */
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= (NumSendTrampolines - 2)
+		? '0' + numArgs
+		: 'N'));
+	return theString;
+}
 
-	/* Cogit>>#trampolineName:numArgs: */
+	/* Cogit>>#trampolineName:numRegArgs: */
 static char *
-trampolineNamenumArgs(char *routinePrefix, sqInt numArgs)
+trampolineNamenumRegArgs(sqInt routinePrefix, sqInt numArgs)
 {
     char *theString;
 
-	
-	theString = malloc((strlen(routinePrefix)) + 6);
-	sprintf(theString, "%s%cArgs", routinePrefix, (numArgs >= 0
+	/* begin trampolineName:numArgs:limit: */
+	;
+	theString = malloc((strlen(((char *) routinePrefix))) + 6);
+	sprintf(theString, "%s%cArgs", ((char *) routinePrefix), (numArgs <= 2
 		? '0' + numArgs
 		: 'N'));
 	return theString;
@@ -20346,7 +20360,7 @@
 	enilopmart = methodZoneBase;
 	methodZoneBase = alignUptoRoutineBoundary(endAddress);
 	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
-	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceCallPIC", numArgs), enilopmart);
+	recordGeneratedRunTimeaddress(trampolineNamenumRegArgs("ceCallPIC", numArgs), enilopmart);
 	return ((void (*)(void)) enilopmart);
 }
 
@@ -20696,7 +20710,6 @@
 	Read the class-side method trampolines for documentation on the various
 	trampolines 
  */
-/*	Slang needs these apparently superfluous asSymbol sends. */
 
 	/* StackToRegisterMappingCogit>>#generateMissAbortTrampolines */
 static void
@@ -20727,24 +20740,27 @@
 {
     sqInt numArgs;
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		ordinarySendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSend", numArgs), ClassReg, 0, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	ordinarySendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSend", -1), ClassReg, 0, ReceiverResultReg, SendNumArgsReg));
 	
 	
 #  if BytecodeSetHasDirectedSuperSend
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		directedSuperSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, numArgs, trampolineNamenumArgs("ceDirectedSuperSend", numArgs), ClassReg, TempReg, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	directedSuperSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendabovetonumArgs, 2 + 1, trampolineNamenumArgs("ceDirectedSuperSend", -1), ClassReg, TempReg, ReceiverResultReg, SendNumArgsReg));
 
 #  endif /* BytecodeSetHasDirectedSuperSend */
 
-	for (numArgs = 0; numArgs <= (NumSendTrampolines - 2); numArgs += 1) {
-		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, numArgs));
+	for (numArgs = 0; numArgs < NumSendTrampolines; numArgs += 1) {
+		superSendTrampolines[numArgs] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, numArgs, trampolineNamenumArgs("ceSuperSend", numArgs), ClassReg, 1, ReceiverResultReg, (numArgs <= (NumSendTrampolines - 2)
+	? numArgs
+	: SendNumArgsReg)));
 	}
-	superSendTrampolines[NumSendTrampolines - 1] = (genSendTrampolineFornumArgscalledargargargarg(ceSendsupertonumArgs, 2 + 1, trampolineNamenumArgs("ceSuperSend", -1), ClassReg, 1, ReceiverResultReg, SendNumArgsReg));
 	firstSend = ordinarySendTrampolines[0];
 	lastSend = superSendTrampolines[NumSendTrampolines - 1];
 }
@@ -20961,9 +20977,7 @@
 	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 0, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
-		? numArgs
-		: -1)), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumRegArgs("ceMethodAbort", numArgs), 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
 }
 
 
@@ -20994,9 +21008,7 @@
 {
 	opcodeIndex = 0;
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genInnerPICAbortTrampoline(trampolineNamenumArgs("cePICAbort", (numArgs <= 2
-		? numArgs
-		: -1)));
+	return genInnerPICAbortTrampoline(trampolineNamenumRegArgs("cePICAbort", numArgs));
 }
 
 	/* StackToRegisterMappingCogit>>#genPICMissTrampolineFor: */
@@ -21011,9 +21023,7 @@
 
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgsscratchReg(backEnd, numArgs, SendNumArgsReg);
-	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 2
-		? numArgs
-		: -1)), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumRegArgs("cePICMiss", numArgs), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 	return startAddress;
 }
 

Modified: branches/Cog/spursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/spursrc/vm/cogitIA32.c	2015-06-02 18:10:30 UTC (rev 3366)
+++ branches/Cog/spursrc/vm/cogitIA32.c	2015-06-03 16:00:39 UTC (rev 3367)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1332 uuid: 528336b3-25ab-41f7-b788-2b9155e5d980
+	CCodeGenerator VMMaker.oscog-eem.1333 uuid: bc9001c2-8816-4b4e-bf91-8e11cad6ed6b
    from

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list