[Vm-dev] [commit][2917] CogVM source as per VMMaker.oscog-eem.706

commits at squeakvm.org commits at squeakvm.org
Wed May 7 04:38:20 UTC 2014


Revision: 2917
Author:   eliot
Date:     2014-05-06 21:38:16 -0700 (Tue, 06 May 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.706

ARM FFI: Fix bug in passing structure argument in the case where a struct would
normally be split between registers and stack, but because of prior coprocessor
register candidiate args having been pushed on the stack, the structure should
not be split but pushed entirely on the stack.

Spur:
Fix the coallescing sweep in pig compact to start from the
lowest of the first forwarder or the first free chunk.

Do a tenuring scavenge to void eden in freeUnmarkedObjectsAndSortAndCoalesce-
FreeSpaceForPigCompact to avoid any tenuring due to futureSpace overflow in the
unmarking scavenge in eliminateAndFreeForwardersForPigCompact.  Do this by
adding the MarkOnTenure tenuring criterion.  Change the use of shouldBeTenured:
to allow it to be inlined into copyAndForward:.

Add an assert to freeChunkWithBytes:at: to catch accidental freeing of
non-oldSpace.  Refactor SpurSegmentManager>>postSnapshot to not fall foul of
this new assert.  Add a check to totalFreeListBytes to catch double freeing
(double freeing was caused by tenuring in the eAFFFPC scavenge growing memory to
make room for tenuring, given free lists are not rebuilt at this point, and
later in eAFFFPC this memory being freed again).

Don't inline doScavenge: or scavengingGCTenuringIf:.

Refactor eliminateAndFreeForwardersForFitCompact to extract the large loops.

Add printForwarders for debugging.

With these changes the StackInterpreter runs the Newspeak bootstrap to
completion, albeit with one presumably bogus assert fail to do with a
DependentsArray referring to forwarder contents.

Cogit:
Fix a double free bug in unlinkSendsOf:isMNUSelector:.  Harmless cuz the result
is only a bogus count of how many methods freed.  Beef up the cog method
integrity check to verify a its methodObject is a CompiledMethod.

Plugins:
Regenerate some that contain formatting changes due to VMMaker.oscog-eem.702/701.

Modified Paths:
--------------
    branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c
    branches/Cog/nscogsrc/plugins/FilePlugin/FilePlugin.c
    branches/Cog/nscogsrc/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
    branches/Cog/nscogsrc/plugins/SqueakSSL/SqueakSSL.c
    branches/Cog/nscogsrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    branches/Cog/nscogsrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cogmethod.h
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nscogsrc/vm/interp.h
    branches/Cog/nscogsrc/vm/vmCallback.h
    branches/Cog/nsspursrc/vm/cogit.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogmethod.h
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/interp.h
    branches/Cog/nsspursrc/vm/vmCallback.h
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/nsspurstacksrc/vm/interp.h
    branches/Cog/nsspurstacksrc/vm/vmCallback.h
    branches/Cog/sistasrc/vm/cogit.c
    branches/Cog/sistasrc/vm/cogit.h
    branches/Cog/sistasrc/vm/cogmethod.h
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/sistasrc/vm/interp.h
    branches/Cog/sistasrc/vm/vmCallback.h
    branches/Cog/spursistasrc/vm/cogit.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogmethod.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/interp.h
    branches/Cog/spursistasrc/vm/vmCallback.h
    branches/Cog/spursrc/vm/cogit.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogmethod.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/interp.h
    branches/Cog/spursrc/vm/vmCallback.h
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/spurstacksrc/vm/interp.h
    branches/Cog/spurstacksrc/vm/vmCallback.h
    branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
    branches/Cog/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogmethod.h
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/src/vm/interp.h
    branches/Cog/src/vm/vmCallback.h
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c
    branches/Cog/stacksrc/vm/interp.h
    branches/Cog/stacksrc/vm/vmCallback.h

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

Modified: branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.597 uuid: c9a71dd4-c394-4a8f-aa4d-a6d4dc3ff220
+	VMPluginCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	BalloonEnginePlugin VMMaker.oscog-eem.597 uuid: c9a71dd4-c394-4a8f-aa4d-a6d4dc3ff220
+	BalloonEnginePlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.597 uuid: c9a71dd4-c394-4a8f-aa4d-a6d4dc3ff220 " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 
 
 
@@ -839,9 +839,9 @@
 static void * loadBBFn;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"B2DPlugin VMMaker.oscog-eem.597 (i)"
+	"B2DPlugin VMMaker.oscog-eem.706 (i)"
 #else
-	"B2DPlugin VMMaker.oscog-eem.597 (e)"
+	"B2DPlugin VMMaker.oscog-eem.706 (e)"
 #endif
 ;
 static int* objBuffer;
@@ -3762,7 +3762,7 @@
 
 	x1 = rightX;
 	while (((((rampIndex = ((sqInt) ds >> 16))) < 0)
- || (rampIndex >= rampSize))
+	 || (rampIndex >= rampSize))
 	 && (x < x1)) {
 		x += 1;
 		ds += dsX;
@@ -3802,7 +3802,7 @@
 		/* Fast version w/o anti-aliasing */
 
 		while (((((rampIndex = ((sqInt) ds >> 16))) < rampSize)
- && (rampIndex >= 0))
+		 && (rampIndex >= 0))
 		 && (x < x1)) {
 			spanBuffer[x] = (ramp[rampIndex]);
 			x += 1;
@@ -5492,7 +5492,7 @@
 	return (fill == 0)
 	 || (((fill & 0xFF000000UL) != 0)
 	 || (((fill >= 0)
- && (fill < objUsed))
+	 && (fill < objUsed))
 	 && (((fill & 0xFF000000UL) != 0)
 	 || ((((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask) != 0))));
 }
@@ -6048,7 +6048,7 @@
 
 		y2 = (point3Get())[1];
 		if (((x0 == y0)
- && (x1 == y1))
+		 && (x1 == y1))
 		 || ((x1 == x2)
 		 && (y1 == y2))) {
 			loadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point3Get(), lineFill, fillIndex, 0);
