[Vm-dev] [commit][2941] CogVM source as per VMMaker.oscog-eem.755

commits at squeakvm.org commits at squeakvm.org
Thu Jun 5 00:11:57 UTC 2014


Revision: 2941
Author:   eliot
Date:     2014-06-04 17:11:55 -0700 (Wed, 04 Jun 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.755

Spur:
Implement unforwarding in inlined machine code #==.  Hence rewrite the /horrible/
StackToRegisterMappingCogit>>genSpecialSelectorEqualsEquals.

Unforward method literals in cog:selector: to ensure that all
examinations of constants in the Cogit are of the actual objects.

Have StackToRegisterMappingCogit>>genPushReceiverBytecode
use ReceiverResultReg if it contains self.

Speed up isForwarded: test by using the fact that the
isForwarded class pun is a power of two.

Fix a slip in an assert in unlinkSolitaryFreeTreeNode:.

Comment out the checkFreeSpace check in copyToOldSpace:bytes:format:.

Make the assert check in Spur32BitCoMemoryManager>>freeStart: more lenient to
avoid bogus assert fails from machine code allocations.

Fix the abort sequence for RISCs.  The assert check on the sendMissCall requires
that sendMissCall means the sendMissCall. But on RISCs we must push the link reg
before calling it.  Hence we need a sendMiss label.

Modified Paths:
--------------
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cogmethod.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/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/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogmethod.h

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

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nscogsrc/vm/cogit.c	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	CCodeGenerator VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	StackToRegisterMappingCogit VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -392,7 +392,6 @@
 static AbstractInstruction * annotatewith(AbstractInstruction *abstractInstruction, sqInt annotationFlag) NoDbgRegParms;
 static sqInt anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n) NoDbgRegParms;
 static void assertSaneJumpTarget(AbstractInstruction *jumpTarget) NoDbgRegParms;
-static sqInt availableRegisterOrNil(void);
 static sqInt blockCreationBytecodeSizeForHeader(sqInt methodHeader) NoDbgRegParms;
 static sqInt blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) NoDbgRegParms;
 sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
@@ -400,6 +399,7 @@
 static AbstractInstruction * CallRT(sqInt callTarget) NoDbgRegParms;
 static AbstractInstruction * CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved) NoDbgRegParms;
 static AbstractInstruction * CallSend(sqInt callTarget) NoDbgRegParms;
+static AbstractInstruction * gCall(sqInt callTarget) NoDbgRegParms;
 static AbstractInstruction * gCmpCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
 static AbstractInstruction * gCmpCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms;
 static sqInt cacheTagIsMarked(sqInt cacheTag) NoDbgRegParms;
@@ -1993,6 +1993,7 @@
 void (*realCEEnterCogCodePopReceiverReg)(void);
 static sqInt regArgsHaveBeenPushed;
 static sqInt runtimeObjectRefIndex;
+static AbstractInstruction * sendMiss;
 static AbstractInstruction * sendMissCall;
 static sqInt sendTrampolines[NumSendTrampolines];
 static CogSimStackEntry simSelf;
@@ -2471,30 +2472,6 @@
 }
 
 static sqInt
