[Vm-dev] [commit][3032] CogVM source as per VMMaker.oscog-eem.804

commits at squeakvm.org commits at squeakvm.org
Sun Jul 6 04:01:16 UTC 2014


Revision: 3032
Author:   eliot
Date:     2014-07-05 21:01:13 -0700 (Sat, 05 Jul 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.804

Cogit:
Change the management of counters in Sista methods to hold the counters well
away from code.  This restores the performance of the Sista VMs on x86, where
when counters are close to code the writes to counters flush the instruction
cache and destroy performance.  In V3 use malloc to allocate and free them
(this means Sista V3 is not currently simulable).  In Spur, store them in
oldSpace in pinned objects (hence Sista Spur simulates just fine).

Split the enilopmarts into those that are used in the context of a call
(entering code as if from a call) and those used in other contexts (converting
interpreted method to machine code method in loops, returning from interpreter
method to machine code one, etc).  This fixes enilopmarts on RISCs (i.e. ARM)
where the ret pc must be popped into the LinkReg when entering machine code as
if from a call, but not when entering in other contexts (returning from inter-
preter to machine-code method, converting interpreter method to machine code in
a loop, etc).

Nuke a couple of unused variables in Cogit hierarchy.

Spur:
Fix bug in allocateSlotsForPinningInOldSpace:bytes:format:classIndex: and make
sure answered object is actually pinned.  Hence fix pinObject: & primitivePin.

Plugins:
Fix access to the characterTable in the ThreadedFFIPlugins.  Replace
characterTable at: with characterObjectOf:, and in Spur support wide characters.

Fix divide-as-shift issue in BalloonEnginePlugin.

Modified Paths:
--------------
    branches/Cog/image/envvars.sh
    branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cogmethod.h
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nscogsrc/vm/interp.h
    branches/Cog/nscogsrc/vm/vmCallback.h
    branches/Cog/nsspursrc/vm/cogit.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogmethod.h
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/interp.h
    branches/Cog/nsspursrc/vm/vmCallback.h
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/nsspurstacksrc/vm/interp.h
    branches/Cog/nsspurstacksrc/vm/vmCallback.h
    branches/Cog/sistasrc/vm/cogit.c
    branches/Cog/sistasrc/vm/cogit.h
    branches/Cog/sistasrc/vm/cogmethod.h
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/sistasrc/vm/interp.h
    branches/Cog/sistasrc/vm/vmCallback.h
    branches/Cog/spursistasrc/vm/cogit.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogmethod.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/interp.h
    branches/Cog/spursistasrc/vm/vmCallback.h
    branches/Cog/spursrc/vm/cogit.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogmethod.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/interp.h
    branches/Cog/spursrc/vm/vmCallback.h
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/spurstacksrc/vm/interp.h
    branches/Cog/spurstacksrc/vm/vmCallback.h
    branches/Cog/src/plugins/B2DPlugin/B2DPlugin.c
    branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
    branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogmethod.h
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/src/vm/interp.h
    branches/Cog/src/vm/vmCallback.h
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c
    branches/Cog/stacksrc/vm/interp.h
    branches/Cog/stacksrc/vm/vmCallback.h

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

Modified: branches/Cog/image/envvars.sh
===================================================================
--- branches/Cog/image/envvars.sh	2014-07-03 13:49:59 UTC (rev 3031)
+++ branches/Cog/image/envvars.sh	2014-07-06 04:01:13 UTC (rev 3032)
@@ -36,6 +36,7 @@
 				exit 2
 			fi
 		fi
+		rm -rf $VMDIR
 		tar xzf "$VMARC"
 		if [ ! -d $VMDIR -o "`quietmd5 "$VM"`" != $VMHASH ]; then
 			echo failed to correctly extract $VMDIR from $VMARC 1>&2
@@ -58,6 +59,7 @@
 				exit 2
 			fi
 		fi
+		rm -rf $VMDIR
 		unzip -q "$VMARC"
 		if [ ! -d "$VMDIR" -o "`quietmd5 "$VM"`" != $VMHASH ]; then
 			echo failed to correctly extract "`dirname $VM`" from $VMARC 1>&2

Modified: branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c	2014-07-03 13:49:59 UTC (rev 3031)
+++ branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c	2014-07-06 04:01:13 UTC (rev 3032)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.787 uuid: 4b38ebc1-339f-4523-a9fc-047923108211
+	VMPluginCodeGenerator VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
    from
-	BalloonEnginePlugin VMMaker.oscog-eem.787 uuid: 4b38ebc1-339f-4523-a9fc-047923108211
+	BalloonEnginePlugin VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
  */
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.787 uuid: 4b38ebc1-339f-4523-a9fc-047923108211 " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d " __DATE__ ;
 
 
 
@@ -839,9 +839,9 @@
 static void * loadBBFn;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"B2DPlugin VMMaker.oscog-eem.787 (i)"
+	"B2DPlugin VMMaker.oscog-eem.804 (i)"
 #else
-	"B2DPlugin VMMaker.oscog-eem.787 (e)"
+	"B2DPlugin VMMaker.oscog-eem.804 (e)"
 #endif
 ;
 static int* objBuffer;
@@ -12123,8 +12123,8 @@
 		minY = yValue * 256;
 		while ((minY > lastY)
 		 && (fwDy1 >= 0)) {
-			lastX += (fwDx1 + 32768) / 65536;
-			lastY += (fwDy1 + 32768) / 65536;
+			lastX += ((signed)(fwDx1 + 32768) >> 16);
+			lastY += ((signed)(fwDy1 + 32768) >> 16);
 			fwDx1 += (((int*) updateData1))[GBUpdateDDX];
 			fwDy1 += (((int*) updateData1))[GBUpdateDDY];
 		}
@@ -12132,7 +12132,7 @@
 		(((int*) updateData1))[GBUpdateY] = lastY;
 		(((int*) updateData1))[GBUpdateDX] = fwDx1;
 		(((int*) updateData1))[GBUpdateDY] = fwDy1;
-		xValue = lastX / 256;
+		xValue = ((signed)lastX >> 8);
 		objBuffer[bezier + GEXValue] = xValue;
 		objBuffer[bezier + GENumLines] = (deltaY - (yValue - startY));
 	}
@@ -12481,8 +12481,8 @@
 	minY = (workBuffer[GWCurrentY]) * 256;
 	while ((minY > lastY)
 	 && (fwDy >= 0)) {
-		lastX += (fwDx + 32768) / 65536;
-		lastY += (fwDy + 32768) / 65536;
+		lastX += ((signed)(fwDx + 32768) >> 16);
+		lastY += ((signed)(fwDy + 32768) >> 16);
 		fwDx += (((int*) updateData))[GBUpdateDDX];
 		fwDy += (((int*) updateData))[GBUpdateDDY];
 	}
@@ -12490,7 +12490,7 @@
 	(((int*) updateData))[GBUpdateY] = lastY;
 	(((int*) updateData))[GBUpdateDX] = fwDx;
 	(((int*) updateData))[GBUpdateDY] = fwDy;
-	xValue = lastX / 256;
+	xValue = ((signed)lastX >> 8);
 	objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue] = xValue;
 	return null;
 }
@@ -12522,8 +12522,8 @@
 	minY = yValue * 256;
 	while ((minY > lastY)
 	 && (fwDy >= 0)) {
-		lastX += (fwDx + 32768) / 65536;
-		lastY += (fwDy + 32768) / 65536;
+		lastX += ((signed)(fwDx + 32768) >> 16);
+		lastY += ((signed)(fwDy + 32768) >> 16);
 		fwDx += (((int*) updateData))[GBUpdateDDX];
 		fwDy += (((int*) updateData))[GBUpdateDDY];
 	}
@@ -12531,7 +12531,7 @@
 	(((int*) updateData))[GBUpdateY] = lastY;
 	(((int*) updateData))[GBUpdateDX] = fwDx;
 	(((int*) updateData))[GBUpdateDY] = fwDy;
-	return lastX / 256;
+	return ((signed)lastX >> 8);
 }
 
 
@@ -12564,8 +12564,8 @@
 	minY = yValue * 256;
 	while ((minY > lastY)
 	 && (fwDy >= 0)) {
-		lastX += (fwDx + 32768) / 65536;
-		lastY += (fwDy + 32768) / 65536;
+		lastX += ((signed)(fwDx + 32768) >> 16);
+		lastY += ((signed)(fwDy + 32768) >> 16);
 		fwDx += (((int*) updateData))[GBUpdateDDX];
 		fwDy += (((int*) updateData))[GBUpdateDDY];
 	}