@@ -6377,7 +6377,7 @@
 		y2 = (((int *) points))[index + 5];
 	}
 	if (((x0 == x1)
- && (y0 == y1))
+	 && (y0 == y1))
 	 || ((x1 == x2)
 	 && (y1 == y2))) {
 
@@ -6755,7 +6755,7 @@
 			y2 = (((int *) points))[index + 5];
 		}
 		if (((x0 == x1)
- && (y0 == y1))
+		 && (y0 == y1))
 		 || ((x1 == x2)
 		 && (y1 == y2))) {
 
@@ -7851,7 +7851,7 @@
 			y2 = (((int *) points))[index + 5];
 		}
 		if (((x0 == x1)
- && (y0 == y1))
+		 && (y0 == y1))
 		 || ((x1 == x2)
 		 && (y1 == y2))) {
 
@@ -8905,7 +8905,7 @@
 		return primitiveFailFor(GEFEngineStopped);
 	}
 	if (((lineFill == 0)
- || (lineWidth == 0))
+	 || (lineWidth == 0))
 	 && (fillIndex == 0)) {
 		return pop(5);
 	}
@@ -9568,7 +9568,7 @@
 		return primitiveFailFor(GEFEngineStopped);
 	}
 	if (((lineFill == 0)
- || (lineWidth == 0))
+	 || (lineWidth == 0))
 	 && (fillIndex == 0)) {
 		return pop(5);
 	}

Modified: branches/Cog/nscogsrc/plugins/FilePlugin/FilePlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/FilePlugin/FilePlugin.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/plugins/FilePlugin/FilePlugin.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.620 uuid: 0c6991e0-acb5-4250-84d8-cdeebfac41e9
+	VMPluginCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	FilePlugin VMMaker.oscog-eem.620 uuid: 0c6991e0-acb5-4250-84d8-cdeebfac41e9
+	FilePlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "FilePlugin VMMaker.oscog-eem.620 uuid: 0c6991e0-acb5-4250-84d8-cdeebfac41e9 " __DATE__ ;
+static char __buildInfo[] = "FilePlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 
 
 
@@ -180,9 +180,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FilePlugin VMMaker.oscog-eem.620 (i)"
+	"FilePlugin VMMaker.oscog-eem.706 (i)"
 #else
-	"FilePlugin VMMaker.oscog-eem.620 (e)"
+	"FilePlugin VMMaker.oscog-eem.706 (e)"
 #endif
 ;
 static void * sCCPfn;
@@ -888,7 +888,7 @@
 		}
 		bytesRead = sqFileReadIntoAt(file, count * elementSize, ((char *) (firstIndexableField(array))), (startIndex - 1) * elementSize);
 		if (!(((primitiveFailureCode()) == PrimErrObjectMayMove)
- && (((retryCount += 1)) <= 2))) break;
+		 && (((retryCount += 1)) <= 2))) break;
 		tenuringIncrementalGC();
 		primitiveFailFor(PrimNoErr);
 	}

Modified: branches/Cog/nscogsrc/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,17 +1,17 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.580 uuid: 751b08d4-d92e-440a-b3f6-cb2c76f52514
+	VMPluginCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	MiscPrimitivePlugin VMMaker.oscog-eem.580 uuid: 751b08d4-d92e-440a-b3f6-cb2c76f52514
-	Bitmap * Graphics-ar.142 uuid: 9a11fdac-93ce-8344-877f-55d10866f795
-	ByteArray * Collections-eem.375 uuid: c9da6558-3bd7-4f0f-b0e5-bc21208275f0
-	ByteString * Collections-eem.375 uuid: c9da6558-3bd7-4f0f-b0e5-bc21208275f0
-	SampledSound * Sound-ar.30 uuid: c0c6133c-73b7-7b47-9858-99b64868d35c
+	MiscPrimitivePlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
+	Bitmap Graphics-nice.289 uuid: e809bcbf-53e1-420b-846a-9e86e0dd1f06
+	ByteArray * Collections-dtl.568 uuid: a7bc6178-b9ac-4b87-bf97-478cc4927158
+	ByteString * Collections-dtl.568 uuid: a7bc6178-b9ac-4b87-bf97-478cc4927158
+	SampledSound Sound-nice.38 uuid: b626daf0-be23-4fb8-b2d5-04b9cd370539
  */
-static char __buildInfo[] = "MiscPrimitivePlugin VMMaker.oscog-eem.580 uuid: 751b08d4-d92e-440a-b3f6-cb2c76f52514\n\
-Bitmap * Graphics-ar.142 uuid: 9a11fdac-93ce-8344-877f-55d10866f795\n\
-ByteArray * Collections-eem.375 uuid: c9da6558-3bd7-4f0f-b0e5-bc21208275f0\n\
-ByteString * Collections-eem.375 uuid: c9da6558-3bd7-4f0f-b0e5-bc21208275f0\n\
-SampledSound * Sound-ar.30 uuid: c0c6133c-73b7-7b47-9858-99b64868d35c " __DATE__ ;
+static char __buildInfo[] = "MiscPrimitivePlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701\n\
+Bitmap Graphics-nice.289 uuid: e809bcbf-53e1-420b-846a-9e86e0dd1f06\n\
+ByteArray * Collections-dtl.568 uuid: a7bc6178-b9ac-4b87-bf97-478cc4927158\n\
+ByteString * Collections-dtl.568 uuid: a7bc6178-b9ac-4b87-bf97-478cc4927158\n\
+SampledSound Sound-nice.38 uuid: b626daf0-be23-4fb8-b2d5-04b9cd370539 " __DATE__ ;
 
 
 
