[Vm-dev] [commit][3732] CogVM source as per VMMaker.oscog-eem.1873

commits at squeakvm.org commits at squeakvm.org
Thu May 26 20:01:39 UTC 2016


Revision: 3732
Author:   eliot
Date:     2016-05-26 13:01:37 -0700 (Thu, 26 May 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1873

Spur: Fix ephemerons (at least for Gule's test case).

The mournQueue is of course a root for the scavenger and so must be visited at
the start of a scavenge.  Fix bug in markAllUnscannedEphemerons, enumerating
correctly.

Both fireEphemeronsInRememberedSet and fireEphemeronsOnEphemeronList must check
for an ephemeron being fireable.  An as-yet-firable ephemeron might get added to
the ephemeron list and later its key may get tenured, rendering the ephemeron
unfirable in that cycle.

Fix marking of obj stack contents (markAndTraceObjStack:andContents:).  Again
tenuring could cause contents to be forwarded and hence read barrier is needed.

Fix asserts that check for ephemerons so that the change in an ephemeron's
format once it gets added to the mournQueue doesn't break the asserts;
isMaybeFiredEphemeron[Format]: answer true for ephemerons and ephemerons in
the mournQueue.

Make pushLiteralVariable: store unfollowed literals back into the literal frame.
Do so in a function off to the side, not inlined into the interpreter loop.

With these changes Guille's test case passes:
	| e |
	Smalltalk supportsQueueingFinalization: true.
	e := (1 to: 200000) collect:
		[:i| Ephemeron
				key: (ObjectFinalizer receiver: 'test', 'asd' selector: #logCr)
				value: Object new].
	Smalltalk garbageCollect!

Plugins:
Take a slightly more minimal approach to Esteban's FloatArray changes in
VMMaker.oscog-EstebanLorenzano.1869

Modified Paths:
--------------
    branches/Cog/nsspur64src/vm/cogit.h
    branches/Cog/nsspur64src/vm/cointerp.c
    branches/Cog/nsspur64src/vm/cointerp.h
    branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
    branches/Cog/nsspurstack64src/vm/interp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/spur64src/vm/cogit.h
    branches/Cog/spur64src/vm/cointerp.c
    branches/Cog/spur64src/vm/cointerp.h
    branches/Cog/spur64src/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstack64src/vm/gcc3x-interp.c
    branches/Cog/spurstack64src/vm/interp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
    branches/Cog/src/vm/cogit.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/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

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

Modified: branches/Cog/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h	2016-05-25 23:56:00 UTC (rev 3731)
+++ branches/Cog/nsspur64src/vm/cogit.h	2016-05-26 20:01:37 UTC (rev 3732)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47
+	CCodeGenerator VMMaker.oscog-eem.1872 uuid: 6db6d610-b1a5-4f4d-978d-22c917bdb3e4
  */
 
 

Modified: branches/Cog/nsspur64src/vm/cointerp.c
===================================================================
--- branches/Cog/nsspur64src/vm/cointerp.c	2016-05-25 23:56:00 UTC (rev 3731)
+++ branches/Cog/nsspur64src/vm/cointerp.c	2016-05-26 20:01:37 UTC (rev 3732)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1872 uuid: 6db6d610-b1a5-4f4d-978d-22c917bdb3e4
    from
-	CoInterpreter VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47
+	CoInterpreter VMMaker.oscog-eem.1872 uuid: 6db6d610-b1a5-4f4d-978d-22c917bdb3e4
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1872 uuid: 6db6d610-b1a5-4f4d-978d-22c917bdb3e4 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -75,6 +75,9 @@
 # define siglongjmp(jb,v) _longjmp(jb,v)
 #endif
 
+#define odd(v) ((int)(v)&1)
+#define even(v) (!odd(v))
+
 /* end StackInterpreter class>>preambleCCode */
 
 
@@ -913,6 +916,7 @@
 static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void);
 static sqInt allWeakSurvivorsOnWeakList(void);
 static void NeverInline computeRefCountToShrinkRT(void);
+static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner);
 static sqInt NoDbgRegParms copyAndForward(sqInt survivor);
 static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor);
 static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList);