@@ -12573,7 +12573,7 @@
 	(((int*) updateData))[GBUpdateY] = lastY;
 	(((int*) updateData))[GBUpdateDX] = fwDx;
 	(((int*) updateData))[GBUpdateDY] = fwDy;
-	xValue = lastX / 256;
+	xValue = ((signed)lastX >> 8);
 	objBuffer[bezier + GEXValue] = xValue;
 }
 
@@ -12683,8 +12683,8 @@
 		minY = yValue * 256;
 		while ((minY > lastY)
 		 && (fwDy >= 0)) {
-			lastX += (fwDx + 32768) / 65536;
-			lastY += (fwDy + 32768) / 65536;
+			lastX += ((signed)(fwDx + 32768) >> 16);
+			lastY += ((signed)(fwDy + 32768) >> 16);
 			fwDx += (((int*) updateData))[GBUpdateDDX];
 			fwDy += (((int*) updateData))[GBUpdateDDY];
 		}
@@ -12692,7 +12692,7 @@
 		(((int*) updateData))[GBUpdateY] = lastY;
 		(((int*) updateData))[GBUpdateDX] = fwDx;
 		(((int*) updateData))[GBUpdateDY] = fwDy;
-		lastX / 256;
+		((signed)lastX >> 8);
 	}
 	else {
 
@@ -12716,8 +12716,8 @@
 	minY1 = yValue * 256;
 	while ((minY1 > lastY1)
 	 && (fwDy1 >= 0)) {
-		lastX1 += (fwDx1 + 32768) / 65536;
-		lastY1 += (fwDy1 + 32768) / 65536;
+		lastX1 += ((signed)(fwDx1 + 32768) >> 16);
+		lastY1 += ((signed)(fwDy1 + 32768) >> 16);
 		fwDx1 += (((int*) updateData1))[GBUpdateDDX];
 		fwDy1 += (((int*) updateData1))[GBUpdateDDY];
 	}
@@ -12725,7 +12725,7 @@
 	(((int*) updateData1))[GBUpdateY] = lastY1;
 	(((int*) updateData1))[GBUpdateDX] = fwDx1;
 	(((int*) updateData1))[GBUpdateDY] = fwDy1;
-	lastX1 / 256;
+	((signed)lastX1 >> 8);
 	computeFinalWideBezierValueswidth(bezier, lineWidth);
 }
 

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2014-07-03 13:49:59 UTC (rev 3031)
+++ branches/Cog/nscogsrc/vm/cogit.c	2014-07-06 04:01:13 UTC (rev 3032)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.798 uuid: f47e2c22-fea0-4762-b689-8b295a59d8ac
+	CCodeGenerator VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.798 uuid: f47e2c22-fea0-4762-b689-8b295a59d8ac
+	StackToRegisterMappingCogit VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.798 uuid: f47e2c22-fea0-4762-b689-8b295a59d8ac " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -301,6 +301,7 @@
 #define OrCqR 93
 #define OrCwR 100
 #define OrRR 86
+#define PCReg -18
 #define PopR 69
 #define PrefetchAw 72
 #define PrimCallCollectsProfileSamples 8
@@ -380,6 +381,7 @@
 static AbstractInstruction * genJumpFPLess(AbstractInstruction * self_in_genJumpFPLess, void *jumpTarget) NoDbgRegParms;
 static AbstractInstruction * genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister) NoDbgRegParms;
 static AbstractInstruction * getJmpTarget(AbstractInstruction * self_in_getJmpTarget) NoDbgRegParms;
+static sqInt hasPCRegister(AbstractInstruction * self_in_hasPCRegister) NoDbgRegParms;
 static sqInt isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress) NoDbgRegParms;
 static sqInt isAnInstruction(AbstractInstruction * self_in_isAnInstruction, AbstractInstruction *addressOrInstruction) NoDbgRegParms;
 static sqInt isJump(AbstractInstruction * self_in_isJump) NoDbgRegParms;
@@ -572,6 +574,8 @@
 static AbstractInstruction * gCall(sqInt callTarget) NoDbgRegParms;
 static AbstractInstruction * gCmpCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
 static AbstractInstruction * gCmpCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms;
+void callCogCodePopReceiver(void);
+void callCogCodePopReceiverAndClassRegs(void);
 sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver);
 static sqInt ceImplicitReceiverForreceiverclass(sqInt selector, sqInt receiver, sqInt rcvrClass) NoDbgRegParms;
 sqInt ceSICMiss(sqInt receiver);
@@ -615,7 +619,6 @@
 static AbstractInstruction * gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) NoDbgRegParms;
 static sqInt endPCOf(sqInt aMethod) NoDbgRegParms;
 void enterCogCodePopReceiver(void);
-void enterCogCodePopReceiverAndClassRegs(void);
 static sqInt extABytecode(void);
 static sqInt extBBytecode(void);
 static sqInt fillInBlockHeadersAt(sqInt startAddress) NoDbgRegParms;
@@ -628,10 +631,12 @@
 static sqInt findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranch, char *mcpc, sqInt bcpc, void *targetMcpc) NoDbgRegParms;
 static void freePICsWithFreedTargets(void);
 void freeUnmarkedMachineCode(void);
+static void (*genCallEnilopmartForandcalled(sqInt regArg1, sqInt regArg2, char *trampolineName))(void)  NoDbgRegParms;
+static void (*genCallEnilopmartForcalled(sqInt regArg1, char *trampolineName))(void)  NoDbgRegParms;
 static sqInt genCheckForInterruptsTrampoline(void);
 static void (*genEnilopmartForandandcalled(sqInt regArg1, sqInt regArg2, sqInt regArg3, char *trampolineName))(void)  NoDbgRegParms;
 static void (*genEnilopmartForandcalled(sqInt regArg1, sqInt regArg2, char *trampolineName))(void)  NoDbgRegParms;
-static void (*genEnilopmartForcalled(sqInt regArg, char *trampolineName))(void)  NoDbgRegParms;
+static void (*genEnilopmartForcalled(sqInt regArg1, char *trampolineName))(void)  NoDbgRegParms;
 static void generateCaptureCStackPointers(sqInt captureFramePointer) NoDbgRegParms;
 static void generateClosedPICPrototype(void);
 static CogMethod * generateCogMethod(sqInt selector) NoDbgRegParms;
@@ -711,6 +716,7 @@
 static sqInt maybeFreeCogMethodDoesntLookKosher(CogMethod *cogMethod) NoDbgRegParms;
 static sqInt maybeGenerateCheckFeatures(void);
 static sqInt maybeGenerateICacheFlush(void);
+static void maybeMarkCountersIn(CogMethod *cogMethod) NoDbgRegParms;
 usqInt mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
 static sqInt methodhasSameCodeAscheckPenultimate(sqInt methodA, sqInt methodB, sqInt comparePenultimateLiteral) NoDbgRegParms;
 sqInt minCogMethodAddress(void);
@@ -858,10 +864,12 @@
 static sqInt isSmallIntegerTagNonZero(void);
 static void markAndTraceLiteralIfYoung(sqInt literal) NoDbgRegParms;
 static void markAndTraceLiteral(sqInt literal) NoDbgRegParms;
+static sqInt numCountersFor(usqInt theCounters) NoDbgRegParms;
 sqInt numRegArgs(void);
 static sqInt numSmallIntegerBits(void);
 static sqInt remapObject(sqInt oop) NoDbgRegParms;
 static sqInt remapOop(sqInt oop) NoDbgRegParms;
+void resetCountersIn(CogMethod *cogMethod);
 static sqInt shouldAnnotateObjectReference(sqInt anOop) NoDbgRegParms;
 static sqInt slotOffsetOfInstVarIndex(sqInt index) NoDbgRegParms;
 static sqInt smallIntegerIsOnlyImmediateType(void);
@@ -978,6 +986,8 @@
 static BlockStart * addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span) NoDbgRegParms;
 static void annotateBytecodeIfAnnotated(CogSimStackEntry *aSimStackEntry) NoDbgRegParms;
 static sqInt anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n) NoDbgRegParms;