-availableRegisterOrNil(void)
-{
-    sqInt liveRegs;
-
-	liveRegs = liveRegisters();
-	if (!(liveRegs & (registerMaskFor(Arg1Reg)))) {
-		return Arg1Reg;
-	}
-	if (!(liveRegs & (registerMaskFor(Arg0Reg)))) {
-		return Arg0Reg;
-	}
-	if (!(liveRegs & (registerMaskFor(SendNumArgsReg)))) {
-		return SendNumArgsReg;
-	}
-	if (!(liveRegs & (registerMaskFor(ClassReg)))) {
-		return ClassReg;
-	}
-	if (!(liveRegs & (registerMaskFor(ReceiverResultReg)))) {
-		return ReceiverResultReg;
-	}
-	return null;
-}
-
-static sqInt
 blockCreationBytecodeSizeForHeader(sqInt methodHeader)
 {
 	return (headerIndicatesAlternateBytecodeSet(methodHeader)
@@ -2759,6 +2736,12 @@
 }
 
 static AbstractInstruction *
+gCall(sqInt callTarget)
+{
+	return genoperand(Call, callTarget);
+}
+
+static AbstractInstruction *
 gCmpCqR(sqInt quickConstant, sqInt reg)
 {
 	return genoperandoperand(CmpCqR, quickConstant, reg);
@@ -4000,6 +3983,7 @@
 		bytecodeSetOffset = 0;
 	}
 	extA = (extB = 0);
+	/* begin ensureNoForwardedLiteralsIn: */
 	methodObj = aMethodObj;
 	cogMethod = compileCogMethod(aSelectorOop);
 	if ((((((sqInt)cogMethod)) >= MaxNegativeErrorCode) && ((((sqInt)cogMethod)) <= -1))) {
@@ -4123,10 +4107,8 @@
 
 	/* begin MoveCq:R: */
 	stackOverflowCall = genoperandoperand(MoveCqR, 0, ReceiverResultReg);
-	
-	/* begin Call: */
-	callTarget = methodAbortTrampolineFor(methodOrBlockNumArgs);
-	sendMissCall = genoperand(Call, callTarget);
+	sendMiss = (sendMissCall = gCall(methodAbortTrampolineFor(methodOrBlockNumArgs)));
+
 }
 
 
@@ -4722,7 +4704,7 @@
 	/* begin CmpR:R: */
 	genoperandoperand(CmpRR, ClassReg, TempReg);
 	/* begin JumpNonZero: */
-	genoperand(JumpNonZero, ((sqInt)sendMissCall));
+	genoperand(JumpNonZero, ((sqInt)sendMiss));
 	/* begin Label */
 	noCheckEntry = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
 	if (recordSendTrace()) {
@@ -15085,6 +15067,10 @@
 static sqInt
 genPushReceiverBytecode(void)
 {
+	if (((optStatus.isReceiverResultRegLive))
+	 && (((optStatus.ssEntry)) == ((&simSelf)))) {
+		return ssPushRegister(ReceiverResultReg);
+	}
 	return ssPushDesc(simSelf);
 }
 
@@ -16095,50 +16081,21 @@
     BytecodeDescriptor *primDescriptor;
     sqInt quickConstant;
     sqInt rcvrReg;
-    sqInt resultReg;
     sqInt targetBytecodePC;
+    sqInt unforwardArg;
+    sqInt unforwardRcvr;
 
-	flag("rewrite this crap.");
-	ssPop(2);
-	resultReg = availableRegisterOrNil();
-	if (!(resultReg)) {
-		;
-		ssAllocateRequiredReg((resultReg = Arg1Reg));
-	}
-	ssPush(2);
-	if (((((ssTop())->type)) == SSConstant)
-	 && (!(((ssTop())->spilled)))) {
 
-		/* if spilled we must generate a real pop */
+	/* forwarders have been followed in cog:selector: */
 
-		if ((((ssValue(1))->type)) == SSRegister) {
-			rcvrReg = ((ssValue(1))->registerr);
-		}
-		else {
-			popToReg(ssValue(1), (rcvrReg = resultReg));
-		}
-		if (shouldAnnotateObjectReference(((ssTop())->constant))) {
-			annotateobjRef(gCmpCwR(((ssTop())->constant), rcvrReg), ((ssTop())->constant));
-		}
-		else {
-			/* begin CmpCq:R: */
-			quickConstant = ((ssTop())->constant);
-			genoperandoperand(CmpCqR, quickConstant, rcvrReg);
-		}
-		ssPop(1);
-	}
-	else {
-		argReg = ssStorePoptoPreferredReg(1, TempReg);
-		rcvrReg = (argReg == resultReg
-			? TempReg
-			: resultReg);
-		popToReg(ssTop(), rcvrReg);
-		/* begin CmpR:R: */
-		genoperandoperand(CmpRR, argReg, rcvrReg);
-	}
-	ssPop(1);
-	ssPushRegister(resultReg);
 	primDescriptor = generatorAt(byte0);
+	if (((((ssTop())->type)) == SSConstant)
+	 && ((((ssValue(1))->type)) == SSConstant)) {
+		assert(!((primDescriptor->isMapped)));
+		return ssPushConstant(((((ssTop())->constant)) == (((ssValue(1))->constant))
+			? trueObject()
+			: falseObject()));
+	}
 	nextPC = bytecodePC + ((primDescriptor->numBytes));
 	nExts = 0;
 	while (1) {
@@ -16149,37 +16106,79 @@
 	}
 	if (((branchDescriptor->isBranchTrue))
 	 || ((branchDescriptor->isBranchFalse))) {
-		ssFlushTo(simStackPtr - 1);
-		targetBytecodePC = (nextPC + ((branchDescriptor->numBytes))) + (((branchDescriptor->spanFunction))(branchDescriptor, nextPC, nExts, methodObj));
-		postBranchPC = nextPC + ((branchDescriptor->numBytes));
-		if ((((fixupAt(nextPC - initialPC))->targetInstruction)) == 0) {
+		ssFlushTo(simStackPtr - 2);
+	}
+	unforwardRcvr = ((((ssValue(1))->type)) != SSConstant)
+	 || (shouldAnnotateObjectReference(((ssValue(1))->constant)));
 
-			/* The next instruction is dead.  we can skip it. */
+	/* Don't use ReceiverResultReg for receiver to keep ReceiverResultReg live.
+	   Optimize e.g. rcvr == nil, the common case for ifNil: et al. */
 
-			deadCode = 1;
-			ssPop(1);
-			ensureFixupAt(targetBytecodePC - initialPC);
-			ensureFixupAt(postBranchPC - initialPC);
+	unforwardArg = ((((ssTop())->type)) != SSConstant)
+	 || (shouldAnnotateObjectReference(((ssTop())->constant)));
+	if (needsFrame) {
+		if (unforwardArg) {
+			ssAllocateRequiredRegupThrough((argReg = Arg0Reg), simStackPtr - 1);
 		}
-		genoperand(((branchDescriptor->isBranchTrue)
-			? JumpZero
-			: JumpNonZero), ((usqInt)(ensureNonMergeFixupAt(targetBytecodePC - initialPC))));
-		/* begin Jump: */
-		jumpTarget = ensureNonMergeFixupAt(postBranchPC - initialPC);
-		genoperand(Jump, ((sqInt)jumpTarget));
+		ssAllocateRequiredRegupThrough((rcvrReg = Arg1Reg), simStackPtr - 2);
 	}
 	else {
+		if (unforwardArg) {
+			argReg = ssAllocatePreferredReg(ClassReg);
+		}
+		rcvrReg = ssAllocatePreferredReg(SendNumArgsReg);
+	}
+	if (unforwardArg) {
+		popToReg(ssTop(), argReg);
+		genEnsureOopInRegNotForwardedscratchReg(argReg, TempReg);
+		popToReg(ssValue(1), rcvrReg);
+		if (unforwardRcvr) {
+			genEnsureOopInRegNotForwardedscratchReg(rcvrReg, TempReg);
+		}
+		/* begin CmpR:R: */
+		genoperandoperand(CmpRR, argReg, rcvrReg);
+	}
+	else {
+		popToReg(ssValue(1), rcvrReg);
+		if (unforwardRcvr) {
+			genEnsureOopInRegNotForwardedscratchReg(rcvrReg, TempReg);
+		}
+		/* begin CmpCq:R: */
+		quickConstant = ((ssTop())->constant);
+		genoperandoperand(CmpCqR, quickConstant, rcvrReg);
+	}
+	ssPop(2);
+	if (!(((branchDescriptor->isBranchTrue))
+		 || ((branchDescriptor->isBranchFalse)))) {
 		/* begin JumpNonZero: */
 		jumpNotEqual = genoperand(JumpNonZero, ((sqInt)0));
-		annotateobjRef(gMoveCwR(trueObject(), resultReg), trueObject());
+		annotateobjRef(gMoveCwR(trueObject(), rcvrReg), trueObject());
 		/* begin Jump: */
 		jumpEqual = genoperand(Jump, ((sqInt)0));
-		jmpTarget(jumpNotEqual, annotateobjRef(gMoveCwR(falseObject(), resultReg), falseObject()));
+		jmpTarget(jumpNotEqual, annotateobjRef(gMoveCwR(falseObject(), rcvrReg), falseObject()));
 		jmpTarget(jumpEqual, gLabel());
+		ssPushRegister(rcvrReg);
+		return 0;
 	}
-	if (resultReg == ReceiverResultReg) {
-		(optStatus.isReceiverResultRegLive = 0);
+	targetBytecodePC = (nextPC + ((branchDescriptor->numBytes))) + (((branchDescriptor->spanFunction))(branchDescriptor, nextPC, nExts, methodObj));
+	postBranchPC = nextPC + ((branchDescriptor->numBytes));
+	if ((((fixupAt(nextPC - initialPC))->targetInstruction)) == 0) {
+
+		/* The next instruction is dead.  we can skip it. */
+
+		deadCode = 1;
+		ensureFixupAt(targetBytecodePC - initialPC);
+		ensureFixupAt(postBranchPC - initialPC);
 	}
+	else {
+		ssPushConstant(trueObject());
+	}
+	genoperand(((branchDescriptor->isBranchTrue)
+		? JumpZero
+		: JumpNonZero), ((usqInt)(ensureNonMergeFixupAt(targetBytecodePC - initialPC))));
+	/* begin Jump: */
+	jumpTarget = ensureNonMergeFixupAt(postBranchPC - initialPC);
+	genoperand(Jump, ((sqInt)jumpTarget));
 	return 0;
 }
 

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nscogsrc/vm/cogit.h	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	CCodeGenerator VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	CCodeGenerator VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
 
 typedef struct {

Modified: branches/Cog/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nsspursrc/vm/cogit.c	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	CCodeGenerator VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	StackToRegisterMappingCogit VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -387,7 +387,6 @@
 static AbstractInstruction * annotatewith(AbstractInstruction *abstractInstruction, sqInt annotationFlag) NoDbgRegParms;
 static sqInt anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n) NoDbgRegParms;
 static void assertSaneJumpTarget(AbstractInstruction *jumpTarget) NoDbgRegParms;
-static sqInt availableRegisterOrNil(void);
 static sqInt blockCreationBytecodeSizeForHeader(sqInt methodHeader) NoDbgRegParms;
 static sqInt blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) NoDbgRegParms;
 sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
@@ -395,6 +394,7 @@
 static AbstractInstruction * CallRT(sqInt callTarget) NoDbgRegParms;
 static AbstractInstruction * CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved) NoDbgRegParms;
 static AbstractInstruction * CallSend(sqInt callTarget) NoDbgRegParms;
+static AbstractInstruction * gCall(sqInt callTarget) NoDbgRegParms;
 static AbstractInstruction * gCmpCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
 static AbstractInstruction * gCmpCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms;
 static AbstractInstruction * gCmpRR(sqInt reg1, sqInt reg2) NoDbgRegParms;
@@ -604,6 +604,7 @@
 static void (*genEnilopmartForandcalled(sqInt regArg1, sqInt regArg2, char *trampolineName))(void)  NoDbgRegParms;
 static void (*genEnilopmartForcalled(sqInt regArg, char *trampolineName))(void)  NoDbgRegParms;
 static sqInt genEnsureObjInRegNotForwardedscratchReg(sqInt reg, sqInt scratch) NoDbgRegParms;
+static sqInt genEnsureOopInRegNotForwardedscratchReg(sqInt reg, sqInt scratch) NoDbgRegParms;
 static void (*genEnterPICEnilopmartNumArgs(sqInt numArgs))(void)  NoDbgRegParms;
 static sqInt genExtendedSendBytecode(void);
 static sqInt genExtendedSuperBytecode(void);
@@ -2002,6 +2003,7 @@
 void (*realCEEnterCogCodePopReceiverReg)(void);
 static sqInt regArgsHaveBeenPushed;
 static sqInt runtimeObjectRefIndex;
+static AbstractInstruction * sendMiss;
 static AbstractInstruction * sendMissCall;
 static sqInt sendTrampolines[NumSendTrampolines];
 static CogSimStackEntry simSelf;
@@ -2481,30 +2483,6 @@
 }
 
 static sqInt