@@ -94,9 +94,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"MiscPrimitivePlugin VMMaker.oscog-eem.580 (i)"
+	"MiscPrimitivePlugin VMMaker.oscog-eem.706 (i)"
 #else
-	"MiscPrimitivePlugin VMMaker.oscog-eem.580 (e)"
+	"MiscPrimitivePlugin VMMaker.oscog-eem.706 (e)"
 #endif
 ;
 

Modified: branches/Cog/nscogsrc/plugins/SqueakSSL/SqueakSSL.c
===================================================================
--- branches/Cog/nscogsrc/plugins/SqueakSSL/SqueakSSL.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/plugins/SqueakSSL/SqueakSSL.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.584 uuid: f8e3994b-6462-4df0-bc8e-c71034adf6aa
+	VMPluginCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	SqueakSSLPlugin VMMaker.oscog-eem.584 uuid: f8e3994b-6462-4df0-bc8e-c71034adf6aa
+	SqueakSSLPlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "SqueakSSLPlugin VMMaker.oscog-eem.584 uuid: f8e3994b-6462-4df0-bc8e-c71034adf6aa " __DATE__ ;
+static char __buildInfo[] = "SqueakSSLPlugin VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 
 
 
@@ -101,9 +101,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"SqueakSSL VMMaker.oscog-eem.584 (i)"
+	"SqueakSSL VMMaker.oscog-eem.706 (i)"
 #else
-	"SqueakSSL VMMaker.oscog-eem.584 (e)"
+	"SqueakSSL VMMaker.oscog-eem.706 (e)"
 #endif
 ;
 
@@ -180,7 +180,7 @@
 		return null;
 	}
 	if (!(((start > 0)
- && (srcLen >= 0))
+		 && (srcLen >= 0))
 		 && ((isBytes(srcOop))
 		 && ((isBytes(dstOop))
 		 && ((byteSizeOf(srcOop)) >= ((start + srcLen) - 1)))))) {
@@ -234,7 +234,7 @@
 		return null;
 	}
 	if (!(((start > 0)
- && (srcLen >= 0))
+		 && (srcLen >= 0))
 		 && ((isBytes(srcOop))
 		 && ((isBytes(dstOop))
 		 && ((byteSizeOf(srcOop)) >= ((start + srcLen) - 1)))))) {
@@ -304,7 +304,7 @@
 		return null;
 	}
 	if (!(((start > 0)
- && (srcLen >= 0))
+		 && (srcLen >= 0))
 		 && ((isBytes(srcOop))
 		 && ((isBytes(dstOop))
 		 && ((byteSizeOf(srcOop)) >= ((start + srcLen) - 1)))))) {
@@ -378,7 +378,7 @@
 		return null;
 	}
 	if (!(((start > 0)
- && (srcLen >= 0))
+		 && (srcLen >= 0))
 		 && ((isBytes(srcOop))
 		 && ((isBytes(dstOop))
 		 && ((byteSizeOf(srcOop)) >= ((start + srcLen) - 1)))))) {

Modified: branches/Cog/nscogsrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.598 uuid: b85d7330-2ddc-4d90-8592-4e37234f4ac2
+	VMPluginCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.46 uuid: 5ede26ca-4333-4d0a-8d3c-856b68975986
+	UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 uuid: 65e92aef-c30a-4a73-8966-e3d7da6ec7b6
  */
-static char __buildInfo[] = "UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.46 uuid: 5ede26ca-4333-4d0a-8d3c-856b68975986 " __DATE__ ;
+static char __buildInfo[] = "UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 uuid: 65e92aef-c30a-4a73-8966-e3d7da6ec7b6 " __DATE__ ;
 /* D T Lewis - UnixOSProcessPlugin.c translated from class
    UnixOSProcessPlugin of OSProcessPlugin version 4.3.3 Cog */
 
@@ -318,9 +318,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.46 (i)"
+	"UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 (i)"
 #else
-	"UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.46 (e)"
+	"UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 (e)"
 #endif
 ;
 static void *originalSigHandlers[NSIG];
@@ -446,8 +446,8 @@
 
 	/* begin fileDescriptorFrom: */
 	if (!((((isBytes(anSQFileDataStructure))
- && ((byteSizeOf(anSQFileDataStructure)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(anSQFileDataStructure)))))
+		 && ((byteSizeOf(anSQFileDataStructure)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(anSQFileDataStructure)))))
 		 && (isNonNullSQFile(anSQFileDataStructure)))) {
 		filenoToDup = -1;
 		goto l1;
@@ -481,8 +481,8 @@
 
 	/* begin fileDescriptorFrom: */
 	if (!((((isBytes(anSQFileDataStructure))
- && ((byteSizeOf(anSQFileDataStructure)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(anSQFileDataStructure)))))
+		 && ((byteSizeOf(anSQFileDataStructure)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(anSQFileDataStructure)))))
 		 && (isNonNullSQFile(anSQFileDataStructure)))) {
 		filenoToDup = -1;
 		goto l1;
@@ -517,8 +517,8 @@
 
 	/* begin fileDescriptorFrom: */
 	if (!((((isBytes(anSQFileDataStructure))
- && ((byteSizeOf(anSQFileDataStructure)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(anSQFileDataStructure)))))
+		 && ((byteSizeOf(anSQFileDataStructure)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(anSQFileDataStructure)))))
 		 && (isNonNullSQFile(anSQFileDataStructure)))) {
 		filenoToDup = -1;
 		goto l1;
@@ -545,8 +545,8 @@
 fileDescriptorFrom(sqInt aSQFileByteArray)
 {
 	if (!((((isBytes(aSQFileByteArray))
- && ((byteSizeOf(aSQFileByteArray)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(aSQFileByteArray)))))
+		 && ((byteSizeOf(aSQFileByteArray)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(aSQFileByteArray)))))
 		 && (isNonNullSQFile(aSQFileByteArray)))) {
 		return -1;
 	}