+void callCogCodePopReceiverArg0Regs(void);
+void callCogCodePopReceiverArg1Arg0Regs(void);
 static sqInt compileAbstractInstructionsFromthrough(sqInt start, sqInt end) NoDbgRegParms;
 static sqInt compileBlockBodies(void);
 static void compileBlockFrameBuild(BlockStart *blockStart) NoDbgRegParms;
@@ -992,12 +1002,10 @@
 static BytecodeFixup * ensureFixupAt(sqInt targetIndex) NoDbgRegParms;
 static BytecodeFixup * ensureNonMergeFixupAt(sqInt targetIndex) NoDbgRegParms;
 static void ensureReceiverResultRegContainsSelf(void);
-void enterCogCodePopReceiverArg0Regs(void);
-void enterCogCodePopReceiverArg1Arg0Regs(void);
 static void evaluateat(BytecodeDescriptor *descriptor, sqInt pc) NoDbgRegParms;
+static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void)  NoDbgRegParms;
 static sqInt genDoubleArithmeticpreOpCheck(sqInt arithmeticOperator, AbstractInstruction *(*preOpCheckOrNil)(int rcvrReg, int argReg)) NoDbgRegParms;
 static sqInt genDoubleComparisoninvert(AbstractInstruction *(*jumpOpcodeGenerator)(void *), sqInt invertComparison) NoDbgRegParms;
-static void (*genEnterPICEnilopmartNumArgs(sqInt numArgs))(void)  NoDbgRegParms;
 static sqInt genExternalizePointersForPrimitiveCall(void);
 static sqInt genExtPushClosureBytecode(void);
 static void generateEnilopmarts(void);
@@ -1151,6 +1159,13 @@
 static sqInt callerSavedRegMask;
 static sqInt ceActiveContextTrampoline;
 sqInt ceBaseFrameReturnTrampoline;
+void (*ceCall0ArgsPIC)(void);
+void (*ceCall1ArgsPIC)(void);
+void (*ceCall2ArgsPIC)(void);
+void (*ceCallCogCodePopReceiverAndClassRegs)(void);
+void (*ceCallCogCodePopReceiverArg0Regs)(void);
+void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void);
+void (*ceCallCogCodePopReceiverReg)(void);
 sqInt ceCannotResumeTrampoline;
 void (*ceCaptureCStackPointers)(void);
 static unsigned long (*ceCheckFeaturesFunction)(void);
@@ -1158,12 +1173,6 @@
 static sqInt ceClosureCopyTrampoline;
 static sqInt ceCPICMissTrampoline;
 static sqInt ceCreateNewArrayTrampoline;
-void (*ceEnter0ArgsPIC)(void);
-void (*ceEnter1ArgsPIC)(void);
-void (*ceEnter2ArgsPIC)(void);
-void (*ceEnterCogCodePopReceiverAndClassRegs)(void);
-void (*ceEnterCogCodePopReceiverArg0Regs)(void);
-void (*ceEnterCogCodePopReceiverArg1Arg0Regs)(void);
 void (*ceEnterCogCodePopReceiverReg)(void);
 static sqInt ceExplicitReceiverTrampoline;
 static sqInt ceFetchContextInstVarTrampoline;
@@ -1740,7 +1749,6 @@
 static sqInt lastSend;
 static usqInt limitAddress;
 static sqInt maxLitIndex;
-static CogBlockMethod * maxMethodBefore;
 static sqInt methodAbortTrampolines[4];
 static sqInt methodBytesFreedSinceLastCompaction;
 static sqInt methodCount;
@@ -1993,9 +2001,10 @@
 	{ genPrimitiveClosureValue, 1, 0 }
 };
 static sqInt primitiveIndex;
-void (*realCEEnterCogCodePopReceiverAndClassRegs)(void);
-void (*realCEEnterCogCodePopReceiverArg0Regs)(void);
-void (*realCEEnterCogCodePopReceiverArg1Arg0Regs)(void);
+void (*realCECallCogCodePopReceiverAndClassRegs)(void);
+void (*realCECallCogCodePopReceiverArg0Regs)(void);
+void (*realCECallCogCodePopReceiverArg1Arg0Regs)(void);
+void (*realCECallCogCodePopReceiverReg)(void);
 void (*realCEEnterCogCodePopReceiverReg)(void);
 static sqInt regArgsHaveBeenPushed;
 static sqInt runtimeObjectRefIndex;
@@ -2256,7 +2265,21 @@
 	return ((AbstractInstruction *) (((self_in_getJmpTarget->operands))[0]));
 }
 
+
+/*	Answer if the processor has a generally addressable pc register, such as
+	the ARM.
+	On such processors we can execute jumping to pop top of stack by popping
+	into the pc register. Note that this is not a generic RISC feature. The
+	PowerPC does not
+	allow one to pop into the pc for example. So by default, answer false. */
+
 static sqInt
+hasPCRegister(AbstractInstruction * self_in_hasPCRegister)
+{
+	return 0;
+}
+
+static sqInt
 isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress)
 {
 	return addressIsInFixups(fixupOrAddress);
@@ -8696,6 +8719,30 @@
 }
 
 
+/*	This is a static version of ceCallCogCodePopReceiverReg
+	for break-pointing when debugging in C. */
+/*	This exists only for break-pointing. */
+
+void
+callCogCodePopReceiver(void)
+{
+	realCECallCogCodePopReceiverReg();
+	error("what??");
+
+}
+
+
+/*	This is a static version of ceCallCogCodePopReceiverAndClassRegs
+	for break-pointing when debugging in C. */
+/*	This exists only for break-pointing. */
+
+void
+callCogCodePopReceiverAndClassRegs(void)
+{
+	realCECallCogCodePopReceiverAndClassRegs();
+}
+
+
 /*	Code entry closed PIC miss. A send has fallen
 	through a closed (finite) polymorphic inline cache.
 	Either extend it or patch the send site to an open PIC.
@@ -9797,6 +9844,7 @@
 		if ((((sqInt)cogMethod)) == InsufficientCodeSpace) {
 			callForCogCompiledCodeCompaction();
 		}
+		/* begin maybeFreeCounters */
 		return null;
 	}
 	return cogMethod;
@@ -10461,17 +10509,6 @@
 }
 
 
-/*	This is a static version of ceEnterCogCodePopReceiverAndClassRegs
-	for break-pointing when debugging in C. */
-/*	This exists only for break-pointing. */
-
-void
-enterCogCodePopReceiverAndClassRegs(void)
-{
-	realCEEnterCogCodePopReceiverAndClassRegs();
-}
-
-
 /*	224		11100000	aaaaaaaa	Extend A (Ext A = Ext A prev * 256 + Ext A) */
 
 static sqInt
@@ -10754,12 +10791,111 @@
 	}
 }
 