-availableRegisterOrNil(void)
-{
-    sqInt liveRegs;
-
-	liveRegs = liveRegisters();
-	if (!(liveRegs & (registerMaskFor(Arg1Reg)))) {
-		return Arg1Reg;
-	}
-	if (!(liveRegs & (registerMaskFor(Arg0Reg)))) {
-		return Arg0Reg;
-	}
-	if (!(liveRegs & (registerMaskFor(SendNumArgsReg)))) {
-		return SendNumArgsReg;
-	}
-	if (!(liveRegs & (registerMaskFor(ClassReg)))) {
-		return ClassReg;
-	}
-	if (!(liveRegs & (registerMaskFor(ReceiverResultReg)))) {
-		return ReceiverResultReg;
-	}
-	return null;
-}
-
-static sqInt
 blockCreationBytecodeSizeForHeader(sqInt methodHeader)
 {
 	return (headerIndicatesAlternateBytecodeSet(methodHeader)
@@ -2769,6 +2747,12 @@
 }
 
 static AbstractInstruction *
+gCall(sqInt callTarget)
+{
+	return genoperand(Call, callTarget);
+}
+
+static AbstractInstruction *
 gCmpCqR(sqInt quickConstant, sqInt reg)
 {
 	return genoperandoperand(CmpCqR, quickConstant, reg);
@@ -3939,6 +3923,8 @@
 		bytecodeSetOffset = 0;
 	}
 	extA = (extB = 0);
+	/* begin ensureNoForwardedLiteralsIn: */
+	followForwardedObjectFieldstoDepth(aMethodObj, 0);
 	methodObj = aMethodObj;
 	cogMethod = compileCogMethod(aSelectorOop);
 	if ((((((sqInt)cogMethod)) >= MaxNegativeErrorCode) && ((((sqInt)cogMethod)) <= -1))) {
@@ -4062,10 +4048,8 @@
 
 	/* begin MoveCq:R: */
 	stackOverflowCall = genoperandoperand(MoveCqR, 0, ReceiverResultReg);
-	
-	/* begin Call: */
-	callTarget = methodAbortTrampolineFor(methodOrBlockNumArgs);
-	sendMissCall = genoperand(Call, callTarget);
+	sendMiss = (sendMissCall = gCall(methodAbortTrampolineFor(methodOrBlockNumArgs)));
+
 }
 
 
@@ -4661,7 +4645,7 @@
 	/* begin CmpR:R: */
 	genoperandoperand(CmpRR, ClassReg, TempReg);
 	/* begin JumpNonZero: */
-	genoperand(JumpNonZero, ((sqInt)sendMissCall));
+	genoperand(JumpNonZero, ((sqInt)sendMiss));
 	/* begin Label */
 	noCheckEntry = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
 	if (recordSendTrace()) {
@@ -11494,7 +11478,12 @@
 }
 
 
-/*	Make sure that the object in reg is not forwarded. */
+/*	Make sure that the object in reg is not forwarded. This routine assumes
+	the object will
+	never be forwarded to an immediate, as it is used to unforward literal
+	variables (associations). 
+	Use the fact that isForwardedObjectClassIndexPun is a power of two to save
+	an instruction. */
 
 static sqInt
 genEnsureObjInRegNotForwardedscratchReg(sqInt reg, sqInt scratch)
@@ -11506,10 +11495,11 @@
 	assert(reg != scratch);
 	/* begin Label */
 	loop = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
-	genGetClassIndexOfNonImminto(reg, scratch);
-	/* begin CmpCq:R: */
-	quickConstant = isForwardedObjectClassIndexPun();
-	genoperandoperand(CmpCqR, quickConstant, TempReg);
+	/* begin MoveMw:r:R: */
+	genoperandoperandoperand(MoveMwrR, 0, reg, scratch);
+	/* begin AndCq:R: */
+	quickConstant = (classIndexMask()) - (isForwardedObjectClassIndexPun());
+	genoperandoperand(AndCqR, quickConstant, scratch);
 	/* begin JumpNonZero: */
 	ok = genoperand(JumpNonZero, ((sqInt)0));
 	genLoadSlotsourceRegdestReg(0, reg, reg);
@@ -11520,6 +11510,41 @@
 }
 
 
