[commit] r2453 - CogVM source as per VMMaker.oscog-eem.97.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2453 - CogVM source as per VMMaker.oscog-eem.97.

commits-3
 
Author: eliot
Date: 2011-07-11 13:55:34 -0700 (Mon, 11 Jul 2011)
New Revision: 2453

Modified:
   branches/Cog/cygwinbuild/Makefile.plugin
   branches/Cog/nsbuild/cygwinbuild/Makefile.plugin
   branches/Cog/nscogbuild/cygwinbuild/Makefile.plugin
   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/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
   branches/Cog/src/plugins/FilePlugin/FilePlugin.c
   branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c
   branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
   branches/Cog/src/vm/cointerp.c
   branches/Cog/src/vm/cointerp.h
   branches/Cog/src/vm/gcc3x-cointerp.c
   branches/Cog/src/vm/interp.h
Log:
CogVM source as per VMMaker.oscog-eem.97.
Add stack alignment asserts to the callback entry-points.
Modify cygwinbuild plugin makefiles to allow specifying of exact set of objects.
Exclude ppc-specific files from Alien plugin on cygwin/win32.


Modified: branches/Cog/cygwinbuild/Makefile.plugin
===================================================================
--- branches/Cog/cygwinbuild/Makefile.plugin 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/cygwinbuild/Makefile.plugin 2011-07-11 20:55:34 UTC (rev 2453)
@@ -79,7 +79,7 @@
 VMDIR:=     $(BASEDIR)/$(BUILD)/vm
 PLUGINLIB:= $(VMDIR)/$(LIBNAME).lib
 PLUGINDLL:= $(VMDIR)/$(LIBNAME).dll
-LIBOBJ:= $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))
+LIBOBJ ?= $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))
 
 
 VPATH:= $(MAKERDIR) $(WIN32DIR) $(CROSSDIR) $(OBJDIR)

Modified: branches/Cog/nsbuild/cygwinbuild/Makefile.plugin
===================================================================
--- branches/Cog/nsbuild/cygwinbuild/Makefile.plugin 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nsbuild/cygwinbuild/Makefile.plugin 2011-07-11 20:55:34 UTC (rev 2453)
@@ -79,7 +79,7 @@
 VMDIR:=     $(BASEDIR)/$(BUILD)/vm
 PLUGINLIB:= $(VMDIR)/$(LIBNAME).lib
 PLUGINDLL:= $(VMDIR)/$(LIBNAME).dll
-LIBOBJ:= $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))
+LIBOBJ ?= $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))
 
 
 VPATH:= $(MAKERDIR) $(WIN32DIR) $(CROSSDIR) $(OBJDIR)

Modified: branches/Cog/nscogbuild/cygwinbuild/Makefile.plugin
===================================================================
--- branches/Cog/nscogbuild/cygwinbuild/Makefile.plugin 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nscogbuild/cygwinbuild/Makefile.plugin 2011-07-11 20:55:34 UTC (rev 2453)
@@ -79,7 +79,7 @@
 VMDIR:=     $(BASEDIR)/$(BUILD)/vm
 PLUGINLIB:= $(VMDIR)/$(LIBNAME).lib
 PLUGINDLL:= $(VMDIR)/$(LIBNAME).dll
-LIBOBJ:= $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))
+LIBOBJ ?= $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LIBSRC)))
 
 
 VPATH:= $(MAKERDIR) $(WIN32DIR) $(CROSSDIR) $(OBJDIR)

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
+ CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1883,7 +1883,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_*_VMMaker.oscog-eem.96";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.97";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5122,13 +5122,16 @@
  checkProfileTick(GIV(newMethod));
  }
  succeeded = !GIV(primFailCode);
+ if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) {
+ GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP);
+ }
  /* begin internalizeIPandSP */
  assert(GIV(instructionPointer) != (ceReturnToInterpreterPC()));
  localIP = pointerForOop(GIV(instructionPointer));
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  if (succeeded) {
- returntoExecutive(popStack(), 0);
+ returntoExecutive(popStack(), 1);
  browserPluginReturnIfNeeded();
  goto l108;
  }

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
+ CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1886,7 +1886,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_*_VMMaker.oscog-eem.96";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.97";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -5126,13 +5126,16 @@
  checkProfileTick(GIV(newMethod));
  }
  succeeded = !GIV(primFailCode);