+
+/*	An enilopmart (the reverse of a trampoline) is a piece of code that makes
+	the system-call-like transition from the C runtime into generated machine
+	code. This version is for entering code as if from a call. The desired
+	arguments and entry-point are pushed on a stackPage's stack, and beneath
+	them is the call's return address. The enilopmart pops off the values to
+	be loaded into registers, and on CISCs then executes a return instruction
+	to pop
+	off the entry-point and jump to it. On RISCs the enilopmart pops off the
+	values to be loaded into registers, pops the entry-point into a scratch
+	register, pops
+	the return address into the LinkReg and then jumps to the entry point.
+	
+	BEFORE				AFTER			(stacks grow down)
+	whatever			stackPointer ->	whatever
+	call return pc
+	target address =>	reg1 = reg1val, etc
+	reg1val				LinkReg = call return pc
+	stackPointer ->	reg2val				pc = target address
+	
+	C.F. genEnilopmartFor:and:and:called: */
+
+static void (*genCallEnilopmartForandcalled(sqInt regArg1, sqInt regArg2, char *trampolineName))(void)
+
+{
+    sqInt endAddress;
+    sqInt enilopmart;
+    sqInt size;
+
+	opcodeIndex = 0;
+	genLoadStackPointers(backEnd);
+	/* begin PopR: */
+	genoperand(PopR, regArg2);
+	/* begin PopR: */
+	genoperand(PopR, regArg1);
+	/* begin RetN: */
+	genoperand(RetN, 0);
+
+	computeMaximumSizes();
+	size = generateInstructionsAt(methodZoneBase);
+	endAddress = outputInstructionsAt(methodZoneBase);
+	assert((methodZoneBase + size) == endAddress);
+	enilopmart = methodZoneBase;
+	methodZoneBase = alignUptoRoutineBoundary(endAddress);
+	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
+	recordGeneratedRunTimeaddress(trampolineName, enilopmart);
+	return ((void (*)(void)) enilopmart);
+}
+
+
+/*	An enilopmart (the reverse of a trampoline) is a piece of code that makes
+	the system-call-like transition from the C runtime into generated machine
+	code. This version is for entering code as if from a call. The desired
+	arguments and entry-point are pushed on a stackPage's stack, and beneath
+	them is the call's return address. The enilopmart pops off the values to
+	be loaded into registers, and on CISCs then executes a return instruction
+	to pop
+	off the entry-point and jump to it. On RISCs the enilopmart pops off the
+	values to be loaded into registers, pops the entry-point into a scratch
+	register, pops
+	the return address into the LinkReg and then jumps to the entry point.
+	
+	BEFORE				AFTER			(stacks grow down)
+	whatever			stackPointer ->	whatever
+	call return pc		reg1 = reg1val
+	target address =>	LinkReg = call return pc
+	stackPointer ->	reg1val				pc = target address
+	
+	C.F. genEnilopmartFor:and:and:called: */
+
+static void (*genCallEnilopmartForcalled(sqInt regArg1, char *trampolineName))(void)
+
+{
+    sqInt endAddress;
+    sqInt enilopmart;
+    sqInt size;
+
+	opcodeIndex = 0;
+	genLoadStackPointers(backEnd);
+	/* begin PopR: */
+	genoperand(PopR, regArg1);
+	/* begin RetN: */
+	genoperand(RetN, 0);
+
+	computeMaximumSizes();
+	size = generateInstructionsAt(methodZoneBase);
+	endAddress = outputInstructionsAt(methodZoneBase);
+	assert((methodZoneBase + size) == endAddress);
+	enilopmart = methodZoneBase;
+	methodZoneBase = alignUptoRoutineBoundary(endAddress);
+	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
+	recordGeneratedRunTimeaddress(trampolineName, enilopmart);
+	return ((void (*)(void)) enilopmart);
+}
+
 static sqInt
 genCheckForInterruptsTrampoline(void)
 {
     sqInt address;
     sqInt address1;
 
+
+	/* if we have a link register we will assume that it does not get automatically pushed onto the stack
+	   and thus there is no need to pop it before saving to instructionPointerAddress */
+
 	opcodeIndex = 0;
 	/* begin PopR: */
 	genoperand(PopR, TempReg);
@@ -10776,7 +10912,15 @@
 	code. The desired arguments and entry-point are pushed on a stackPage's
 	stack. The enilopmart pops off the values to be loaded into registers and
 	then executes a return instruction to pop off the entry-point and jump to
-	it.  */
+	it. 
+	BEFORE				AFTER			(stacks grow down)
+	whatever			stackPointer ->	whatever
+	target address =>	reg1 = reg1val, etc
+	reg1val				pc = target address
+	reg2val
+	stackPointer ->	reg3val
+	
+	C.F. genCallEnilopmartFor:and:and:called: */
 
 static void (*genEnilopmartForandandcalled(sqInt regArg1, sqInt regArg2, sqInt regArg3, char *trampolineName))(void)
 
@@ -10793,9 +10937,9 @@
 	genoperand(PopR, regArg2);
 	/* begin PopR: */
 	genoperand(PopR, regArg1);
-	
 	/* begin RetN: */
 	genoperand(RetN, 0);
+
 	computeMaximumSizes();
 	size = generateInstructionsAt(methodZoneBase);
 	endAddress = outputInstructionsAt(methodZoneBase);
@@ -10813,7 +10957,14 @@
 	code. The desired arguments and entry-point are pushed on a stackPage's
 	stack. The enilopmart pops off the values to be loaded into registers and
 	then executes a return instruction to pop off the entry-point and jump to
-	it.  */
+	it. 
+	BEFORE				AFTER			(stacks grow down)
+	whatever			stackPointer ->	whatever
+	target address =>	reg1 = reg1val, etc
+	reg1val				pc = target address
+	stackPointer ->	reg2val
+	
+	C.F. genCallEnilopmartFor:and:and:called: */
 
 static void (*genEnilopmartForandcalled(sqInt regArg1, sqInt regArg2, char *trampolineName))(void)
 
@@ -10828,9 +10979,9 @@
 	genoperand(PopR, regArg2);
 	/* begin PopR: */
 	genoperand(PopR, regArg1);
-	
 	/* begin RetN: */
 	genoperand(RetN, 0);
+
 	computeMaximumSizes();
 	size = generateInstructionsAt(methodZoneBase);
 	endAddress = outputInstructionsAt(methodZoneBase);
@@ -10848,9 +10999,15 @@
 	code. The desired arguments and entry-point are pushed on a stackPage's
 	stack. The enilopmart pops off the values to be loaded into registers and
 	then executes a return instruction to pop off the entry-point and jump to
-	it.  */
+	it. 
+	BEFORE				AFTER			(stacks grow down)
+	whatever			stackPointer ->	whatever
+	target address =>	reg1 = reg1val
+	stackPointer ->	reg1val				pc = target address
+	
+	C.F. genCallEnilopmartFor:and:and:called: */
 
-static void (*genEnilopmartForcalled(sqInt regArg, char *trampolineName))(void)
+static void (*genEnilopmartForcalled(sqInt regArg1, char *trampolineName))(void)
 
 {
     sqInt endAddress;
@@ -10860,10 +11017,10 @@
 	opcodeIndex = 0;
 	genLoadStackPointers(backEnd);
 	/* begin PopR: */
-	genoperand(PopR, regArg);
-	
+	genoperand(PopR, regArg1);
 	/* begin RetN: */
 	genoperand(RetN, 0);
+
 	computeMaximumSizes();
 	size = generateInstructionsAt(methodZoneBase);
 	endAddress = outputInstructionsAt(methodZoneBase);
@@ -12493,6 +12650,7 @@
 			 && ((isImmediate((cogMethod->selector)))
 			 || (isMarked((cogMethod->selector))))));
 			markAndTraceLiteral((cogMethod->selector));
+			maybeMarkCountersIn(cogMethod);
 			/* begin mapFor:performUntil:arg: */
 			mcpc = (((sqInt)cogMethod)) + cmNoCheckEntryOffset;
 			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
@@ -12525,6 +12683,7 @@
 			 && ((isImmediate((cogMethod->selector)))
 			 || (isMarked((cogMethod->selector))))));
 			markAndTraceLiteral((cogMethod->selector));
+			maybeMarkCountersIn(cogMethod);
 			/* begin mapFor:performUntil:arg: */
 			mcpc1 = (((sqInt)cogMethod)) + cmNoCheckEntryOffset;
 			map1 = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
@@ -12624,6 +12783,7 @@
 			assert(((cogMethod->cmType)) == CMMethod);
 			assert(isMarked((cogMethod->methodObject)));
 			markAndTraceLiteral((cogMethod->selector));
+			maybeMarkCountersIn(cogMethod);
 			/* begin mapFor:performUntil:arg: */
 			mcpc = (((sqInt)cogMethod)) + cmNoCheckEntryOffset;
 			map = ((((usqInt)cogMethod)) + ((cogMethod->blockSize))) - 1;
@@ -13032,6 +13192,18 @@
 }
 
 
+/*	In SIsta Spur counters are held on the heap in pinned objects which must
+	be marked
+	to avoid them being garbage collected. This is the hook through which that
+	happens. 
+ */
+
+static void
+maybeMarkCountersIn(CogMethod *cogMethod)
+{
+}
+
+
 /*	Answer the absolute machine code pc matching the zero-relative
 	bytecode pc of a backward branch in cogMethod, given the start
 	of the bytecodes for cogMethod's block or method object. */
@@ -14704,6 +14876,7 @@
 			removeFromUnpairedMethodList(cogMethod);
 
 		}
+		/* begin maybeFreeCountersOf: */
 		(cogMethod->cmRefersToYoung = 0);
 	}
 	if (((cogMethod->cmType)) == CMOpenPIC) {
@@ -16391,7 +16564,13 @@
 	}
 }
 