+/*	Make sure that the oop in reg is not forwarded. */
+
+static sqInt
+genEnsureOopInRegNotForwardedscratchReg(sqInt reg, sqInt scratch)
+{
+    AbstractInstruction *loop;
+    AbstractInstruction * okImm;
+    AbstractInstruction * okObj;
+    sqInt quickConstant;
+
+	assert(reg != scratch);
+	/* begin MoveR:R: */
+	loop = genoperandoperand(MoveRR, reg, scratch);
+
+	/* notionally
+	   self genGetClassIndexOfNonImm: reg into: scratch.
+	   cogit CmpCq: objectMemory isForwardedObjectClassIndexPun R: TempReg.
+	   but the following is an instruction shorter: */
+
+	okImm = genJumpImmediateInScratchReg(scratch);
+	/* begin MoveMw:r:R: */
+	genoperandoperandoperand(MoveMwrR, 0, reg, scratch);
+	/* begin AndCq:R: */
+	quickConstant = (classIndexMask()) - (isForwardedObjectClassIndexPun());
+	genoperandoperand(AndCqR, quickConstant, scratch);
+	/* begin JumpNonZero: */
+	okObj = genoperand(JumpNonZero, ((sqInt)0));
+	genLoadSlotsourceRegdestReg(0, reg, reg);
+	/* begin Jump: */
+	genoperand(Jump, ((sqInt)loop));
+	jmpTarget(okImm, jmpTarget(okObj, gLabel()));
+	return 0;
+}
+
+
 /*	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. */