+ if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) {
+ GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP);
+ }
  /* begin internalizeIPandSP */
  assert(GIV(instructionPointer) != (ceReturnToInterpreterPC()));
  localIP = pointerForOop(GIV(instructionPointer));
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  if (succeeded) {
- returntoExecutive(popStack(), 0);
+ returntoExecutive(popStack(), 1);
  browserPluginReturnIfNeeded();
  goto l108;
  }

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nscogsrc/vm/interp.h 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/nscogsrc/vm/vmCallback.h 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
 
 #define VM_CALLBACK_INC 1

Modified: branches/Cog/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
===================================================================
--- branches/Cog/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- VMPluginCodeGenerator VMMaker-oscog.54 uuid: 73c095bd-7fa5-4ef9-b9fc-60378cae64c7
+ VMPluginCodeGenerator VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- ADPCMCodecPlugin VMMaker-oscog.54 uuid: 73c095bd-7fa5-4ef9-b9fc-60378cae64c7
+ ADPCMCodecPlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-oscog.54 uuid: 73c095bd-7fa5-4ef9-b9fc-60378cae64c7 " __DATE__ ;
+static char __buildInfo[] = "ADPCMCodecPlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 
 
 
@@ -68,9 +68,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "ADPCMCodecPlugin VMMaker-oscog.54 (i)"
+ "ADPCMCodecPlugin VMMaker.oscog-eem.97 (i)"
 #else
- "ADPCMCodecPlugin VMMaker-oscog.54 (e)"
+ "ADPCMCodecPlugin VMMaker.oscog-eem.97 (e)"
 #endif
 ;
 
@@ -573,7 +573,7 @@
  l6: /* end nextBits: */;
  stepLeft = stepSizeTable[indexLeft + 1];
  stepRight = stepSizeTable[indexRight + 1];
- predictedDeltaLeft = predictedDeltaRight = 0;
+ predictedDeltaLeft = (predictedDeltaRight = 0);
  bit = deltaValueHighBit;
  while (bit > 0) {
  if ((deltaLeft & bit) > 0) {

Modified: branches/Cog/src/plugins/FilePlugin/FilePlugin.c
===================================================================
--- branches/Cog/src/plugins/FilePlugin/FilePlugin.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/plugins/FilePlugin/FilePlugin.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- VMPluginCodeGenerator VMMaker-oscog.40 uuid: 637db40c-33c6-4263-816e-1b8cc19e3c99
+ VMPluginCodeGenerator VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- FilePlugin VMMaker-oscog.40 uuid: 637db40c-33c6-4263-816e-1b8cc19e3c99
+ FilePlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "FilePlugin VMMaker-oscog.40 uuid: 637db40c-33c6-4263-816e-1b8cc19e3c99 " __DATE__ ;
+static char __buildInfo[] = "FilePlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 
 
 
@@ -38,6 +38,7 @@
 
 
 /*** Constants ***/
+#define COGMTVM 0
 #define DirBadPath 2
 #define DirNoMoreEntries 1
 #define PrimErrBadArgument 3
@@ -96,9 +97,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "FilePlugin VMMaker-oscog.40 (i)"
+ "FilePlugin VMMaker.oscog-eem.97 (i)"
 #else
- "FilePlugin VMMaker-oscog.40 (e)"
+ "FilePlugin VMMaker.oscog-eem.97 (e)"
 #endif
 ;
 static void * sCCPfn;
@@ -129,10 +130,10 @@
     sqInt fileOop;
     sqInt okToOpen;
 
- fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  if (!((interpreterProxy->isBytes(fileOop))
- && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(fileOop)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -173,7 +174,7 @@
 fileValueOf(sqInt objectPointer)
 {
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  return null;
  }
@@ -284,7 +285,7 @@
 moduleUnloaded(char *aModuleName)
 {
  if ((strcmp(aModuleName, "SecurityPlugin")) == 0) {
- sCCPfn = sCDPfn = sCGFTfn = sCLPfn = sCSFTfn = sDFAfn = sCDFfn = sCOFfn = sCRFfn = sHFAfn = 0;
+ sCCPfn = (sCDPfn = (sCGFTfn = (sCLPfn = (sCSFTfn = (sDFAfn = (sCDFfn = (sCOFfn = (sCRFfn = (sHFAfn = 0)))))))));
  }
 }
 
@@ -601,7 +602,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(0);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -626,7 +627,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(0);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -680,7 +681,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(0);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -705,7 +706,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(0);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -762,7 +763,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(3);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -774,8 +775,8 @@
  return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
  }
  elementSize = (interpreterProxy->isWords(array)
- ? 4
- : 1);
+ ? (4)
+ : (1));
  if (!((startIndex >= 1)
  && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array))))) {
  return interpreterProxy->primitiveFailFor(PrimErrBadIndex);
@@ -846,7 +847,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(1);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -871,7 +872,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(0);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -907,6 +908,7 @@
  return interpreterProxy->primitiveFailFor(PrimErrUnsupported);
  }
  }