@@ -1106,8 +1106,8 @@
 isSQFileObject(sqInt objectPointer)
 {
 	return (((isBytes(objectPointer))
- && ((byteSizeOf(objectPointer)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(objectPointer)))))
+	 && ((byteSizeOf(objectPointer)) == (sizeof(SQFile))))
+	 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(objectPointer)))))
 	 && (isNonNullSQFile(objectPointer));
 }
 
@@ -1123,7 +1123,7 @@
 isSQSocketObject(sqInt objectPointer)
 {
 	return ((isBytes(objectPointer))
- && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
+	 && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
 	 && (!(isNullSQSocket(objectPointer)));
 }
 
@@ -2017,7 +2017,7 @@
 
 		cwd = getcwd(buffer, bufferSize);
 		if (!((cwd == 0)
- && (bufferSize < maxSize))) break;
+		 && (bufferSize < maxSize))) break;
 		bufferSize += incrementBy;
 	}
 	if (cwd == 0) {
@@ -2143,7 +2143,9 @@
 EXPORT(sqInt)
 primitiveGetSession(void)
 {
+    sqInt bytes;
     void *charArray1;
+    sqInt i;
     unsigned char *sessionByteArrayPointer;
     sqInt sessionIDSize;
     sqInt sessionOop;
@@ -2311,8 +2313,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -2408,8 +2410,8 @@
 	start = stackIntegerValue(2);
 	sqFileOop = stackValue(3);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3382,8 +3384,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3414,8 +3416,8 @@
 
 	sqFileOop = stackValue(1);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3439,15 +3441,15 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
 	/* begin fileDescriptorFrom: */
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		descriptor = -1;
 		goto l1;
@@ -3484,8 +3486,8 @@
 
 	sqFileOop = stackValue(1);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3494,8 +3496,8 @@
 	if (thisSession == (sqFile->sessionID)) {
 		/* begin fileDescriptorFrom: */
 		if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+			 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+			 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 			 && (isNonNullSQFile(sqFileOop)))) {
 			descriptor = -1;
 			goto l1;
@@ -3530,15 +3532,15 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
 	/* begin fileDescriptorFrom: */
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		descriptor = -1;
 		goto l1;
@@ -3575,8 +3577,8 @@
 
 	sqFileOop = stackValue(1);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3585,8 +3587,8 @@
 	if (thisSession == (sqFile->sessionID)) {
 		/* begin fileDescriptorFrom: */
 		if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+			 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+			 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 			 && (isNonNullSQFile(sqFileOop)))) {
 			descriptor = -1;
 			goto l1;
@@ -3625,8 +3627,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3661,8 +3663,8 @@
 
 	sqFileOop = stackValue(1);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3697,8 +3699,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3761,8 +3763,8 @@
 	start = stackIntegerValue(2);
 	sqFileOop = stackValue(3);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3834,8 +3836,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -3876,8 +3878,8 @@
 	start = stackIntegerValue(1);
 	sqFileOop = stackValue(2);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -4040,7 +4042,7 @@
 	}
 	hasSocketAccess =  ((int (*) (void)) sHSAfn)();
 	if ((canWriteImage
- && (hasFileAccess))
+	 && (hasFileAccess))
 	 && (hasSocketAccess)) {
 		return 0;
 	}

Modified: branches/Cog/nscogsrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.580 uuid: 751b08d4-d92e-440a-b3f6-cb2c76f52514
+	VMPluginCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.45 uuid: 7e7b595f-3783-417f-b514-4f5323e0a3c1
+	Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 uuid: 65e92aef-c30a-4a73-8966-e3d7da6ec7b6
  */
-static char __buildInfo[] = "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.45 uuid: 7e7b595f-3783-417f-b514-4f5323e0a3c1 " __DATE__ ;
+static char __buildInfo[] = "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 uuid: 65e92aef-c30a-4a73-8966-e3d7da6ec7b6 " __DATE__ ;
 /* D T Lewis - Win32OSProcessPlugin.c translated from class
    Win32OSProcessPlugin of OSProcessPlugin version 4.3.3 Cog */
 
@@ -225,9 +225,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.45 (i)"
+	"Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 (i)"
 #else
-	"Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.45 (e)"
+	"Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.48 (e)"
 #endif
 ;
 static int osprocessSandboxSecurity;
@@ -597,8 +597,8 @@
 isSQFileObject(sqInt objectPointer)
 {
 	return (((isBytes(objectPointer))
- && ((byteSizeOf(objectPointer)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(objectPointer)))))
+	 && ((byteSizeOf(objectPointer)) == (sizeof(SQFile))))
+	 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(objectPointer)))))
 	 && (isNonNullSQFile(objectPointer));
 }
 
