[Vm-dev] [commit][2890] CogVM source as per VMMaker.oscog-eem.670

commits at squeakvm.org commits at squeakvm.org
Wed Apr 9 19:32:29 UTC 2014


Revision: 2890
Author:   eliot
Date:     2014-04-09 12:32:17 -0700 (Wed, 09 Apr 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.670

CoInterpreter:
Garbage collect/remap the primTraceLog correctly.  If a GC happens
very early in start-up the log circular buffer may not be full and the
existing code assumed it always was.

Cogit:
Fix bug in unlinkSendsOf:isMNUSelector: (primitiveFlushCacheBySelector)
where old code could free the method of an active frame.

Fix an assert fail in mapFor:bcpc:performUntil:arg: (this for
primitiveClass where the class table reference can be the first map entry).

Newspeak:
Fix a bug in remapIfObjectRef:pc:hasYoung: with dynamic super
sends which could compute an invalid target method.

Rename pushExplicitOuterSendReceiverBytecode et al to
pushExplicitOuterReceiverBytecode et al.  These are not sends.

Sista:
Cope with doubleExtendedDoAnythingBytecodes which /may/ be
sends or not, and hence are problematic for gathering send data.
Generate correct counting code for #==, which implies it can't be
frameless in Sista.
Annotate the right address (the return address of the
ceMustBeBooleanFoo call) in counting genJump:if:.
Add Spur support for Sista (shorten:toIndexableSize: et al).
Implement instantiation in picDataFor:into: in terms of
eeInstantiateClassIndex:format:numSlots:.

Modified Paths:
--------------
    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/scripts/findUnofficialFiles
    branches/Cog/scripts/nukeversion
    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/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/BochsIA32Plugin/BochsIA32Plugin.c
    branches/Cog/src/plugins/FT2Plugin/FT2Plugin.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

Added Paths:
-----------
    branches/Cog/spursistamacbuild/
    branches/Cog/spursistamacbuild/BochsIA32Plugin/
    branches/Cog/spursistamacbuild/BochsIA32Plugin/BochsIA32Plugin.xcodeproj/
    branches/Cog/spursistamacbuild/BochsIA32Plugin/BochsIA32Plugin.xcodeproj/eliot.mode1
    branches/Cog/spursistamacbuild/BochsIA32Plugin/BochsIA32Plugin.xcodeproj/eliot.pbxuser
    branches/Cog/spursistamacbuild/BochsIA32Plugin/BochsIA32Plugin.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/BochsIA32Plugin/Info.plist
    branches/Cog/spursistamacbuild/BochsIA32Plugin/makeit
    branches/Cog/spursistamacbuild/CoreVM.plist
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/johnmci.mode1
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/johnmci.pbxuser
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/sophie.mode1
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/sophie.pbxuser
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/temp
    branches/Cog/spursistamacbuild/CoreVM.xcodeproj/werdna.pbxuser
    branches/Cog/spursistamacbuild/CroquetPlugin/
    branches/Cog/spursistamacbuild/CroquetPlugin/CroquetPlugin.xcodeproj/
    branches/Cog/spursistamacbuild/CroquetPlugin/CroquetPlugin.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/CroquetPlugin/CroquetPlugin_Prefix.pch
    branches/Cog/spursistamacbuild/CroquetPlugin/English.lproj/
    branches/Cog/spursistamacbuild/CroquetPlugin/English.lproj/InfoPlist.strings
    branches/Cog/spursistamacbuild/CroquetPlugin/Info.plist
    branches/Cog/spursistamacbuild/FloatArrayPlugin/
    branches/Cog/spursistamacbuild/FloatArrayPlugin/English.lproj/
    branches/Cog/spursistamacbuild/FloatArrayPlugin/English.lproj/InfoPlist.strings
    branches/Cog/spursistamacbuild/FloatArrayPlugin/FloatArrayPlugin.xcodeproj/
    branches/Cog/spursistamacbuild/FloatArrayPlugin/FloatArrayPlugin.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/FloatArrayPlugin/FloatArrayPlugin_Prefix.pch
    branches/Cog/spursistamacbuild/FloatArrayPlugin/Info.plist
    branches/Cog/spursistamacbuild/FloatMathPlugin/
    branches/Cog/spursistamacbuild/FloatMathPlugin/English.lproj/
    branches/Cog/spursistamacbuild/FloatMathPlugin/English.lproj/InfoPlist.strings
    branches/Cog/spursistamacbuild/FloatMathPlugin/FloatMathPlugin.xcodeproj/
    branches/Cog/spursistamacbuild/FloatMathPlugin/FloatMathPlugin.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/FloatMathPlugin/FloatMathPlugin_Prefix.pch
    branches/Cog/spursistamacbuild/FloatMathPlugin/Info.plist
    branches/Cog/spursistamacbuild/HowToBuild
    branches/Cog/spursistamacbuild/Mpeg3Plugin/
    branches/Cog/spursistamacbuild/Mpeg3Plugin/Mpeg3Plugin-Info.plist
    branches/Cog/spursistamacbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/
    branches/Cog/spursistamacbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/SqueakFFIPrims/
    branches/Cog/spursistamacbuild/SqueakFFIPrims/Info.plist
    branches/Cog/spursistamacbuild/SqueakFFIPrims/SqueakFFI.xcodeproj/
    branches/Cog/spursistamacbuild/SqueakFFIPrims/SqueakFFI.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/SqueakFFIPrims/SqueakFFIPrims_Prefix.pch
    branches/Cog/spursistamacbuild/SqueakSSL/
    branches/Cog/spursistamacbuild/SqueakSSL/Info.plist
    branches/Cog/spursistamacbuild/SqueakSSL/SqueakSSL.xcodeproj/
    branches/Cog/spursistamacbuild/SqueakSSL/SqueakSSL.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/SqueakSSL/SqueakSSL_Prefix.pch
    branches/Cog/spursistamacbuild/Template/
    branches/Cog/spursistamacbuild/Template/HowToMakeANewPlugin.txt
    branches/Cog/spursistamacbuild/Template/Info.plist
    branches/Cog/spursistamacbuild/Template/Template.xcodeproj/
    branches/Cog/spursistamacbuild/Template/Template.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/Template/Template_Prefix.pch
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/English.lproj/
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/English.lproj/InfoPlist.strings
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/Info.plist
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/PkgInfo
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/eliot.mode1
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/eliot.pbxuser
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj
    branches/Cog/spursistamacbuild/UnixOSProcessPlugin/makeit
    branches/Cog/spursistamacbuild/makeall
    branches/Cog/spursistamacbuild/makeclean
    branches/Cog/spursistamacbuild/makevm
    branches/Cog/spursistamacbuild/mkNamedPrims.sh
    branches/Cog/spursistamacbuild/mvm
    branches/Cog/spursistamacbuild/plugins.ext
    branches/Cog/spursistamacbuild/plugins.int
    branches/Cog/spursistamacbuild/resources/
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/Info.plist
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/MacOS/
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/MacOS/FT2Plugin
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/PkgInfo
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/Resources/
    branches/Cog/spursistamacbuild/resources/FT2Plugin.bundle/Contents/Resources/SqueakPlugin.icns
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/Info.plist
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/MacOS/
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/MacOS/FloatMathPlugin
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/PkgInfo
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/Resources/
    branches/Cog/spursistamacbuild/resources/FloatMathPlugin.bundle/Contents/Resources/SqueakPlugin.icns
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/Info.plist
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/MacOS/
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/MacOS/LocalePlugin
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/PkgInfo
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/Resources/
    branches/Cog/spursistamacbuild/resources/LocalePlugin.bundle/Contents/Resources/SqueakPlugin.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/Croquet.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/GreenCogSqueak.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/Squeak VM.r
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/Squeak.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakChanges.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakGeneric.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakImage.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakPlugin.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakProject.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakScript.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/SqueakSources.icns
    branches/Cog/spursistamacbuild/resources/ProjectBuilder/Teleplace.icns
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/Info.plist
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/MacOS/
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/MacOS/QuicktimePlugin
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/PkgInfo
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/Resources/
    branches/Cog/spursistamacbuild/resources/QuicktimePlugin.bundle/Contents/Resources/SqueakPlugin.icns
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/Info.plist
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/MacOS/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/MacOS/SpellCheck
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/Resources/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/Resources/English.lproj/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/Resources/English.lproj/InfoPlist.strings
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Info.plist
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/MacOS/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/MacOS/SpellingPlugin
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/PkgInfo
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Resources/
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Resources/InfoPlist.strings
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Resources/PkgInfo
    branches/Cog/spursistamacbuild/resources/SpellingPlugin.bundle/Contents/Resources/SqueakPlugin.icns
    branches/Cog/spursistasrc/
    branches/Cog/spursistasrc/examplePlugins.ext
    branches/Cog/spursistasrc/examplePlugins.int
    branches/Cog/spursistasrc/vm/
    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/exampleSqNamedPrims.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/interp.h
    branches/Cog/spursistasrc/vm/vmCallback.h

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

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/cogit.c	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGenerator VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	StackToRegisterMappingCogit VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -747,8 +747,8 @@
 static sqInt genPushConstantOneBytecode(void);
 static sqInt genPushConstantTrueBytecode(void);
 static sqInt genPushConstantZeroBytecode(void);
-static sqInt genPushExplicitOuterSendReceiverBytecode(void);
-static sqInt genPushExplicitOuterSendReceiver(sqInt level);
+static sqInt genPushExplicitOuterReceiverBytecode(void);
+static sqInt genPushExplicitOuterReceiver(sqInt level);
 static sqInt genPushImplicitReceiverBytecode(void);
 static sqInt genPushLiteralConstantBytecode(void);
 static sqInt genPushLiteralIndex(sqInt literalIndex);
@@ -1328,7 +1328,7 @@
 	{ duplicateTopBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
 	{ genPushActiveContextBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
 	{ genPushNewArrayBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 },
-	{ genPushExplicitOuterSendReceiverBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0 },
+	{ genPushExplicitOuterReceiverBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0 },
 	{ genPushRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
 	{ genStoreRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
 	{ genStoreAndPopRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
@@ -3047,8 +3047,7 @@
 
 			/* It's a linked send; find which kind. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -11179,7 +11178,7 @@
 
 	default:
 		if (ext < 0) {
-			return genPushExplicitOuterSendReceiver(0 - ext);
+			return genPushExplicitOuterReceiver(0 - ext);
 		}
 		warning("undefined extension for extPushPseudoVariableOrOuter");
 		return unknownBytecode();
@@ -14358,20 +14357,20 @@
 /*	Uncached push explicit outer send receiver */
 
 static sqInt
-genPushExplicitOuterSendReceiverBytecode(void)
+genPushExplicitOuterReceiverBytecode(void)
 {
     sqInt levelOop;
 
 	levelOop = getLiteral(byte1);
 	assert((levelOop & 1));
-	return genPushExplicitOuterSendReceiver((levelOop >> 1));
+	return genPushExplicitOuterReceiver((levelOop >> 1));
 }
 
 
 /*	Uncached push explicit outer send receiver */
 
 static sqInt
-genPushExplicitOuterSendReceiver(sqInt level)
+genPushExplicitOuterReceiver(sqInt level)
 {
 	assert(needsFrame);
 	(optStatus.isReceiverResultRegLive = 0);
@@ -16253,8 +16252,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -17247,8 +17245,9 @@
 		assert(startbcpc == (startPCOfMethodHeader((homeMethod->methodHeader))));
 		map = ((((usqInt)homeMethod)) + ((homeMethod->blockSize))) - 1;
 		assert(((((usqInt) (byteAt(map))) >> AnnotationShift) == IsAbsPCReference)
+		 || (((((usqInt) (byteAt(map))) >> AnnotationShift) == IsObjectReference)
 		 || (((((usqInt) (byteAt(map))) >> AnnotationShift) == IsRelativeCall)
-		 || ((((usqInt) (byteAt(map))) >> AnnotationShift) == IsDisplacementX2N)));
+		 || ((((usqInt) (byteAt(map))) >> AnnotationShift) == IsDisplacementX2N))));
 		latestContinuation = startbcpc;
 		aMethodObj = (homeMethod->methodObject);
 		endbcpc = (byteLengthOf(aMethodObj)) - 1;
@@ -17969,8 +17968,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint1 & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint1 - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -19576,16 +19574,18 @@
     sqInt cacheTag1;
     sqInt entryPoint;
     sqInt entryPoint1;
+    sqInt ignored;
     sqInt literal;
     sqInt mappedCacheTag;
     sqInt mappedLiteral;
     sqInt mappedOop;
-    sqInt offset;
     sqInt oop;
     sqInt pc;
+    sqInt *sendTable;
     sqInt tagCouldBeObj;
     sqInt tagCouldBeObj1;
     CogMethod *targetMethod;
+    CogMethod *targetMethod1;
 
 	if (annotation == IsObjectReference) {
 		literal = literalBeforeFollowingAddress(backEnd, ((sqInt)mcpc));
@@ -19666,13 +19666,26 @@
 
 					/* It's a linked send. */
 
-					offset = ((entryPoint1 & entryPointMask) == checkedEntryAlignment
-						? cmEntryOffset
-						: cmNoCheckEntryOffset);
-					targetMethod = ((CogMethod *) (entryPoint1 - offset));
-					if (isYoung((targetMethod->selector))) {
+					/* begin targetMethodAndSendTableFor:into: */
+					if ((entryPoint1 & entryPointMask) == checkedEntryAlignment) {
+						targetMethod1 = ((CogMethod *) (entryPoint1 - cmEntryOffset));
+						sendTable = sendTrampolines;
+					}
+					else {
+						if ((entryPoint1 & entryPointMask) == dynSuperEntryAlignment) {
+							targetMethod1 = ((CogMethod *) (entryPoint1 - cmDynSuperEntryOffset));
+							sendTable = dynamicSuperSendTrampolines;
+						}
+						else {
+							targetMethod1 = ((CogMethod *) (entryPoint1 - cmNoCheckEntryOffset));
+							sendTable = superSendTrampolines;
+						}
+					}
+
+					if (isYoung((targetMethod1->selector))) {
 						(((sqInt *) hasYoungPtr))[0] = 1;
 					}
+
 				}
 			}
 		}
@@ -20825,8 +20838,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -20879,8 +20891,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -20924,8 +20935,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -20973,8 +20983,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -21012,35 +21021,53 @@
 }
 
 
-/*	Unlink all sends in cog methods. */
+/*	Unlink all sends in cog methods. Free all Closed PICs with the selector,
+	or with an MNU case if isMNUSelector. First check if any method actually
+	has the selector; if not there can't be any linked send to it. This
+	routine (including descendents) is performance critical. It contributes
+	perhaps 30% of entire execution time in Compiler recompileAll. */
 
 void
 unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector)
 {
     CogMethod *cogMethod;
-    sqInt freeSpace;
+    sqInt mustScanAndUnlink;
 
 	if (methodZoneBase == null) {
 		return;
 	}
 	cogMethod = ((CogMethod *) methodZoneBase);
-
-	/* First check if any method actually has the selector; if not there can't
-	   be any linked send to it. */
-
-	freeSpace = methodBytesFreedSinceLastCompaction();
-	while ((cogMethod < (limitZony()))
-	 && (((cogMethod->selector)) != selector)) {
-		if ((((cogMethod->cmType)) != CMFree)
-		 && ((isMNUSelector
- && ((cogMethod->cpicHasMNUCase)))
-		 || (((cogMethod->selector)) == selector))) {
-			freeMethod(cogMethod);
+	mustScanAndUnlink = 0;
+	if (isMNUSelector) {
+		while (cogMethod < (limitZony())) {
+			if ((cogMethod->cpicHasMNUCase)) {
+				assert(((cogMethod->cmType)) == CMClosedPIC);
+				freeMethod(cogMethod);
+				mustScanAndUnlink = 1;
+			}
+			else {
+				if (((cogMethod->selector)) == selector) {
+					mustScanAndUnlink = 1;
+					if (((cogMethod->cmType)) == CMClosedPIC) {
+						freeMethod(cogMethod);
+					}
+				}
+			}
+			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
 		}
-		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
 	}
-	if ((cogMethod >= (limitZony()))
-	 && (freeSpace == (methodBytesFreedSinceLastCompaction()))) {
+	else {
+		while (cogMethod < (limitZony())) {
+			if (((cogMethod->selector)) == selector) {
+				mustScanAndUnlink = 1;
+				if (((cogMethod->cmType)) == CMClosedPIC) {
+					freeMethod(cogMethod);
+				}
+			}
+			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
+		}
+	}
+	if (!mustScanAndUnlink) {
 		return;
 	}
 	codeModified = 0;

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/cogit.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGenerator VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGenerator VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 typedef struct {

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/cointerp.c	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
    from
-	CoInterpreter VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CoInterpreter VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -763,7 +763,7 @@
 sqInt methodArg(sqInt index);
 void * methodCacheAddress(void);
 sqInt methodClassAssociationOf(sqInt methodPointer);
-static sqInt methodClassOf(sqInt methodPointer);
+sqInt methodClassOf(sqInt methodPointer);
 sqInt methodHasCogMethod(sqInt aMethodOop);
 static sqInt methodHeaderHasPrimitive(sqInt methodHeader);
 sqInt methodPrimitiveIndex(void);
@@ -1152,7 +1152,7 @@
 static void rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void));
 static sqInt roomToPushNArgs(sqInt n);
 static void runLeakCheckerForFullGC(sqInt fullGCFlag);
-static sqInt safeObjectAfter(sqInt oop);
+static usqInt safeObjectAfter(sqInt oop);
 static sqInt safePrintStringOf(sqInt oop);
 usqInt scavengeThresholdAddress(void);
 EXPORT(sqInt) sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext);
@@ -1299,8 +1299,8 @@
 _iss sqInt rootTableCount;
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
+_iss unsigned char primTraceLogIndex;
 _iss StackPage * mostRecentlyUsedPage;
-_iss unsigned char primTraceLogIndex;
 _iss usqInt scavengeThreshold;
 _iss sqInt numStackPages;
 _iss sqInt needGCFlag;
@@ -2040,7 +2040,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.658";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.670";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5951,14 +5951,14 @@
 			}
 			break;
 		case 139:
-			/* pushExplicitOuterSendReceiverBytecode */
+			/* pushExplicitOuterReceiverBytecode */
 			{
 				sqInt anIntOop;
 				sqInt litIndex;
 				sqInt n;
 				sqInt object;
 
-				VM_LABEL(0pushExplicitOuterSendReceiverBytecode);
+				VM_LABEL(0pushExplicitOuterReceiverBytecode);
 				litIndex = byteAtPointer(++localIP);
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
@@ -23975,17 +23975,15 @@
     sqInt header1;
     sqInt header2;
     sqInt header3;
-    sqInt header4;
     usqInt lastWord;
     sqInt newFreeChunk;
     sqInt newOop;
-    sqInt next;
+    usqInt next;
     sqInt oop;
     sqInt realHeader;
     sqInt sz;
     sqInt sz1;
     sqInt sz2;
-    sqInt sz3;
     sqInt target;
     usqInt w;
 
@@ -23996,21 +23994,7 @@
 		/* begin objectAfterWhileForwarding: */
 		header2 = longAt(oop);
 		if ((header2 & MarkBit) == 0) {
-			/* begin objectAfter: */
-			if (!(asserta(oopisLessThan(oop, GIV(freeStart))))) {
-				error("no objects after the end of memory");
-			}
-			if (((longAt(oop)) & TypeMask) == HeaderTypeFree) {
-				sz2 = (longAt(oop)) & AllButTypeMask;
-			}
-			else {
-				/* begin sizeBitsOf: */
-				header3 = longAt(oop);
-				sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass
-					? (longAt(oop - (BytesPerWord * 2))) & LongSizeMask
-					: header3 & SizeMask);
-			}
-			next = (oop + sz2) + (headerTypeBytes[(longAt(oop + sz2)) & TypeMask]);
+			next = ((sqInt) (objectAfter(oop)));
 			goto l1;
 		}
 		fwdBlock1 = (header2 & AllButMarkBitAndTypeMask) << 1;
@@ -24025,7 +24009,7 @@
 		else {
 			sz1 = realHeader & SizeMask;
 		}
-		next = (oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);
+		next = ((sqInt) ((oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask])));
 	l1:	/* end objectAfterWhileForwarding: */;
 		if (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {
 
@@ -24079,18 +24063,18 @@
 	}
 	/* begin safeObjectAfter: */
 	if (((longAt(newFreeChunk)) & TypeMask) == HeaderTypeFree) {
-		sz3 = (longAt(newFreeChunk)) & AllButTypeMask;
+		sz2 = (longAt(newFreeChunk)) & AllButTypeMask;
 	}
 	else {
 		/* begin sizeBitsOf: */
-		header4 = longAt(newFreeChunk);
-		sz3 = ((header4 & TypeMask) == HeaderTypeSizeAndClass
+		header3 = longAt(newFreeChunk);
+		sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass
 			? (longAt(newFreeChunk - (BytesPerWord * 2))) & LongSizeMask
-			: header4 & SizeMask);
+			: header3 & SizeMask);
 	}
-	next = ((newFreeChunk + sz3) >= GIV(freeStart)
+	next = ((newFreeChunk + sz2) >= GIV(freeStart)
 		? GIV(freeStart)
-		: (newFreeChunk + sz3) + (headerTypeBytes[(longAt(newFreeChunk + sz3)) & TypeMask]));
+		: (newFreeChunk + sz2) + (headerTypeBytes[(longAt(newFreeChunk + sz2)) & TypeMask]));
 	assert((next == GIV(freeStart))
 	 || (next == (oopFromChunk(GIV(compEnd)))));
 	if (next == GIV(freeStart)) {
@@ -27500,24 +27484,31 @@
 mapPrimTraceLog(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt i;
-    sqInt limit;
     sqInt remainder;
     sqInt selector;
 
-	limit = (((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
+	if ((GIV(primTraceLog)[(((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
 		? remainder + PrimTraceLogSize
-		: remainder);
-	if ((GIV(primTraceLog)[limit]) == 0) {
+		: remainder)]) == 0) {
 		return;
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
-		limit = PrimTraceLogSize - 1;
+		for (i = GIV(primTraceLogIndex); i < PrimTraceLogSize; i += 1) {
+			selector = GIV(primTraceLog)[i];
+			if ((selector != 0)
+			 && (((selector & 1) == 0)
+			 && (((selector & 1) == 0)
+			 && (((longAt(selector)) & MarkBit) != 0)))) {
+				GIV(primTraceLog)[i] = (remapObj(selector));
+			}
+		}
 	}
-	for (i = 0; i <= limit; i += 1) {
+	for (i = 0; i < GIV(primTraceLogIndex); i += 1) {
 		selector = GIV(primTraceLog)[i];
-		if (((selector & 1) == 0)
+		if ((selector != 0)
 		 && (((selector & 1) == 0)
-		 && (((longAt(selector)) & MarkBit) != 0))) {
+		 && (((selector & 1) == 0)
+		 && (((longAt(selector)) & MarkBit) != 0)))) {
 			GIV(primTraceLog)[i] = (remapObj(selector));
 		}
 	}
@@ -27762,22 +27753,27 @@
 markAndTracePrimTraceLog(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt i;
-    sqInt limit;
     sqInt remainder;
     sqInt selector;
 
-	limit = (((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
+	if ((GIV(primTraceLog)[(((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
 		? remainder + PrimTraceLogSize
-		: remainder);
-	if ((GIV(primTraceLog)[limit]) == 0) {
+		: remainder)]) == 0) {
 		return;
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
-		limit = PrimTraceLogSize - 1;
+		for (i = GIV(primTraceLogIndex); i < PrimTraceLogSize; i += 1) {
+			selector = GIV(primTraceLog)[i];
+			if ((selector != 0)
+			 && ((selector & 1) == 0)) {
+				markAndTrace(selector);
+			}
+		}
 	}
-	for (i = 0; i <= limit; i += 1) {
+	for (i = 0; i < GIV(primTraceLogIndex); i += 1) {
 		selector = GIV(primTraceLog)[i];
-		if (!((selector & 1))) {
+		if ((selector != 0)
+		 && ((selector & 1) == 0)) {
 			markAndTrace(selector);
 		}
 	}
@@ -28804,7 +28800,7 @@
 	return longAt((methodPointer + BaseHeaderSize) + ((offset + LiteralStart) << ShiftForWord));
 }
 
-static sqInt
+sqInt
 methodClassOf(sqInt methodPointer)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt literal;
@@ -48560,7 +48556,13 @@
 		print("???");
 	}
 	else {
-		safePrintStringOf(intOrSelector);
+		if (intOrSelector == 0) {
+			printNum(i);
+			print("!!!");
+		}
+		else {
+			safePrintStringOf(intOrSelector);
+		}
 	}
 }
 
@@ -50524,7 +50526,7 @@
 	given object or free chunk in memory. Return freeStart when
 	enumeration is complete. This is for assertion checking only. */
 
-static sqInt
+static usqInt
 safeObjectAfter(sqInt oop)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt header;
@@ -51232,7 +51234,7 @@
 }
 
 
-/*	Reduce the number if indexable fields in obj, a pointer object, to nSlots.
+/*	Reduce the number of indexable fields in obj, a pointer object, to nSlots.
 	Convert the
 	unused residual to a free chunk. Word and byte indexable objects are not
 	changed. Answer the number of bytes returned to free memory, which may be

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/cointerp.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 
@@ -135,6 +135,7 @@
 sqInt maybeSplObj(sqInt index);
 void * methodCacheAddress(void);
 sqInt methodClassAssociationOf(sqInt methodPointer);
+sqInt methodClassOf(sqInt methodPointer);
 sqInt methodHasCogMethod(sqInt aMethodOop);
 sqInt methodPrimitiveIndex(void);
 sqInt methodShouldBeCogged(sqInt aMethodObj);

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2014-04-09 19:32:17 UTC (rev 2890)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
    from
-	CoInterpreter VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CoInterpreter VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -766,7 +766,7 @@
 sqInt methodArg(sqInt index);
 void * methodCacheAddress(void);
 sqInt methodClassAssociationOf(sqInt methodPointer);
-static sqInt methodClassOf(sqInt methodPointer);
+sqInt methodClassOf(sqInt methodPointer);
 sqInt methodHasCogMethod(sqInt aMethodOop);
 static sqInt methodHeaderHasPrimitive(sqInt methodHeader);
 sqInt methodPrimitiveIndex(void);
@@ -1155,7 +1155,7 @@
 static void rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void));
 static sqInt roomToPushNArgs(sqInt n);
 static void runLeakCheckerForFullGC(sqInt fullGCFlag);
-static sqInt safeObjectAfter(sqInt oop);
+static usqInt safeObjectAfter(sqInt oop);
 static sqInt safePrintStringOf(sqInt oop);
 usqInt scavengeThresholdAddress(void);
 EXPORT(sqInt) sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext);
@@ -1302,8 +1302,8 @@
 _iss sqInt rootTableCount;
 _iss usqInt memoryLimit;
 _iss usqInt endOfMemory;
+_iss unsigned char primTraceLogIndex;
 _iss StackPage * mostRecentlyUsedPage;
-_iss unsigned char primTraceLogIndex;
 _iss usqInt scavengeThreshold;
 _iss sqInt numStackPages;
 _iss sqInt needGCFlag;
@@ -2043,7 +2043,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.658";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.670";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5960,14 +5960,14 @@
 			}
 			BREAK;
 		CASE(139)
-			/* pushExplicitOuterSendReceiverBytecode */
+			/* pushExplicitOuterReceiverBytecode */
 			{
 				sqInt anIntOop;
 				sqInt litIndex;
 				sqInt n;
 				sqInt object;
 
-				VM_LABEL(0pushExplicitOuterSendReceiverBytecode);
+				VM_LABEL(0pushExplicitOuterReceiverBytecode);
 				litIndex = byteAtPointer(++localIP);
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
@@ -23984,17 +23984,15 @@
     sqInt header1;
     sqInt header2;
     sqInt header3;
-    sqInt header4;
     usqInt lastWord;
     sqInt newFreeChunk;
     sqInt newOop;
-    sqInt next;
+    usqInt next;
     sqInt oop;
     sqInt realHeader;
     sqInt sz;
     sqInt sz1;
     sqInt sz2;
-    sqInt sz3;
     sqInt target;
     usqInt w;
 
@@ -24005,21 +24003,7 @@
 		/* begin objectAfterWhileForwarding: */
 		header2 = longAt(oop);
 		if ((header2 & MarkBit) == 0) {
-			/* begin objectAfter: */
-			if (!(asserta(oopisLessThan(oop, GIV(freeStart))))) {
-				error("no objects after the end of memory");
-			}
-			if (((longAt(oop)) & TypeMask) == HeaderTypeFree) {
-				sz2 = (longAt(oop)) & AllButTypeMask;
-			}
-			else {
-				/* begin sizeBitsOf: */
-				header3 = longAt(oop);
-				sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass
-					? (longAt(oop - (BytesPerWord * 2))) & LongSizeMask
-					: header3 & SizeMask);
-			}
-			next = (oop + sz2) + (headerTypeBytes[(longAt(oop + sz2)) & TypeMask]);
+			next = ((sqInt) (objectAfter(oop)));
 			goto l1;
 		}
 		fwdBlock1 = (header2 & AllButMarkBitAndTypeMask) << 1;
@@ -24034,7 +24018,7 @@
 		else {
 			sz1 = realHeader & SizeMask;
 		}
-		next = (oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);
+		next = ((sqInt) ((oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask])));
 	l1:	/* end objectAfterWhileForwarding: */;
 		if (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {
 
@@ -24088,18 +24072,18 @@
 	}
 	/* begin safeObjectAfter: */
 	if (((longAt(newFreeChunk)) & TypeMask) == HeaderTypeFree) {
-		sz3 = (longAt(newFreeChunk)) & AllButTypeMask;
+		sz2 = (longAt(newFreeChunk)) & AllButTypeMask;
 	}
 	else {
 		/* begin sizeBitsOf: */
-		header4 = longAt(newFreeChunk);
-		sz3 = ((header4 & TypeMask) == HeaderTypeSizeAndClass
+		header3 = longAt(newFreeChunk);
+		sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass
 			? (longAt(newFreeChunk - (BytesPerWord * 2))) & LongSizeMask
-			: header4 & SizeMask);
+			: header3 & SizeMask);
 	}
-	next = ((newFreeChunk + sz3) >= GIV(freeStart)
+	next = ((newFreeChunk + sz2) >= GIV(freeStart)
 		? GIV(freeStart)
-		: (newFreeChunk + sz3) + (headerTypeBytes[(longAt(newFreeChunk + sz3)) & TypeMask]));
+		: (newFreeChunk + sz2) + (headerTypeBytes[(longAt(newFreeChunk + sz2)) & TypeMask]));
 	assert((next == GIV(freeStart))
 	 || (next == (oopFromChunk(GIV(compEnd)))));
 	if (next == GIV(freeStart)) {
@@ -27509,24 +27493,31 @@
 mapPrimTraceLog(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt i;
-    sqInt limit;
     sqInt remainder;
     sqInt selector;
 
-	limit = (((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
+	if ((GIV(primTraceLog)[(((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
 		? remainder + PrimTraceLogSize
-		: remainder);
-	if ((GIV(primTraceLog)[limit]) == 0) {
+		: remainder)]) == 0) {
 		return;
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
-		limit = PrimTraceLogSize - 1;
+		for (i = GIV(primTraceLogIndex); i < PrimTraceLogSize; i += 1) {
+			selector = GIV(primTraceLog)[i];
+			if ((selector != 0)
+			 && (((selector & 1) == 0)
+			 && (((selector & 1) == 0)
+			 && (((longAt(selector)) & MarkBit) != 0)))) {
+				GIV(primTraceLog)[i] = (remapObj(selector));
+			}
+		}
 	}
-	for (i = 0; i <= limit; i += 1) {
+	for (i = 0; i < GIV(primTraceLogIndex); i += 1) {
 		selector = GIV(primTraceLog)[i];
-		if (((selector & 1) == 0)
+		if ((selector != 0)
 		 && (((selector & 1) == 0)
-		 && (((longAt(selector)) & MarkBit) != 0))) {
+		 && (((selector & 1) == 0)
+		 && (((longAt(selector)) & MarkBit) != 0)))) {
 			GIV(primTraceLog)[i] = (remapObj(selector));
 		}
 	}
@@ -27771,22 +27762,27 @@
 markAndTracePrimTraceLog(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt i;
-    sqInt limit;
     sqInt remainder;
     sqInt selector;
 
-	limit = (((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
+	if ((GIV(primTraceLog)[(((remainder = (GIV(primTraceLogIndex) - 1) % PrimTraceLogSize)) < 0
 		? remainder + PrimTraceLogSize
-		: remainder);
-	if ((GIV(primTraceLog)[limit]) == 0) {
+		: remainder)]) == 0) {
 		return;
 	}
 	if ((GIV(primTraceLog)[GIV(primTraceLogIndex)]) != 0) {
-		limit = PrimTraceLogSize - 1;
+		for (i = GIV(primTraceLogIndex); i < PrimTraceLogSize; i += 1) {
+			selector = GIV(primTraceLog)[i];
+			if ((selector != 0)
+			 && ((selector & 1) == 0)) {
+				markAndTrace(selector);
+			}
+		}
 	}
-	for (i = 0; i <= limit; i += 1) {
+	for (i = 0; i < GIV(primTraceLogIndex); i += 1) {
 		selector = GIV(primTraceLog)[i];
-		if (!((selector & 1))) {
+		if ((selector != 0)
+		 && ((selector & 1) == 0)) {
 			markAndTrace(selector);
 		}
 	}
@@ -28813,7 +28809,7 @@
 	return longAt((methodPointer + BaseHeaderSize) + ((offset + LiteralStart) << ShiftForWord));
 }
 
-static sqInt
+sqInt
 methodClassOf(sqInt methodPointer)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt literal;
@@ -48569,7 +48565,13 @@
 		print("???");
 	}
 	else {
-		safePrintStringOf(intOrSelector);
+		if (intOrSelector == 0) {
+			printNum(i);
+			print("!!!");
+		}
+		else {
+			safePrintStringOf(intOrSelector);
+		}
 	}
 }
 
@@ -50533,7 +50535,7 @@
 	given object or free chunk in memory. Return freeStart when
 	enumeration is complete. This is for assertion checking only. */
 
-static sqInt
+static usqInt
 safeObjectAfter(sqInt oop)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt header;
@@ -51241,7 +51243,7 @@
 }
 
 
-/*	Reduce the number if indexable fields in obj, a pointer object, to nSlots.
+/*	Reduce the number of indexable fields in obj, a pointer object, to nSlots.
 	Convert the
 	unused residual to a free chunk. Word and byte indexable objects are not
 	changed. Answer the number of bytes returned to free memory, which may be

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/interp.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nscogsrc/vm/vmCallback.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.658 uuid: e40c5fd5-9990-433f-bd76-2f8d0324e24f
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 #define VM_CALLBACK_INC 1

Modified: branches/Cog/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nsspursrc/vm/cogit.c	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGenerator VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	StackToRegisterMappingCogit VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -744,8 +744,8 @@
 static sqInt genPushConstantOneBytecode(void);
 static sqInt genPushConstantTrueBytecode(void);
 static sqInt genPushConstantZeroBytecode(void);
-static sqInt genPushExplicitOuterSendReceiverBytecode(void);
-static sqInt genPushExplicitOuterSendReceiver(sqInt level);
+static sqInt genPushExplicitOuterReceiverBytecode(void);
+static sqInt genPushExplicitOuterReceiver(sqInt level);
 static sqInt genPushImplicitReceiverBytecode(void);
 static sqInt genPushLiteralConstantBytecode(void);
 static sqInt genPushLiteralIndex(sqInt literalIndex);
@@ -1324,7 +1324,7 @@
 	{ duplicateTopBytecode, 0, needsFrameNever, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
 	{ genPushActiveContextBytecode, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
 	{ genPushNewArrayBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 },
-	{ genPushExplicitOuterSendReceiverBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0 },
+	{ genPushExplicitOuterReceiverBytecode, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0 },
 	{ genPushRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
 	{ genStoreRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
 	{ genStoreAndPopRemoteTempLongBytecode, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 },
@@ -3046,8 +3046,7 @@
 
 			/* It's a linked send; find which kind. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -11276,7 +11275,7 @@
 
 	default:
 		if (ext < 0) {
-			return genPushExplicitOuterSendReceiver(0 - ext);
+			return genPushExplicitOuterReceiver(0 - ext);
 		}
 		warning("undefined extension for extPushPseudoVariableOrOuter");
 		return unknownBytecode();
@@ -15236,20 +15235,20 @@
 /*	Uncached push explicit outer send receiver */
 
 static sqInt
-genPushExplicitOuterSendReceiverBytecode(void)
+genPushExplicitOuterReceiverBytecode(void)
 {
     sqInt levelOop;
 
 	levelOop = getLiteral(byte1);
 	assert((levelOop & 1));
-	return genPushExplicitOuterSendReceiver((levelOop >> 1));
+	return genPushExplicitOuterReceiver((levelOop >> 1));
 }
 
 
 /*	Uncached push explicit outer send receiver */
 
 static sqInt
-genPushExplicitOuterSendReceiver(sqInt level)
+genPushExplicitOuterReceiver(sqInt level)
 {
 	assert(needsFrame);
 	(optStatus.isReceiverResultRegLive = 0);
@@ -17188,8 +17187,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -18211,8 +18209,9 @@
 		assert(startbcpc == (startPCOfMethodHeader((homeMethod->methodHeader))));
 		map = ((((usqInt)homeMethod)) + ((homeMethod->blockSize))) - 1;
 		assert(((((usqInt) (byteAt(map))) >> AnnotationShift) == IsAbsPCReference)
+		 || (((((usqInt) (byteAt(map))) >> AnnotationShift) == IsObjectReference)
 		 || (((((usqInt) (byteAt(map))) >> AnnotationShift) == IsRelativeCall)
-		 || ((((usqInt) (byteAt(map))) >> AnnotationShift) == IsDisplacementX2N)));
+		 || ((((usqInt) (byteAt(map))) >> AnnotationShift) == IsDisplacementX2N))));
 		latestContinuation = startbcpc;
 		aMethodObj = (homeMethod->methodObject);
 		endbcpc = (byteLengthOf(aMethodObj)) - 1;
@@ -20236,16 +20235,18 @@
     sqInt cacheTag1;
     sqInt entryPoint;
     sqInt entryPoint1;
+    sqInt ignored;
     sqInt literal;
     sqInt mappedCacheTag;
     sqInt mappedLiteral;
     sqInt mappedOop;
-    sqInt offset;
     sqInt oop;
     sqInt pc;
+    sqInt *sendTable;
     sqInt tagCouldBeObj;
     sqInt tagCouldBeObj1;
     CogMethod *targetMethod;
+    CogMethod *targetMethod1;
 
 	if (annotation == IsObjectReference) {
 		literal = literalBeforeFollowingAddress(backEnd, ((sqInt)mcpc));
@@ -20326,13 +20327,26 @@
 
 					/* It's a linked send. */
 
-					offset = ((entryPoint1 & entryPointMask) == checkedEntryAlignment
-						? cmEntryOffset
-						: cmNoCheckEntryOffset);
-					targetMethod = ((CogMethod *) (entryPoint1 - offset));
-					if (isYoung((targetMethod->selector))) {
+					/* begin targetMethodAndSendTableFor:into: */
+					if ((entryPoint1 & entryPointMask) == checkedEntryAlignment) {
+						targetMethod1 = ((CogMethod *) (entryPoint1 - cmEntryOffset));
+						sendTable = sendTrampolines;
+					}
+					else {
+						if ((entryPoint1 & entryPointMask) == dynSuperEntryAlignment) {
+							targetMethod1 = ((CogMethod *) (entryPoint1 - cmDynSuperEntryOffset));
+							sendTable = dynamicSuperSendTrampolines;
+						}
+						else {
+							targetMethod1 = ((CogMethod *) (entryPoint1 - cmNoCheckEntryOffset));
+							sendTable = superSendTrampolines;
+						}
+					}
+
+					if (isYoung((targetMethod1->selector))) {
 						(((sqInt *) hasYoungPtr))[0] = 1;
 					}
+
 				}
 			}
 		}
@@ -21483,8 +21497,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -21537,8 +21550,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -21582,8 +21594,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -21631,8 +21642,7 @@
 
 			/* It's a linked send. */
 
-			/* begin targetMethodAndSendTableFor:annotation:into: */
-			assert(annotation == IsSendCall);
+			/* begin targetMethodAndSendTableFor:into: */
 			if ((entryPoint & entryPointMask) == checkedEntryAlignment) {
 				targetMethod1 = ((CogMethod *) (entryPoint - cmEntryOffset));
 				sendTable1 = sendTrampolines;
@@ -21670,35 +21680,53 @@
 }
 
 
-/*	Unlink all sends in cog methods. */
+/*	Unlink all sends in cog methods. Free all Closed PICs with the selector,
+	or with an MNU case if isMNUSelector. First check if any method actually
+	has the selector; if not there can't be any linked send to it. This
+	routine (including descendents) is performance critical. It contributes
+	perhaps 30% of entire execution time in Compiler recompileAll. */
 
 void
 unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector)
 {
     CogMethod *cogMethod;
-    sqInt freeSpace;
+    sqInt mustScanAndUnlink;
 
 	if (methodZoneBase == null) {
 		return;
 	}
 	cogMethod = ((CogMethod *) methodZoneBase);
-
-	/* First check if any method actually has the selector; if not there can't
-	   be any linked send to it. */
-
-	freeSpace = methodBytesFreedSinceLastCompaction();
-	while ((cogMethod < (limitZony()))
-	 && (((cogMethod->selector)) != selector)) {
-		if ((((cogMethod->cmType)) != CMFree)
-		 && ((isMNUSelector
- && ((cogMethod->cpicHasMNUCase)))
-		 || (((cogMethod->selector)) == selector))) {
-			freeMethod(cogMethod);
+	mustScanAndUnlink = 0;
+	if (isMNUSelector) {
+		while (cogMethod < (limitZony())) {
+			if ((cogMethod->cpicHasMNUCase)) {
+				assert(((cogMethod->cmType)) == CMClosedPIC);
+				freeMethod(cogMethod);
+				mustScanAndUnlink = 1;
+			}
+			else {
+				if (((cogMethod->selector)) == selector) {
+					mustScanAndUnlink = 1;
+					if (((cogMethod->cmType)) == CMClosedPIC) {
+						freeMethod(cogMethod);
+					}
+				}
+			}
+			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
 		}
-		cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
 	}
-	if ((cogMethod >= (limitZony()))
-	 && (freeSpace == (methodBytesFreedSinceLastCompaction()))) {
+	else {
+		while (cogMethod < (limitZony())) {
+			if (((cogMethod->selector)) == selector) {
+				mustScanAndUnlink = 1;
+				if (((cogMethod->cmType)) == CMClosedPIC) {
+					freeMethod(cogMethod);
+				}
+			}
+			cogMethod = ((CogMethod *) (roundUpLength((((sqInt)cogMethod)) + ((cogMethod->blockSize)))));
+		}
+	}
+	if (!mustScanAndUnlink) {
 		return;
 	}
 	codeModified = 0;

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nsspursrc/vm/cogit.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGenerator VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogmethod.h	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nsspursrc/vm/cogmethod.h	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGenerator VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
 
 typedef struct {

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2014-04-04 23:23:49 UTC (rev 2889)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2014-04-09 19:32:17 UTC (rev 2890)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
    from
-	CoInterpreter VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086
+	CoInterpreter VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.663 uuid: b4c4ad18-808c-4afb-9ddc-80def5e01086 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.670 uuid: 071bf6af-04c0-4256-b053-d66378b73d27 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -865,7 +865,7 @@
 sqInt methodArg(sqInt index);
 void * methodCacheAddress(void);
 sqInt methodClassAssociationOf(sqInt methodPointer);
-static sqInt methodClassOf(sqInt methodPointer);
+sqInt methodClassOf(sqInt methodPointer);
 sqInt methodHasCogMethod(sqInt aMethodOop);
 static sqInt methodHeaderHasPrimitive(sqInt methodHeader);
 sqInt methodPrimitiveIndex(void);
@@ -1262,8 +1262,6 @@
 static sqInt rawHashBitsOf(sqInt objOop);
 sqInt rawHeaderOf(sqInt methodPointer);
 void rawHeaderOfput(sqInt methodOop, sqInt cogMethodOrMethodHeader);
-static usqInt rawNumSlotsOf(sqInt objOop);
-static usqInt rawOverflowSlotsOf(sqInt objOop);
 sqInt readableFormat(sqInt imageVersion);
 static sqInt readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes);
 size_t readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset);
@@ -1456,12 +1454,12 @@
 _iss sqInt firstFreeChunk;
 _iss SpurNewSpaceSpace pastSpace;
 _iss sqInt rememberedSetSize;
+_iss unsigned char primTraceLogIndex;
 _iss SpurContiguousObjStack unscannedEphemerons;
 _iss SpurNewSpaceSpace futureSpace;
 _iss usqInt newSpaceStart;
 _iss StackPage * mostRecentlyUsedPage;
 _iss sqInt numStackPages;
-_iss unsigned char primTraceLogIndex;
 _iss sqInt classTableFirstPage;
 _iss usqInt oldSpaceStart;
 _iss sqInt futureSurvivorStart;
@@ -2203,7 +2201,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.663";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.670";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5580,22 +5578,20 @@
 				mClassMixin = methodClassOf(GIV(method));
 				mixinApplication = findApplicationOfTargetMixinstartingAtBehavior(mClassMixin, fetchClassOf(rcvr));
 				/* begin classTagForClass: */
-				VM_LABEL(0classTagForClass);
 				assert(addressCouldBeClassObj(longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))));
 				/* begin ensureBehaviorHash: */
+				VM_LABEL(0ensureBehaviorHash);
 				assert(addressCouldBeClassObj(longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))));
-				if (((newHash = rawHashBitsOf(longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))))) == 0) {
+				if (((newHash = (longAt((longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))) + 4)) & 0x3FFFFF)) == 0) {
 					if (((err = enterIntoClassTable(longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))))) != 0) {
 						lkupClassTag = -err;
 						goto l1;
 					}
-					/* begin rawHashBitsOf: */
-					flag("endianness");
 					newHash = (longAt((longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))) + 4)) & 0x3FFFFF;
 					assert((classAtIndex(newHash)) == (longAt((mixinApplication + (BaseHeaderSize)) + (SuperclassIndex << 2))));
 				}
 				lkupClassTag = newHash;
-			l1:	/* end classTagForClass: */;
+			l1:	/* end ensureBehaviorHash: */;
 				goto commonSend;
 			}
 			break;
@@ -6558,6 +6554,7 @@
 						/* begin internalPush: */
 						longAtPointerput((localSP -= BytesPerOop), longAt((rcvr1 + (BaseHeaderSize)) + (byte3 << 2)));
 					}
+					null;
 					goto l5;
 				}
 				if (opType == 3) {
@@ -6567,6 +6564,7 @@
 					assert(GIV(method) == (iframeMethod(localFP)));
 					object = longAt((GIV(method) + (BaseHeaderSize)) + ((byte3 + LiteralStart) << 2));
 					longAtPointerput((localSP -= BytesPerOop), object);
+					null;
 					goto l5;
 				}
 				if (opType == 4) {
@@ -6594,6 +6592,7 @@
 					/* begin internalPush: */
 					longAtPointerput((localSP -= BytesPerOop), longAt((litVar1 + (BaseHeaderSize)) + (ValueIndex << 2)));
 
+					null;
 					goto l5;
 				}
 				top = longAtPointer(localSP);
@@ -6800,13 +6799,11 @@
 				superclass = longAt((classPointer + (BaseHeaderSize)) + (SuperclassIndex << 2));
 				/* begin ensureBehaviorHash: */
 				assert(addressCouldBeClassObj(superclass));
-				if (((newHash = rawHashBitsOf(superclass))) == 0) {
+				if (((newHash = (longAt(superclass + 4)) & 0x3FFFFF)) == 0) {
 					if (((err = enterIntoClassTable(superclass))) != 0) {
 						-err;
 						goto l300;
 					}
-					/* begin rawHashBitsOf: */
-					flag("endianness");
 					newHash = (longAt(superclass + 4)) & 0x3FFFFF;
 					assert((classAtIndex(newHash)) == superclass);
 				}
@@ -6816,13 +6813,11 @@
 				assert(addressCouldBeClassObj(superclass));
 				/* begin ensureBehaviorHash: */
 				assert(addressCouldBeClassObj(superclass));
-				if (((newHash1 = rawHashBitsOf(superclass))) == 0) {
+				if (((newHash1 = (longAt(superclass + 4)) & 0x3FFFFF)) == 0) {
 					if (((err1 = enterIntoClassTable(superclass))) != 0) {
 						lkupClassTag = -err1;
 						goto l301;
 					}
-					/* begin rawHashBitsOf: */
-					flag("endianness");
 					newHash1 = (longAt(superclass + 4)) & 0x3FFFFF;
 					assert((classAtIndex(newHash1)) == superclass);
 				}
@@ -6973,14 +6968,14 @@
 			}
 			break;
 		case 139:
-			/* pushExplicitOuterSendReceiverBytecode */
+			/* pushExplicitOuterReceiverBytecode */
 			{
 				sqInt anIntOop;
 				sqInt litIndex;
 				sqInt n;
 				sqInt object;
 
-				VM_LABEL(0pushExplicitOuterSendReceiverBytecode);
+				VM_LABEL(0pushExplicitOuterReceiverBytecode);
 				litIndex = byteAtPointer(++localIP);
 				/* begin literal: */
 				assert(GIV(method) == (iframeMethod(localFP)));
@@ -8885,13 +8880,11 @@
 						VM_LABEL(0eeInstantiateSmallClassnumSlots);
 						/* begin ensureBehaviorHash: */
 						assert(addressCouldBeClassObj(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))));
-						if (((newHash = rawHashBitsOf(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))))) == 0) {
+						if (((newHash = (longAt((longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))) + 4)) & 0x3FFFFF)) == 0) {
 							if (((err = enterIntoClassTable(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))))) != 0) {
 								classIndex = -err;
 								goto l90;
 							}
-							/* begin rawHashBitsOf: */
-							flag("endianness");
 							newHash = (longAt((longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))) + 4)) & 0x3FFFFF;
 							assert((classAtIndex(newHash)) == (longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))));
 						}
