[Vm-dev] [commit] r2489 - CogVm source as per VMMaker.oscog-eem.121. Clean up compilation warnings. Add

commits at squeakvm.org commits at squeakvm.org
Tue Aug 23 00:22:53 UTC 2011


Author: eliot
Date: 2011-08-22 17:22:53 -0700 (Mon, 22 Aug 2011)
New Revision: 2489

Modified:
   branches/Cog/cygwinbuild/HowToBuild
   branches/Cog/cygwinbuild/Makefile
   branches/Cog/nsbuild/cygwinbuild/Makefile
   branches/Cog/nscogbuild/cygwinbuild/Makefile
   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/platforms/Cross/vm/sqSCCSVersion.h
   branches/Cog/platforms/win32/util/eitheror.c
   branches/Cog/platforms/win32/vm/sqWin32Backtrace.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
Log:
CogVm source as per VMMaker.oscog-eem.121.  Clean up compilation warnings.  Add
a hard check on Cogit overflowing the number of allocated abstract instructions.


Modified: branches/Cog/cygwinbuild/HowToBuild
===================================================================
--- branches/Cog/cygwinbuild/HowToBuild	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/cygwinbuild/HowToBuild	2011-08-23 00:22:53 UTC (rev 2489)
@@ -58,7 +58,7 @@
 	supports it this VM will be able to read and write to stdin and stdout.
 
 
-3a. If you want to get the Cog VM simulator working you'll need to build the
+3b. If you want to get the Cog VM simulator working you'll need to build the
 BochsIA32Plugin/BochsIA32Plugin.xcodeproj project and to build that you'll
 need to first build bochs.  WARNING: No one has tried to build the plugin on
 Win32.  You are on your own but your efforts will be warmly welcomed.

Modified: branches/Cog/cygwinbuild/Makefile
===================================================================
--- branches/Cog/cygwinbuild/Makefile	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/cygwinbuild/Makefile	2011-08-23 00:22:53 UTC (rev 2489)
@@ -259,7 +259,7 @@
 	@echo -----------------------------------------------------
 
 eitheror.exe: $(WIN32UTILDIR)/eitheror.c
-	$(CC) -o $@ -O1 -mno-cygwin $<
+	$(CC) -o $@ -O1 -mconsole -mno-cygwin $<
 
 mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c
 	$(CC) -o $@ -mconsole -mno-cygwin $<
@@ -367,9 +367,3 @@
 	./mkNamedPrims.exe $(INTERNAL_PLUGINS) > sqNamedPrims.h
 
 $(OBJDIR)/sqNamedPrims.o:	sqNamedPrims.c sqNamedPrims.h