+static sqInt
+numCountersFor(usqInt theCounters)
+{
+	return longAt(theCounters - (sizeof(sqInt)));
+}
 
+
 /*	Define how many register arguments a StackToRegisterMappingCogit can
 	and should use with the receiver. The value must be 0, 1 or 2. Note that a
 	SimpleStackBasedCogit always has 0 register args (although the receiver is
@@ -16430,7 +16609,13 @@
 		: remap(oop));
 }
 
+void
+resetCountersIn(CogMethod *cogMethod)
+{
+	fillInCountersatStartAddress(numCountersFor(counters(cogMethod)), counters(cogMethod));
+}
 
+
 /*	self assert: ((objectMemory isIntegerObject: anOop)
 	or: [objectMemory addressCouldBeObj: anOop]). */
 
@@ -18352,6 +18537,28 @@
 }
 
 
+/*	This is a static version of ceCallCogCodePopReceiverArg0Regs
+	for break-pointing when debugging in C. */
+/*	This exists only for break-pointing. */
+
+void
+callCogCodePopReceiverArg0Regs(void)
+{
+	realCECallCogCodePopReceiverArg0Regs();
+}
+
+
+/*	This is a static version of ceCallCogCodePopReceiverArg1Arg0Regs
+	for break-pointing when debugging in C. */
+/*	This exists only for break-pointing. */
+
+void
+callCogCodePopReceiverArg1Arg0Regs(void)
+{
+	realCECallCogCodePopReceiverArg1Arg0Regs();
+}
+
+
 /*	Loop over bytecodes, dispatching to the generator for each bytecode,
 	handling fixups in due course.
  */
@@ -18641,7 +18848,7 @@
 	if (numCleanBlocks > 0) {
 		addCleanBlockStarts();
 	}
-	/* begin maybeAllocAndInitCounters */
+	
 	blockEntryLabel = null;
 	(methodLabel->dependent = null);
 	if (((result = compileEntireMethod())) < 0) {
@@ -19033,28 +19240,6 @@
 	}
 }
 
-
-/*	This is a static version of ceEnterCogCodePopReceiverArg0Regs
-	for break-pointing when debugging in C. */
-/*	This exists only for break-pointing. */
-
-void
-enterCogCodePopReceiverArg0Regs(void)
-{
-	realCEEnterCogCodePopReceiverArg0Regs();
-}
-
-
-/*	This is a static version of ceEnterCogCodePopReceiverArg1Arg0Regs
-	for break-pointing when debugging in C. */
-/*	This exists only for break-pointing. */
-
-void
-enterCogCodePopReceiverArg1Arg0Regs(void)
-{
-	realCEEnterCogCodePopReceiverArg1Arg0Regs();
-}
-
 static void
 evaluateat(BytecodeDescriptor *descriptor, sqInt pc)
 {
@@ -19065,6 +19250,55 @@
 }
 
 
+/*	Generate special versions of the ceCallCogCodePopReceiverAndClassRegs
+	enilopmart that also pop register args from the stack to undo the pushing
+	of register args in the abort/miss trampolines. */
+
+static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void)
+
+{
+    sqInt endAddress;
+    sqInt enilopmart;
+    sqInt reg;
+    sqInt size;
+
+	opcodeIndex = 0;
+	genLoadStackPointers(backEnd);
+	/* begin PopR: */
+	genoperand(PopR, ClassReg);
+	/* begin PopR: */
+	genoperand(PopR, TempReg);
+	/* begin PopR: */
+	reg = SendNumArgsReg;
+	genoperand(PopR, reg);
+	if (numArgs > 0) {
+		if (numArgs > 1) {
+			/* begin PopR: */
+			genoperand(PopR, Arg1Reg);
+			assert((numRegArgs()) == 2);
+		}
+		/* begin PopR: */
+		genoperand(PopR, Arg0Reg);
+	}
+	/* begin PopR: */
+	genoperand(PopR, ReceiverResultReg);
+	/* begin PushR: */
+	genoperand(PushR, SendNumArgsReg);
+
+	/* begin JumpR: */
+	genoperand(JumpR, TempReg);
+	computeMaximumSizes();
+	size = generateInstructionsAt(methodZoneBase);
+	endAddress = outputInstructionsAt(methodZoneBase);
+	assert((methodZoneBase + size) == endAddress);
+	enilopmart = methodZoneBase;
+	methodZoneBase = alignUptoRoutineBoundary(endAddress);
+	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
+	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceCallPIC", numArgs), enilopmart);
+	return ((void (*)(void)) enilopmart);
+}
+
+
 /*	Receiver and arg in registers.
 	Stack looks like
 	return address */
@@ -19186,52 +19420,6 @@
 }
 
 
-/*	Generate special versions of the ceEnterCogCodePopReceiverAndClassRegs
-	enilopmart that also pop register args from the stack to undo the pushing
-	of register args in the abort/miss trampolines. */
-
-static void (*genEnterPICEnilopmartNumArgs(sqInt numArgs))(void)
-
-{
-    sqInt endAddress;
-    sqInt enilopmart;
-    sqInt size;
-
-	opcodeIndex = 0;
-	genLoadStackPointers(backEnd);
-	/* begin PopR: */
-	genoperand(PopR, ClassReg);
-	/* begin PopR: */
-	genoperand(PopR, TempReg);
-	/* begin PopR: */
-	genoperand(PopR, SendNumArgsReg);
-	if (numArgs > 0) {
-		if (numArgs > 1) {
-			/* begin PopR: */
-			genoperand(PopR, Arg1Reg);
-			assert((numRegArgs()) == 2);
-		}
-		/* begin PopR: */
-		genoperand(PopR, Arg0Reg);
-	}
-	/* begin PopR: */
-	genoperand(PopR, ReceiverResultReg);
-	/* begin PushR: */
-	genoperand(PushR, SendNumArgsReg);
-	/* begin JumpR: */
-	genoperand(JumpR, TempReg);
-	computeMaximumSizes();
-	size = generateInstructionsAt(methodZoneBase);
-	endAddress = outputInstructionsAt(methodZoneBase);
-	assert((methodZoneBase + size) == endAddress);
-	enilopmart = methodZoneBase;
-	methodZoneBase = alignUptoRoutineBoundary(endAddress);
-	nopsFromto(backEnd, endAddress, methodZoneBase - 1);
-	recordGeneratedRunTimeaddress(trampolineNamenumArgs("ceEnterPIC", numArgs), enilopmart);
-	return ((void (*)(void)) enilopmart);
-}
-
-
 /*	Override to push the register receiver and register arguments, if any. */
 
 static sqInt
@@ -19309,12 +19497,15 @@
 #  if Debug
 	realCEEnterCogCodePopReceiverReg = genEnilopmartForcalled(ReceiverResultReg, "realCEEnterCogCodePopReceiverReg");
 	ceEnterCogCodePopReceiverReg = enterCogCodePopReceiver;
-	realCEEnterCogCodePopReceiverAndClassRegs = genEnilopmartForandcalled(ReceiverResultReg, ClassReg, "realCEEnterCogCodePopReceiverAndClassRegs");
-	ceEnterCogCodePopReceiverAndClassRegs = enterCogCodePopReceiverAndClassRegs;
+	realCECallCogCodePopReceiverReg = genCallEnilopmartForcalled(ReceiverResultReg, "realCEEnterCogCodePopReceiverReg");
+	ceCallCogCodePopReceiverReg = callCogCodePopReceiver;
+	realCECallCogCodePopReceiverAndClassRegs = genCallEnilopmartForandcalled(ReceiverResultReg, ClassReg, "realCECallCogCodePopReceiverAndClassRegs");
+	ceCallCogCodePopReceiverAndClassRegs = callCogCodePopReceiverAndClassRegs;
 
 #  else /* Debug */
 	ceEnterCogCodePopReceiverReg = genEnilopmartForcalled(ReceiverResultReg, "ceEnterCogCodePopReceiverReg");
-	ceEnterCogCodePopReceiverAndClassRegs = genEnilopmartForandcalled(ReceiverResultReg, ClassReg, "ceEnterCogCodePopReceiverAndClassRegs");
+	ceCallCogCodePopReceiverReg = genCallEnilopmartForcalled(ReceiverResultReg, "ceCallCogCodePopReceiverReg");
+	ceCallCogCodePopReceiverAndClassRegs = genCallEnilopmartForandcalled(ReceiverResultReg, ClassReg, "ceCallCogCodePopReceiverAndClassRegs");
 
 #  endif /* Debug */
 