@@ -8944,13 +8937,11 @@
 						VM_LABEL(1eeInstantiateSmallClassnumSlots);
 						/* begin ensureBehaviorHash: */
 						assert(addressCouldBeClassObj(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))));
-						if (((newHash1 = rawHashBitsOf(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))))) == 0) {
+						if (((newHash1 = (longAt((longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))) + 4)) & 0x3FFFFF)) == 0) {
 							if (((err1 = enterIntoClassTable(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))))) != 0) {
 								classIndex1 = -err1;
 								goto l92;
 							}
-							/* begin rawHashBitsOf: */
-							flag("endianness");
 							newHash1 = (longAt((longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))) + 4)) & 0x3FFFFF;
 							assert((classAtIndex(newHash1)) == (longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))));
 						}
@@ -9036,13 +9027,11 @@
 					VM_LABEL(2eeInstantiateSmallClassnumSlots);
 					/* begin ensureBehaviorHash: */
 					assert(addressCouldBeClassObj(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))));
-					if (((newHash2 = rawHashBitsOf(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))))) == 0) {
+					if (((newHash2 = (longAt((longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))) + 4)) & 0x3FFFFF)) == 0) {
 						if (((err2 = enterIntoClassTable(longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))))) != 0) {
 							classIndex2 = -err2;
 							goto l94;
 						}