-
-Squeak.res: $(BASEDIR)/Squeak.rc
-	$(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@
-
-Croquet.res: $(BASEDIR)/Croquet.rc
-	$(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@

Modified: branches/Cog/nsbuild/cygwinbuild/Makefile
===================================================================
--- branches/Cog/nsbuild/cygwinbuild/Makefile	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nsbuild/cygwinbuild/Makefile	2011-08-23 00:22:53 UTC (rev 2489)
@@ -218,7 +218,7 @@
 	@echo -----------------------------------------------------
 
 eitheror.exe: $(WIN32UTILDIR)/eitheror.c
-	$(CC) -o $@ -O1 -mno-cygwin $<
+	$(CC) -o $@ -O1 -mconsole -mno-cygwin $<
 
 mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c
 	$(CC) -o $@ -mconsole -mno-cygwin $<

Modified: branches/Cog/nscogbuild/cygwinbuild/Makefile
===================================================================
--- branches/Cog/nscogbuild/cygwinbuild/Makefile	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogbuild/cygwinbuild/Makefile	2011-08-23 00:22:53 UTC (rev 2489)
@@ -218,7 +218,7 @@
 	@echo -----------------------------------------------------
 
 eitheror.exe: $(WIN32UTILDIR)/eitheror.c
-	$(CC) -o $@ -O1 -mno-cygwin $<
+	$(CC) -o $@ -O1 -mconsole -mno-cygwin $<
 
 mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c
 	$(CC) -o $@ -mconsole -mno-cygwin $<
@@ -326,6 +326,3 @@
 	./mkNamedPrims.exe $(INTERNAL_PLUGINS) > sqNamedPrims.h
 
 $(OBJDIR)/sqNamedPrims.o:	sqNamedPrims.c sqNamedPrims.h
-
-nsvm.res: $(BASEDIR)/nsvm.rc
-	$(RC) $(RCFLAGS) -i $< -o $(OBJDIR)/$@

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/cogit.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGenerator VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	StackToRegisterMappingCogit VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -2971,7 +2971,7 @@
 {
     sqInt address;
     sqInt end;
-    void *jumpTarget;
+    sqInt jumpTarget;
     sqInt operand;
     sqInt size;
     sqInt target;
@@ -3000,7 +3000,7 @@
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLongZero: */
-	genoperand(JumpLongZero, ((sqInt)(((void *) target))));
+	genoperand(JumpLongZero, ((sqInt)target));
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, ((sqInt)cPIC), ClassReg);
 	/* begin JumpLong: */
@@ -3109,7 +3109,7 @@
 
 	compilationBreakpoint(selector, lengthOf(selector));
 	if (endCPICCase0 == null) {
-		return NotFullyInitialized;
+		return ((CogMethod *) NotFullyInitialized);
 	}
 	startAddress = allocate(closedPICSize);
 	if (startAddress == 0) {
@@ -3123,7 +3123,7 @@
 	headerSize = sizeof(CogMethod);
 	size = generateInstructionsAt(startAddress + headerSize);
 
-	/* The missOffset is th same as the interpretOffset. */
+	/* The missOffset is the same as the interpretOffset. */
 
 	end = outputInstructionsAt(startAddress + headerSize);
 	assert(missOffset == ((((interpretCall->address)) + ((interpretCall->machineCodeSize))) - startAddress));
@@ -3405,6 +3405,10 @@
 	: 0));
 	} while((result == 0)
  && (bytecodePointer <= end));
+	/* begin checkEnoughOpcodes */
+	if (opcodeIndex > numAbstractOpcodes) {
+		error("Cog JIT internal error. Too many abstract opcodes.  Num opcodes heuristic is too optimistic.");
+	}
 	return result;
 }
 
@@ -3681,7 +3685,7 @@
 {
     sqInt h;
     AbstractInstruction *jumpNext;
-    void *jumpTarget;
+    sqInt jumpTarget;
     sqInt numArgs;
 
 	numArgs = 0;
@@ -3698,7 +3702,7 @@
 		/* begin MoveCw:R: */
 		genoperandoperand(MoveCwR, 195929424 + h, SendNumArgsReg);
 		/* begin JumpLongZero: */
-		genoperand(JumpLongZero, ((sqInt)(((void *) (3202131424UL + h)))));
+		genoperand(JumpLongZero, ((sqInt)3202131424UL));
 		if (h == 1) {
 			/* begin Label */
 			endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePointer);
@@ -3707,7 +3711,7 @@
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, 179686997, ClassReg);
 	/* begin JumpLong: */
-	jumpTarget = ((void *) (cPICMissTrampolineFor(numArgs)));
+	jumpTarget = cPICMissTrampolineFor(numArgs);
 	genoperand(JumpLong, jumpTarget);
 	return 0;
 }