@@ -614,7 +614,7 @@
 isSQSocketObject(sqInt objectPointer)
 {
 	return ((isBytes(objectPointer))
- && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
+	 && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
 	 && (!(isNullSQSocket(objectPointer)));
 }
 
@@ -1237,7 +1237,9 @@
 EXPORT(sqInt)
 primitiveGetSession(void)
 {
+    sqInt bytes;
     void *charArray1;
+    sqInt i;
     unsigned char *sessionByteArrayPointer;
     sqInt sessionIDSize;
     sqInt sessionOop;
@@ -1661,8 +1663,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -1688,8 +1690,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -1715,8 +1717,8 @@
 
 	sqFileOop = stackValue(0);
 	if (!((((isBytes(sqFileOop))
- && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
- && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
 		 && (isNonNullSQFile(sqFileOop)))) {
 		return primitiveFail();
 	}
@@ -1967,7 +1969,7 @@
 	}
 	hasSocketAccess =  ((int (*) (void)) sHSAfn)();
 	if ((canWriteImage
- && (hasFileAccess))
+	 && (hasFileAccess))
 	 && (hasSocketAccess)) {
 		return 0;
 	}

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/cogit.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	StackToRegisterMappingCogit VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -3347,6 +3347,13 @@
 					cr();
 					ok = 0;
 				}
+				if (!(isCompiledMethod((cogMethod->methodObject)))) {
+					print("non-method in CM ");
+					printHex(((sqInt)cogMethod));
+					print(" methodObject");
+					cr();
+					ok = 0;
+				}
 				if ((mapForperformUntilarg(cogMethod, checkIfValidObjectRefpccogMethod, ((sqInt)cogMethod))) != 0) {
 					ok = 0;
 				}
@@ -21676,16 +21683,18 @@
 	mustScanAndUnlink = 0;
 	if (isMNUSelector) {
 		while (cogMethod < (limitZony())) {
-			if ((cogMethod->cpicHasMNUCase)) {
-				assert(((cogMethod->cmType)) == CMClosedPIC);
-				freeMethod(cogMethod);
-				mustScanAndUnlink = 1;
-			}
-			else {
-				if (((cogMethod->selector)) == selector) {
+			if (((cogMethod->cmType)) != CMFree) {
+				if ((cogMethod->cpicHasMNUCase)) {
+					assert(((cogMethod->cmType)) == CMClosedPIC);
+					freeMethod(cogMethod);
 					mustScanAndUnlink = 1;
-					if (((cogMethod->cmType)) == CMClosedPIC) {
-						freeMethod(cogMethod);
+				}
+				else {
+					if (((cogMethod->selector)) == selector) {
+						mustScanAndUnlink = 1;
+						if (((cogMethod->cmType)) == CMClosedPIC) {
+							freeMethod(cogMethod);
+						}
 					}
 				}
 			}
@@ -21694,7 +21703,8 @@
 	}
 	else {
 		while (cogMethod < (limitZony())) {
-			if (((cogMethod->selector)) == selector) {
+			if ((((cogMethod->cmType)) != CMFree)
+			 && (((cogMethod->selector)) == selector)) {
 				mustScanAndUnlink = 1;
 				if (((cogMethod->cmType)) == CMClosedPIC) {
 					freeMethod(cogMethod);

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/cogit.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 typedef struct {

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/cointerp.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	CoInterpreter VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CoInterpreter VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2045,7 +2045,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.702";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.706";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5684,6 +5684,7 @@
 						/* begin internalPush: */
 						longAtPointerput((localSP -= BytesPerOop), longAt((rcvr + BaseHeaderSize) + (byte3 << ShiftForWord)));
 					}
+					null;
 					goto l4;
 				}
 				if (opType == 3) {
@@ -5693,6 +5694,7 @@
 					assert(GIV(method) == (iframeMethod(localFP)));
 					object = longAt((GIV(method) + BaseHeaderSize) + ((byte3 + LiteralStart) << ShiftForWord));
 					longAtPointerput((localSP -= BytesPerOop), object);
+					null;
 					goto l4;
 				}
 				if (opType == 4) {
@@ -5706,6 +5708,7 @@
 					object2 = longAt((oop + BaseHeaderSize) + (ValueIndex << ShiftForWord));
 					longAtPointerput((localSP -= BytesPerOop), object2);
 
+					null;
 					goto l4;
 				}
 				top = longAtPointer(localSP);
@@ -46607,6 +46610,7 @@
 				assert((callerContextOrNil == (nilObject()))
 				 || (isContext(callerContextOrNil)));
 				ctxt = callerContextOrNil;
+				
 			}
 			else {
 				print("widowed caller frame ");
@@ -51587,6 +51591,7 @@
 static sqInt
 shortReversePrintFrameAndCallers(char *aFramePointer)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt caller;
     sqInt callerContextOrNil;
     char *callerFP;
     sqInt index;
@@ -51616,7 +51621,9 @@
 	assert(addressCouldBeObj(callerContextOrNil));
 	assert((callerContextOrNil == (nilObject()))
 	 || (isContext(callerContextOrNil)));
-	return callerContextOrNil;
+	caller = callerContextOrNil;
+	
+	return caller;
 }
 
 

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/cointerp.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	CoInterpreter VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CoInterpreter VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2048,7 +2048,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.702";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.706";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5693,6 +5693,7 @@
 						/* begin internalPush: */
 						longAtPointerput((localSP -= BytesPerOop), longAt((rcvr + BaseHeaderSize) + (byte3 << ShiftForWord)));
 					}
+					null;
 					goto l4;
 				}
 				if (opType == 3) {
@@ -5702,6 +5703,7 @@
 					assert(GIV(method) == (iframeMethod(localFP)));
 					object = longAt((GIV(method) + BaseHeaderSize) + ((byte3 + LiteralStart) << ShiftForWord));
 					longAtPointerput((localSP -= BytesPerOop), object);
+					null;
 					goto l4;
 				}
 				if (opType == 4) {
@@ -5715,6 +5717,7 @@
 					object2 = longAt((oop + BaseHeaderSize) + (ValueIndex << ShiftForWord));
 					longAtPointerput((localSP -= BytesPerOop), object2);
 
+					null;
 					goto l4;
 				}
 				top = longAtPointer(localSP);
@@ -46616,6 +46619,7 @@
 				assert((callerContextOrNil == (nilObject()))
 				 || (isContext(callerContextOrNil)));
 				ctxt = callerContextOrNil;
+				
 			}
 			else {
 				print("widowed caller frame ");
@@ -51596,6 +51600,7 @@
 static sqInt
 shortReversePrintFrameAndCallers(char *aFramePointer)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt caller;
     sqInt callerContextOrNil;
     char *callerFP;
     sqInt index;
@@ -51625,7 +51630,9 @@
 	assert(addressCouldBeObj(callerContextOrNil));
 	assert((callerContextOrNil == (nilObject()))
 	 || (isContext(callerContextOrNil)));
-	return callerContextOrNil;
+	caller = callerContextOrNil;
+	
+	return caller;
 }
 
 

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/interp.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nscogsrc/vm/vmCallback.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 #define VM_CALLBACK_INC 1

Modified: branches/Cog/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nsspursrc/vm/cogit.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	StackToRegisterMappingCogit VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -3346,6 +3346,13 @@
 					cr();
 					ok = 0;
 				}
+				if (!(isCompiledMethod((cogMethod->methodObject)))) {
+					print("non-method in CM ");
+					printHex(((sqInt)cogMethod));
+					print(" methodObject");
+					cr();
+					ok = 0;
+				}
 				if ((mapForperformUntilarg(cogMethod, checkIfValidObjectRefpccogMethod, ((sqInt)cogMethod))) != 0) {
 					ok = 0;
 				}
@@ -22313,16 +22320,18 @@
 	mustScanAndUnlink = 0;
 	if (isMNUSelector) {
 		while (cogMethod < (limitZony())) {
-			if ((cogMethod->cpicHasMNUCase)) {
-				assert(((cogMethod->cmType)) == CMClosedPIC);
-				freeMethod(cogMethod);
-				mustScanAndUnlink = 1;
-			}
-			else {
-				if (((cogMethod->selector)) == selector) {
+			if (((cogMethod->cmType)) != CMFree) {
+				if ((cogMethod->cpicHasMNUCase)) {
+					assert(((cogMethod->cmType)) == CMClosedPIC);
+					freeMethod(cogMethod);
 					mustScanAndUnlink = 1;
-					if (((cogMethod->cmType)) == CMClosedPIC) {
-						freeMethod(cogMethod);
+				}
+				else {
+					if (((cogMethod->selector)) == selector) {
+						mustScanAndUnlink = 1;
+						if (((cogMethod->cmType)) == CMClosedPIC) {
+							freeMethod(cogMethod);
+						}
 					}
 				}
 			}
@@ -22331,7 +22340,8 @@
 	}
 	else {
 		while (cogMethod < (limitZony())) {
-			if (((cogMethod->selector)) == selector) {
+			if ((((cogMethod->cmType)) != CMFree)
+			 && (((cogMethod->selector)) == selector)) {
 				mustScanAndUnlink = 1;
 				if (((cogMethod->cmType)) == CMClosedPIC) {
 					freeMethod(cogMethod);

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nsspursrc/vm/cogit.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogmethod.h	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nsspursrc/vm/cogmethod.h	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+	CCodeGenerator VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
 
 typedef struct {

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2014-05-06 22:13:38 UTC (rev 2916)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2014-05-07 04:38:16 UTC (rev 2917)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.704 uuid: 5a1a2624-b349-4d95-aeb3-097087219b4e
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
    from
-	CoInterpreter VMMaker.oscog-eem.704 uuid: 5a1a2624-b349-4d95-aeb3-097087219b4e
+	CoInterpreter VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.704 uuid: 5a1a2624-b349-4d95-aeb3-097087219b4e " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.706 uuid: 6eba60e7-a131-4353-870a-b34e8230b701 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -197,7 +197,7 @@
 #define CSWait 10
 #define CSYield 11
 #define CtxtTempFrameStart 6
-#define DontTenureButDoUnmark 3
+#define DontTenureButDoUnmark 4
 #define DumpStackOnLowSpace 0
 #define EnclosingMixinIndex 3
 #define EnclosingObjectIndex 4
@@ -233,6 +233,7 @@
 #define LargeContextSlots 62
 #define LastLinkIndex 1
 #define LiteralStart 1
+#define MarkOnTenure 5
 #define MarkStackRootIndex 0x1000
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -549,6 +550,7 @@
 static void divorceFramesIn(StackPage *aStackPage);
 static sqInt doPrimitiveDivby(sqInt rcvr, sqInt arg);
 static sqInt doPrimitiveModby(sqInt rcvr, sqInt arg);
+static void doScavenge(sqInt tenuringCriterion);
 sqInt doSignalSemaphoreWithIndex(sqInt index);
 static void dummyReferToProxy(void);
 EXPORT(sqInt) dumpImage(sqInt fileName);
@@ -906,7 +908,6 @@
 static sqInt nilUnmarkedWeaklingSlotsIn(sqInt aWeakling);
 sqInt noAssertHeaderOf(sqInt methodPointer);
 static sqInt noCheckPushonObjStack(sqInt objOop, sqInt objStack);
-static sqInt noForwardersBelowFirstFreeChunk(void);
 static sqInt noInlineTemporaryin(sqInt offset, char *theFP);
 static sqInt noInlineTemporaryinput(sqInt offset, char *theFP, sqInt valueOop);
 static sqInt noMarkedContextsOnPage(StackPage *thePage);
@@ -953,6 +954,7 @@
 unsigned long positiveMachineIntegerValueOf(sqInt oop);
 static void postBecomeOrCompactScanClassTable(sqInt effectsFlags);
 static void postGCAction(sqInt gcModeArg);
+static void postSnapshot(void);
 static void prepareForSnapshot(void);
 sqInt primErrTable(void);
 usqInt primFailCodeAddress(void);
@@ -1206,6 +1208,7 @@
 static sqInt printContextCallStackOf(sqInt aContext);
 void printContext(sqInt aContext);
 void printExternalHeadFrame(void);
+void printForwarders(void);
 static sqInt printFrameAndCallersSPshort(char *theFP, char *theSP, sqInt printShort);
 static void printFrameFlagsForFP(char *theFP);
 static void printFrameMethodFor(char *theFP);
@@ -1328,7 +1331,6 @@
 void shortPrintObjectsFromto(sqInt startAddress, sqInt endAddress);
 static void shortPrintOop(sqInt oop);
 static sqInt shortReversePrintFrameAndCallers(char *aFramePointer);
-static sqInt shouldBeTenured(sqInt survivor);
 sqInt shouldRemapObj(sqInt objOop);
 sqInt shouldRemapOop(sqInt oop);
 sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
@@ -1451,35 +1453,35 @@
 _iss char * stackBasePlus1;
 _iss sqInt hiddenRootsObj;
 _iss usqInt endOfMemory;
+_iss sqInt totalFreeOldSpace;
 _iss SpurCircularBuffer highestObjects;
-_iss sqInt totalFreeOldSpace;
-_iss SpurSegmentInfo * segments;
 _iss sqInt trueObj;
 _iss sqInt remapBufferCount;
+_iss SpurSegmentInfo * segments;
 _iss sqInt needGCFlag;
 _iss sqInt falseObj;
 _iss sqInt traceLogIndex;
 _iss sqInt bytesPerPage;
 _iss sqInt firstFreeChunk;
 _iss sqInt * freeLists;
+_iss sqInt numSegments;
 _iss usqInt pastSpaceStart;
-_iss sqInt numSegments;
 _iss usqInt freeListsMask;
 _iss char * stackLimit;
 _iss usqInt scavengeThreshold;
-_iss SpurNewSpaceSpace pastSpace;
-_iss SpurNewSpaceSpace futureSpace;
 _iss sqInt rememberedSetSize;
 _iss unsigned char primTraceLogIndex;
 _iss SpurContiguousObjStack unscannedEphemerons;
 _iss usqInt newSpaceStart;
 _iss StackPage * mostRecentlyUsedPage;
-_iss sqInt futureSurvivorStart;
+_iss SpurNewSpaceSpace pastSpace;
 _iss sqInt numStackPages;
 _iss sqInt classTableFirstPage;
 _iss sqInt markStack;
 _iss usqInt oldSpaceStart;
 _iss sqInt weaklingStack;
+_iss SpurNewSpaceSpace futureSpace;
+_iss sqInt futureSurvivorStart;
 _iss sqInt jmpDepth;
 _iss sqLong nextProfileTick;
 _iss sqInt numRememberedEphemerons;
@@ -1488,11 +1490,11 @@
 _iss sqInt longRunningPrimitiveCheckSemaphore;
 _iss sqInt tempOop;
 _iss char * objStackInvalidBecause;
-_iss sqInt tenureThreshold;
 _iss SpurNewSpaceSpace eden;
 _iss sqInt profileSemaphore;
 _iss sqInt ephemeronList;
 _iss sqInt profileProcess;
+_iss sqInt tenureThreshold;
 _iss sqInt extraRootCount;
 _iss sqInt invalidObjStackPage;
 _iss sqInt lastSubdividedFreeChunk;
@@ -1508,6 +1510,7 @@
 _iss sqInt lastMethodCacheProbeWrite;
 _iss sqInt lkupClass;
 _iss sqInt backwardJumpCount;
+_iss sqInt gcMode;
 _iss sqInt metaclassNumSlots;
 _iss usqLong nextWakeupUsecs;
 _iss sqInt preemptionYields;
@@ -1517,7 +1520,6 @@
 _iss usqLong longRunningPrimitiveStopUsecs;
 _iss sqInt numSegInfos;
 _iss usqLong statCheckForEvents;
-_iss sqInt gcMode;
 _iss sqInt lastCoggableInterpretedBlockMethod;
 _iss sqInt lastUncoggableInterpretedBlockMethod;
 _iss usqInt lowSpaceThreshold;
@@ -1525,9 +1527,7 @@
 _iss sqInt cogCodeSize;
 _iss sqInt externalPrimitiveTableFirstFreeIndex;
 _iss sqInt flagInterpretedMethods;
-_iss usqInt memory;
 _iss sqInt pendingFinalizationSignals;
-_iss sqInt scavengeInProgress;
 _iss usqLong statIOProcessEvents;
 _iss sqInt weakList;
 _iss sqInt firstSegmentSize;
@@ -1544,13 +1544,13 @@
 _iss sqInt lastHash;
 _iss sqInt longRunningPrimitiveCheckSequenceNumber;
 _iss sqInt marking;
+_iss usqInt memory;
 _iss sqInt methodDictLinearSearchLimit;
 _iss usqLong nextPollUsecs;
 _iss usqLong statForceInterruptCheck;
 _iss usqLong statProcessSwitch;
 _iss usqLong statStackOverflow;
 _iss usqLong statStackPageDivorce;
-_iss sqInt tenuringProportion;
 _iss sqInt extraFramesToMoveOnOverflow;
 _iss sqInt globalSessionID;
 _iss sqInt interruptKeycode;
@@ -1569,12 +1569,14 @@
 _iss sqInt longRunningPrimitiveSignalUndelivered;
 _iss StackPage * overflowedPage;
 _iss sqInt savedWindowSize;
+_iss sqInt scavengeInProgress;
 _iss sqInt signalLowSpace;
 _iss sqInt statCodeCompactionCount;
 _iss usqLong statCodeCompactionUsecs;
 _iss sqInt statMarkCount;
 _iss sqInt statPendingFinalizationSignals;
 _iss sqInt statRootTableCount;
+_iss sqInt tenuringProportion;
 _iss sqInt classByteArrayCompactIndex;
 _iss sqInt gcSemaphoreIndex;
 _iss sqInt imageHeaderFlags;
@@ -2218,7 +2220,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.704";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.706";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -6571,6 +6573,7 @@
 						/* begin internalPush: */
 						longAtPointerput((localSP -= BytesPerOop), longAt((rcvr1 + (BaseHeaderSize)) + (byte3 << 2)));
 					}
+					null;
 					goto l5;
 				}
 				if (opType == 3) {
@@ -6580,6 +6583,7 @@
 					assert(GIV(method) == (iframeMethod(localFP)));
 					object = longAt((GIV(method) + (BaseHeaderSize)) + ((byte3 + LiteralStart) << 2));
 					longAtPointerput((localSP -= BytesPerOop), object);
+					null;
 					goto l5;
 				}
 				if (opType == 4) {
@@ -6607,6 +6611,7 @@
 					/* begin internalPush: */
 					longAtPointerput((localSP -= BytesPerOop), longAt((litVar1 + (BaseHeaderSize)) + (ValueIndex << 2)));
 
+					null;
 					goto l5;
 				}
 				top = longAtPointer(localSP);
@@ -15515,7 +15520,6 @@
 static SpurSegmentInfo *
 addSegmentOfSize(sqInt ammount)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt address;
     sqInt allocatedSize;
     sqInt i;
     sqInt idx;
@@ -15555,11 +15559,6 @@
 		bridgeFromto(newSeg, (!(newSegIndex == (GIV(numSegments) - 1))
 			? (&(GIV(segments)[newSegIndex + 1]))
 			: 0));
-		/* begin addFreeChunkWithBytes:at: */
-		address = (newSeg->segStart);
-		freeChunkWithBytesat(allocatedSize - (2 * (BaseHeaderSize)), address);
-		GIV(totalFreeOldSpace) += allocatedSize - (2 * (BaseHeaderSize));
-		assert((addressAfter(objectStartingAt((newSeg->segStart)))) == ((segLimit(newSeg)) - (bridgeSize())));
 		for (i = 0; i < GIV(numSegments); i += 1) {
 			assert(isInSegments(((GIV(segments)[i]).segStart)));
 			assert(isInSegments((segLimit(&GIV(segments)[i])) - (wordSize())));
@@ -22613,7 +22612,8 @@
 		if (!(((longAt(free)) & 0x3FFFFF) == 0)) {
 			free = (longAt((prevFree + (BaseHeaderSize)) + (0 << 2))) ^ prevPrevFree;
 		}
-		if (((longAt(nextFree)) & 0x3FFFFF) == 0) {
+		if ((nextFree == 0)
+		 || (((longAt(nextFree)) & 0x3FFFFF) == 0)) {
 			prevPrevFree = prevFree;
 			prevFree = free;
 			free = nextFree;
@@ -22777,16 +22777,40 @@
     sqInt nTenures;
     sqInt startOfSurvivor;
     sqInt startOfSurvivor1;
+    sqInt tenure;
 
 	assert((isInEden(survivor))
 	 || (isInPastSpace(survivor)));
 	bytesInObj = bytesInObject(survivor);
 	format = (((usqInt) (longAt(survivor))) >> 24) & 0x1F;
-	if ((shouldBeTenured(survivor))
+
+	/* Allow Slang to inline. */
+
+	
+	switch (GIV(tenureCriterion)) {
+	case TenureByAge:
+		tenure = survivor < GIV(tenureThreshold);
+
+		break;
+	case TenureByClass:
+		tenure = ((longAt(survivor)) & 0x3FFFFF) == GIV(tenuringClassIndex);
+
+		break;
+	case DontTenureButDoUnmark:
+		setIsMarkedOfto(survivor, 0);
+		tenure = 0;
+
+		break;
+	default:
+		tenure = 0;
+
+	}
+	if (tenure
 	 || ((GIV(futureSurvivorStart) + bytesInObj) > ((GIV(futureSpace).limit)))) {
 		/* begin copyToOldSpace:bytes:format: */
 		assert((format == (formatOf(survivor)))
-		 && ((!(isMarked(survivor)))
+		 && (((!(isMarked(survivor)))
+		 || (GIV(tenureCriterion) == MarkOnTenure))
 		 && ((!(isPinned(survivor)))
 		 && (!(isRemembered(survivor))))));
 		nTenures = GIV(statTenures);
@@ -22813,6 +22837,9 @@
 			flag("endianness");

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list