@@ -1104,7 +1108,9 @@
 static sqInt NoDbgRegParms isInNewSpace(sqInt objOop);
 extern sqInt isInOldSpace(sqInt address);
 static sqInt NoDbgRegParms isInPastSpace(sqInt address);
+static sqInt NoDbgRegParms isMaybeFiredEphemeron(sqInt objOop);
 extern sqInt isNonImmediate(sqInt oop);
+static sqInt NoDbgRegParms isObjEphemeron(sqInt objOop);
 static sqInt NoDbgRegParms isObjImmutable(sqInt anOop);
 extern sqInt isOldObject(sqInt objOop);
 extern sqInt isOopCompiledMethod(sqInt oop);
@@ -1151,6 +1157,7 @@
 extern void longPrintInstancesOf(sqInt aClassOop);
 extern void longPrintInstancesWithClassIndex(sqInt classIndex);
 extern void longPrintReferencesTo(sqInt anOop);
+static void NeverInline mapMournQueue(void);
 static sqInt NoDbgRegParms mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointerArray, sqInt savedOutHashes);
 static void NoDbgRegParms markAndTraceClassOf(sqInt objOop);
 static void NoDbgRegParms markAndTraceObjStackandContents(sqInt stackOrNil, sqInt markAndTraceContents);
@@ -1561,6 +1568,7 @@
 extern sqInt superclassOf(sqInt classPointer);
 extern sqInt tempCountOf(sqInt methodPointer);
 extern sqInt temporaryCountOfMethodHeader(sqInt header);
+static sqInt NoDbgRegParms NeverInline unfollowatIndex(sqInt litVar, sqInt literalIndex);
 static sqInt NoDbgRegParms validInstructionPointerinFrame(usqInt anInstrPointer, char *fp);
 static sqInt validStackPageBaseFrames(void);
 static void NoDbgRegParms voidLongRunningPrimitive(char *reason);
@@ -1661,9 +1669,10 @@
 _iss usqInt oldSpaceStart;
 _iss sqLong nextProfileTick;
 _iss sqInt profileProcess;
+_iss SpurNewSpaceSpace futureSpace;
 _iss sqInt numClassTablePages;
 _iss sqInt profileSemaphore;
-_iss SpurNewSpaceSpace futureSpace;
+_iss sqInt futureSurvivorStart;
 _iss sqInt profileMethod;
 _iss sqInt classTableIndex;
 _iss sqInt longRunningPrimitiveCheckSemaphore;
@@ -1671,24 +1680,23 @@
 _iss sqInt jmpDepth;
 _iss usqInt lastFreeChunk;
 _iss SpurNewSpaceSpace eden;
+_iss sqInt mournQueue;
 _iss sqInt becomeEffectsFlags;
-_iss sqInt futureSurvivorStart;
 _iss sqInt longRunningPrimitiveCheckMethod;
 _iss char * objStackInvalidBecause;
-_iss sqInt tempOop2;
 _iss sqInt ephemeronList;
+_iss sqInt tempOop2;
+_iss sqInt tenureThreshold;
 _iss usqInt freeOldSpaceStart;
 _iss sqInt tempOop3;
-_iss sqInt tenureThreshold;
 _iss sqInt extraRootCount;
 _iss sqInt growHeadroom;
 _iss sqInt invalidObjStackPage;
-_iss sqInt mournQueue;
 _iss sqInt previousRememberedSetSize;
+_iss sqInt tenureCriterion;
 _iss sqInt classNameIndex;
 _iss sqInt methodDictLinearSearchLimit;
 _iss sqInt pendingFinalizationSignals;
-_iss sqInt tenureCriterion;
 _iss sqInt metaclassNumSlots;
 _iss sqInt numSegInfos;
 _iss sqInt preemptionYields;
@@ -1708,6 +1716,7 @@
 _iss sqInt weakList;
 _iss sqInt externalPrimitiveTableFirstFreeIndex;
 _iss sqInt marking;
+_iss sqInt statSurvivorCount;
 _iss sqInt thisClassIndex;
 _iss sqInt firstSegmentSize;
 _iss usqLong gcStartUsecs;