@@ -3785,7 +3789,7 @@
 compileCPICCase0Case1MethodtagisMNUCasenumArgs(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs)
 {
     AbstractInstruction *jumpNext;
-    void *jumpTarget;
+    sqInt jumpTarget;
     sqInt jumpTarget1;
     sqInt operand;
     void *targetEntry;
@@ -3817,14 +3821,14 @@
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLongZero: */
-	jumpTarget = (isMNUCase
-		? mnuCall
-		: targetEntry);
+	jumpTarget = ((sqInt)((isMNUCase
+	? mnuCall
+	: targetEntry)));
 	genoperand(JumpLongZero, ((sqInt)jumpTarget));
 	/* begin MoveCw:R: */
 	endCPICCase1 = genoperandoperand(MoveCwR, ((sqInt)cPIC), ClassReg);
 	/* begin JumpLong: */
-	jumpTarget1 = ((void *) (cPICMissTrampolineFor(numArgs)));
+	jumpTarget1 = cPICMissTrampolineFor(numArgs);
 	genoperand(JumpLong, jumpTarget1);
 	return 0;
 }

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/cogit.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGenerator VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGenerator VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 typedef struct {

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/cointerp.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -553,7 +553,7 @@
 usqLong getNextWakeupUsecs(void);
 sqInt getSavedWindowSize(void);
 static sqInt getShortFromFileswap(sqImageFile aFile, sqInt swapFlag);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt getThisSessionID(void);
 static sqInt handleMNUInMachineCodeToclassForMessage(sqInt selectorIndex, sqInt rcvr, sqInt classForMessage);
 static void handleStackOverflow(void);
@@ -1891,7 +1891,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.119";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.121";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17200,7 +17200,7 @@
 
 /*	For Alien FFI */
 
-sqInt
+sqInt *
 getStackPointer(void)
 {
 	return GIV(stackPointer);

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/cointerp.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 
@@ -76,7 +76,7 @@
 void (*functionPointerForCompiledMethodprimitiveIndex(sqInt methodObj, sqInt primIndex))(void) ;
 void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
 usqLong getNextWakeupUsecs(void);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt headerOf(sqInt methodPointer);
 void ifValidWriteBackStackPointersSaveTo(void *theCFP, void *theCSP, char **savedFPP, char **savedSPP);
 sqInt implicitReceiverFormixinimplementing(sqInt receiver, sqInt mixin, sqInt selector);

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -556,7 +556,7 @@
 usqLong getNextWakeupUsecs(void);
 sqInt getSavedWindowSize(void);
 static sqInt getShortFromFileswap(sqImageFile aFile, sqInt swapFlag);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt getThisSessionID(void);
 static sqInt handleMNUInMachineCodeToclassForMessage(sqInt selectorIndex, sqInt rcvr, sqInt classForMessage);
 static void handleStackOverflow(void);
@@ -1894,7 +1894,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.119";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.121";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17204,7 +17204,7 @@
 
 /*	For Alien FFI */
 
-sqInt
+sqInt *
 getStackPointer(void)
 {
 	return GIV(stackPointer);

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/interp.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/nscogsrc/vm/vmCallback.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 #define VM_CALLBACK_INC 1


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Fri Aug 19 14:31:01 PDT 2011
   + Mon Aug 22 17:21:13 PDT 2011

Modified: branches/Cog/platforms/win32/util/eitheror.c
===================================================================
--- branches/Cog/platforms/win32/util/eitheror.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/platforms/win32/util/eitheror.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -10,6 +10,8 @@
 #ifdef _MSC_VER
 # define F_OK 00
 # define access _access
+#else
+# include <unistd.h>
 #endif
 
 int

Modified: branches/Cog/platforms/win32/vm/sqWin32Backtrace.c
===================================================================
--- branches/Cog/platforms/win32/vm/sqWin32Backtrace.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/platforms/win32/vm/sqWin32Backtrace.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -61,7 +61,7 @@
 		mov EAX, EBP
 		mov [__fp], EAX
 	}
-#elif defined(__MINGW32__)
+#elif defined(__GNUC__)
 	asm volatile ("movl %%ebp, %0" : "=r"(__fp) : );
 #else
 # error "don't know how to derive ebp"
@@ -81,7 +81,7 @@
 		mov EAX, FS:[18h]
 		mov [tib], EAX
 	}
-#elif defined(__MINGW32__)
+#elif defined(__GNUC__)
 	asm volatile ("movl %%fs:0x18, %0" : "=r" (tib) : );
 #else
 # error "don't know how to derive tib"

Modified: branches/Cog/src/vm/cogit.c
===================================================================
--- branches/Cog/src/vm/cogit.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cogit.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGenerator VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	StackToRegisterMappingCogit VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -2894,7 +2894,7 @@
 {
     sqInt address;
     sqInt end;
-    void *jumpTarget;
+    sqInt jumpTarget;
     sqInt operand;
     sqInt size;
     sqInt target;
@@ -2923,7 +2923,7 @@
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLongZero: */
-	genoperand(JumpLongZero, ((sqInt)(((void *) target))));
+	genoperand(JumpLongZero, ((sqInt)target));
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, ((sqInt)cPIC), ClassReg);
 	/* begin JumpLong: */
@@ -3032,7 +3032,7 @@
 
 	compilationBreakpoint(selector, lengthOf(selector));
 	if (endCPICCase0 == null) {
-		return NotFullyInitialized;
+		return ((CogMethod *) NotFullyInitialized);
 	}
 	startAddress = allocate(closedPICSize);
 	if (startAddress == 0) {
@@ -3046,7 +3046,7 @@
 	headerSize = sizeof(CogMethod);
 	size = generateInstructionsAt(startAddress + headerSize);
 
-	/* The missOffset is th same as the interpretOffset. */
+	/* The missOffset is the same as the interpretOffset. */
 
 	end = outputInstructionsAt(startAddress + headerSize);
 	assert(missOffset == ((((interpretCall->address)) + ((interpretCall->machineCodeSize))) - startAddress));
@@ -3328,6 +3328,10 @@
 	: 0));
 	} while((result == 0)
  && (bytecodePointer <= end));
