[Vm-dev] [commit][3252] CogVM source as per VMMaker.oscog-eem.1053

commits at squeakvm.org commits at squeakvm.org
Wed Feb 11 19:21:50 UTC 2015


Revision: 3252
Author:   eliot
Date:     2015-02-11 11:21:48 -0800 (Wed, 11 Feb 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1053

Spur:
Fix idiocy with image segment bit-position constants.  Move the constants to
class variables.  Ensure all methods commented as being part of load or save.

Modified Paths:
--------------
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    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

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

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -350,6 +350,8 @@
 #define TheInterruptSemaphore 30
 #define TheLowSpaceSemaphore 17
 #define TheTimerSemaphore 29
+#define TopHashBit 0x200000
+#define TopOopBit 0x80000000UL
 #define TraceBlockActivation 5
 #define TraceBlockCreation 7
 #define TraceBufferSize 768
@@ -2354,7 +2356,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.1050";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1053";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -45018,7 +45020,8 @@
 }
 
 
-/*	Copy objOop into the segment beginning at segAddr, and forward it to the
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Copy objOop into the segment beginning at segAddr, and forward it to the
 	copy. If it is a class in the class table, set the copy's hash to 0 for
 	reassignment on load,
 	and mark it as a class by setting its isRemembered bit.
@@ -48934,9 +48937,6 @@
     sqInt slotBytes1;
     sqInt stopAddr;
     sqInt stopAddr1;
-    sqInt topHashBit;
-    sqInt topHashBit1;
-    sqInt topOopBit;
 
 	/* begin numSlotsOf: */
 	flag("endianness");