@@ -1722,7 +1731,6 @@
 _iss usqInt memory;
 _iss sqInt numCompactionPasses;
 _iss sqInt scavengeInProgress;
-_iss sqInt statSurvivorCount;
 _iss sqInt fullScreenFlag;
 _iss float heapGrowthToSizeGCRatio;
 _iss usqInt heapSizeAtPreviousGC;
@@ -2444,7 +2452,7 @@
 	};
 sqInt checkedPluginName;
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1865";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1872";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -3606,7 +3614,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode);
 				/* begin fetchNextBytecode */
@@ -3622,14 +3629,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 8 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 0 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3641,7 +3641,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode1);
 				/* begin fetchNextBytecode */
@@ -3657,14 +3656,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 16 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 1 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3676,7 +3668,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode2);
 				/* begin fetchNextBytecode */
@@ -3692,14 +3683,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 24 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 2 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3711,7 +3695,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode3);
 				/* begin fetchNextBytecode */
@@ -3727,14 +3710,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 32 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 3 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3746,7 +3722,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode4);
 				/* begin fetchNextBytecode */
@@ -3762,14 +3737,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 40 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 4 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3781,7 +3749,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode5);
 				/* begin fetchNextBytecode */
@@ -3797,14 +3764,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 48 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 5 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3816,7 +3776,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode6);
 				/* begin fetchNextBytecode */
@@ -3832,14 +3791,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 56 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 6 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3851,7 +3803,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode7);
 				/* begin fetchNextBytecode */
@@ -3867,14 +3818,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 64 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 7 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3886,7 +3830,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode8);
 				/* begin fetchNextBytecode */
@@ -3902,14 +3845,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 72 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 8 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3921,7 +3857,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode9);
 				/* begin fetchNextBytecode */
@@ -3937,14 +3872,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 80 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 9 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3956,7 +3884,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode10);
 				/* begin fetchNextBytecode */
@@ -3972,14 +3899,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 88 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 10 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -3991,7 +3911,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode11);
 				/* begin fetchNextBytecode */
@@ -4007,14 +3926,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 96 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 11 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4026,7 +3938,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode12);
 				/* begin fetchNextBytecode */
@@ -4042,14 +3953,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 104 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 12 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4061,7 +3965,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode13);
 				/* begin fetchNextBytecode */
@@ -4077,14 +3980,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 112 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 13 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4096,7 +3992,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode14);
 				/* begin fetchNextBytecode */
@@ -4112,14 +4007,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 120 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 14 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4131,7 +4019,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode15);
 				/* begin fetchNextBytecode */
@@ -4147,14 +4034,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 128 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 15 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4165,7 +4045,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode16);
 				/* begin fetchNextBytecode */
@@ -4181,14 +4060,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 136 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 16 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4199,7 +4071,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode17);
 				/* begin fetchNextBytecode */
@@ -4215,14 +4086,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 144 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 17 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4233,7 +4097,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode18);
 				/* begin fetchNextBytecode */
@@ -4249,14 +4112,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 152 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 18 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4267,7 +4123,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode19);
 				/* begin fetchNextBytecode */
@@ -4283,14 +4138,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 160 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 19 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4301,7 +4149,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode20);
 				/* begin fetchNextBytecode */
@@ -4317,14 +4164,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 168 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 20 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4335,7 +4175,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode21);
 				/* begin fetchNextBytecode */
@@ -4351,14 +4190,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 176 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 21 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4369,7 +4201,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode22);
 				/* begin fetchNextBytecode */
@@ -4385,14 +4216,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 184 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 22 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4403,7 +4227,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode23);
 				/* begin fetchNextBytecode */
@@ -4419,14 +4242,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 192 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 23 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4437,7 +4253,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode24);
 				/* begin fetchNextBytecode */
@@ -4453,14 +4268,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 200 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 24 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4471,7 +4279,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode25);
 				/* begin fetchNextBytecode */
@@ -4487,14 +4294,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 208 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 25 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4505,7 +4305,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode26);
 				/* begin fetchNextBytecode */