+ ;
  validMask = sqFileStdioHandlesInto((&fileRecords));
  if (validMask == 0) {
  return interpreterProxy->primitiveFailFor(PrimErrUnsupported);
@@ -918,13 +920,13 @@
  interpreterProxy->pushRemappableOop(result);
  for (index = 0; index <= 2; index += 1) {
  if ((validMask & (1 << index)) != 0) {
- result = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ result = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  if (result == null) {
  interpreterProxy->popRemappableOop();
  return interpreterProxy->primitiveFailFor(PrimErrNoMemory);
  }
  interpreterProxy->storePointerofObjectwithValue(index, interpreterProxy->topRemappableOop(), result);
- memcpy(interpreterProxy->firstIndexableField(result), (&(fileRecords[index])), fileRecordSize());
+ memcpy(interpreterProxy->firstIndexableField(result), (&(fileRecords[index])), sizeof(SQFile));
  }
  }
 
@@ -960,7 +962,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(1);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;
@@ -993,7 +995,7 @@
  /* begin fileValueOf: */
  objectPointer = interpreterProxy->stackValue(3);
  if (!((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  file = null;
  goto l1;

Modified: branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c
===================================================================
--- branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- VMPluginCodeGenerator VMMaker-oscog.54 uuid: 73c095bd-7fa5-4ef9-b9fc-60378cae64c7
+ VMPluginCodeGenerator VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- SoundGenerationPlugin VMMaker-oscog.54 uuid: 73c095bd-7fa5-4ef9-b9fc-60378cae64c7
+ SoundGenerationPlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "SoundGenerationPlugin VMMaker-oscog.54 uuid: 73c095bd-7fa5-4ef9-b9fc-60378cae64c7 " __DATE__ ;
+static char __buildInfo[] = "SoundGenerationPlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 
 
 
@@ -73,9 +73,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SoundGenerationPlugin VMMaker-oscog.54 (i)"
+ "SoundGenerationPlugin VMMaker.oscog-eem.97 (i)"
 #else
- "SoundGenerationPlugin VMMaker-oscog.54 (e)"
+ "SoundGenerationPlugin VMMaker.oscog-eem.97 (e)"
 #endif
 ;
 
@@ -171,7 +171,7 @@
  return null;
  }
  for (sliceIndex = startIndex; sliceIndex <= ((startIndex + n) - 1); sliceIndex += 1) {
- delayedLeft = delayedRight = 0;
+ delayedLeft = (delayedRight = 0);
  for (tapIndex = 1; tapIndex <= tapCount; tapIndex += 1) {
  i = bufferIndex - (tapDelays[tapIndex]);
  if (i < 1) {
@@ -313,7 +313,7 @@
  if (((scaledVolIncr > 0)
  && (scaledVol >= scaledVolLimit))
  || ((scaledVolIncr < 0)
- && (scaledVol <= scaledVolLimit))) {
+ && (scaledVol <= scaledVolLimit))) {
 
  /* reached the limit; stop incrementing */
 
@@ -439,7 +439,7 @@
  }
  }
  m = scaledIndex & LoopIndexFractionMask;
- rightVal = leftVal = ((sqInt) (((leftSamples[sampleIndex]) * (LoopIndexScaleFactor - m)) + ((leftSamples[nextSampleIndex]) * m)) >> 9);
+ rightVal = (leftVal = ((sqInt) (((leftSamples[sampleIndex]) * (LoopIndexScaleFactor - m)) + ((leftSamples[nextSampleIndex]) * m)) >> 9));
  if (isInStereo) {
  rightVal = ((sqInt) (((rightSamples[sampleIndex]) * (LoopIndexScaleFactor - m)) + ((rightSamples[nextSampleIndex]) * m)) >> 9);
  }
@@ -473,7 +473,7 @@
  if (((scaledVolIncr > 0)
  && (scaledVol >= scaledVolLimit))
  || ((scaledVolIncr < 0)
- && (scaledVol <= scaledVolLimit))) {
+ && (scaledVol <= scaledVolLimit))) {
 
  /* reached the limit; stop incrementing */
 
@@ -550,7 +550,7 @@
  return null;
  }
  lastIndex = (startIndex + n) - 1;
- scaledThisIndex = scaledNextIndex = scaledIndex;
+ scaledThisIndex = (scaledNextIndex = scaledIndex);
  for (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex += 1) {
  scaledNextIndex = scaledThisIndex + scaledIndexIncr;
  if (scaledNextIndex >= scaledIndexLimit) {
@@ -590,7 +590,7 @@
  if (((scaledVolIncr > 0)
  && (scaledVol >= scaledVolLimit))
  || ((scaledVolIncr < 0)
- && (scaledVol <= scaledVolLimit))) {
+ && (scaledVol <= scaledVolLimit))) {
 
  /* reached the limit; stop incrementing */
 
@@ -670,7 +670,7 @@
  outIndex = startIndex;
  sampleIndex = indexHighBits + (((usqInt) scaledIndex) >> IncrementFractionBits);
  while ((sampleIndex <= samplesSize)
- && (outIndex <= lastIndex)) {
+ && (outIndex <= lastIndex)) {
  sample = ((sqInt) ((samples[sampleIndex]) * scaledVol) >> 15);
  if (leftVol > 0) {
  i = (2 * outIndex) - 1;
@@ -699,7 +699,7 @@
  if (((scaledVolIncr > 0)
  && (scaledVol >= scaledVolLimit))
  || ((scaledVolIncr < 0)
- && (scaledVol <= scaledVolLimit))) {
+ && (scaledVol <= scaledVolLimit))) {
 
  /* reached the limit; stop incrementing */
 

Modified: branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
===================================================================
--- branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- VMPluginCodeGenerator VMMaker.oscog-eem.75 uuid: e1bb08e3-482d-4bfd-a416-d203d9fe4c57
+ VMPluginCodeGenerator VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin-eem.28 uuid: 9dd4e012-1f25-4946-9b7b-feb93153e08a
+ Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.31 uuid: b7c551ed-5e67-4774-9285-3f4a291fccb9
  */
-static char __buildInfo[] = "Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin-eem.28 uuid: 9dd4e012-1f25-4946-9b7b-feb93153e08a " __DATE__ ;
+static char __buildInfo[] = "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.31 uuid: b7c551ed-5e67-4774-9285-3f4a291fccb9 " __DATE__ ;
 
 
 
@@ -14,7 +14,7 @@
 #include <time.h>
 #include <sys/types.h>
 /* D T Lewis - Win32OSProcessPlugin.c translated from class
-   Win32OSProcessPlugin of OSProcessPlugin version 4.3.2 */
+   Win32OSProcessPlugin of OSProcessPlugin version 4.3.3 Cog */
 #include <windows.h>
 #include <process.h>
 
@@ -158,9 +158,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin-eem.28 (i)"
+ "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.31 (i)"
 #else
- "Win32OSProcessPlugin * VMConstruction-Plugins-OSProcessPlugin-eem.28 (e)"
+ "Win32OSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-eem.31 (e)"
 #endif
 ;
 static int osprocessSandboxSecurity;
@@ -262,7 +262,7 @@
 }
 
 
-/* Answer the size of a SQFile data structure in bytes. */
+/* Return the size of a Smalltalk file record in bytes. */
 
 static sqInt
 fileRecordSize(void)
@@ -372,7 +372,7 @@
     SQFile *sqFile;
 
  if (!((interpreterProxy->isBytes(anSQFileRecord))
- && ((interpreterProxy->stSizeOf(anSQFileRecord)) == (fileRecordSize())))) {
+ && ((interpreterProxy->stSizeOf(anSQFileRecord)) == (sizeof(SQFile))))) {
  interpreterProxy->primitiveFail();
  return null;
  }
@@ -456,7 +456,7 @@
 
  sqFileBytes = interpreterProxy->arrayValueOf(objectPointer);
  idx = 0;
- while (idx < (fileRecordSize())) {
+ while (idx < (sizeof(SQFile))) {
  if ((sqFileBytes[idx]) != 0) {
  return 1;
  }
@@ -494,7 +494,7 @@
 isSQFileObject(sqInt objectPointer)
 {
  return (((interpreterProxy->isBytes(objectPointer))
- && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))
+ && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))
  && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer)))))
  && (isNonNullSQFile(objectPointer));
 }