@@ -16700,6 +16725,10 @@
 static sqInt
 genPushReceiverBytecode(void)
 {
+	if (((optStatus.isReceiverResultRegLive))
+	 && (((optStatus.ssEntry)) == ((&simSelf)))) {
+		return ssPushRegister(ReceiverResultReg);
+	}
 	return ssPushDesc(simSelf);
 }
 
@@ -17723,54 +17752,21 @@
     BytecodeDescriptor *primDescriptor;
     sqInt quickConstant;
     sqInt rcvrReg;
-    sqInt resultReg;
     sqInt targetBytecodePC;
+    sqInt unforwardArg;
+    sqInt unforwardRcvr;
 
-	flag("rewrite this crap.");
-	ssPop(2);
-	resultReg = availableRegisterOrNil();
-	if (!(resultReg)) {
-		if ((2 > 1)
-		 && ((!needsFrame)
-		 && (methodOrBlockNumArgs == 2))) {
-			halt();
-		}
-		ssAllocateRequiredReg((resultReg = Arg1Reg));
-	}
-	ssPush(2);
-	if (((((ssTop())->type)) == SSConstant)
-	 && (!(((ssTop())->spilled)))) {
 
-		/* if spilled we must generate a real pop */
+	/* forwarders have been followed in cog:selector: */
 
-		if ((((ssValue(1))->type)) == SSRegister) {
-			rcvrReg = ((ssValue(1))->registerr);
-		}
-		else {
-			popToReg(ssValue(1), (rcvrReg = resultReg));
-		}
-		if (shouldAnnotateObjectReference(((ssTop())->constant))) {
-			annotateobjRef(gCmpCwR(((ssTop())->constant), rcvrReg), ((ssTop())->constant));
-		}
-		else {
-			/* begin CmpCq:R: */
-			quickConstant = ((ssTop())->constant);
-			genoperandoperand(CmpCqR, quickConstant, rcvrReg);
-		}
-		ssPop(1);
+	primDescriptor = generatorAt(byte0);
+	if (((((ssTop())->type)) == SSConstant)
+	 && ((((ssValue(1))->type)) == SSConstant)) {
+		assert(!((primDescriptor->isMapped)));
+		return ssPushConstant(((((ssTop())->constant)) == (((ssValue(1))->constant))
+			? trueObject()
+			: falseObject()));
 	}
-	else {
-		argReg = ssStorePoptoPreferredReg(1, TempReg);
-		rcvrReg = (argReg == resultReg
-			? TempReg
-			: resultReg);
-		popToReg(ssTop(), rcvrReg);
-		/* begin CmpR:R: */
-		genoperandoperand(CmpRR, argReg, rcvrReg);
-	}
-	ssPop(1);
-	ssPushRegister(resultReg);
-	primDescriptor = generatorAt(byte0);
 	nextPC = bytecodePC + ((primDescriptor->numBytes));
 	nExts = 0;
 	while (1) {
@@ -17781,37 +17777,79 @@
 	}
 	if (((branchDescriptor->isBranchTrue))
 	 || ((branchDescriptor->isBranchFalse))) {
-		ssFlushTo(simStackPtr - 1);
-		targetBytecodePC = (nextPC + ((branchDescriptor->numBytes))) + (((branchDescriptor->spanFunction))(branchDescriptor, nextPC, nExts, methodObj));
-		postBranchPC = nextPC + ((branchDescriptor->numBytes));
-		if ((((fixupAt(nextPC - initialPC))->targetInstruction)) == 0) {
+		ssFlushTo(simStackPtr - 2);
+	}
+	unforwardRcvr = ((((ssValue(1))->type)) != SSConstant)
+	 || (shouldAnnotateObjectReference(((ssValue(1))->constant)));
 
-			/* The next instruction is dead.  we can skip it. */
+	/* Don't use ReceiverResultReg for receiver to keep ReceiverResultReg live.
+	   Optimize e.g. rcvr == nil, the common case for ifNil: et al. */
 
-			deadCode = 1;
-			ssPop(1);
-			ensureFixupAt(targetBytecodePC - initialPC);
-			ensureFixupAt(postBranchPC - initialPC);
+	unforwardArg = ((((ssTop())->type)) != SSConstant)
+	 || (shouldAnnotateObjectReference(((ssTop())->constant)));
+	if (needsFrame) {
+		if (unforwardArg) {
+			ssAllocateRequiredRegupThrough((argReg = Arg0Reg), simStackPtr - 1);
 		}
-		genoperand(((branchDescriptor->isBranchTrue)
-			? JumpZero
-			: JumpNonZero), ((usqInt)(ensureNonMergeFixupAt(targetBytecodePC - initialPC))));
-		/* begin Jump: */
-		jumpTarget = ensureNonMergeFixupAt(postBranchPC - initialPC);
-		genoperand(Jump, ((sqInt)jumpTarget));
+		ssAllocateRequiredRegupThrough((rcvrReg = Arg1Reg), simStackPtr - 2);
 	}
 	else {
+		if (unforwardArg) {
+			argReg = ssAllocatePreferredReg(ClassReg);
+		}
+		rcvrReg = ssAllocatePreferredReg(SendNumArgsReg);
+	}
+	if (unforwardArg) {
+		popToReg(ssTop(), argReg);
+		genEnsureOopInRegNotForwardedscratchReg(argReg, TempReg);
+		popToReg(ssValue(1), rcvrReg);
+		if (unforwardRcvr) {
+			genEnsureOopInRegNotForwardedscratchReg(rcvrReg, TempReg);
+		}
+		/* begin CmpR:R: */
+		genoperandoperand(CmpRR, argReg, rcvrReg);
+	}
+	else {
+		popToReg(ssValue(1), rcvrReg);
+		if (unforwardRcvr) {
+			genEnsureOopInRegNotForwardedscratchReg(rcvrReg, TempReg);
+		}
+		/* begin CmpCq:R: */
+		quickConstant = ((ssTop())->constant);
+		genoperandoperand(CmpCqR, quickConstant, rcvrReg);
+	}
+	ssPop(2);
+	if (!(((branchDescriptor->isBranchTrue))
+		 || ((branchDescriptor->isBranchFalse)))) {
 		/* begin JumpNonZero: */
 		jumpNotEqual = genoperand(JumpNonZero, ((sqInt)0));
-		annotateobjRef(gMoveCwR(trueObject(), resultReg), trueObject());
+		annotateobjRef(gMoveCwR(trueObject(), rcvrReg), trueObject());
 		/* begin Jump: */
 		jumpEqual = genoperand(Jump, ((sqInt)0));
-		jmpTarget(jumpNotEqual, annotateobjRef(gMoveCwR(falseObject(), resultReg), falseObject()));
+		jmpTarget(jumpNotEqual, annotateobjRef(gMoveCwR(falseObject(), rcvrReg), falseObject()));
 		jmpTarget(jumpEqual, gLabel());
+		ssPushRegister(rcvrReg);
+		return 0;
 	}
-	if (resultReg == ReceiverResultReg) {
-		(optStatus.isReceiverResultRegLive = 0);
+	targetBytecodePC = (nextPC + ((branchDescriptor->numBytes))) + (((branchDescriptor->spanFunction))(branchDescriptor, nextPC, nExts, methodObj));
+	postBranchPC = nextPC + ((branchDescriptor->numBytes));
+	if ((((fixupAt(nextPC - initialPC))->targetInstruction)) == 0) {
+
+		/* The next instruction is dead.  we can skip it. */
+
+		deadCode = 1;
+		ensureFixupAt(targetBytecodePC - initialPC);
+		ensureFixupAt(postBranchPC - initialPC);
 	}
+	else {
+		ssPushConstant(trueObject());
+	}
+	genoperand(((branchDescriptor->isBranchTrue)
+		? JumpZero
+		: JumpNonZero), ((usqInt)(ensureNonMergeFixupAt(targetBytecodePC - initialPC))));
+	/* begin Jump: */
+	jumpTarget = ensureNonMergeFixupAt(postBranchPC - initialPC);
+	genoperand(Jump, ((sqInt)jumpTarget));
 	return 0;
 }
 

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nsspursrc/vm/cogit.h	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	CCodeGenerator VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogmethod.h	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nsspursrc/vm/cogmethod.h	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.747 uuid: 488671d9-ac3b-4b24-8102-9a2623c7ce72
+	CCodeGenerator VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
 
 typedef struct {

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2014-06-04 22:40:47 UTC (rev 2940)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2014-06-05 00:11:55 UTC (rev 2941)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.746 uuid: cc4961d3-e629-4e28-b308-88eab314a8c9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
    from
-	CoInterpreter VMMaker.oscog-eem.746 uuid: cc4961d3-e629-4e28-b308-88eab314a8c9
+	CoInterpreter VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.746 uuid: cc4961d3-e629-4e28-b308-88eab314a8c9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.755 uuid: 3557bde2-30d3-482c-89bf-4b9907ffa49b " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -647,7 +647,7 @@
 static void followForwardedFieldsInCurrentMethod(void);
 static void followForwardedFrameContentsstackPointer(char *theFP, char *theSP) NoDbgRegParms;
 static sqInt followForwardedInObjStackatIndex(sqInt objStack, sqInt objStackRootIndex) NoDbgRegParms;
-static sqInt followForwardedObjectFieldstoDepth(sqInt objOop, sqInt depth) NoDbgRegParms;
+sqInt followForwardedObjectFieldstoDepth(sqInt objOop, sqInt depth);
 sqInt followForwarded(sqInt objOop);
 static void followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) NoDbgRegParms;
 static void followNecessaryForwardingInMethod(sqInt methodObj) NoDbgRegParms;
@@ -2238,7 +2238,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.746";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.755";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -3471,7 +3471,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 4 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3510,7 +3510,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 8 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3549,7 +3549,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 12 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3588,7 +3588,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 16 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3627,7 +3627,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 20 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3666,7 +3666,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 24 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3705,7 +3705,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 28 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3744,7 +3744,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 32 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3783,7 +3783,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 36 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3822,7 +3822,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 40 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3861,7 +3861,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 44 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3900,7 +3900,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 48 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3939,7 +3939,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 52 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -3978,7 +3978,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 56 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4017,7 +4017,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 60 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4056,7 +4056,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 64 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4094,7 +4094,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 68 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4132,7 +4132,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 72 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4170,7 +4170,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 76 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4208,7 +4208,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 80 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4246,7 +4246,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 84 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4284,7 +4284,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 88 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4322,7 +4322,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 92 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4360,7 +4360,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 96 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4398,7 +4398,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 100 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4436,7 +4436,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 104 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4474,7 +4474,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 108 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4512,7 +4512,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 112 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4550,7 +4550,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 116 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4588,7 +4588,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 120 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4626,7 +4626,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 0x7C /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -4664,7 +4664,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + 128 /* ((currentBytecode bitAnd: 31) + LiteralStart) << 2 */);
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -5531,6 +5531,7 @@
 							GIV(framePointer) = localFP;
 							
 							ceEnterCogCodePopReceiverReg();
+							null;
 							goto l290;
 						}
 						localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