@@ -19328,19 +19519,19 @@
 	recordGeneratedRunTimeaddress("cePrimReturnEnterCogCodeProfiling", cePrimReturnEnterCogCodeProfiling);
 	
 #  if Debug
-	realCEEnterCogCodePopReceiverArg0Regs = genEnilopmartForandcalled(ReceiverResultReg, Arg0Reg, "realCEEnterCogCodePopReceiverArg0Regs");
-	ceEnterCogCodePopReceiverArg0Regs = enterCogCodePopReceiverArg0Regs;
-	realCEEnterCogCodePopReceiverArg1Arg0Regs = genEnilopmartForandandcalled(ReceiverResultReg, Arg0Reg, Arg1Reg, "realCEEnterCogCodePopReceiverArg1Arg0Regs");
-	ceEnterCogCodePopReceiverArg1Arg0Regs = enterCogCodePopReceiverArg1Arg0Regs;
+	realCECallCogCodePopReceiverArg0Regs = genEnilopmartForandcalled(ReceiverResultReg, Arg0Reg, "realCECallCogCodePopReceiverArg0Regs");
+	ceCallCogCodePopReceiverArg0Regs = callCogCodePopReceiverArg0Regs;
+	realCECallCogCodePopReceiverArg1Arg0Regs = genEnilopmartForandandcalled(ReceiverResultReg, Arg0Reg, Arg1Reg, "realCECallCogCodePopReceiverArg1Arg0Regs");
+	ceCallCogCodePopReceiverArg1Arg0Regs = callCogCodePopReceiverArg1Arg0Regs;
 
 #  else /* Debug */
-	ceEnterCogCodePopReceiverArg0Regs = genEnilopmartForandcalled(ReceiverResultReg, Arg0Reg, "ceEnterCogCodePopReceiverArg0Regs");
-	ceEnterCogCodePopReceiverArg1Arg0Regs = genEnilopmartForandandcalled(ReceiverResultReg, Arg0Reg, Arg1Reg, "ceEnterCogCodePopReceiverArg1Arg0Regs");
+	ceCallCogCodePopReceiverArg0Regs = genEnilopmartForandcalled(ReceiverResultReg, Arg0Reg, "ceCallCogCodePopReceiverArg0Regs");
+	ceCallCogCodePopReceiverArg1Arg0Regs = genEnilopmartForandandcalled(ReceiverResultReg, Arg0Reg, Arg1Reg, "ceCallCogCodePopReceiverArg1Arg0Regs");
 
 #  endif /* Debug */
 
-	ceEnter0ArgsPIC = genEnterPICEnilopmartNumArgs(0);
-	ceEnter1ArgsPIC = genEnterPICEnilopmartNumArgs(1);
+	ceCall0ArgsPIC = genCallPICEnilopmartNumArgs(0);
+	ceCall1ArgsPIC = genCallPICEnilopmartNumArgs(1);
 	
 
 }

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2014-07-03 13:49:59 UTC (rev 3031)
+++ branches/Cog/nscogsrc/vm/cogit.h	2014-07-06 04:01:13 UTC (rev 3032)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.798 uuid: f47e2c22-fea0-4762-b689-8b295a59d8ac
+	CCodeGenerator VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
  */
 
 
@@ -17,6 +17,8 @@
 sqInt abortOffset(void);
 void addCogMethodsToHeapMap(void);
 sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
+void callCogCodePopReceiver(void);
+void callCogCodePopReceiverAndClassRegs(void);
 sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver);
 sqInt ceSICMiss(sqInt receiver);
 void checkAssertsEnabledInCogit(void);
@@ -31,7 +33,6 @@
 CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop);
 void compactCogCompiledCode(void);
 void enterCogCodePopReceiver(void);
-void enterCogCodePopReceiverAndClassRegs(void);
 CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod);
 void freeUnmarkedMachineCode(void);
 void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress);
@@ -71,14 +72,15 @@
 char * whereIsMaybeCodeThing(sqInt anOop);
 sqInt canLinkToYoungClasses(void);
 sqInt numRegArgs(void);
+void resetCountersIn(CogMethod *cogMethod);
 sqInt genQuickReturnConst(void);
 sqInt genQuickReturnInstVar(void);
 sqInt genQuickReturnSelf(void);
 void recordCallOffsetInof(CogMethod *cogMethod, void *callLabelArg);
 void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void));
 void voidCogCompiledCode(void);
-void enterCogCodePopReceiverArg0Regs(void);
-void enterCogCodePopReceiverArg1Arg0Regs(void);
+void callCogCodePopReceiverArg0Regs(void);
+void callCogCodePopReceiverArg1Arg0Regs(void);
 
 
 /*** Global Variables ***/
@@ -87,15 +89,16 @@
 void * CFramePointer;
 void * CStackPointer;
 sqInt ceBaseFrameReturnTrampoline;
+void (*ceCall0ArgsPIC)(void);
+void (*ceCall1ArgsPIC)(void);
+void (*ceCall2ArgsPIC)(void);
+void (*ceCallCogCodePopReceiverAndClassRegs)(void);
+void (*ceCallCogCodePopReceiverArg0Regs)(void);
+void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void);
+void (*ceCallCogCodePopReceiverReg)(void);
 sqInt ceCannotResumeTrampoline;
 void (*ceCaptureCStackPointers)(void);
 sqInt ceCheckForInterruptTrampoline;
-void (*ceEnter0ArgsPIC)(void);
-void (*ceEnter1ArgsPIC)(void);
-void (*ceEnter2ArgsPIC)(void);
-void (*ceEnterCogCodePopReceiverAndClassRegs)(void);
-void (*ceEnterCogCodePopReceiverArg0Regs)(void);
-void (*ceEnterCogCodePopReceiverArg1Arg0Regs)(void);
 void (*ceEnterCogCodePopReceiverReg)(void);
 unsigned long (*ceGetSP)(void);
 sqInt ceReturnToInterpreterTrampoline;
@@ -107,9 +110,10 @@
 sqInt cmNoCheckEntryOffset;
 unsigned long debugPrimCallStackOffset;
 sqInt missOffset;
-void (*realCEEnterCogCodePopReceiverAndClassRegs)(void);
-void (*realCEEnterCogCodePopReceiverArg0Regs)(void);
-void (*realCEEnterCogCodePopReceiverArg1Arg0Regs)(void);
+void (*realCECallCogCodePopReceiverAndClassRegs)(void);
+void (*realCECallCogCodePopReceiverArg0Regs)(void);
+void (*realCECallCogCodePopReceiverArg1Arg0Regs)(void);
+void (*realCECallCogCodePopReceiverReg)(void);
 void (*realCEEnterCogCodePopReceiverReg)(void);
 int traceFlags ;
 sqInt traceStores;

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2014-07-03 13:49:59 UTC (rev 3031)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2014-07-06 04:01:13 UTC (rev 3032)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.798 uuid: f47e2c22-fea0-4762-b689-8b295a59d8ac
+	CCodeGenerator VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
  */
 
 typedef struct {

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c	2014-07-03 13:49:59 UTC (rev 3031)
+++ branches/Cog/nscogsrc/vm/cointerp.c	2014-07-06 04:01:13 UTC (rev 3032)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.800 uuid: 33fd7d74-ad59-446d-ac56-1e9c2eb4c089
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
    from
-	CoInterpreter VMMaker.oscog-eem.800 uuid: 33fd7d74-ad59-446d-ac56-1e9c2eb4c089
+	CoInterpreter VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.800 uuid: 33fd7d74-ad59-446d-ac56-1e9c2eb4c089 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.804 uuid: 8f232d31-fa50-4134-8556-da8fc12ab32d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -377,6 +377,7 @@
 static void attemptToSwitchToMachineCode(sqInt bcpc) NoDbgRegParms;
 EXPORT(sqInt) callbackEnter(sqInt *callbackID);
 void callForCogCompiledCodeCompaction(void);
+static void callRegisterArgCogMethodatreceiver(CogMethod *cogMethod, sqInt entryOffset, sqInt rcvr) NoDbgRegParms;
 void ceActivateFailingPrimitiveMethod(sqInt aPrimitiveMethod);
 sqInt ceActiveContext(void);
 sqInt ceBaseFrameReturn(sqInt returnValue);
@@ -418,7 +419,6 @@
 void dumpPrimTraceLog(void);
 void dumpTraceLog(void);
 static void ensureContextIsExecutionSafeAfterAssignToStackPointer(sqInt aContext) NoDbgRegParms;
-static void enterRegisterArgCogMethodatreceiver(CogMethod *cogMethod, sqInt entryOffset, sqInt rcvr) NoDbgRegParms;
 static sqInt enterSmalltalkExecutiveImplementation(void);
 void executeCogMethodfromLinkedSendWithReceiver(CogMethod *cogMethod, sqInt rcvr);
 void executeCogMethodfromLinkedSendWithReceiverandCacheTag(CogMethod *cogMethod, sqInt rcvr, sqInt cacheTag);
@@ -835,7 +835,7 @@
 void printWronglySizedContexts(sqInt printContexts);
 static void restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut) NoDbgRegParms;
 static void runLeakCheckerForFullGC(sqInt fullGCFlag) NoDbgRegParms;