@@ -558,7 +558,7 @@
 static sqInt
 newSQFileByteArray(void)
 {
- return interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ return interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
 }
 
 
@@ -827,7 +827,7 @@
  if (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {
  return interpreterProxy->primitiveFail();
  }
- writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  writerPtr = interpreterProxy->arrayValueOf(writer);
  writerPtr->file = writerIOStream;
@@ -835,7 +835,7 @@
  writerPtr->writable = 1;
  writerPtr->lastOp = 0;
  interpreterProxy->pushRemappableOop(writer);
- reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  readerPtr = interpreterProxy->arrayValueOf(reader);
  readerPtr->file = readerIOStream;
@@ -889,7 +889,7 @@
  if (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {
  return interpreterProxy->primitiveFail();
  }
- writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  writerPtr = interpreterProxy->arrayValueOf(writer);
  writerPtr->file = writerIOStream;
@@ -897,7 +897,7 @@
  writerPtr->writable = 1;
  writerPtr->lastOp = 0;
  interpreterProxy->pushRemappableOop(writer);
- reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  readerPtr = interpreterProxy->arrayValueOf(reader);
  readerPtr->file = readerIOStream;
@@ -1192,7 +1192,7 @@
  thisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));
  invalid = INVALID_HANDLE_VALUE;
  result = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);
- fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  file = interpreterProxy->arrayValueOf(fileOop);
  handle = GetStdHandle(STD_ERROR_HANDLE);
@@ -1235,7 +1235,7 @@
  thisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));
  invalid = INVALID_HANDLE_VALUE;
  result = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);
- fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  file = interpreterProxy->arrayValueOf(fileOop);
  handle = GetStdHandle(STD_INPUT_HANDLE);
@@ -1278,7 +1278,7 @@
  thisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));
  invalid = INVALID_HANDLE_VALUE;
  result = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);
- fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ fileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  file = interpreterProxy->arrayValueOf(fileOop);
  handle = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -1398,7 +1398,7 @@
  if (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {
  return interpreterProxy->primitiveFail();
  }
- writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  writerPtr = interpreterProxy->arrayValueOf(writer);
  writerPtr->file = writerIOStream;
@@ -1406,7 +1406,7 @@
  writerPtr->writable = 1;
  writerPtr->lastOp = 0;
  interpreterProxy->pushRemappableOop(writer);
- reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  readerPtr = interpreterProxy->arrayValueOf(reader);
  readerPtr->file = readerIOStream;
@@ -1460,7 +1460,7 @@
  if (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {
  return interpreterProxy->primitiveFail();
  }
- writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ writer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  writerPtr = interpreterProxy->arrayValueOf(writer);
  writerPtr->file = writerIOStream;
@@ -1468,7 +1468,7 @@
  writerPtr->writable = 1;
  writerPtr->lastOp = 0;
  interpreterProxy->pushRemappableOop(writer);
- reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());
+ reader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));
  /* begin fileValueOf: */
  readerPtr = interpreterProxy->arrayValueOf(reader);
  readerPtr->file = readerIOStream;