@@ -4521,14 +4320,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 216 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 26 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4539,7 +4331,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode27);
 				/* begin fetchNextBytecode */
@@ -4555,14 +4346,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 224 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 27 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4573,7 +4357,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode28);
 				/* begin fetchNextBytecode */
@@ -4589,14 +4372,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 232 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 28 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4607,7 +4383,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode29);
 				/* begin fetchNextBytecode */
@@ -4623,14 +4398,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 240 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 29 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4641,7 +4409,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode30);
 				/* begin fetchNextBytecode */
@@ -4657,14 +4424,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 0xF8 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 30 /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4675,7 +4435,6 @@
 			/* pushLiteralVariableBytecode */
 			{
 				sqInt litVar;
-				sqInt referent;
 
 				VM_LABEL(pushLiteralVariableBytecode31);
 				/* begin fetchNextBytecode */
@@ -4691,14 +4450,7 @@
 				assert(GIV(method) == (iframeMethod(localFP)));
 				litVar = longAt((GIV(method) + BaseHeaderSize) + 256 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */);
 				if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-					/* begin followForwarded: */
-					assert(isUnambiguouslyForwarder(litVar));
-					referent = longAt((litVar + BaseHeaderSize));
-					while (((referent & (tagMask())) == 0)
-					 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-						referent = longAt((referent + BaseHeaderSize));
-					}
-					litVar = referent;
+					litVar = unfollowatIndex(litVar, 0x1F /* currentBytecode bitAnd: 31 */);
 				}
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + 8 /* ValueIndex << self shiftForWord */));
@@ -4740,7 +4492,7 @@
 					GIV(argumentCount) = 2;
 					goto normalSend;
 					/* return self */
-					goto l8;
+					goto l7;
 				}
 
 #        endif /* IMMUTABILITY */
@@ -4759,7 +4511,7 @@
 					}
 				}
 				longAtput((rcvr + BaseHeaderSize) + (((long)instVarIndex) << (shiftForWord())), top);
-			l8:	/* end storePointerImmutabilityCheck:ofObject:withValue: */;
+			l7:	/* end storePointerImmutabilityCheck:ofObject:withValue: */;
 				/* begin fetchNextBytecode */
 				currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
 
@@ -5066,7 +4818,7 @@
 				frameToReturnTo = 0;
 				if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) {
 					goto commonCallerReturn;
-					goto l413;
+					goto l408;
 				}
 				closure = longAt(localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
 	? ((mframeCogMethod(localFP))->cmNumArgs)
@@ -5116,10 +4868,10 @@
 						: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
 						assert(isContext(frameContext(localFP)));
 						ourContext = longAt(localFP + FoxThisContext);
-						goto l419;
+						goto l414;
 					}
 					ourContext = marryFrameSP(localFP, localSP);
-				l419:	/* end ensureFrameIsMarried:SP: */;
+				l414:	/* end ensureFrameIsMarried:SP: */;
 					/* begin internalPush: */
 					longAtPointerput((localSP -= BytesPerOop), ourContext);
 					/* begin internalPush: */
@@ -5127,7 +4879,7 @@
 					GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorCannotReturn) << (shiftForWord())));
 					GIV(argumentCount) = 1;
 					goto normalSend;
-					goto l413;
+					goto l408;
 				}
 				if (unwindContextOrNilOrZero != 0) {
 					/* begin internalAboutToReturn:through: */
@@ -5136,10 +4888,10 @@
 						: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
 						assert(isContext(frameContext(localFP)));
 						ourContext1 = longAt(localFP + FoxThisContext);
-						goto l416;
+						goto l411;
 					}
 					ourContext1 = marryFrameSP(localFP, localSP);
-				l416:	/* end ensureFrameIsMarried:SP: */;
+				l411:	/* end ensureFrameIsMarried:SP: */;
 					/* begin internalPush: */
 					longAtPointerput((localSP -= BytesPerOop), ourContext1);
 					/* begin internalPush: */
@@ -5149,7 +4901,7 @@
 					GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorAboutToReturn) << (shiftForWord())));
 					GIV(argumentCount) = 2;
 					goto normalSend;
