[Vm-dev] [commit][3557] CogVm source as per VMMaker.oscog-eem.1641

commits at squeakvm.org commits at squeakvm.org
Sat Jan 16 05:33:04 UTC 2016


Revision: 3557
Author:   eliot
Date:     2016-01-15 21:33:04 -0800 (Fri, 15 Jan 2016)
Log Message:
-----------
CogVm source as per VMMaker.oscog-eem.1641

Spur:
Follow the stacked receiver (closure) of a block activation when
handling send faults so that forwarded copied values are unforwarded
for subsequent activations of the same closure.

Modified Paths:
--------------
    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/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/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspursrc/vm/cogit.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGenerator VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -842,7 +842,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2399,7 +2399,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1639";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1641";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -42051,7 +42051,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur32BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqLong NoDbgRegParms
+static sqInt NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -63294,7 +63294,7 @@
 bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
 {
     usqInt bridgeSpan;
-    sqInt clifton;
+    usqInt clifton;
     usqInt segEnd;
 
 	segEnd = ((aSegment->segSize)) + ((aSegment->segStart));
@@ -63531,7 +63531,7 @@
     sqInt largeChild;
     sqInt newEndOfMemory;
     sqInt next;
-    sqInt node;
+    usqInt node;
     SpurSegmentInfo *seg;
     sqInt smallChild;
     sqInt treeNode;
@@ -67064,6 +67064,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -67082,9 +67083,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0

Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspursrc/vm/cointerp.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -845,7 +845,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2402,7 +2402,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1639";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1641";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -42060,7 +42060,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur32BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqLong NoDbgRegParms
+static sqInt NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -63303,7 +63303,7 @@
 bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
 {
     usqInt bridgeSpan;
-    sqInt clifton;
+    usqInt clifton;
     usqInt segEnd;
 
 	segEnd = ((aSegment->segSize)) + ((aSegment->segStart));
@@ -63540,7 +63540,7 @@
     sqInt largeChild;
     sqInt newEndOfMemory;
     sqInt next;
-    sqInt node;
+    usqInt node;
     SpurSegmentInfo *seg;
     sqInt smallChild;
     sqInt treeNode;
@@ -67073,6 +67073,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -67091,9 +67092,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0

Modified: branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstack64src/vm/gcc3x-interp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspurstack64src/vm/gcc3x-interp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1104,6 +1104,7 @@
 static sqInt NoDbgRegParms frameNumArgs(char *theFP);
 static char * NoDbgRegParms frameOfMarriedContext(sqInt aContext);
 static sqInt NoDbgRegParms frameReceiver(char *theFP);
+static sqInt NoDbgRegParms frameStackedReceiverOffset(char *theFP);
 static void freeUntracedStackPages(void);
 extern sqInt fullDisplayUpdate(void);
 extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
@@ -2166,7 +2167,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1639";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1641";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -56639,6 +56640,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -56653,9 +56655,21 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0LL << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0LL << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if ((byteAt((theFP + FoxFrameFlags) + 2)) != 0) {
 		assert(!(isForwarded(frameContext(theFP))));
@@ -56960,6 +56974,20 @@
 }
 
 
+/*	Answer the offset in bytes from the the frame pointer to its stacked
+	receiver. The receiver of a message send or the closure of a block
+	activation is
+	always on the stack above any arguments and the frame itself. See the
+	diagram in StackInterpreter class>>initializeFrameIndices. */
+
+	/* StackInterpreter>>#frameStackedReceiverOffset: */
+static sqInt NoDbgRegParms
+frameStackedReceiverOffset(char *theFP)
+{
+	return (FoxCallerSavedIP + BytesPerWord) + (((long)(byteAt((theFP + FoxFrameFlags) + 1))) << (shiftForWord()));
+}
+
+
 /*	Free any untraced stack pages. */
 
 	/* StackInterpreter>>#freeUntracedStackPages */

Modified: branches/Cog/nsspurstack64src/vm/interp.c
===================================================================
--- branches/Cog/nsspurstack64src/vm/interp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspurstack64src/vm/interp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1101,6 +1101,7 @@
 static sqInt NoDbgRegParms frameNumArgs(char *theFP);
 static char * NoDbgRegParms frameOfMarriedContext(sqInt aContext);
 static sqInt NoDbgRegParms frameReceiver(char *theFP);
+static sqInt NoDbgRegParms frameStackedReceiverOffset(char *theFP);
 static void freeUntracedStackPages(void);
 extern sqInt fullDisplayUpdate(void);
 extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
@@ -2163,7 +2164,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1639";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1641";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -56630,6 +56631,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -56644,9 +56646,21 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0LL << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0LL << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if ((byteAt((theFP + FoxFrameFlags) + 2)) != 0) {
 		assert(!(isForwarded(frameContext(theFP))));
@@ -56951,6 +56965,20 @@
 }
 
 
+/*	Answer the offset in bytes from the the frame pointer to its stacked
+	receiver. The receiver of a message send or the closure of a block
+	activation is
+	always on the stack above any arguments and the frame itself. See the
+	diagram in StackInterpreter class>>initializeFrameIndices. */
+
+	/* StackInterpreter>>#frameStackedReceiverOffset: */
+static sqInt NoDbgRegParms
+frameStackedReceiverOffset(char *theFP)
+{
+	return (FoxCallerSavedIP + BytesPerWord) + (((long)(byteAt((theFP + FoxFrameFlags) + 1))) << (shiftForWord()));
+}
+
+
 /*	Free any untraced stack pages. */
 
 	/* StackInterpreter>>#freeUntracedStackPages */

Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1073,6 +1073,7 @@
 static sqInt NoDbgRegParms frameNumArgs(char *theFP);
 static char * NoDbgRegParms frameOfMarriedContext(sqInt aContext);
 static sqInt NoDbgRegParms frameReceiver(char *theFP);
+static sqInt NoDbgRegParms frameStackedReceiverOffset(char *theFP);
 static void freeUntracedStackPages(void);
 extern sqInt fullDisplayUpdate(void);
 extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
@@ -2136,7 +2137,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1639";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1641";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -35684,7 +35685,7 @@
 static sqInt
 imageSegmentVersion(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    int wholeWord;
+    sqInt wholeWord;
 
 
 	/* first data word, 'does' */
@@ -51143,7 +51144,7 @@
     sqInt prevPrevObj2;
     usqInt stopAddr;
     sqInt swapFloatWords;
-    int temp;
+    sqInt temp;
     sqInt temp1;
     sqInt wordAddr;
 
@@ -52472,6 +52473,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -52486,9 +52488,21 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if ((byteAt((theFP + FoxFrameFlags) + 2)) != 0) {
 		assert(!(isForwarded(frameContext(theFP))));
@@ -52793,6 +52807,20 @@
 }
 
 
+/*	Answer the offset in bytes from the the frame pointer to its stacked
+	receiver. The receiver of a message send or the closure of a block
+	activation is
+	always on the stack above any arguments and the frame itself. See the
+	diagram in StackInterpreter class>>initializeFrameIndices. */
+
+	/* StackInterpreter>>#frameStackedReceiverOffset: */
+static sqInt NoDbgRegParms
+frameStackedReceiverOffset(char *theFP)
+{
+	return (FoxCallerSavedIP + BytesPerWord) + ((byteAt((theFP + FoxFrameFlags) + 1)) << (shiftForWord()));
+}
+
+
 /*	Free any untraced stack pages. */
 
 	/* StackInterpreter>>#freeUntracedStackPages */
@@ -61508,7 +61536,7 @@
     sqInt displayObj;
     sqInt primFailCodeValue;
     sqInt ptr;
-    int reversed;
+    sqInt reversed;
     sqInt w;
     sqInt wordEndIndex;
     sqInt wordStartIndex;

Modified: branches/Cog/nsspurstacksrc/vm/interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/interp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/nsspurstacksrc/vm/interp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1070,6 +1070,7 @@
 static sqInt NoDbgRegParms frameNumArgs(char *theFP);
 static char * NoDbgRegParms frameOfMarriedContext(sqInt aContext);
 static sqInt NoDbgRegParms frameReceiver(char *theFP);
+static sqInt NoDbgRegParms frameStackedReceiverOffset(char *theFP);
 static void freeUntracedStackPages(void);
 extern sqInt fullDisplayUpdate(void);
 extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
@@ -2133,7 +2134,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1639";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1641";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -35675,7 +35676,7 @@
 static sqInt
 imageSegmentVersion(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    int wholeWord;
+    sqInt wholeWord;
 
 
 	/* first data word, 'does' */
@@ -51134,7 +51135,7 @@
     sqInt prevPrevObj2;
     usqInt stopAddr;
     sqInt swapFloatWords;
-    int temp;
+    sqInt temp;
     sqInt temp1;
     sqInt wordAddr;
 
@@ -52463,6 +52464,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -52477,9 +52479,21 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if ((byteAt((theFP + FoxFrameFlags) + 2)) != 0) {
 		assert(!(isForwarded(frameContext(theFP))));
@@ -52784,6 +52798,20 @@
 }
 
 
+/*	Answer the offset in bytes from the the frame pointer to its stacked
+	receiver. The receiver of a message send or the closure of a block
+	activation is
+	always on the stack above any arguments and the frame itself. See the
+	diagram in StackInterpreter class>>initializeFrameIndices. */
+
+	/* StackInterpreter>>#frameStackedReceiverOffset: */
+static sqInt NoDbgRegParms
+frameStackedReceiverOffset(char *theFP)
+{
+	return (FoxCallerSavedIP + BytesPerWord) + ((byteAt((theFP + FoxFrameFlags) + 1)) << (shiftForWord()));
+}
+
+
 /*	Free any untraced stack pages. */
 
 	/* StackInterpreter>>#freeUntracedStackPages */
@@ -61499,7 +61527,7 @@
     sqInt displayObj;
     sqInt primFailCodeValue;
     sqInt ptr;
-    int reversed;
+    sqInt reversed;
     sqInt w;
     sqInt wordEndIndex;
     sqInt wordStartIndex;


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Fri Jan 15 20:44:34 PST 2016
   + Fri Jan 15 21:32:12 PST 2016

Modified: branches/Cog/spur64src/vm/cogit.h
===================================================================
--- branches/Cog/spur64src/vm/cogit.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spur64src/vm/cogit.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1640 uuid: 5fd87422-b235-4b98-b023-c3be3586cca5
+	CCodeGenerator VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/spur64src/vm/cointerp.c
===================================================================
--- branches/Cog/spur64src/vm/cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spur64src/vm/cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -847,7 +847,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2393,7 +2393,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1639]";
+const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1641]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -36403,7 +36403,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur64BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqLong NoDbgRegParms
+static sqInt NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -54915,7 +54915,7 @@
     usqInt prevFree;
     usqInt prevFreeChunk;
     usqInt prevPrevFree;
-    sqInt prevPrevFreeChunk;
+    usqInt prevPrevFreeChunk;
     sqInt slotBytes;
     sqInt slotBytes1;
     usqInt there;
@@ -60397,7 +60397,7 @@
 static void
 postSnapshot(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    usqInt address;
+    sqInt address;
     sqInt bytes;
     usqInt freeChunk;
     sqInt i;
@@ -60457,7 +60457,7 @@
     sqInt limit;
     sqInt newEndOfMemory;
     sqInt next;
-    usqInt node;
+    sqInt node;
     usqInt numSlots;
     usqInt numSlots1;
     SpurSegmentInfo *seg;
@@ -60798,8 +60798,8 @@
 {
     usqLong firstSavedBridgeWord;
     sqInt nWritten;
-    usqInt pier1;
-    usqInt pier2;
+    sqInt pier1;
+    sqInt pier2;
     usqLong secondSavedBridgeWord;
 
 	pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -64031,6 +64031,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -64049,9 +64050,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0LL << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0LL << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0
@@ -72739,7 +72754,7 @@
     sqInt headerSize;
     squeakFileOffsetType headerStart;
     sqInt i;
-    sqInt imageBytes;
+    usqInt imageBytes;
     extern char imageName[];
     sqInt okToWrite;
     void *sCWIfn;

Modified: branches/Cog/spur64src/vm/cointerp.h
===================================================================
--- branches/Cog/spur64src/vm/cointerp.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spur64src/vm/cointerp.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/spur64src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/spur64src/vm/gcc3x-cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spur64src/vm/gcc3x-cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -850,7 +850,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2396,7 +2396,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1639]";
+const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1641]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -36412,7 +36412,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur64BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqLong NoDbgRegParms
+static sqInt NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -54924,7 +54924,7 @@
     usqInt prevFree;
     usqInt prevFreeChunk;
     usqInt prevPrevFree;
-    sqInt prevPrevFreeChunk;
+    usqInt prevPrevFreeChunk;
     sqInt slotBytes;
     sqInt slotBytes1;
     usqInt there;
@@ -60406,7 +60406,7 @@
 static void
 postSnapshot(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    usqInt address;
+    sqInt address;
     sqInt bytes;
     usqInt freeChunk;
     sqInt i;
@@ -60466,7 +60466,7 @@
     sqInt limit;
     sqInt newEndOfMemory;
     sqInt next;
-    usqInt node;
+    sqInt node;
     usqInt numSlots;
     usqInt numSlots1;
     SpurSegmentInfo *seg;
@@ -60807,8 +60807,8 @@
 {
     usqLong firstSavedBridgeWord;
     sqInt nWritten;
-    usqInt pier1;
-    usqInt pier2;
+    sqInt pier1;
+    sqInt pier2;
     usqLong secondSavedBridgeWord;
 
 	pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -64040,6 +64040,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -64058,9 +64059,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0LL << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0LL << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0
@@ -72748,7 +72763,7 @@
     sqInt headerSize;
     squeakFileOffsetType headerStart;
     sqInt i;
-    sqInt imageBytes;
+    usqInt imageBytes;
     extern char imageName[];
     sqInt okToWrite;
     void *sCWIfn;

Modified: branches/Cog/spursistasrc/vm/cogit.h
===================================================================
--- branches/Cog/spursistasrc/vm/cogit.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursistasrc/vm/cogit.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGenerator VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/spursistasrc/vm/cointerp.c
===================================================================
--- branches/Cog/spursistasrc/vm/cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursistasrc/vm/cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -827,7 +827,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2375,7 +2375,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1639]";
+const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1641]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -16959,7 +16959,7 @@
 static sqInt
 checkForAndFollowForwardedPrimitiveState(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt accessorDepth;
+    signed char accessorDepth;
     sqInt firstBytecode;
     sqInt found;
     sqInt found1;
@@ -40691,7 +40691,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur32BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqLong NoDbgRegParms
+static sqInt NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -57427,7 +57427,7 @@
     usqInt prevFree;
     usqInt prevFreeChunk;
     usqInt prevPrevFree;
-    sqInt prevPrevFreeChunk;
+    usqInt prevPrevFreeChunk;
     sqInt slotBytes;
     sqInt slotBytes1;
     usqInt there;
@@ -61948,7 +61948,7 @@
 bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
 {
     usqInt bridgeSpan;
-    usqInt clifton;
+    sqInt clifton;
     usqInt segEnd;
 
 	segEnd = ((aSegment->segSize)) + ((aSegment->segStart));
@@ -62128,7 +62128,7 @@
 static void
 postSnapshot(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt address;
+    usqInt address;
     sqInt bytes;
     usqInt freeChunk;
     sqInt i;
@@ -62500,8 +62500,8 @@
 {
     usqLong firstSavedBridgeWord;
     sqInt nWritten;
-    sqInt pier1;
-    sqInt pier2;
+    usqInt pier1;
+    usqInt pier2;
     usqLong secondSavedBridgeWord;
 
 	pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -65523,6 +65523,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -65541,9 +65542,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0

Modified: branches/Cog/spursistasrc/vm/cointerp.h
===================================================================
--- branches/Cog/spursistasrc/vm/cointerp.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursistasrc/vm/cointerp.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/spursistasrc/vm/gcc3x-cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursistasrc/vm/gcc3x-cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -830,7 +830,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2378,7 +2378,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1639]";
+const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1641]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -16968,7 +16968,7 @@
 static sqInt
 checkForAndFollowForwardedPrimitiveState(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt accessorDepth;
+    signed char accessorDepth;
     sqInt firstBytecode;
     sqInt found;
     sqInt found1;
@@ -40700,7 +40700,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur32BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqLong NoDbgRegParms
+static sqInt NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -57436,7 +57436,7 @@
     usqInt prevFree;
     usqInt prevFreeChunk;
     usqInt prevPrevFree;
-    sqInt prevPrevFreeChunk;
+    usqInt prevPrevFreeChunk;
     sqInt slotBytes;
     sqInt slotBytes1;
     usqInt there;
@@ -61957,7 +61957,7 @@
 bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
 {
     usqInt bridgeSpan;
-    usqInt clifton;
+    sqInt clifton;
     usqInt segEnd;
 
 	segEnd = ((aSegment->segSize)) + ((aSegment->segStart));
@@ -62137,7 +62137,7 @@
 static void
 postSnapshot(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt address;
+    usqInt address;
     sqInt bytes;
     usqInt freeChunk;
     sqInt i;
@@ -62509,8 +62509,8 @@
 {
     usqLong firstSavedBridgeWord;
     sqInt nWritten;
-    sqInt pier1;
-    sqInt pier2;
+    usqInt pier1;
+    usqInt pier2;
     usqLong secondSavedBridgeWord;
 
 	pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -65532,6 +65532,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -65550,9 +65551,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0

Modified: branches/Cog/spursrc/vm/cogit.h
===================================================================
--- branches/Cog/spursrc/vm/cogit.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursrc/vm/cogit.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGenerator VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/spursrc/vm/cointerp.c
===================================================================
--- branches/Cog/spursrc/vm/cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursrc/vm/cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -128,7 +128,7 @@
 #define ActiveProcessIndex 1
 #define AlternateHeaderHasPrimFlag 0x20000
 #define AlternateHeaderNumLiteralsMask 0x7FFF
-#define AltLongStoreBytecode 234
+#define AltLongStoreBytecode 129
 #define AtCacheFixedFields 4
 #define AtCacheFmt 3
 #define AtCacheMask 0x1C
@@ -819,7 +819,7 @@
 extern void ensureNoForwardedLiteralsIn(sqInt aMethodObj);
 extern usqInt freeStartAddress(void);
 extern usqInt getScavengeThreshold(void);
-static sqInt NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
+static sqLong NoDbgRegParms headerWhileForwardingOf(sqInt aCompiledMethodObjOop);
 extern sqInt isForwardedClassIndex(sqInt maybeClassIndex);
 extern sqInt isImmediateClass(sqInt classObj);
 extern sqInt isReallyYoungObject(sqInt objOop);
@@ -2362,7 +2362,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1639]";
+const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1641]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -35649,7 +35649,7 @@
 	(which shouldn't happen with Spur). */
 
 	/* Spur32BitCoMemoryManager>>#headerWhileForwardingOf: */
-static sqInt NoDbgRegParms
+static sqLong NoDbgRegParms
 headerWhileForwardingOf(sqInt aCompiledMethodObjOop)
 {
 	assert(!(isForwarded(aCompiledMethodObjOop)));
@@ -43935,7 +43935,7 @@
 static sqInt
 imageSegmentVersion(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    int wholeWord;
+    sqInt wholeWord;
 
 
 	/* first data word, 'does' */
@@ -52377,7 +52377,7 @@
     usqInt prevFree;
     usqInt prevFreeChunk;
     usqInt prevPrevFree;
-    usqInt prevPrevFreeChunk;
+    sqInt prevPrevFreeChunk;
     sqInt slotBytes;
     sqInt slotBytes1;
     usqInt there;
@@ -59108,7 +59108,7 @@
     sqInt prevPrevObj2;
     usqInt stopAddr;
     sqInt swapFloatWords;
-    int temp;
+    sqInt temp;
     sqInt temp1;
     sqInt wordAddr;
 
@@ -60447,6 +60447,7 @@
 {
     sqInt oop;
     char *ptr;
+    sqInt referent;
     char * toDoLimit1;
     char * toDoLimit2;
 
@@ -60465,9 +60466,23 @@
 		oop = longAt(ptr);
 		if (((oop & (tagMask())) == 0)
 		 && (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) {
-			longAtput(ptr, followForwarded(oop));
+			/* begin followForwarded: */
+			assert(isUnambiguouslyForwarder(oop));
+			referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+			while (((referent & (tagMask())) == 0)
+			 && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+				referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+			}
+			oop = referent;
+			longAtput(ptr, oop);
 		}
 	}
+	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
+		? ((longAt(theFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
+		: (byteAt((theFP + FoxIFrameFlags) + 3)) != 0)) {
+		assert(oop == (longAt(theFP + (frameStackedReceiverOffset(theFP)))));
+		followForwardedObjectFieldstoDepth(oop, 0);
+	}
 	assert(!(isForwarded(frameMethodObject(theFP))));
 	if (((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
 		? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0
@@ -66907,7 +66922,7 @@
     sqInt displayObj;
     sqInt primFailCodeValue;
     sqInt ptr;
-    int reversed;
+    sqInt reversed;
     sqInt w;
     sqInt wordEndIndex;
     sqInt wordStartIndex;

Modified: branches/Cog/spursrc/vm/cointerp.h
===================================================================
--- branches/Cog/spursrc/vm/cointerp.h	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursrc/vm/cointerp.h	2016-01-16 05:33:04 UTC (rev 3557)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
 
 

Modified: branches/Cog/spursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/spursrc/vm/gcc3x-cointerp.c	2016-01-16 04:45:20 UTC (rev 3556)
+++ branches/Cog/spursrc/vm/gcc3x-cointerp.c	2016-01-16 05:33:04 UTC (rev 3557)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
    from
-	CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9
+	CoInterpreter VMMaker.oscog-eem.1641 uuid: a1fef138-fa26-4a09-b0c1-1e7be82e14a8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1639 uuid: 0607da54-875d-4632-95f3-ce5b0d6d3bf9 " __DATE__ ;

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list