@@ -49027,8 +49027,6 @@
 	numOutPointers = (numSlots4 == 0xFF
 		? longAt(outPointerArray - BaseHeaderSize)
 		: numSlots4);
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots13 = byteAt(segmentStart + 7);
 	objOop1 = (numSlots13 == 0xFF
@@ -49043,12 +49041,12 @@
 		/* validate the class ref, but don't update it until any internal classes have been added to the class table. */
 
 		classIndex = ((longAt(objOop1)) & 0x3FFFFF) - 16;
-		if (classIndex & topHashBit) {
-			if ((classIndex - topHashBit) >= numOutPointers) {
+		if (classIndex & TopHashBit) {
+			if ((classIndex - TopHashBit) >= numOutPointers) {
 				errorCode = PrimErrBadIndex;
 				goto l2;
 			}
-			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - topHashBit) << (shiftForWord())));
+			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - TopHashBit) << (shiftForWord())));
 			hash = (long32At(mappedOop + 4)) & 0x3FFFFF;
 			if (!((hash > 0x1F)
 				 && ((classOrNilAtIndex(hash)) == mappedOop))) {
@@ -49072,8 +49070,8 @@
 		for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) {
 			oop1 = longAt((objOop1 + BaseHeaderSize) + (i << (shiftForWord())));
 			if ((oop1 & 3) == 0) {
-				if (oop1 & topOopBit) {
-					if (((oop1 = (oop1 - topOopBit) / BytesPerOop)) >= numOutPointers) {
+				if (oop1 & TopOopBit) {
+					if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) {
 						errorCode = PrimErrBadIndex;
 						goto l2;
 					}
@@ -49126,7 +49124,6 @@
 		return errorCode;
 	}
 	/* begin assignClassIndicesAndPinFrom:to:outPointers: */
-	topHashBit1 = 1 << (22 - 1);
 	/* begin objectStartingAt: */
 	numSlots5 = byteAt(segmentStart + 7);
 	objOop2 = (numSlots5 == 0xFF
@@ -49138,8 +49135,8 @@
 		   or into outPointers.  See mapOopsFrom:to:outPointers:outHashes:. */
 
 		classRef = ((longAt(objOop2)) & 0x3FFFFF) - 16;
-		classOop = (classRef & topHashBit1
-			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - topHashBit1) << (shiftForWord())))
+		classOop = (classRef & TopHashBit
+			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - TopHashBit) << (shiftForWord())))
 			: (classRef * 8) + segmentStart);
 		classIndex1 = (long32At(classOop + 4)) & 0x3FFFFF;
 		assert((classIndex1 > (lastClassIndexPun()))
@@ -49520,8 +49517,6 @@
     sqInt outIndex;
     usqInt p;
     sqInt segIndex;
-    sqInt topHashBit;
-    sqInt topOopBit;
 
 	outIndex = 0;
 	/* begin fillObj:numSlots:with: */
@@ -49537,8 +49532,6 @@
 		longAtput(p, GIV(nilObj));
 		longAtput(p + 4, GIV(nilObj));
 	}
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots1 = byteAt(segStart + 7);
 	objOop = (numSlots1 == 0xFF
@@ -49550,7 +49543,7 @@
 
 			/* oop is a new outPointer; allocate its oop */
 
-			/* begin newOutPointer:at:in:hashes:topHashBit: */
+			/* begin newOutPointer:at:in:hashes: */
 			if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 				/* no room in outPointers; fail */
@@ -49576,11 +49569,11 @@
 			long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 			/* begin setHashBitsOf:to: */
 			flag("endianness");
-			assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+			assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 			setIsMarkedOfto(oop, 1);
 			outIndex += 1;
-		l1:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+		l1:	/* end newOutPointer:at:in:hashes: */;
 			if (outIndex == 0) {
 
 				/* no room in outPointers; fail */
@@ -49600,7 +49593,7 @@
 
 					/* oop is a new outPointer; allocate its oop */
 
-					/* begin newOutPointer:at:in:hashes:topHashBit: */
+					/* begin newOutPointer:at:in:hashes: */
 					if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 						/* no room in outPointers; fail */
@@ -49626,11 +49619,11 @@
 					long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 					/* begin setHashBitsOf:to: */
 					flag("endianness");
-					assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+					assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 					setIsMarkedOfto(oop, 1);
 					outIndex += 1;
-				l2:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+				l2:	/* end newOutPointer:at:in:hashes: */;
 					if (outIndex == 0) {
 
 						/* no room in outPointers; fail */
@@ -49638,10 +49631,10 @@
 						return -1;
 					}
 				}
-				/* begin mappedOopOf:topHashBit:topOopBit: */
+				/* begin mappedInSegmentOopOf: */
 				hash = (long32At(oop + 4)) & 0x3FFFFF;
-				oop = (hash & topHashBit
-					? ((hash - topHashBit) * BytesPerOop) + topOopBit
+				oop = (hash & TopHashBit
+					? ((hash - TopHashBit) * BytesPerOop) + TopOopBit
 					: hash * 8);
 				/* begin storePointerUnchecked:ofObject:withValue: */
 				assert(!(isForwarded(objOop)));
@@ -58315,7 +58308,8 @@
 }
 
 
-/*	Enumerate the objects in objArray, unmarking them and restoring their
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Enumerate the objects in objArray, unmarking them and restoring their
 	hashes from the corresponding 32-bit slots in savedHashes. The first
 	unused entry in
 	objArray will have a non-hash value entry in savedHashes. Free

Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/nsspursrc/vm/cointerp.h	2015-02-11 19:21:48 UTC (rev 3252)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
 
 

Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -353,6 +353,8 @@
 #define TheInterruptSemaphore 30
 #define TheLowSpaceSemaphore 17
 #define TheTimerSemaphore 29
+#define TopHashBit 0x200000
+#define TopOopBit 0x80000000UL
 #define TraceBlockActivation 5
 #define TraceBlockCreation 7
 #define TraceBufferSize 768
@@ -2357,7 +2359,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.1050";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1053";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -45027,7 +45029,8 @@
 }
 
 
-/*	Copy objOop into the segment beginning at segAddr, and forward it to the
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Copy objOop into the segment beginning at segAddr, and forward it to the
 	copy. If it is a class in the class table, set the copy's hash to 0 for
 	reassignment on load,
 	and mark it as a class by setting its isRemembered bit.
@@ -48943,9 +48946,6 @@
     sqInt slotBytes1;
     sqInt stopAddr;
     sqInt stopAddr1;
-    sqInt topHashBit;
-    sqInt topHashBit1;
-    sqInt topOopBit;
 
 	/* begin numSlotsOf: */
 	flag("endianness");
@@ -49036,8 +49036,6 @@
 	numOutPointers = (numSlots4 == 0xFF
 		? longAt(outPointerArray - BaseHeaderSize)
 		: numSlots4);
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots13 = byteAt(segmentStart + 7);
 	objOop1 = (numSlots13 == 0xFF
@@ -49052,12 +49050,12 @@
 		/* validate the class ref, but don't update it until any internal classes have been added to the class table. */
 
 		classIndex = ((longAt(objOop1)) & 0x3FFFFF) - 16;
-		if (classIndex & topHashBit) {
-			if ((classIndex - topHashBit) >= numOutPointers) {
+		if (classIndex & TopHashBit) {
+			if ((classIndex - TopHashBit) >= numOutPointers) {
 				errorCode = PrimErrBadIndex;
 				goto l2;
 			}
-			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - topHashBit) << (shiftForWord())));
+			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - TopHashBit) << (shiftForWord())));
 			hash = (long32At(mappedOop + 4)) & 0x3FFFFF;
 			if (!((hash > 0x1F)
 				 && ((classOrNilAtIndex(hash)) == mappedOop))) {
@@ -49081,8 +49079,8 @@
 		for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) {
 			oop1 = longAt((objOop1 + BaseHeaderSize) + (i << (shiftForWord())));
 			if ((oop1 & 3) == 0) {
-				if (oop1 & topOopBit) {
-					if (((oop1 = (oop1 - topOopBit) / BytesPerOop)) >= numOutPointers) {
+				if (oop1 & TopOopBit) {
+					if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) {
 						errorCode = PrimErrBadIndex;
 						goto l2;
 					}
@@ -49135,7 +49133,6 @@
 		return errorCode;
 	}
 	/* begin assignClassIndicesAndPinFrom:to:outPointers: */
-	topHashBit1 = 1 << (22 - 1);
 	/* begin objectStartingAt: */
 	numSlots5 = byteAt(segmentStart + 7);
 	objOop2 = (numSlots5 == 0xFF
@@ -49147,8 +49144,8 @@
 		   or into outPointers.  See mapOopsFrom:to:outPointers:outHashes:. */
 
 		classRef = ((longAt(objOop2)) & 0x3FFFFF) - 16;
-		classOop = (classRef & topHashBit1
-			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - topHashBit1) << (shiftForWord())))
+		classOop = (classRef & TopHashBit
+			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - TopHashBit) << (shiftForWord())))
 			: (classRef * 8) + segmentStart);
 		classIndex1 = (long32At(classOop + 4)) & 0x3FFFFF;
 		assert((classIndex1 > (lastClassIndexPun()))
@@ -49529,8 +49526,6 @@
     sqInt outIndex;
     usqInt p;
     sqInt segIndex;
-    sqInt topHashBit;
-    sqInt topOopBit;
 
 	outIndex = 0;
 	/* begin fillObj:numSlots:with: */
@@ -49546,8 +49541,6 @@
 		longAtput(p, GIV(nilObj));
 		longAtput(p + 4, GIV(nilObj));
 	}
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots1 = byteAt(segStart + 7);
 	objOop = (numSlots1 == 0xFF
@@ -49559,7 +49552,7 @@
 
 			/* oop is a new outPointer; allocate its oop */
 
-			/* begin newOutPointer:at:in:hashes:topHashBit: */
+			/* begin newOutPointer:at:in:hashes: */
 			if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 				/* no room in outPointers; fail */
@@ -49585,11 +49578,11 @@
 			long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 			/* begin setHashBitsOf:to: */
 			flag("endianness");
-			assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+			assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 			setIsMarkedOfto(oop, 1);
 			outIndex += 1;
-		l1:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+		l1:	/* end newOutPointer:at:in:hashes: */;
 			if (outIndex == 0) {
 
 				/* no room in outPointers; fail */
@@ -49609,7 +49602,7 @@
 
 					/* oop is a new outPointer; allocate its oop */
 
-					/* begin newOutPointer:at:in:hashes:topHashBit: */
+					/* begin newOutPointer:at:in:hashes: */
 					if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 						/* no room in outPointers; fail */
@@ -49635,11 +49628,11 @@
 					long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 					/* begin setHashBitsOf:to: */
 					flag("endianness");
-					assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+					assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 					setIsMarkedOfto(oop, 1);
 					outIndex += 1;
-				l2:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+				l2:	/* end newOutPointer:at:in:hashes: */;
 					if (outIndex == 0) {
 
 						/* no room in outPointers; fail */
@@ -49647,10 +49640,10 @@
 						return -1;
 					}
 				}
-				/* begin mappedOopOf:topHashBit:topOopBit: */
+				/* begin mappedInSegmentOopOf: */
 				hash = (long32At(oop + 4)) & 0x3FFFFF;
-				oop = (hash & topHashBit
-					? ((hash - topHashBit) * BytesPerOop) + topOopBit
+				oop = (hash & TopHashBit
+					? ((hash - TopHashBit) * BytesPerOop) + TopOopBit
 					: hash * 8);
 				/* begin storePointerUnchecked:ofObject:withValue: */
 				assert(!(isForwarded(objOop)));
@@ -58324,7 +58317,8 @@
 }
 
 
-/*	Enumerate the objects in objArray, unmarking them and restoring their
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Enumerate the objects in objArray, unmarking them and restoring their
 	hashes from the corresponding 32-bit slots in savedHashes. The first
 	unused entry in
 	objArray will have a non-hash value entry in savedHashes. Free

Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	StackInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	StackInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -318,6 +318,8 @@
 #define TheInterruptSemaphore 30
 #define TheLowSpaceSemaphore 17
 #define TheTimerSemaphore 29
+#define TopHashBit 0x200000
+#define TopOopBit 0x80000000UL
 #define TrueObject 2
 #define V3PrimitiveBitsMask 0x200003FE
 #define ValueIndex 1
@@ -2106,7 +2108,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1050";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1053";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -32147,7 +32149,8 @@
 }
 
 
-/*	Copy objOop into the segment beginning at segAddr, and forward it to the
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Copy objOop into the segment beginning at segAddr, and forward it to the
 	copy. If it is a class in the class table, set the copy's hash to 0 for
 	reassignment on load,
 	and mark it as a class by setting its isRemembered bit.
@@ -36060,9 +36063,6 @@
     sqInt slotBytes1;
     sqInt stopAddr;
     sqInt stopAddr1;
-    sqInt topHashBit;
-    sqInt topHashBit1;
-    sqInt topOopBit;
 
 	/* begin numSlotsOf: */
 	flag("endianness");
@@ -36153,8 +36153,6 @@
 	numOutPointers = (numSlots4 == 0xFF
 		? longAt(outPointerArray - BaseHeaderSize)
 		: numSlots4);
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots13 = byteAt(segmentStart + 7);
 	objOop1 = (numSlots13 == 0xFF
@@ -36169,12 +36167,12 @@
 		/* validate the class ref, but don't update it until any internal classes have been added to the class table. */
 
 		classIndex = ((longAt(objOop1)) & 0x3FFFFF) - 16;
-		if (classIndex & topHashBit) {
-			if ((classIndex - topHashBit) >= numOutPointers) {
+		if (classIndex & TopHashBit) {
+			if ((classIndex - TopHashBit) >= numOutPointers) {
 				errorCode = PrimErrBadIndex;
 				goto l2;
 			}
-			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - topHashBit) << (shiftForWord())));
+			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - TopHashBit) << (shiftForWord())));
 			hash = (long32At(mappedOop + 4)) & 0x3FFFFF;
 			if (!((hash > 0x1F)
 				 && ((classOrNilAtIndex(hash)) == mappedOop))) {
@@ -36198,8 +36196,8 @@
 		for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) {
 			oop1 = longAt((objOop1 + BaseHeaderSize) + (i << (shiftForWord())));
 			if ((oop1 & 3) == 0) {
-				if (oop1 & topOopBit) {
-					if (((oop1 = (oop1 - topOopBit) / BytesPerOop)) >= numOutPointers) {
+				if (oop1 & TopOopBit) {
+					if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) {
 						errorCode = PrimErrBadIndex;
 						goto l2;
 					}
@@ -36252,7 +36250,6 @@
 		return errorCode;
 	}
 	/* begin assignClassIndicesAndPinFrom:to:outPointers: */
-	topHashBit1 = 1 << (22 - 1);
 	/* begin objectStartingAt: */
 	numSlots5 = byteAt(segmentStart + 7);
 	objOop2 = (numSlots5 == 0xFF
@@ -36264,8 +36261,8 @@
 		   or into outPointers.  See mapOopsFrom:to:outPointers:outHashes:. */
 
 		classRef = ((longAt(objOop2)) & 0x3FFFFF) - 16;
-		classOop = (classRef & topHashBit1
-			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - topHashBit1) << (shiftForWord())))
+		classOop = (classRef & TopHashBit
+			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - TopHashBit) << (shiftForWord())))
 			: (classRef * 8) + segmentStart);
 		classIndex1 = (long32At(classOop + 4)) & 0x3FFFFF;
 		assert((classIndex1 > (lastClassIndexPun()))
@@ -36646,8 +36643,6 @@
     sqInt outIndex;
     usqInt p;
     sqInt segIndex;
-    sqInt topHashBit;
-    sqInt topOopBit;
 
 	outIndex = 0;
 	/* begin fillObj:numSlots:with: */
@@ -36663,8 +36658,6 @@
 		longAtput(p, GIV(nilObj));
 		longAtput(p + 4, GIV(nilObj));
 	}
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots1 = byteAt(segStart + 7);
 	objOop = (numSlots1 == 0xFF
@@ -36676,7 +36669,7 @@
 
 			/* oop is a new outPointer; allocate its oop */
 
-			/* begin newOutPointer:at:in:hashes:topHashBit: */
+			/* begin newOutPointer:at:in:hashes: */
 			if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 				/* no room in outPointers; fail */
@@ -36702,11 +36695,11 @@
 			long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 			/* begin setHashBitsOf:to: */
 			flag("endianness");
-			assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+			assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 			setIsMarkedOfto(oop, 1);
 			outIndex += 1;
-		l1:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+		l1:	/* end newOutPointer:at:in:hashes: */;
 			if (outIndex == 0) {
 
 				/* no room in outPointers; fail */
@@ -36726,7 +36719,7 @@
 
 					/* oop is a new outPointer; allocate its oop */
 
-					/* begin newOutPointer:at:in:hashes:topHashBit: */
+					/* begin newOutPointer:at:in:hashes: */
 					if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 						/* no room in outPointers; fail */
@@ -36752,11 +36745,11 @@
 					long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 					/* begin setHashBitsOf:to: */
 					flag("endianness");
-					assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+					assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 					setIsMarkedOfto(oop, 1);
 					outIndex += 1;
-				l2:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+				l2:	/* end newOutPointer:at:in:hashes: */;
 					if (outIndex == 0) {
 
 						/* no room in outPointers; fail */
@@ -36764,10 +36757,10 @@
 						return -1;
 					}
 				}
-				/* begin mappedOopOf:topHashBit:topOopBit: */
+				/* begin mappedInSegmentOopOf: */
 				hash = (long32At(oop + 4)) & 0x3FFFFF;
-				oop = (hash & topHashBit
-					? ((hash - topHashBit) * BytesPerOop) + topOopBit
+				oop = (hash & TopHashBit
+					? ((hash - TopHashBit) * BytesPerOop) + TopOopBit
 					: hash * 8);
 				/* begin storePointerUnchecked:ofObject:withValue: */
 				assert(!(isForwarded(objOop)));
@@ -45297,7 +45290,8 @@
 }
 
 
-/*	Enumerate the objects in objArray, unmarking them and restoring their
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Enumerate the objects in objArray, unmarking them and restoring their
 	hashes from the corresponding 32-bit slots in savedHashes. The first
 	unused entry in
 	objArray will have a non-hash value entry in savedHashes. Free

Modified: branches/Cog/nsspurstacksrc/vm/interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/interp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/nsspurstacksrc/vm/interp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	StackInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	StackInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -315,6 +315,8 @@
 #define TheInterruptSemaphore 30
 #define TheLowSpaceSemaphore 17
 #define TheTimerSemaphore 29
+#define TopHashBit 0x200000
+#define TopOopBit 0x80000000UL
 #define TrueObject 2
 #define V3PrimitiveBitsMask 0x200003FE
 #define ValueIndex 1
@@ -2103,7 +2105,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1050";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1053";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -32138,7 +32140,8 @@
 }
 
 
-/*	Copy objOop into the segment beginning at segAddr, and forward it to the
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Copy objOop into the segment beginning at segAddr, and forward it to the
 	copy. If it is a class in the class table, set the copy's hash to 0 for
 	reassignment on load,
 	and mark it as a class by setting its isRemembered bit.
@@ -36051,9 +36054,6 @@
     sqInt slotBytes1;
     sqInt stopAddr;
     sqInt stopAddr1;
-    sqInt topHashBit;
-    sqInt topHashBit1;
-    sqInt topOopBit;
 
 	/* begin numSlotsOf: */
 	flag("endianness");
@@ -36144,8 +36144,6 @@
 	numOutPointers = (numSlots4 == 0xFF
 		? longAt(outPointerArray - BaseHeaderSize)
 		: numSlots4);
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots13 = byteAt(segmentStart + 7);
 	objOop1 = (numSlots13 == 0xFF
@@ -36160,12 +36158,12 @@
 		/* validate the class ref, but don't update it until any internal classes have been added to the class table. */
 
 		classIndex = ((longAt(objOop1)) & 0x3FFFFF) - 16;
-		if (classIndex & topHashBit) {
-			if ((classIndex - topHashBit) >= numOutPointers) {
+		if (classIndex & TopHashBit) {
+			if ((classIndex - TopHashBit) >= numOutPointers) {
 				errorCode = PrimErrBadIndex;
 				goto l2;
 			}
-			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - topHashBit) << (shiftForWord())));
+			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - TopHashBit) << (shiftForWord())));
 			hash = (long32At(mappedOop + 4)) & 0x3FFFFF;
 			if (!((hash > 0x1F)
 				 && ((classOrNilAtIndex(hash)) == mappedOop))) {
@@ -36189,8 +36187,8 @@
 		for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) {
 			oop1 = longAt((objOop1 + BaseHeaderSize) + (i << (shiftForWord())));
 			if ((oop1 & 3) == 0) {
-				if (oop1 & topOopBit) {
-					if (((oop1 = (oop1 - topOopBit) / BytesPerOop)) >= numOutPointers) {
+				if (oop1 & TopOopBit) {
+					if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) {
 						errorCode = PrimErrBadIndex;
 						goto l2;
 					}
@@ -36243,7 +36241,6 @@
 		return errorCode;
 	}
 	/* begin assignClassIndicesAndPinFrom:to:outPointers: */
-	topHashBit1 = 1 << (22 - 1);
 	/* begin objectStartingAt: */
 	numSlots5 = byteAt(segmentStart + 7);
 	objOop2 = (numSlots5 == 0xFF
@@ -36255,8 +36252,8 @@
 		   or into outPointers.  See mapOopsFrom:to:outPointers:outHashes:. */
 
 		classRef = ((longAt(objOop2)) & 0x3FFFFF) - 16;
-		classOop = (classRef & topHashBit1
-			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - topHashBit1) << (shiftForWord())))
+		classOop = (classRef & TopHashBit
+			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - TopHashBit) << (shiftForWord())))
 			: (classRef * 8) + segmentStart);
 		classIndex1 = (long32At(classOop + 4)) & 0x3FFFFF;
 		assert((classIndex1 > (lastClassIndexPun()))
@@ -36637,8 +36634,6 @@
     sqInt outIndex;
     usqInt p;
     sqInt segIndex;
-    sqInt topHashBit;
-    sqInt topOopBit;
 
 	outIndex = 0;
 	/* begin fillObj:numSlots:with: */
@@ -36654,8 +36649,6 @@
 		longAtput(p, GIV(nilObj));
 		longAtput(p + 4, GIV(nilObj));
 	}
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots1 = byteAt(segStart + 7);
 	objOop = (numSlots1 == 0xFF
@@ -36667,7 +36660,7 @@
 
 			/* oop is a new outPointer; allocate its oop */
 
-			/* begin newOutPointer:at:in:hashes:topHashBit: */
+			/* begin newOutPointer:at:in:hashes: */
 			if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 				/* no room in outPointers; fail */
@@ -36693,11 +36686,11 @@
 			long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 			/* begin setHashBitsOf:to: */
 			flag("endianness");
-			assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+			assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 			setIsMarkedOfto(oop, 1);
 			outIndex += 1;
-		l1:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+		l1:	/* end newOutPointer:at:in:hashes: */;
 			if (outIndex == 0) {
 
 				/* no room in outPointers; fail */
@@ -36717,7 +36710,7 @@
 
 					/* oop is a new outPointer; allocate its oop */
 
-					/* begin newOutPointer:at:in:hashes:topHashBit: */
+					/* begin newOutPointer:at:in:hashes: */
 					if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 						/* no room in outPointers; fail */
@@ -36743,11 +36736,11 @@
 					long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 					/* begin setHashBitsOf:to: */
 					flag("endianness");
-					assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+					assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 					setIsMarkedOfto(oop, 1);
 					outIndex += 1;
-				l2:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+				l2:	/* end newOutPointer:at:in:hashes: */;
 					if (outIndex == 0) {
 
 						/* no room in outPointers; fail */
@@ -36755,10 +36748,10 @@
 						return -1;
 					}
 				}
-				/* begin mappedOopOf:topHashBit:topOopBit: */
+				/* begin mappedInSegmentOopOf: */
 				hash = (long32At(oop + 4)) & 0x3FFFFF;
-				oop = (hash & topHashBit
-					? ((hash - topHashBit) * BytesPerOop) + topOopBit
+				oop = (hash & TopHashBit
+					? ((hash - TopHashBit) * BytesPerOop) + TopOopBit
 					: hash * 8);
 				/* begin storePointerUnchecked:ofObject:withValue: */
 				assert(!(isForwarded(objOop)));
@@ -45288,7 +45281,8 @@
 }
 
 
-/*	Enumerate the objects in objArray, unmarking them and restoring their
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Enumerate the objects in objArray, unmarking them and restoring their
 	hashes from the corresponding 32-bit slots in savedHashes. The first
 	unused entry in
 	objArray will have a non-hash value entry in savedHashes. Free


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Tue Feb 10 19:01:40 PST 2015
   + Wed Feb 11 11:20:59 PST 2015

Modified: branches/Cog/spursistasrc/vm/cointerp.c
===================================================================
--- branches/Cog/spursistasrc/vm/cointerp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/spursistasrc/vm/cointerp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -350,6 +350,8 @@
 #define TheInterruptSemaphore 30
 #define TheLowSpaceSemaphore 17
 #define TheTimerSemaphore 29
+#define TopHashBit 0x200000
+#define TopOopBit 0x80000000UL
 #define TraceBlockActivation 5
 #define TraceBlockCreation 7
 #define TraceBufferSize 768
@@ -2355,7 +2357,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 VM [CoInterpreterPrimitives VMMaker.oscog-eem.1050]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1053]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -45439,7 +45441,8 @@
 }
 
 
-/*	Copy objOop into the segment beginning at segAddr, and forward it to the
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Copy objOop into the segment beginning at segAddr, and forward it to the
 	copy. If it is a class in the class table, set the copy's hash to 0 for
 	reassignment on load,
 	and mark it as a class by setting its isRemembered bit.
@@ -49362,9 +49365,6 @@
     sqInt slotBytes1;
     sqInt stopAddr;
     sqInt stopAddr1;
-    sqInt topHashBit;
-    sqInt topHashBit1;
-    sqInt topOopBit;
 
 	/* begin numSlotsOf: */
 	flag("endianness");
@@ -49455,8 +49455,6 @@
 	numOutPointers = (numSlots4 == 0xFF
 		? longAt(outPointerArray - BaseHeaderSize)
 		: numSlots4);
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots13 = byteAt(segmentStart + 7);
 	objOop1 = (numSlots13 == 0xFF
@@ -49471,12 +49469,12 @@
 		/* validate the class ref, but don't update it until any internal classes have been added to the class table. */
 
 		classIndex = ((longAt(objOop1)) & 0x3FFFFF) - 16;
-		if (classIndex & topHashBit) {
-			if ((classIndex - topHashBit) >= numOutPointers) {
+		if (classIndex & TopHashBit) {
+			if ((classIndex - TopHashBit) >= numOutPointers) {
 				errorCode = PrimErrBadIndex;
 				goto l2;
 			}
-			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - topHashBit) << (shiftForWord())));
+			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - TopHashBit) << (shiftForWord())));
 			hash = (long32At(mappedOop + 4)) & 0x3FFFFF;
 			if (!((hash > 0x1F)
 				 && ((classOrNilAtIndex(hash)) == mappedOop))) {
@@ -49500,8 +49498,8 @@
 		for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) {
 			oop1 = longAt((objOop1 + BaseHeaderSize) + (i << (shiftForWord())));
 			if ((oop1 & 3) == 0) {
-				if (oop1 & topOopBit) {
-					if (((oop1 = (oop1 - topOopBit) / BytesPerOop)) >= numOutPointers) {
+				if (oop1 & TopOopBit) {
+					if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) {
 						errorCode = PrimErrBadIndex;
 						goto l2;
 					}
@@ -49554,7 +49552,6 @@
 		return errorCode;
 	}
 	/* begin assignClassIndicesAndPinFrom:to:outPointers: */
-	topHashBit1 = 1 << (22 - 1);
 	/* begin objectStartingAt: */
 	numSlots5 = byteAt(segmentStart + 7);
 	objOop2 = (numSlots5 == 0xFF
@@ -49566,8 +49563,8 @@
 		   or into outPointers.  See mapOopsFrom:to:outPointers:outHashes:. */
 
 		classRef = ((longAt(objOop2)) & 0x3FFFFF) - 16;
-		classOop = (classRef & topHashBit1
-			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - topHashBit1) << (shiftForWord())))
+		classOop = (classRef & TopHashBit
+			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - TopHashBit) << (shiftForWord())))
 			: (classRef * 8) + segmentStart);
 		classIndex1 = (long32At(classOop + 4)) & 0x3FFFFF;
 		assert((classIndex1 > (lastClassIndexPun()))
@@ -49948,8 +49945,6 @@
     sqInt outIndex;
     usqInt p;
     sqInt segIndex;
-    sqInt topHashBit;
-    sqInt topOopBit;
 
 	outIndex = 0;
 	/* begin fillObj:numSlots:with: */
@@ -49965,8 +49960,6 @@
 		longAtput(p, GIV(nilObj));
 		longAtput(p + 4, GIV(nilObj));
 	}
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots1 = byteAt(segStart + 7);
 	objOop = (numSlots1 == 0xFF
@@ -49978,7 +49971,7 @@
 
 			/* oop is a new outPointer; allocate its oop */
 
-			/* begin newOutPointer:at:in:hashes:topHashBit: */
+			/* begin newOutPointer:at:in:hashes: */
 			if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 				/* no room in outPointers; fail */
@@ -50004,11 +49997,11 @@
 			long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 			/* begin setHashBitsOf:to: */
 			flag("endianness");
-			assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+			assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 			setIsMarkedOfto(oop, 1);
 			outIndex += 1;
-		l1:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+		l1:	/* end newOutPointer:at:in:hashes: */;
 			if (outIndex == 0) {
 
 				/* no room in outPointers; fail */
@@ -50028,7 +50021,7 @@
 
 					/* oop is a new outPointer; allocate its oop */
 
-					/* begin newOutPointer:at:in:hashes:topHashBit: */
+					/* begin newOutPointer:at:in:hashes: */
 					if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 						/* no room in outPointers; fail */
@@ -50054,11 +50047,11 @@
 					long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 					/* begin setHashBitsOf:to: */
 					flag("endianness");
-					assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+					assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 					setIsMarkedOfto(oop, 1);
 					outIndex += 1;
-				l2:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+				l2:	/* end newOutPointer:at:in:hashes: */;
 					if (outIndex == 0) {
 
 						/* no room in outPointers; fail */
@@ -50066,10 +50059,10 @@
 						return -1;
 					}
 				}
-				/* begin mappedOopOf:topHashBit:topOopBit: */
+				/* begin mappedInSegmentOopOf: */
 				hash = (long32At(oop + 4)) & 0x3FFFFF;
-				oop = (hash & topHashBit
-					? ((hash - topHashBit) * BytesPerOop) + topOopBit
+				oop = (hash & TopHashBit
+					? ((hash - TopHashBit) * BytesPerOop) + TopOopBit
 					: hash * 8);
 				/* begin storePointerUnchecked:ofObject:withValue: */
 				assert(!(isForwarded(objOop)));
@@ -58737,7 +58730,8 @@
 }
 
 
-/*	Enumerate the objects in objArray, unmarking them and restoring their
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Enumerate the objects in objArray, unmarking them and restoring their
 	hashes from the corresponding 32-bit slots in savedHashes. The first
 	unused entry in
 	objArray will have a non-hash value entry in savedHashes. Free

Modified: branches/Cog/spursistasrc/vm/cointerp.h
===================================================================
--- branches/Cog/spursistasrc/vm/cointerp.h	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/spursistasrc/vm/cointerp.h	2015-02-11 19:21:48 UTC (rev 3252)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
 
 

Modified: branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/spursistasrc/vm/gcc3x-cointerp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/spursistasrc/vm/gcc3x-cointerp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -353,6 +353,8 @@
 #define TheInterruptSemaphore 30
 #define TheLowSpaceSemaphore 17
 #define TheTimerSemaphore 29
+#define TopHashBit 0x200000
+#define TopOopBit 0x80000000UL
 #define TraceBlockActivation 5
 #define TraceBlockCreation 7
 #define TraceBufferSize 768
@@ -2358,7 +2360,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 VM [CoInterpreterPrimitives VMMaker.oscog-eem.1050]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1053]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -45448,7 +45450,8 @@
 }
 
 
-/*	Copy objOop into the segment beginning at segAddr, and forward it to the
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Copy objOop into the segment beginning at segAddr, and forward it to the
 	copy. If it is a class in the class table, set the copy's hash to 0 for
 	reassignment on load,
 	and mark it as a class by setting its isRemembered bit.
@@ -49371,9 +49374,6 @@
     sqInt slotBytes1;
     sqInt stopAddr;
     sqInt stopAddr1;
-    sqInt topHashBit;
-    sqInt topHashBit1;
-    sqInt topOopBit;
 
 	/* begin numSlotsOf: */
 	flag("endianness");
@@ -49464,8 +49464,6 @@
 	numOutPointers = (numSlots4 == 0xFF
 		? longAt(outPointerArray - BaseHeaderSize)
 		: numSlots4);
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots13 = byteAt(segmentStart + 7);
 	objOop1 = (numSlots13 == 0xFF
@@ -49480,12 +49478,12 @@
 		/* validate the class ref, but don't update it until any internal classes have been added to the class table. */
 
 		classIndex = ((longAt(objOop1)) & 0x3FFFFF) - 16;
-		if (classIndex & topHashBit) {
-			if ((classIndex - topHashBit) >= numOutPointers) {
+		if (classIndex & TopHashBit) {
+			if ((classIndex - TopHashBit) >= numOutPointers) {
 				errorCode = PrimErrBadIndex;
 				goto l2;
 			}
-			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - topHashBit) << (shiftForWord())));
+			mappedOop = longAt((outPointerArray + BaseHeaderSize) + ((classIndex - TopHashBit) << (shiftForWord())));
 			hash = (long32At(mappedOop + 4)) & 0x3FFFFF;
 			if (!((hash > 0x1F)
 				 && ((classOrNilAtIndex(hash)) == mappedOop))) {
@@ -49509,8 +49507,8 @@
 		for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) {
 			oop1 = longAt((objOop1 + BaseHeaderSize) + (i << (shiftForWord())));
 			if ((oop1 & 3) == 0) {
-				if (oop1 & topOopBit) {
-					if (((oop1 = (oop1 - topOopBit) / BytesPerOop)) >= numOutPointers) {
+				if (oop1 & TopOopBit) {
+					if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) {
 						errorCode = PrimErrBadIndex;
 						goto l2;
 					}
@@ -49563,7 +49561,6 @@
 		return errorCode;
 	}
 	/* begin assignClassIndicesAndPinFrom:to:outPointers: */
-	topHashBit1 = 1 << (22 - 1);
 	/* begin objectStartingAt: */
 	numSlots5 = byteAt(segmentStart + 7);
 	objOop2 = (numSlots5 == 0xFF
@@ -49575,8 +49572,8 @@
 		   or into outPointers.  See mapOopsFrom:to:outPointers:outHashes:. */
 
 		classRef = ((longAt(objOop2)) & 0x3FFFFF) - 16;
-		classOop = (classRef & topHashBit1
-			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - topHashBit1) << (shiftForWord())))
+		classOop = (classRef & TopHashBit
+			? longAt((outPointerArray + BaseHeaderSize) + ((classRef - TopHashBit) << (shiftForWord())))
 			: (classRef * 8) + segmentStart);
 		classIndex1 = (long32At(classOop + 4)) & 0x3FFFFF;
 		assert((classIndex1 > (lastClassIndexPun()))
@@ -49957,8 +49954,6 @@
     sqInt outIndex;
     usqInt p;
     sqInt segIndex;
-    sqInt topHashBit;
-    sqInt topOopBit;
 
 	outIndex = 0;
 	/* begin fillObj:numSlots:with: */
@@ -49974,8 +49969,6 @@
 		longAtput(p, GIV(nilObj));
 		longAtput(p + 4, GIV(nilObj));
 	}
-	topHashBit = 1 << (22 - 1);
-	topOopBit = ((1 << BytesPerOop) * 8) - 1;
 	/* begin objectStartingAt: */
 	numSlots1 = byteAt(segStart + 7);
 	objOop = (numSlots1 == 0xFF
@@ -49987,7 +49980,7 @@
 
 			/* oop is a new outPointer; allocate its oop */
 
-			/* begin newOutPointer:at:in:hashes:topHashBit: */
+			/* begin newOutPointer:at:in:hashes: */
 			if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 				/* no room in outPointers; fail */
@@ -50013,11 +50006,11 @@
 			long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 			/* begin setHashBitsOf:to: */
 			flag("endianness");
-			assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+			assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+			long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 			setIsMarkedOfto(oop, 1);
 			outIndex += 1;
-		l1:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+		l1:	/* end newOutPointer:at:in:hashes: */;
 			if (outIndex == 0) {
 
 				/* no room in outPointers; fail */
@@ -50037,7 +50030,7 @@
 
 					/* oop is a new outPointer; allocate its oop */
 
-					/* begin newOutPointer:at:in:hashes:topHashBit: */
+					/* begin newOutPointer:at:in:hashes: */
 					if (outIndex >= (numSlotsOf(outPointerArray))) {
 
 						/* no room in outPointers; fail */
@@ -50063,11 +50056,11 @@
 					long32Atput((savedOutHashes + BaseHeaderSize) + (outIndex << 2), (long32At(oop + 4)) & 0x3FFFFF);
 					/* begin setHashBitsOf:to: */
 					flag("endianness");
-					assert((((outIndex + topHashBit) >= 0) && ((outIndex + topHashBit) <= (identityHashHalfWordMask()))));
-					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + topHashBit));
+					assert((((outIndex + TopHashBit) >= 0) && ((outIndex + TopHashBit) <= (identityHashHalfWordMask()))));
+					long32Atput(oop + 4, ((((long32At(oop + 4)) | 0x3FFFFF) - 0x3FFFFF)) + (outIndex + TopHashBit));
 					setIsMarkedOfto(oop, 1);
 					outIndex += 1;
-				l2:	/* end newOutPointer:at:in:hashes:topHashBit: */;
+				l2:	/* end newOutPointer:at:in:hashes: */;
 					if (outIndex == 0) {
 
 						/* no room in outPointers; fail */
@@ -50075,10 +50068,10 @@
 						return -1;
 					}
 				}
-				/* begin mappedOopOf:topHashBit:topOopBit: */
+				/* begin mappedInSegmentOopOf: */
 				hash = (long32At(oop + 4)) & 0x3FFFFF;
-				oop = (hash & topHashBit
-					? ((hash - topHashBit) * BytesPerOop) + topOopBit
+				oop = (hash & TopHashBit
+					? ((hash - TopHashBit) * BytesPerOop) + TopOopBit
 					: hash * 8);
 				/* begin storePointerUnchecked:ofObject:withValue: */
 				assert(!(isForwarded(objOop)));
@@ -58746,7 +58739,8 @@
 }
 
 
-/*	Enumerate the objects in objArray, unmarking them and restoring their
+/*	This is part of storeImageSegmentInto:outPointers:roots:.
+	Enumerate the objects in objArray, unmarking them and restoring their
 	hashes from the corresponding 32-bit slots in savedHashes. The first
 	unused entry in
 	objArray will have a non-hash value entry in savedHashes. Free

Modified: branches/Cog/spursrc/vm/cointerp.c
===================================================================
--- branches/Cog/spursrc/vm/cointerp.c	2015-02-11 03:01:24 UTC (rev 3251)
+++ branches/Cog/spursrc/vm/cointerp.c	2015-02-11 19:21:48 UTC (rev 3252)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
    from
-	CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b
+	CoInterpreter VMMaker.oscog-eem.1053 uuid: 86f23972-c4fa-430d-93b9-865bb86a098d
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1050 uuid: ad3a825c-97ba-4d01-a0e7-637af8cbf52b " __DATE__ ;

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list