-						/* begin rawHashBitsOf: */
-						flag("endianness");
 						newHash2 = (longAt((longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))) + 4)) & 0x3FFFFF;
 						assert((classAtIndex(newHash2)) == (longAt((GIV(specialObjectsOop) + (BaseHeaderSize)) + (ClassPoint << 2))));
 					}
@@ -9429,10 +9418,10 @@
 				usqInt numSlots1;
 				usqInt numSlots11;
 				usqInt numSlots2;
+				usqInt numSlots21;
 				usqInt numSlots3;
+				usqInt numSlots31;
 				usqInt numSlots4;
-				usqInt numSlots5;
-				usqInt numSlots6;
 				sqInt objOop;
 				sqInt rcvr;
 				sqInt reasonCode;
@@ -9464,61 +9453,57 @@
 							VM_LABEL(0installinAtCacheatstring);
 							assert(!(isContext(rcvr)));
 							hdr = longLongAt(rcvr);
-							fmt = (((unsigned sqLong)hdr) >> 24) & 0x1F;
-							if ((fmt == 3)
+							fmt1 = (((unsigned sqLong)hdr) >> 24) & 0x1F;
+							if ((fmt1 == 3)
 							 && ((hdr & 0x3FFFFF) == ClassMethodContextCompactIndex)) {
 

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list