-static sqInt safeObjectAfter(sqInt oop) NoDbgRegParms;
+static usqInt safeObjectAfter(sqInt oop) NoDbgRegParms;
 static sqInt safePrintStringOf(sqInt oop) NoDbgRegParms;
 static sqInt shortentoIndexableSize(sqInt obj, sqInt nSlots) NoDbgRegParms;
 static sqInt sizeBitsOfSafe(sqInt oop) NoDbgRegParms;
@@ -2064,7 +2064,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.800";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.804";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -13146,7 +13146,7 @@
 		/* dont use and: so as to get Slang to inline cogit numRegArgs > 0 */
 
 		if (((cogMethod->cmNumArgs)) <= (numRegArgs())) {
-			enterRegisterArgCogMethodatreceiver(cogMethod, noCheckEntryOffset(), rcvr);
+			callRegisterArgCogMethodatreceiver(cogMethod, noCheckEntryOffset(), rcvr);
 		}
 
 		/* begin push: */
@@ -13156,7 +13156,7 @@
 		/* begin push: */
 		longAtput((sp1 = GIV(stackPointer) - BytesPerWord), rcvr);
 		GIV(stackPointer) = sp1;
-		ceEnterCogCodePopReceiverReg();
+		ceCallCogCodePopReceiverReg();
 		error("should not be reached");
 	}
 	/* begin push: */
@@ -13815,6 +13815,60 @@
 }
 
 
+/*	convert
+	rcvr	base
+	arg(s)
+	retpc	<- sp
+	to
+	retpc	base
+	entrypc
+	rcvr
+	arg(s)	<- sp
+	and then enter at either the checked or the unchecked entry-point. */
+
+static void
+callRegisterArgCogMethodatreceiver(CogMethod *cogMethod, sqInt entryOffset, sqInt rcvr)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt object;
+    sqInt object1;
+    char *sp;
+    char *sp1;
+    char *sp2;
+
+	assert(((numRegArgs()) > 0)
+	 && (((numRegArgs()) <= 2)
+	 && (((cogMethod->cmNumArgs)) <= (numRegArgs()))));
+	if (((cogMethod->cmNumArgs)) == 2) {
+		longAtput(GIV(stackPointer) + (3 * BytesPerWord), longAt(GIV(stackPointer)));
+		/* begin push: */
+		object = longAt(GIV(stackPointer) + (1 * BytesPerWord));
+		longAtput((sp = GIV(stackPointer) - BytesPerWord), object);
+		GIV(stackPointer) = sp;
+		longAtput(GIV(stackPointer) + (1 * BytesPerWord), longAt(GIV(stackPointer) + (3 * BytesPerWord)));
+		longAtput(GIV(stackPointer) + (2 * BytesPerWord), rcvr);
+		longAtput(GIV(stackPointer) + (3 * BytesPerWord), (((sqInt)cogMethod)) + entryOffset);
+		ceCallCogCodePopReceiverArg1Arg0Regs();
+	}
+	if (((cogMethod->cmNumArgs)) == 1) {
+		longAtput(GIV(stackPointer) + (2 * BytesPerWord), longAt(GIV(stackPointer)));
+		/* begin push: */
+		object1 = longAt(GIV(stackPointer) + (1 * BytesPerWord));
+		longAtput((sp1 = GIV(stackPointer) - BytesPerWord), object1);
+		GIV(stackPointer) = sp1;
+		longAtput(GIV(stackPointer) + (1 * BytesPerWord), rcvr);
+		longAtput(GIV(stackPointer) + (2 * BytesPerWord), (((sqInt)cogMethod)) + entryOffset);
+		ceCallCogCodePopReceiverArg0Regs();
+	}
+	assert(((cogMethod->cmNumArgs)) == 0);
+	longAtput(GIV(stackPointer) + (1 * BytesPerWord), longAt(GIV(stackPointer)));
+	longAtput(GIV(stackPointer) + (0 * BytesPerWord), (((sqInt)cogMethod)) + entryOffset);
+	/* begin push: */
+	longAtput((sp2 = GIV(stackPointer) - BytesPerWord), rcvr);
+	GIV(stackPointer) = sp2;
+	ceCallCogCodePopReceiverReg();
+}
+
+
 /*	An external call or FFI primitive has failed. Build the frame and
 	activate as appropriate. Enter either the interpreter or machine
 	code depending on whether aPrimitiveMethod has been or is still
@@ -15857,60 +15911,6 @@
 }
 
 
-/*	convert
-	rcvr	base
-	arg(s)
-	retpc	<- sp
-	to
-	retpc	base
-	entrypc
-	rcvr
-	arg(s)	<- sp
-	and then enter at either the checked or the unchecked entry-point. */
-
-static void
-enterRegisterArgCogMethodatreceiver(CogMethod *cogMethod, sqInt entryOffset, sqInt rcvr)
-{   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt object;
-    sqInt object1;
-    char *sp;
-    char *sp1;
-    char *sp2;
-
-	assert(((numRegArgs()) > 0)
-	 && (((numRegArgs()) <= 2)
-	 && (((cogMethod->cmNumArgs)) <= (numRegArgs()))));
-	if (((cogMethod->cmNumArgs)) == 2) {
-		longAtput(GIV(stackPointer) + (3 * BytesPerWord), longAt(GIV(stackPointer)));
-		/* begin push: */
-		object = longAt(GIV(stackPointer) + (1 * BytesPerWord));
-		longAtput((sp = GIV(stackPointer) - BytesPerWord), object);
-		GIV(stackPointer) = sp;
-		longAtput(GIV(stackPointer) + (1 * BytesPerWord), longAt(GIV(stackPointer) + (3 * BytesPerWord)));
-		longAtput(GIV(stackPointer) + (2 * BytesPerWord), rcvr);
-		longAtput(GIV(stackPointer) + (3 * BytesPerWord), (((sqInt)cogMethod)) + entryOffset);
-		ceEnterCogCodePopReceiverArg1Arg0Regs();
-	}
-	if (((cogMethod->cmNumArgs)) == 1) {
-		longAtput(GIV(stackPointer) + (2 * BytesPerWord), longAt(GIV(stackPointer)));
-		/* begin push: */
-		object1 = longAt(GIV(stackPointer) + (1 * BytesPerWord));
-		longAtput((sp1 = GIV(stackPointer) - BytesPerWord), object1);
-		GIV(stackPointer) = sp1;
-		longAtput(GIV(stackPointer) + (1 * BytesPerWord), rcvr);
-		longAtput(GIV(stackPointer) + (2 * BytesPerWord), (((sqInt)cogMethod)) + entryOffset);
-		ceEnterCogCodePopReceiverArg0Regs();
-	}
-	assert(((cogMethod->cmNumArgs)) == 0);
-	longAtput(GIV(stackPointer) + (1 * BytesPerWord), longAt(GIV(stackPointer)));
-	longAtput(GIV(stackPointer) + (0 * BytesPerWord), (((sqInt)cogMethod)) + entryOffset);
-	/* begin push: */
-	longAtput((sp2 = GIV(stackPointer) - BytesPerWord), rcvr);
-	GIV(stackPointer) = sp2;
-	ceEnterCogCodePopReceiverReg();
-}
-
-
 /*	Main entry-point into the interpreter at each execution level, where an
 	execution level is either the start of execution or reentry for a
 	callback. Capture the C stack
@@ -15969,7 +15969,7 @@
 	/* dont use and: so as to get Slang to inline cogit numRegArgs > 0 */
 
 	if (((cogMethod->cmNumArgs)) <= (numRegArgs())) {
-		enterRegisterArgCogMethodatreceiver(cogMethod, entryOffset(), rcvr);
+		callRegisterArgCogMethodatreceiver(cogMethod, entryOffset(), rcvr);
 	}
 
 	/* begin push: */