-					goto l413;
+					goto l408;
 				}
 				contextToReturnTo = null;
 				if (((((longAt((home + BaseHeaderSize) + (((long)SenderIndex) << (shiftForWord()))))) & 7) == 1)) {
@@ -5201,10 +4953,10 @@
 							: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
 							assert(isContext(frameContext(localFP)));
 							ourContext2 = longAt(localFP + FoxThisContext);
-							goto l435;
+							goto l430;
 						}
 						ourContext2 = marryFrameSP(localFP, localSP);
-					l435:	/* end ensureFrameIsMarried:SP: */;
+					l430:	/* end ensureFrameIsMarried:SP: */;
 						/* begin internalPush: */
 						longAtPointerput((localSP -= BytesPerOop), ourContext2);
 						/* begin internalPush: */
@@ -5212,7 +4964,7 @@
 						GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorCannotReturn) << (shiftForWord())));
 						GIV(argumentCount) = 1;
 						goto normalSend;
-						goto l413;
+						goto l408;
 					}
 				}
 				assert(pageListIsWellFormed());
@@ -5317,11 +5069,11 @@
 						GIV(stackPointer) = localSP;
 						GIV(framePointer) = localFP;
 						ceEnterCogCodePopReceiverReg();
-						goto l415;
+						goto l410;
 					}
 					localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
 				}
-			l415:	/* end maybeReturnToMachineCodeFrame */;
+			l410:	/* end maybeReturnToMachineCodeFrame */;
 				/* begin setMethod: */
 				aMethodObj = longAt(localFP + FoxMethod);
 				assert((((usqInt)aMethodObj)) >= (startOfMemory()));
@@ -5336,7 +5088,7 @@
 
 				longAtPointerput(localSP, localReturnValue);
 			}
-		l413:	/* end case */;
+		l408:	/* end case */;
 			break;
 		case 121:
 			/* returnTrue */
@@ -5449,27 +5201,27 @@
 							fp = (thePage->headFP);
 							if (fp == theFP) {
 								frameAbove = 0;
-								goto l441;
+								goto l436;
 							}
 							while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) {
 								if (callerFP == theFP) {
 									frameAbove = fp;
-									goto l441;
+									goto l436;
 								}
 								fp = callerFP;
 							}
 							error("did not find theFP in stack page");
 							frameAbove = 0;
-						l441:	/* end findFrameAbove:inPage: */;
+						l436:	/* end findFrameAbove:inPage: */;
 							/* begin newStackPage */
 							lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage);
 							if (((lruOrFree->baseFP)) == 0) {
 								newPage = lruOrFree;
-								goto l445;
+								goto l440;
 							}
 							divorceFramesIn(lruOrFree);
 							newPage = lruOrFree;
-						l445:	/* end newStackPage */;
+						l440:	/* end newStackPage */;
 							assert(newPage == GIV(stackPage));
 							moveFramesInthroughtoPage(thePage, frameAbove, newPage);
 							markStackPageMostRecentlyUsed(newPage);
@@ -5492,7 +5244,7 @@
 							longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer));
 							GIV(stackPointer) = sp2;
 							ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorCannotReturn) << (shiftForWord()))), contextToReturnFrom, 1);
-							goto l437;
+							goto l432;
 						}
 						GIV(instructionPointer) = 0;
 						thePage = makeBaseFrameFor(contextToReturnTo);
@@ -5528,7 +5280,7 @@
 							GIV(stackPointer) = localSP;
 							GIV(framePointer) = localFP;
 							ceEnterCogCodePopReceiverReg();
-							goto l437;
+							goto l432;
 						}
 						localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
 					}
@@ -5546,7 +5298,7 @@
 					/* begin fetchNextBytecode */
 					currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
 
-					goto l437;
+					goto l432;
 				}
 				localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
 				localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
@@ -5571,7 +5323,7 @@
 						GIV(stackPointer) = localSP;
 						GIV(framePointer) = localFP;
 						ceEnterCogCodePopReceiverReg();
-						goto l437;
+						goto l432;
 					}
 					localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
 				}