+	/* begin checkEnoughOpcodes */
+	if (opcodeIndex > numAbstractOpcodes) {
+		error("Cog JIT internal error. Too many abstract opcodes.  Num opcodes heuristic is too optimistic.");
+	}
 	return result;
 }
 
@@ -3604,7 +3608,7 @@
 {
     sqInt h;
     AbstractInstruction *jumpNext;
-    void *jumpTarget;
+    sqInt jumpTarget;
     sqInt numArgs;
 
 	numArgs = 0;
@@ -3621,7 +3625,7 @@
 		/* begin MoveCw:R: */
 		genoperandoperand(MoveCwR, 195929424 + h, SendNumArgsReg);
 		/* begin JumpLongZero: */
-		genoperand(JumpLongZero, ((sqInt)(((void *) (3202131424UL + h)))));
+		genoperand(JumpLongZero, ((sqInt)3202131424UL));
 		if (h == 1) {
 			/* begin Label */
 			endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePointer);
@@ -3630,7 +3634,7 @@
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, 179686997, ClassReg);
 	/* begin JumpLong: */
-	jumpTarget = ((void *) (cPICMissTrampolineFor(numArgs)));
+	jumpTarget = cPICMissTrampolineFor(numArgs);
 	genoperand(JumpLong, jumpTarget);
 	return 0;
 }
@@ -3708,7 +3712,7 @@
 compileCPICCase0Case1MethodtagisMNUCasenumArgs(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs)
 {
     AbstractInstruction *jumpNext;
-    void *jumpTarget;
+    sqInt jumpTarget;
     sqInt jumpTarget1;
     sqInt operand;
     void *targetEntry;
@@ -3740,14 +3744,14 @@
 	/* begin MoveCw:R: */
 	genoperandoperand(MoveCwR, operand, SendNumArgsReg);
 	/* begin JumpLongZero: */
-	jumpTarget = (isMNUCase
-		? mnuCall
-		: targetEntry);
+	jumpTarget = ((sqInt)((isMNUCase
+	? mnuCall
+	: targetEntry)));
 	genoperand(JumpLongZero, ((sqInt)jumpTarget));
 	/* begin MoveCw:R: */
 	endCPICCase1 = genoperandoperand(MoveCwR, ((sqInt)cPIC), ClassReg);
 	/* begin JumpLong: */
-	jumpTarget1 = ((void *) (cPICMissTrampolineFor(numArgs)));
+	jumpTarget1 = cPICMissTrampolineFor(numArgs);
 	genoperand(JumpLong, jumpTarget1);
 	return 0;
 }

Modified: branches/Cog/src/vm/cogit.h
===================================================================
--- branches/Cog/src/vm/cogit.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cogit.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGenerator VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 

Modified: branches/Cog/src/vm/cogmethod.h
===================================================================
--- branches/Cog/src/vm/cogmethod.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cogmethod.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGenerator VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 typedef struct {

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cointerp.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -546,7 +546,7 @@
 usqLong getNextWakeupUsecs(void);
 sqInt getSavedWindowSize(void);
 static sqInt getShortFromFileswap(sqImageFile aFile, sqInt swapFlag);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt getThisSessionID(void);
 static sqInt handleMNUInMachineCodeToclassForMessage(sqInt selectorIndex, sqInt rcvr, sqInt classForMessage);
 static void handleStackOverflow(void);
@@ -1882,7 +1882,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.119]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.121]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -16739,7 +16739,7 @@
 
 /*	For Alien FFI */
 