@@ -15979,7 +15979,7 @@
 	/* begin push: */
 	longAtput((sp1 = GIV(stackPointer) - BytesPerWord), rcvr);
 	GIV(stackPointer) = sp1;
-	ceEnterCogCodePopReceiverReg();
+	ceCallCogCodePopReceiverReg();
 }
 
 
@@ -16018,13 +16018,13 @@
 		
 		switch ((cogMethod->cmNumArgs)) {
 		case 0:
-			ceEnter0ArgsPIC();
+			ceCall0ArgsPIC();
 			break;
 		case 1:
-			ceEnter1ArgsPIC();
+			ceCall1ArgsPIC();
 			break;
 		case 2:
-			ceEnter2ArgsPIC();
+			ceCall2ArgsPIC();
 			break;
 		default:
 			null;
@@ -16039,7 +16039,7 @@
 	/* begin push: */
 	longAtput((sp3 = GIV(stackPointer) - BytesPerWord), cacheTag);
 	GIV(stackPointer) = sp3;
-	ceEnterCogCodePopReceiverAndClassRegs();
+	ceCallCogCodePopReceiverAndClassRegs();
 }
 
 
@@ -16066,7 +16066,7 @@
 	/* dont use and: so as to get Slang to inline cogit numRegArgs > 0 */
 
 	if (((cogMethod->cmNumArgs)) <= (numRegArgs())) {
-		enterRegisterArgCogMethodatreceiver(cogMethod, noCheckEntryOffset(), rcvr);
+		callRegisterArgCogMethodatreceiver(cogMethod, noCheckEntryOffset(), rcvr);
 	}
 
 	/* begin push: */
@@ -16076,7 +16076,7 @@
 	/* begin push: */
 	longAtput((sp1 = GIV(stackPointer) - BytesPerWord), rcvr);
 	GIV(stackPointer) = sp1;
-	ceEnterCogCodePopReceiverReg();
+	ceCallCogCodePopReceiverReg();
 }
 
 
@@ -25361,7 +25361,7 @@
 		/* begin push: */
 		longAtput((sp31 = GIV(stackPointer) - BytesPerWord), blockClosure);
 		GIV(stackPointer) = sp31;
-		ceEnterCogCodePopReceiverReg();
+		ceCallCogCodePopReceiverReg();
 		goto l1;
 	}
 	if ((((((sqInt) methodHeader)) < 0
@@ -25412,7 +25412,7 @@
 					/* begin push: */
 					longAtput((sp32 = GIV(stackPointer) - BytesPerWord), blockClosure);
 					GIV(stackPointer) = sp32;
-					ceEnterCogCodePopReceiverReg();
+					ceCallCogCodePopReceiverReg();
 					goto l1;
 				}
 				if (!GIV(cogCompiledCodeCompactionCalledFor)) {
@@ -25616,7 +25616,7 @@
 		/* begin push: */
 		longAtput((sp31 = GIV(stackPointer) - BytesPerWord), blockClosure);
 		GIV(stackPointer) = sp31;
-		ceEnterCogCodePopReceiverReg();
+		ceCallCogCodePopReceiverReg();
 		goto l1;
 	}
 	if ((((((sqInt) methodHeader)) < 0
@@ -25667,7 +25667,7 @@
 					/* begin push: */
 					longAtput((sp32 = GIV(stackPointer) - BytesPerWord), blockClosure);
 					GIV(stackPointer) = sp32;
-					ceEnterCogCodePopReceiverReg();
+					ceCallCogCodePopReceiverReg();
 					goto l1;
 				}
 				if (!GIV(cogCompiledCodeCompactionCalledFor)) {
@@ -25906,7 +25906,7 @@
 		/* begin push: */
 		longAtput((sp31 = GIV(stackPointer) - BytesPerWord), blockClosure);
 		GIV(stackPointer) = sp31;
-		ceEnterCogCodePopReceiverReg();
+		ceCallCogCodePopReceiverReg();
 		goto l1;
 	}
 	if ((((((sqInt) methodHeader)) < 0
@@ -25957,7 +25957,7 @@
 					/* begin push: */
 					longAtput((sp32 = GIV(stackPointer) - BytesPerWord), blockClosure);
 					GIV(stackPointer) = sp32;
-					ceEnterCogCodePopReceiverReg();
+					ceCallCogCodePopReceiverReg();
 					goto l1;
 				}
 				if (!GIV(cogCompiledCodeCompactionCalledFor)) {
@@ -36993,17 +36993,15 @@
     sqInt header1;
     sqInt header2;
     sqInt header3;
-    sqInt header4;
     usqInt lastWord;
     sqInt newFreeChunk;
     sqInt newOop;
-    sqInt next;
+    usqInt next;
     sqInt oop;
     sqInt realHeader;
     sqInt sz;
     sqInt sz1;
     sqInt sz2;
-    sqInt sz3;
     sqInt target;
     usqInt w;
 
@@ -37014,21 +37012,7 @@
 		/* begin objectAfterWhileForwarding: */
 		header2 = longAt(oop);
 		if ((header2 & MarkBit) == 0) {
-			/* begin objectAfter: */
-			if (!(asserta(oopisLessThan(oop, GIV(freeStart))))) {
-				error("no objects after the end of memory");
-			}
-			if (((longAt(oop)) & TypeMask) == HeaderTypeFree) {
-				sz2 = (longAt(oop)) & AllButTypeMask;
-			}
-			else {
-				/* begin sizeBitsOf: */
-				header3 = longAt(oop);
-				sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass
-					? (longAt(oop - (BytesPerWord * 2))) & LongSizeMask
-					: header3 & SizeMask);
-			}
-			next = (oop + sz2) + (headerTypeBytes[(longAt(oop + sz2)) & TypeMask]);
+			next = ((sqInt) (objectAfter(oop)));
 			goto l1;
 		}
 		fwdBlock1 = (header2 & AllButMarkBitAndTypeMask) << 1;
@@ -37043,7 +37027,7 @@
 		else {
 			sz1 = realHeader & SizeMask;
 		}
-		next = (oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);
+		next = ((sqInt) ((oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask])));
 	l1:	/* end objectAfterWhileForwarding: */;
 		if (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {
 
@@ -37097,18 +37081,18 @@
 	}
 	/* begin safeObjectAfter: */
 	if (((longAt(newFreeChunk)) & TypeMask) == HeaderTypeFree) {
-		sz3 = (longAt(newFreeChunk)) & AllButTypeMask;
+		sz2 = (longAt(newFreeChunk)) & AllButTypeMask;
 	}
 	else {
 		/* begin sizeBitsOf: */
-		header4 = longAt(newFreeChunk);
-		sz3 = ((header4 & TypeMask) == HeaderTypeSizeAndClass
+		header3 = longAt(newFreeChunk);
+		sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass
 			? (longAt(newFreeChunk - (BytesPerWord * 2))) & LongSizeMask
-			: header4 & SizeMask);
+			: header3 & SizeMask);
 	}
-	next = ((newFreeChunk + sz3) >= GIV(freeStart)
+	next = ((newFreeChunk + sz2) >= GIV(freeStart)
 		? GIV(freeStart)
-		: (newFreeChunk + sz3) + (headerTypeBytes[(longAt(newFreeChunk + sz3)) & TypeMask]));
+		: (newFreeChunk + sz2) + (headerTypeBytes[(longAt(newFreeChunk + sz2)) & TypeMask]));
 	assert((next == GIV(freeStart))
 	 || (next == (oopFromChunk(GIV(compEnd)))));
 	if (next == GIV(freeStart)) {
@@ -38976,7 +38960,7 @@
 	given object or free chunk in memory. Return freeStart when
 	enumeration is complete. This is for assertion checking only. */
 
-static sqInt
+static usqInt
 safeObjectAfter(sqInt oop)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt header;

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h	2014-07-03 13:49:59 UTC (rev 3031)

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list