@@ -5589,7 +5341,7 @@
 
 				longAtPointerput(localSP, localReturnValue);
 			}
-		l437:	/* end case */;
+		l432:	/* end case */;
 			break;
 		case 126:
 		case 127:
@@ -5618,10 +5370,10 @@
 					: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
 					assert(isContext(frameContext(localFP)));
 					ourContext = longAt(localFP + FoxThisContext);
-					goto l446;
+					goto l441;
 				}
 				ourContext = marryFrameSP(localFP, localSP);
-			l446:	/* end ensureFrameIsMarried:SP: */;
+			l441:	/* end ensureFrameIsMarried:SP: */;
 				localIP -= 1;
 				/* begin internalPush: */
 				longAtPointerput((localSP -= BytesPerOop), ourContext);
@@ -5637,7 +5389,6 @@
 				sqInt litVar;
 				sqInt object;
 				sqInt object1;
-				sqInt referent;
 				sqInt variableIndex;
 				sqInt variableType;
 
@@ -5651,7 +5402,7 @@
 				if (variableType == 0) {
 					/* begin pushReceiverVariable: */
 					longAtPointerput((localSP -= BytesPerOop), longAt(((longAt(localFP + FoxIFReceiver)) + BaseHeaderSize) + (((long)variableIndex) << (shiftForWord()))));
-					goto l10;
+					goto l9;
 				}
 				if (variableType == 1) {
 					/* begin pushTemporaryVariable: */
@@ -5659,14 +5410,14 @@
 						? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - variableIndex) * BytesPerWord))
 						: longAt(((localFP + FoxIFReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord)));
 					longAtPointerput((localSP -= BytesPerOop), object);
-					goto l10;
+					goto l9;
 				}
 				if (variableType == 2) {
 					/* begin pushLiteralConstant: */
 					assert(GIV(method) == (iframeMethod(localFP)));
 					object1 = longAt((GIV(method) + BaseHeaderSize) + (((long)(variableIndex + LiteralStart)) << (shiftForWord())));
 					longAtPointerput((localSP -= BytesPerOop), object1);
-					goto l10;
+					goto l9;
 				}
 				if (variableType == 3) {
 					/* begin pushLiteralVariable: */
@@ -5679,22 +5430,15 @@
 					assert(GIV(method) == (iframeMethod(localFP)));
 					litVar = longAt((GIV(method) + BaseHeaderSize) + (((long)(variableIndex + LiteralStart)) << (shiftForWord())));
 					if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
-						/* begin followForwarded: */
-						assert(isUnambiguouslyForwarder(litVar));
-						referent = longAt((litVar + BaseHeaderSize) + (0LL << (shiftForWord())));
-						while (((referent & (tagMask())) == 0)
-						 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
-							referent = longAt((referent + BaseHeaderSize) + (0LL << (shiftForWord())));
-						}
-						litVar = referent;
+						litVar = unfollowatIndex(litVar, variableIndex);
 					}
 					/* begin internalPush: */
 					longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + (((long)ValueIndex) << (shiftForWord()))));
 
-					goto l10;
+					goto l9;
 				}
 			}
-		l10:	/* end case */;
+		l9:	/* end case */;
 			break;
 		case 129:
 			/* extendedStoreBytecode */
@@ -5731,7 +5475,7 @@
 						GIV(argumentCount) = 2;
 						goto normalSend;
 						/* return self */
-						goto l19;
+						goto l17;
 					}
 
 #          endif /* IMMUTABILITY */
@@ -5750,11 +5494,11 @@
 						}
 					}
 					longAtput((objOop + BaseHeaderSize) + (((long)variableIndex) << (shiftForWord())), value);
-				l19:	/* end storePointerImmutabilityCheck:ofObject:withValue: */;
+				l17:	/* end storePointerImmutabilityCheck:ofObject:withValue: */;
 					/* begin fetchNextBytecode */
 					currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
 
-					goto l16;
+					goto l14;
 				}
 				if (variableType == 1) {
 					/* begin fetchNextBytecode */
@@ -5766,7 +5510,7 @@
 					else {
 						longAtput(((localFP + FoxIFReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord), value);
 					}

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list