-sqInt
+sqInt *
 getStackPointer(void)
 {
 	return GIV(stackPointer);

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cointerp.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 
@@ -76,7 +76,7 @@
 void (*functionPointerForCompiledMethodprimitiveIndex(sqInt methodObj, sqInt primIndex))(void) ;
 void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
 usqLong getNextWakeupUsecs(void);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt headerOf(sqInt methodPointer);
 void ifValidWriteBackStackPointersSaveTo(void *theCFP, void *theCSP, char **savedFPP, char **savedSPP);
 sqInt implicitReceiverFormixinimplementing(sqInt receiver, sqInt mixin, sqInt selector);

Modified: branches/Cog/src/vm/cointerpmt.c
===================================================================
--- branches/Cog/src/vm/cointerpmt.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cointerpmt.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	CoInterpreterMT VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -596,7 +596,7 @@
 usqLong getNextWakeupUsecs(void);
 sqInt getSavedWindowSize(void);
 static sqInt getShortFromFileswap(sqImageFile aFile, sqInt swapFlag);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt getThisSessionID(void);
 sqOSThread getVMOSThread(void);
 static sqInt getVMOwner(void);
@@ -1982,7 +1982,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.119]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.121]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -17359,7 +17359,7 @@
 
 /*	For Alien FFI */
 
-sqInt
+sqInt *
 getStackPointer(void)
 {
 	return GIV(stackPointer);

Modified: branches/Cog/src/vm/cointerpmt.h
===================================================================
--- branches/Cog/src/vm/cointerpmt.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/cointerpmt.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 
@@ -77,7 +77,7 @@
 void (*functionPointerForCompiledMethodprimitiveIndex(sqInt methodObj, sqInt primIndex))(void) ;
 void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ;
 usqLong getNextWakeupUsecs(void);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqOSThread getVMOSThread(void);
 sqInt headerOf(sqInt methodPointer);
 void ifValidWriteBackStackPointersSaveTo(void *theCFP, void *theCSP, char **savedFPP, char **savedSPP);

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/gcc3x-cointerp.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -549,7 +549,7 @@
 usqLong getNextWakeupUsecs(void);
 sqInt getSavedWindowSize(void);
 static sqInt getShortFromFileswap(sqImageFile aFile, sqInt swapFlag);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt getThisSessionID(void);
 static sqInt handleMNUInMachineCodeToclassForMessage(sqInt selectorIndex, sqInt rcvr, sqInt classForMessage);
 static void handleStackOverflow(void);
@@ -1885,7 +1885,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.119]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.121]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -16743,7 +16743,7 @@
 
 /*	For Alien FFI */
 
-sqInt
+sqInt *
 getStackPointer(void)
 {
 	return GIV(stackPointer);

Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerpmt.c	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/gcc3x-cointerpmt.c	2011-08-23 00:22:53 UTC (rev 2489)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
    from
-	CoInterpreterMT VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -599,7 +599,7 @@
 usqLong getNextWakeupUsecs(void);
 sqInt getSavedWindowSize(void);
 static sqInt getShortFromFileswap(sqImageFile aFile, sqInt swapFlag);
-sqInt getStackPointer(void);
+sqInt * getStackPointer(void);
 sqInt getThisSessionID(void);
 sqOSThread getVMOSThread(void);
 static sqInt getVMOwner(void);
@@ -1985,7 +1985,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.119]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.121]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -17363,7 +17363,7 @@
 
 /*	For Alien FFI */
 
-sqInt
+sqInt *
 getStackPointer(void)
 {
 	return GIV(stackPointer);

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/interp.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/src/vm/vmCallback.h
===================================================================
--- branches/Cog/src/vm/vmCallback.h	2011-08-19 21:33:12 UTC (rev 2488)
+++ branches/Cog/src/vm/vmCallback.h	2011-08-23 00:22:53 UTC (rev 2489)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.119 uuid: dedbaf07-59d6-4a97-b10a-af8a7f631287
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
  */
 
 #define VM_CALLBACK_INC 1



More information about the Vm-dev mailing list