@@ -5548,7 +5549,7 @@
 					/* begin fetchNextBytecode */
 					currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
 
-					/* return self */
+					null;
 				l290:	/* end baseFrameReturn */;
 					goto l287;
 				}
@@ -5708,7 +5709,7 @@
 					/* begin literal: */
 					assert(GIV(method) == (iframeMethod(localFP)));
 					litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((variableIndex + LiteralStart) << 2));
-					if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+					if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 						/* begin followForwarded: */
 						assert(isForwarded(litVar));
 						referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -5779,7 +5780,7 @@
 					/* begin literal: */
 					assert(GIV(method) == (iframeMethod(localFP)));
 					litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((variableIndex + LiteralStart) << 2));
-					if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+					if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 						/* begin followForwarded: */
 						assert(isForwarded(litVar));
 						referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -5869,7 +5870,7 @@
 					/* begin literal: */
 					assert(GIV(method) == (iframeMethod(localFP)));
 					litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((variableIndex + LiteralStart) << 2));
-					if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+					if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 						/* begin followForwarded: */
 						assert(isForwarded(litVar));
 						referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -6617,7 +6618,7 @@
 					/* begin literal: */
 					assert(GIV(method) == (iframeMethod(localFP)));
 					litVar1 = longAt((GIV(method) + (BaseHeaderSize)) + ((byte3 + LiteralStart) << 2));