@@ -1573,7 +1573,7 @@
 
  sqFileOop = interpreterProxy->stackValue(0);
  if (!((((interpreterProxy->isBytes(sqFileOop))
- && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize())))
+ && ((interpreterProxy->byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
  && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop)))))
  && (isNonNullSQFile(sqFileOop)))) {
  return interpreterProxy->primitiveFail();
@@ -1600,7 +1600,7 @@
 
  sqFileOop = interpreterProxy->stackValue(0);
  if (!((((interpreterProxy->isBytes(sqFileOop))
- && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize())))
+ && ((interpreterProxy->byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
  && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop)))))
  && (isNonNullSQFile(sqFileOop)))) {
  return interpreterProxy->primitiveFail();
@@ -1627,7 +1627,7 @@
 
  sqFileOop = interpreterProxy->stackValue(0);
  if (!((((interpreterProxy->isBytes(sqFileOop))
- && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize())))
+ && ((interpreterProxy->byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
  && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop)))))
  && (isNonNullSQFile(sqFileOop)))) {
  return interpreterProxy->primitiveFail();
@@ -2200,7 +2200,7 @@
 static char *
 versionString(void)
 {
-    static char version[]= "4.3.2";
+    static char version[]= "4.3.3 Cog";
 
  return version;
 }

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/vm/cointerp.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- CoInterpreter VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100
+ CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1153,9 +1153,9 @@
 _iss StackPage * mostRecentlyUsedPage;
 _iss sqInt needGCFlag;
 _iss usqInt scavengeThreshold;
+_iss unsigned char primTraceLogIndex;
 _iss sqLong nextProfileTick;
 _iss sqInt numStackPages;
-_iss unsigned char primTraceLogIndex;
 _iss sqInt jmpDepth;
 _iss usqInt fwdTableNext;
 _iss sqInt longRunningPrimitiveCheckSemaphore;
@@ -1875,7 +1875,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.93]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.97]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -4898,13 +4898,16 @@
  checkProfileTick(GIV(newMethod));
  }
  succeeded = !GIV(primFailCode);
+ if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) {
+ GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP);
+ }
  /* begin internalizeIPandSP */
  assert(GIV(instructionPointer) != (ceReturnToInterpreterPC()));
  localIP = pointerForOop(GIV(instructionPointer));
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  if (succeeded) {
- returntoExecutive(popStack(), 0);
+ returntoExecutive(popStack(), 1);
  browserPluginReturnIfNeeded();
  goto l103;
  }
@@ -39941,9 +39944,10 @@
  vmCallbackContext as the jmpbuf argument (see
  reestablishContextPriorToCallback:). The arguments are raw C addresses and
  are converted to integer objects on the way. */
-/* Override to log. Since this is an implicit send we need to log it
- explicitly. The return side is done via a primitive so that gets logged
- normally.  */
+/* Override to log and check stack alignment. Since this is an implicit send
+ we need to
+ log it explicitly. The return side is done via a primitive so that gets
+ logged normally. */
 
 EXPORT(sqInt)
 sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext)
@@ -39990,6 +39994,7 @@
     char *sp9;
     sqInt table;
 
+ assertCStackWellAligned();
  if (recordPrimTrace()) {
  /* begin fastLogPrim: */
  GIV(primTraceLog)[GIV(primTraceLogIndex)] = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorInvokeCallback << ShiftForWord)));
@@ -40199,6 +40204,10 @@
  invokeCallback:stack:registers:jmpbuf: to Alien class with the supplied
  args. The arguments are raw C addresses
  and are converted to integer objects on the way. */
+/* Override to log and check stack alignment. Since this is an implicit send
+ we need to
+ log it explicitly. The return side is done via a primitive so that gets
+ logged normally. */
 
 EXPORT(sqInt)
 sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr)