-					if (((longAt(litVar1)) & 0x3FFFFF) == 8) {
+					if (((longAt(litVar1)) & (0x3FFFFF - 8)) == 0) {
 						/* begin followForwarded: */
 						assert(isForwarded(litVar1));
 						referent1 = longAt((litVar1 + (BaseHeaderSize)) + (0 << 2));
@@ -6638,7 +6639,7 @@
 					/* begin literal: */
 					assert(GIV(method) == (iframeMethod(localFP)));
 					litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((byte3 + LiteralStart) << 2));
-					if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+					if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 						/* begin followForwarded: */
 						assert(isForwarded(litVar));
 						referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -13899,7 +13900,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((index + LiteralStart) << 2));
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -14211,7 +14212,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((variableIndex + LiteralStart) << 2));
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -14434,7 +14435,7 @@
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + (BaseHeaderSize)) + ((variableIndex + LiteralStart) << 2));
-				if (((longAt(litVar)) & 0x3FFFFF) == 8) {
+				if (((longAt(litVar)) & (0x3FFFFF - 8)) == 0) {
 					/* begin followForwarded: */
 					assert(isForwarded(litVar));
 					referent = longAt((litVar + (BaseHeaderSize)) + (0 << 2));
@@ -17634,7 +17635,7 @@
 				ec = PrimErrInappropriate;
 				goto l2;
 			}
-			if (((longAt(oop)) & 0x3FFFFF) == 8) {
+			if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 				/* begin followForwarded: */
 				assert(isForwarded(oop));
 				referent = longAt((oop + (BaseHeaderSize)) + (0 << 2));
@@ -17655,7 +17656,7 @@
 				ec = PrimErrInappropriate;
 				goto l2;
 			}
-			if (((longAt(oop)) & 0x3FFFFF) == 8) {
+			if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 				/* begin followForwarded: */
 				assert(isForwarded(oop));
 				referent1 = longAt((oop + (BaseHeaderSize)) + (0 << 2));
@@ -17730,7 +17731,7 @@
 				ec = PrimErrInappropriate;
 				goto l3;
 			}
-			if (((longAt(oop1)) & 0x3FFFFF) == 8) {
+			if (((longAt(oop1)) & (0x3FFFFF - 8)) == 0) {
 				/* begin followForwarded: */
 				assert(isForwarded(oop1));
 				referent2 = longAt((oop1 + (BaseHeaderSize)) + (0 << 2));
@@ -18130,7 +18131,7 @@
 	postBecomeOrCompactScanClassTable(becomeEffectsFlags);
 l1:	/* end postBecomeScanClassTable */;
 	/* begin followSpecialObjectsOop */
-	if (((longAt(GIV(specialObjectsOop))) & 0x3FFFFF) == 8) {
+	if (((longAt(GIV(specialObjectsOop))) & (0x3FFFFF - 8)) == 0) {
 		/* begin followForwarded: */
 		assert(isForwarded(GIV(specialObjectsOop)));
 		referent4 = longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (0 << 2));
@@ -18177,14 +18178,14 @@
 		/* begin followNonImmediateField:ofObject: */
 		objOop11 = longAt((schedAssoc + (BaseHeaderSize)) + (ValueIndex << 2));
 		assert(isNonImmediate(objOop11));
-		if (((longAt(objOop11)) & 0x3FFFFF) == 8) {
+		if (((longAt(objOop11)) & (0x3FFFFF - 8)) == 0) {
 			objOop11 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, schedAssoc, objOop11);
 		}
 		sched = objOop11;
 		/* begin followNonImmediateField:ofObject: */
 		objOop12 = longAt((sched + (BaseHeaderSize)) + (ProcessListsIndex << 2));
 		assert(isNonImmediate(objOop12));
-		if (((longAt(objOop12)) & 0x3FFFFF) == 8) {
+		if (((longAt(objOop12)) & (0x3FFFFF - 8)) == 0) {
 			objOop12 = fixFollowedFieldofObjectwithInitialValue(ProcessListsIndex, sched, objOop12);
 		}
 		procLists = objOop12;
@@ -18192,21 +18193,21 @@
 			/* begin followNonImmediateField:ofObject: */
 			objOop8 = longAt((procLists + (BaseHeaderSize)) + (i3 << 2));
 			assert(isNonImmediate(objOop8));
-			if (((longAt(objOop8)) & 0x3FFFFF) == 8) {
+			if (((longAt(objOop8)) & (0x3FFFFF - 8)) == 0) {
 				objOop8 = fixFollowedFieldofObjectwithInitialValue(i3, procLists, objOop8);
 			}
 			list = objOop8;
 			/* begin followNonImmediateField:ofObject: */
 			objOop9 = longAt((list + (BaseHeaderSize)) + (FirstLinkIndex << 2));
 			assert(isNonImmediate(objOop9));
-			if (((longAt(objOop9)) & 0x3FFFFF) == 8) {
+			if (((longAt(objOop9)) & (0x3FFFFF - 8)) == 0) {
 				objOop9 = fixFollowedFieldofObjectwithInitialValue(FirstLinkIndex, list, objOop9);
 			}
 			first = objOop9;
 			/* begin followNonImmediateField:ofObject: */
 			objOop10 = longAt((list + (BaseHeaderSize)) + (LastLinkIndex << 2));
 			assert(isNonImmediate(objOop10));
-			if (((longAt(objOop10)) & 0x3FFFFF) == 8) {
+			if (((longAt(objOop10)) & (0x3FFFFF - 8)) == 0) {
 				objOop10 = fixFollowedFieldofObjectwithInitialValue(LastLinkIndex, list, objOop10);
 			}
 			last = objOop10;
@@ -18214,7 +18215,7 @@
 				/* begin followNonImmediateField:ofObject: */
 				objOop7 = longAt((first + (BaseHeaderSize)) + (NextLinkIndex << 2));
 				assert(isNonImmediate(objOop7));
-				if (((longAt(objOop7)) & 0x3FFFFF) == 8) {
+				if (((longAt(objOop7)) & (0x3FFFFF - 8)) == 0) {
 					objOop7 = fixFollowedFieldofObjectwithInitialValue(NextLinkIndex, first, objOop7);
 				}
 				next = objOop7;
@@ -20664,7 +20665,7 @@
 		for (index = 0; index <= GIV(argumentCount); index += 1) {
 			oop = longAt(GIV(stackPointer) + (index * BytesPerWord));
 			if ((oop & 3) == 0) {
-				if (((longAt(oop)) & 0x3FFFFF) == 8) {
+				if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 					assert(index < GIV(argumentCount));
 					found = 1;
 					/* begin followForwarded: */
@@ -20894,7 +20895,7 @@
 				ok = 0;
 			}
 		}
-		if (((longAt(objOop)) & 0x3FFFFF) == 8) {
+		if (((longAt(objOop)) & (0x3FFFFF - 8)) == 0) {
 			fieldOop = longAt((objOop + (BaseHeaderSize)) + (0 << 2));
 			if ((heapMapAtWord(pointerForOop(fieldOop))) == 0) {
 				print("object leak in forwarder ");
@@ -20980,7 +20981,7 @@
 				ok = 0;
 			}
 		}
-		if (((longAt(objOop)) & 0x3FFFFF) == 8) {
+		if (((longAt(objOop)) & (0x3FFFFF - 8)) == 0) {
 			fieldOop = longAt((objOop + (BaseHeaderSize)) + (0 << 2));
 			if ((heapMapAtWord(pointerForOop(fieldOop))) == 0) {
 				print("object leak in forwarder ");
@@ -21070,7 +21071,7 @@
 					ok = 0;
 				}
 			}
-			if (((longAt(objOop1)) & 0x3FFFFF) == 8) {
+			if (((longAt(objOop1)) & (0x3FFFFF - 8)) == 0) {
 				fieldOop = longAt((objOop1 + (BaseHeaderSize)) + (0 << 2));
 				if ((heapMapAtWord(pointerForOop(fieldOop))) == 0) {
 					print("object leak in forwarder ");
@@ -21419,7 +21420,7 @@
 		return 0;
 	}
 	frameCtxt = longAt(theFP + FoxThisContext);
-	if (((longAt(frameCtxt)) & 0x3FFFFF) == 8) {
+	if (((longAt(frameCtxt)) & (0x3FFFFF - 8)) == 0) {
 		/* begin followForwarded: */
 		assert(isForwarded(frameCtxt));
 		referent = longAt((frameCtxt + (BaseHeaderSize)) + (0 << 2));
@@ -22622,7 +22623,7 @@

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list