@@ -40237,6 +40246,12 @@
     char *sp9;
     sqInt table;
 
+ assertCStackWellAligned();
+ if (recordPrimTrace()) {
+ /* begin fastLogPrim: */
+ GIV(primTraceLog)[GIV(primTraceLogIndex)] = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorInvokeCallback << ShiftForWord)));
+ primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+ }
  flag("obsolete");
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassAlien << ShiftForWord))))) >> 12) & 31)) == 0) {

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/vm/cointerp.h 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
 
 

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/vm/gcc3x-cointerp.c 2011-07-11 20:55:34 UTC (rev 2453)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
    from
- CoInterpreter VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100
+ CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1156,9 +1156,9 @@
 _iss StackPage * mostRecentlyUsedPage;
 _iss sqInt needGCFlag;
 _iss usqInt scavengeThreshold;
+_iss unsigned char primTraceLogIndex;
 _iss sqLong nextProfileTick;
 _iss sqInt numStackPages;
-_iss unsigned char primTraceLogIndex;
 _iss sqInt jmpDepth;
 _iss usqInt fwdTableNext;
 _iss sqInt longRunningPrimitiveCheckSemaphore;
@@ -1878,7 +1878,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.93]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.97]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -4902,13 +4902,16 @@
  checkProfileTick(GIV(newMethod));
  }
  succeeded = !GIV(primFailCode);
+ if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) {
+ GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP);
+ }
  /* begin internalizeIPandSP */
  assert(GIV(instructionPointer) != (ceReturnToInterpreterPC()));
  localIP = pointerForOop(GIV(instructionPointer));
  localSP = pointerForOop(GIV(stackPointer));
  localFP = pointerForOop(GIV(framePointer));
  if (succeeded) {
- returntoExecutive(popStack(), 0);
+ returntoExecutive(popStack(), 1);
  browserPluginReturnIfNeeded();
  goto l103;
  }
@@ -39945,9 +39948,10 @@
  vmCallbackContext as the jmpbuf argument (see
  reestablishContextPriorToCallback:). The arguments are raw C addresses and
  are converted to integer objects on the way. */
-/* Override to log. Since this is an implicit send we need to log it
- explicitly. The return side is done via a primitive so that gets logged
- normally.  */
+/* Override to log and check stack alignment. Since this is an implicit send
+ we need to
+ log it explicitly. The return side is done via a primitive so that gets
+ logged normally. */
 
 EXPORT(sqInt)
 sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext)
@@ -39994,6 +39998,7 @@
     char *sp9;
     sqInt table;
 
+ assertCStackWellAligned();
  if (recordPrimTrace()) {
  /* begin fastLogPrim: */
  GIV(primTraceLog)[GIV(primTraceLogIndex)] = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorInvokeCallback << ShiftForWord)));
@@ -40203,6 +40208,10 @@
  invokeCallback:stack:registers:jmpbuf: to Alien class with the supplied
  args. The arguments are raw C addresses
  and are converted to integer objects on the way. */
+/* Override to log and check stack alignment. Since this is an implicit send
+ we need to
+ log it explicitly. The return side is done via a primitive so that gets
+ logged normally. */
 
 EXPORT(sqInt)
 sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr)
@@ -40241,6 +40250,12 @@
     char *sp9;
     sqInt table;
 
+ assertCStackWellAligned();
+ if (recordPrimTrace()) {
+ /* begin fastLogPrim: */
+ GIV(primTraceLog)[GIV(primTraceLogIndex)] = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorInvokeCallback << ShiftForWord)));
+ primTraceLogIndex(GIV(primTraceLogIndex) + 1);
+ }
  flag("obsolete");
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassAlien << ShiftForWord))))) >> 12) & 31)) == 0) {

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h 2011-07-11 20:51:47 UTC (rev 2452)
+++ branches/Cog/src/vm/interp.h 2011-07-11 20:55:34 UTC (rev 2453)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.93 uuid: a811c33a-a695-452b-9090-e0984e33c100
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8
  */
 
 #define VM_PROXY_MAJOR 1