[Vm-dev] [commit] r2437 - OSCogVM source as per VMMaker.oscog-eem.79. Use methodReturnValue: where

commits at squeakvm.org commits at squeakvm.org
Sun Jun 19 22:44:12 UTC 2011


Author: eliot
Date: 2011-06-19 15:44:12 -0700 (Sun, 19 Jun 2011)
New Revision: 2437

Modified:
   branches/Cog/nssrc/plugins/IA32ABI/IA32ABI.c
   branches/Cog/nssrc/vm/gcc3x-interp.c
   branches/Cog/nssrc/vm/interp.c
   branches/Cog/platforms/unix/vm/sqUnixMain.c
   branches/Cog/scripts/revertUnchangedPlugins
   branches/Cog/src/plugins/IA32ABI/IA32ABI.c
Log:
OSCogVM source as per VMMaker.oscog-eem.79.  Use methodReturnValue: where
appropriate in Alien plugins for newspeak-style VMMirror argumentCount
shenanigans.  Clean up the Newspeak primitive table a little.


Modified: branches/Cog/nssrc/plugins/IA32ABI/IA32ABI.c
===================================================================
--- branches/Cog/nssrc/plugins/IA32ABI/IA32ABI.c	2011-06-19 22:10:00 UTC (rev 2436)
+++ branches/Cog/nssrc/plugins/IA32ABI/IA32ABI.c	2011-06-19 22:44:12 UTC (rev 2437)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.68 uuid: 1fd12e1a-c0b3-4d41-91bb-26f029240bfe
+	VMPluginCodeGenerator * VMMaker.oscog-eem.78 uuid: 412444c6-36dc-48be-b5cd-a6ebc4ade0bb
    from
-	NewsqueakIA32ABIPlugin VMMaker.oscog-eem.68 uuid: 1fd12e1a-c0b3-4d41-91bb-26f029240bfe
+	NewsqueakIA32ABIPlugin * VMMaker.oscog-eem.78 uuid: 412444c6-36dc-48be-b5cd-a6ebc4ade0bb
  */
-static char __buildInfo[] = "NewsqueakIA32ABIPlugin VMMaker.oscog-eem.68 uuid: 1fd12e1a-c0b3-4d41-91bb-26f029240bfe " __DATE__ ;
+static char __buildInfo[] = "NewsqueakIA32ABIPlugin * VMMaker.oscog-eem.78 uuid: 412444c6-36dc-48be-b5cd-a6ebc4ade0bb " __DATE__ ;
 
 
 
@@ -134,9 +134,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"IA32ABI VMMaker.oscog-eem.68 (i)"
+	"IA32ABI * VMMaker.oscog-eem.78 (i)"
 #else
-	"IA32ABI VMMaker.oscog-eem.68 (e)"
+	"IA32ABI * VMMaker.oscog-eem.78 (e)"
 #endif
 ;
 
@@ -215,7 +215,7 @@
 	rcvr = interpreterProxy->stackValue(0);
 	value = longAt((rcvr + BaseHeaderSize) + BytesPerOop);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(1, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -242,7 +242,7 @@
 		return interpreterProxy->primitiveFailFor(PrimErrNoModification);
 	}
 	longAtput((rcvr + BaseHeaderSize) + BytesPerOop, value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -388,7 +388,7 @@
 	ptr = interpreterProxy->firstIndexableField(alien);
 	ptr[0] = (0 - byteSize);
 	ptr[1] = (((long) mem));
-	interpreterProxy->popthenPush(1, alien);
+	interpreterProxy->methodReturnValue(alien);
 }
 
 
@@ -570,7 +570,7 @@
 	if (addr == 0) {
 		return interpreterProxy->primitiveFailFor(PrimErrNoCMemory);
 	}
-	interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(addr));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(addr));
 }
 
 
@@ -619,7 +619,7 @@
     sqInt addr;
     sqInt byteOffset;
     sqInt dataSize;
-    double  floatValue;
+    double floatValue;
     sqInt rcvr;
     sqInt valueOop;
 
@@ -647,7 +647,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	((int*)addr)[0] = ((int*)(&floatValue))[0];
 	((int*)addr)[1] = ((int*)(&floatValue))[1];
-	interpreterProxy->popthenPush(3, valueOop);
+	interpreterProxy->methodReturnValue(valueOop);
 }
 
 EXPORT(sqInt)
@@ -700,7 +700,7 @@
     sqInt addr;
     sqInt byteOffset;
     sqInt dataSize;
-    float  floatValue;
+    float floatValue;
     sqInt rcvr;
     sqInt valueOop;
 
@@ -727,7 +727,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	((long *)addr)[0] = ((long *)(&floatValue))[0];
-	interpreterProxy->popthenPush(3, valueOop);
+	interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -763,7 +763,7 @@
     sqInt address;
 
 	{ extern int inIOProcessEvents; address = (sqInt)&inIOProcessEvents; }
-	interpreterProxy->popthenPush(1, interpreterProxy->positive32BitIntegerFor(address));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(address));
 }
 
 
@@ -795,7 +795,7 @@
 	 || (address == 0)) {
 		return interpreterProxy->primitiveFailFor(PrimErrNotFound);
 	}
-	interpreterProxy->popthenPush((interpreterProxy->methodArgumentCount()) + 1, interpreterProxy->positive32BitIntegerFor(address));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(address));
 }
 
 
@@ -818,7 +818,7 @@
 	if (libraryHandle == 0) {
 		return interpreterProxy->primitiveFailFor(PrimErrNotFound);
 	}
-	interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(libraryHandle));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(libraryHandle));
 }
 
 
@@ -841,7 +841,7 @@
 	if (addr == 0) {
 		return interpreterProxy->primitiveFailFor(PrimErrNoCMemory);
 	}
-	interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(addr));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(addr));
 }
 
 
@@ -885,7 +885,7 @@
 	if (((mac = interpreterProxy->methodArgumentCount())) == 3) {
 		isMostRecent = vmCallbackContext == (getMostRecentCallbackContext());
 		if (!(isMostRecent)) {
-			interpreterProxy->popthenPush((interpreterProxy->methodArgumentCount()) + 1, interpreterProxy->trueObject());
+			interpreterProxy->methodReturnValue(interpreterProxy->trueObject());
 			return null;
 		}
 		if (!((interpreterProxy->fetchClassOf(interpreterProxy->stackValue(2))) == (interpreterProxy->classSemaphore()))) {
@@ -933,7 +933,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = byteAt(addr);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -973,7 +973,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	byteAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1007,7 +1007,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = longAt(addr);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1045,7 +1045,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	longAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1083,7 +1083,7 @@
 	signedlonglongvaluePtr = ((long long*) addr);
 	signedlonglongvalue = *signedlonglongvaluePtr;
 	valueOop = interpreterProxy->signed64BitIntegerFor(signedlonglongvalue);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1126,7 +1126,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	signedlonglongvaluePtr = ((long long*) addr);
 	*signedlonglongvaluePtr = signedlonglongvalue;
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1160,7 +1160,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = shortAt(addr);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1200,7 +1200,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	shortAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1220,7 +1220,7 @@
 	rcvr = interpreterProxy->stackValue(0);
 	value = longAt(rcvr + BaseHeaderSize);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(1, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1247,7 +1247,7 @@
 		return interpreterProxy->primitiveFailFor(PrimErrNoModification);
 	}
 	longAtput(rcvr + BaseHeaderSize, value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1292,7 +1292,7 @@
 			index += 1;
 		}
 	}
-	return interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(index));
+	return interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(index));
 }
 
 
@@ -1325,7 +1325,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	ptr = ((char *) (longAt(addr)));
-	return interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(strlen(ptr)));
+	return interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(strlen(ptr)));
 }
 
 
@@ -1340,7 +1340,7 @@
     sqInt address;
 
 	address = (sqInt)thunkEntry;
-	interpreterProxy->popthenPush(1, interpreterProxy->positive32BitIntegerFor(address));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(address));
 }
 
 
@@ -1374,7 +1374,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = byteAt(addr);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1413,7 +1413,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	byteAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1447,7 +1447,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = longAt(addr);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1485,7 +1485,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	longAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1523,7 +1523,7 @@
 	unsignedlonglongvaluePtr = ((unsigned long long*) addr);
 	unsignedlonglongvalue = *unsignedlonglongvaluePtr;
 	valueOop = interpreterProxy->positive64BitIntegerFor(unsignedlonglongvalue);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1567,7 +1567,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	unsignedlonglongvaluePtr = ((unsigned long long*) addr);
 	*unsignedlonglongvaluePtr = unsignedlonglongvalue;
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1601,7 +1601,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = shortAt(addr);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1640,7 +1640,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	shortAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1660,12 +1660,14 @@
 {
     sqInt array;
     sqInt errCode;
+    sqInt mac;
     sqInt result;
 
 	array = interpreterProxy->stackValue(0);
 	if (!(interpreterProxy->isArray(array))) {
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
+	mac = interpreterProxy->methodArgumentCount();
 	errCode = callIA32DoubleReturn(interpreterProxy->firstIndexableField(array),	/* arg vec */
 													interpreterProxy->stSizeOf(array)			/* nargs */,
 													2											/* funcOffset*/,
@@ -1674,7 +1676,7 @@
 		return interpreterProxy->primitiveFailFor(errCode);
 	}
 	result = interpreterProxy->stackValue(1);
-	interpreterProxy->popthenPush(3, result);
+	interpreterProxy->popthenPush(mac + 1, result);
 }
 
 
@@ -1694,12 +1696,14 @@
 {
     sqInt array;
     sqInt errCode;
+    sqInt mac;
     sqInt result;
 
 	array = interpreterProxy->stackValue(0);
 	if (!(interpreterProxy->isArray(array))) {
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
+	mac = interpreterProxy->methodArgumentCount();
 	errCode = callIA32FloatReturn(interpreterProxy->firstIndexableField(array),	/* arg vec */
 												interpreterProxy->stSizeOf(array)				/* nargs */,
 												2												/* funcOffset*/,
@@ -1708,7 +1712,7 @@
 		return interpreterProxy->primitiveFailFor(errCode);
 	}
 	result = interpreterProxy->stackValue(1);
-	interpreterProxy->popthenPush(3, result);
+	interpreterProxy->popthenPush(mac + 1, result);
 }
 
 
@@ -1728,12 +1732,14 @@
 {
     sqInt array;
     sqInt errCode;
+    sqInt mac;
     sqInt result;
 
 	array = interpreterProxy->stackValue(0);
 	if (!(interpreterProxy->isArray(array))) {
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
+	mac = interpreterProxy->methodArgumentCount();
 	errCode = callIA32IntegralReturn(interpreterProxy->firstIndexableField(array),	/* arg vec */
 													interpreterProxy->stSizeOf(array)			/* nargs */,
 													2											/* funcOffset*/,
@@ -1742,7 +1748,7 @@
 		return interpreterProxy->primitiveFailFor(errCode);
 	}
 	result = interpreterProxy->stackValue(1);
-	interpreterProxy->popthenPush(3, result);
+	interpreterProxy->popthenPush(mac + 1, result);
 }
 
 

Modified: branches/Cog/nssrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nssrc/vm/gcc3x-interp.c	2011-06-19 22:10:00 UTC (rev 2436)
+++ branches/Cog/nssrc/vm/gcc3x-interp.c	2011-06-19 22:44:12 UTC (rev 2437)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.76 uuid: 3ff12599-c75e-4b1d-ae5d-3eb3fc3c9263
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b
    from
-	NewspeakInterpreter VMMaker.oscog-eem.76 uuid: 3ff12599-c75e-4b1d-ae5d-3eb3fc3c9263
+	NewspeakInterpreter VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b
  */
-static char __buildInfo[] = "NewspeakInterpreter VMMaker.oscog-eem.76 uuid: 3ff12599-c75e-4b1d-ae5d-3eb3fc3c9263 " __DATE__ ;
+static char __buildInfo[] = "NewspeakInterpreter VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -657,7 +657,6 @@
 static sqInt primitiveTruncated(void);
 static sqInt primitiveUnloadModule(void);
 static sqInt primitiveValue(void);
-static sqInt primitiveValueUninterruptably(void);
 static sqInt primitiveValueWithArgs(void);
 static sqInt primitiveVMParameter(void);
 static sqInt primitiveVMPath(void);
@@ -925,8 +924,8 @@
 	/* 35 */ (void (*)(void))0,
 	/* 36 */ (void (*)(void))0,
 	/* 37 */ (void (*)(void))0,
-	/* 38 */ (void (*)(void))0,
-	/* 39 */ (void (*)(void))0,
+	/* 38 */ primitiveAt,
+	/* 39 */ primitiveAtPut,
 	/* 40 */ primitiveAsFloat,
 	/* 41 */ primitiveFloatAdd,
 	/* 42 */ primitiveFloatSubtract,
@@ -1010,7 +1009,7 @@
 	/* 120 */ primitiveCalloutToFFI,
 	/* 121 */ primitiveImageName,
 	/* 122 */ primitiveNoop,
-	/* 123 */ primitiveValueUninterruptably,
+	/* 123 */ (void (*)(void))0,
 	/* 124 */ primitiveLowSpaceSemaphore,
 	/* 125 */ primitiveSignalAtBytesLeft,
 	/* 126 */ primitiveDeferDisplayUpdates,
@@ -1466,7 +1465,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Newspeak Virtual Machine NewspeakInterpreter_VMMaker.oscog-eem.76";
+const char *interpreterVersion = "Newspeak Virtual Machine NewspeakInterpreter_VMMaker.oscog-eem.79";
 volatile int sendTrace;
 
 
@@ -26406,18 +26405,7 @@
 	}
 }
 
-
-/*	The only purpose of this primitive is to indicate that the new EH
-	mechanisms are supported.
- */
-
 static sqInt
-primitiveValueUninterruptably(void)
-{
-	return primitiveValue();
-}
-
-static sqInt
 primitiveValueWithArgs(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt argumentArray;
@@ -28363,7 +28351,8 @@
 	if (heapSize < minimumMemory) {
 		insufficientMemorySpecifiedError();
 	}
-	memory = (usqInt)sqAllocateMemory(minimumMemory, heapSize);
+	/* begin allocateMemory:minimum:imageFile:headerSize: */
+	memory = ((char *) (allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, f, headerSize)));
 	if (memory == null) {
 		insufficientMemoryAvailableError();
 	}

Modified: branches/Cog/nssrc/vm/interp.c
===================================================================
--- branches/Cog/nssrc/vm/interp.c	2011-06-19 22:10:00 UTC (rev 2436)
+++ branches/Cog/nssrc/vm/interp.c	2011-06-19 22:44:12 UTC (rev 2437)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.76 uuid: 3ff12599-c75e-4b1d-ae5d-3eb3fc3c9263
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b
    from
-	NewspeakInterpreter VMMaker.oscog-eem.76 uuid: 3ff12599-c75e-4b1d-ae5d-3eb3fc3c9263
+	NewspeakInterpreter VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b
  */
-static char __buildInfo[] = "NewspeakInterpreter VMMaker.oscog-eem.76 uuid: 3ff12599-c75e-4b1d-ae5d-3eb3fc3c9263 " __DATE__ ;
+static char __buildInfo[] = "NewspeakInterpreter VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -654,7 +654,6 @@
 static sqInt primitiveTruncated(void);
 static sqInt primitiveUnloadModule(void);
 static sqInt primitiveValue(void);
-static sqInt primitiveValueUninterruptably(void);
 static sqInt primitiveValueWithArgs(void);
 static sqInt primitiveVMParameter(void);
 static sqInt primitiveVMPath(void);
@@ -922,8 +921,8 @@
 	/* 35 */ (void (*)(void))0,
 	/* 36 */ (void (*)(void))0,
 	/* 37 */ (void (*)(void))0,
-	/* 38 */ (void (*)(void))0,
-	/* 39 */ (void (*)(void))0,
+	/* 38 */ primitiveAt,
+	/* 39 */ primitiveAtPut,
 	/* 40 */ primitiveAsFloat,
 	/* 41 */ primitiveFloatAdd,
 	/* 42 */ primitiveFloatSubtract,
@@ -1007,7 +1006,7 @@
 	/* 120 */ primitiveCalloutToFFI,
 	/* 121 */ primitiveImageName,
 	/* 122 */ primitiveNoop,
-	/* 123 */ primitiveValueUninterruptably,
+	/* 123 */ (void (*)(void))0,
 	/* 124 */ primitiveLowSpaceSemaphore,
 	/* 125 */ primitiveSignalAtBytesLeft,
 	/* 126 */ primitiveDeferDisplayUpdates,
@@ -1463,7 +1462,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Newspeak Virtual Machine NewspeakInterpreter_VMMaker.oscog-eem.76";
+const char *interpreterVersion = "Newspeak Virtual Machine NewspeakInterpreter_VMMaker.oscog-eem.79";
 volatile int sendTrace;
 
 
@@ -26402,18 +26401,7 @@
 	}
 }
 
-
-/*	The only purpose of this primitive is to indicate that the new EH
-	mechanisms are supported.
- */
-
 static sqInt
-primitiveValueUninterruptably(void)
-{
-	return primitiveValue();
-}
-
-static sqInt
 primitiveValueWithArgs(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt argumentArray;
@@ -28359,7 +28347,8 @@
 	if (heapSize < minimumMemory) {
 		insufficientMemorySpecifiedError();
 	}
-	memory = (usqInt)sqAllocateMemory(minimumMemory, heapSize);
+	/* begin allocateMemory:minimum:imageFile:headerSize: */
+	memory = ((char *) (allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, f, headerSize)));
 	if (memory == null) {
 		insufficientMemoryAvailableError();
 	}

Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixMain.c	2011-06-19 22:10:00 UTC (rev 2436)
+++ branches/Cog/platforms/unix/vm/sqUnixMain.c	2011-06-19 22:44:12 UTC (rev 2437)
@@ -153,7 +153,8 @@
   forceInterruptCheck();
 }
 
-static void initTimers(void)
+void
+ioInitTime(void)
 {
   /* set up the micro/millisecond clock */
   gettimeofday(&startUpTime, 0);
@@ -1382,7 +1383,7 @@
 #endif
 #if 1
   printf("Deprecated:\n");
-# if !(STACKVM || COGVM)
+# if !STACKVM
   printf("  -jit                  enable the dynamic compiler (if available)\n");
 # endif
   printf("  -notimer              disable interval timer for low-res clock \n");
@@ -1688,12 +1689,8 @@
   printf("documentName: %s\n", documentName);
 #endif
 
-#if STACKVM || COGVM
   ioInitTime();
   ioInitThreads();
-#else
-  initTimers();
-#endif
   aioInit();
   dpy->winInit();
   imgInit();
@@ -1702,7 +1699,7 @@
    */
   dpy->winOpen(runAsSingleInstance ? squeakArgCnt : 0, squeakArgVec);
 
-#if defined(HAVE_LIBDL) && !(STACKVM || COGVM)
+#if defined(HAVE_LIBDL) && !STACKVM
   if (useJit)
     {
       /* first try to find an internal dynamic compiler... */
@@ -1725,7 +1722,7 @@
 	printf("could not find j_interpret\n");
       exit(1);
     }
-#endif /* defined(HAVE_LIBDL) && !(STACKVM || COGVM) */
+#endif /* defined(HAVE_LIBDL) && !STACKVM */
 
   if (installHandlers) {
 	struct sigaction sigusr1_handler_action, sigsegv_handler_action;

Modified: branches/Cog/scripts/revertUnchangedPlugins
===================================================================
--- branches/Cog/scripts/revertUnchangedPlugins	2011-06-19 22:10:00 UTC (rev 2436)
+++ branches/Cog/scripts/revertUnchangedPlugins	2011-06-19 22:44:12 UTC (rev 2437)
@@ -5,7 +5,12 @@
 #IFS=<tab><nl>
 IFS='	
 '
-for d in src/plugins/[A-Z]*
+if [ $# = 0 ]; then
+PD=src/plugins
+else
+PD=$1
+fi
+for d in $PD/[A-Z]*
 do
 	test -d "$d" || continue
 	find "$d" -name .svn -prune -o \( -type f -a -name '*.[ch]' \) -exec \

Modified: branches/Cog/src/plugins/IA32ABI/IA32ABI.c
===================================================================
--- branches/Cog/src/plugins/IA32ABI/IA32ABI.c	2011-06-19 22:10:00 UTC (rev 2436)
+++ branches/Cog/src/plugins/IA32ABI/IA32ABI.c	2011-06-19 22:44:12 UTC (rev 2437)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.69 uuid: fd9c171e-3731-4093-912d-ad8fefb4800c
+	VMPluginCodeGenerator VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b
    from
-	IA32ABIPlugin VMMaker.oscog-eem.69 uuid: fd9c171e-3731-4093-912d-ad8fefb4800c
+	IA32ABIPlugin VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b
  */
-static char __buildInfo[] = "IA32ABIPlugin VMMaker.oscog-eem.69 uuid: fd9c171e-3731-4093-912d-ad8fefb4800c " __DATE__ ;
+static char __buildInfo[] = "IA32ABIPlugin VMMaker.oscog-eem.79 uuid: d1cc45e3-9cc0-4399-a644-2bacab32b83b " __DATE__ ;
 
 
 
@@ -63,7 +63,7 @@
 #define PrimErrNoMemory 9
 #define PrimErrNotFound 11
 #define PrimErrUnsupported 7
-#define STACKVM 1
+#define STACKVM 0
 
 
 /*** Function Prototypes ***/
@@ -132,9 +132,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"IA32ABI VMMaker.oscog-eem.69 (i)"
+	"IA32ABI VMMaker.oscog-eem.79 (i)"
 #else
-	"IA32ABI VMMaker.oscog-eem.69 (e)"
+	"IA32ABI VMMaker.oscog-eem.79 (e)"
 #endif
 ;
 
@@ -213,7 +213,7 @@
 	rcvr = interpreterProxy->stackValue(0);
 	value = longAt((rcvr + BaseHeaderSize) + BytesPerOop);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(1, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -237,7 +237,7 @@
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
 	longAtput((rcvr + BaseHeaderSize) + BytesPerOop, value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -380,7 +380,7 @@
 	ptr = interpreterProxy->firstIndexableField(alien);
 	ptr[0] = (0 - byteSize);
 	ptr[1] = (((long) mem));
-	interpreterProxy->popthenPush(1, alien);
+	interpreterProxy->methodReturnValue(alien);
 }
 
 
@@ -562,7 +562,7 @@
 	if (addr == 0) {
 		return interpreterProxy->primitiveFailFor(PrimErrNoCMemory);
 	}
-	interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(addr));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(addr));
 }
 
 
@@ -611,7 +611,7 @@
     sqInt addr;
     sqInt byteOffset;
     sqInt dataSize;
-    double  floatValue;
+    double floatValue;
     sqInt rcvr;
     sqInt valueOop;
 
@@ -636,7 +636,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	((int*)addr)[0] = ((int*)(&floatValue))[0];
 	((int*)addr)[1] = ((int*)(&floatValue))[1];
-	interpreterProxy->popthenPush(3, valueOop);
+	interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -683,7 +683,7 @@
     sqInt addr;
     sqInt byteOffset;
     sqInt dataSize;
-    float  floatValue;
+    float floatValue;
     sqInt rcvr;
     sqInt valueOop;
 
@@ -707,7 +707,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	((long *)addr)[0] = ((long *)(&floatValue))[0];
-	interpreterProxy->popthenPush(3, valueOop);
+	interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -743,7 +743,7 @@
     sqInt address;
 
 	{ extern int inIOProcessEvents; address = (sqInt)&inIOProcessEvents; }
-	interpreterProxy->popthenPush(1, interpreterProxy->positive32BitIntegerFor(address));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(address));
 }
 
 
@@ -775,7 +775,7 @@
 	 || (address == 0)) {
 		return interpreterProxy->primitiveFailFor(PrimErrNotFound);
 	}
-	interpreterProxy->popthenPush((interpreterProxy->methodArgumentCount()) + 1, interpreterProxy->positive32BitIntegerFor(address));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(address));
 }
 
 
@@ -798,7 +798,7 @@
 	if (libraryHandle == 0) {
 		return interpreterProxy->primitiveFailFor(PrimErrNotFound);
 	}
-	interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(libraryHandle));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(libraryHandle));
 }
 
 
@@ -821,7 +821,7 @@
 	if (addr == 0) {
 		return interpreterProxy->primitiveFailFor(PrimErrNoCMemory);
 	}
-	interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(addr));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(addr));
 }
 
 
@@ -865,7 +865,7 @@
 	if (((mac = interpreterProxy->methodArgumentCount())) == 3) {
 		isMostRecent = vmCallbackContext == (getMostRecentCallbackContext());
 		if (!(isMostRecent)) {
-			interpreterProxy->popthenPush((interpreterProxy->methodArgumentCount()) + 1, interpreterProxy->trueObject());
+			interpreterProxy->methodReturnValue(interpreterProxy->trueObject());
 			return null;
 		}
 		if (!((interpreterProxy->fetchClassOf(interpreterProxy->stackValue(2))) == (interpreterProxy->classSemaphore()))) {
@@ -913,7 +913,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = byteAt(addr);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -950,7 +950,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	byteAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -984,7 +984,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = longAt(addr);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1019,7 +1019,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	longAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1057,7 +1057,7 @@
 	signedlonglongvaluePtr = ((long long*) addr);
 	signedlonglongvalue = *signedlonglongvaluePtr;
 	valueOop = interpreterProxy->signed64BitIntegerFor(signedlonglongvalue);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1097,7 +1097,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	signedlonglongvaluePtr = ((long long*) addr);
 	*signedlonglongvaluePtr = signedlonglongvalue;
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1131,7 +1131,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = shortAt(addr);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1168,7 +1168,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	shortAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1188,7 +1188,7 @@
 	rcvr = interpreterProxy->stackValue(0);
 	value = longAt(rcvr + BaseHeaderSize);
 	valueOop = interpreterProxy->signed32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(1, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1212,7 +1212,7 @@
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
 	longAtput(rcvr + BaseHeaderSize, value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1257,7 +1257,7 @@
 			index += 1;
 		}
 	}
-	return interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(index));
+	return interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(index));
 }
 
 
@@ -1290,7 +1290,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	ptr = ((char *) (longAt(addr)));
-	return interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(strlen(ptr)));
+	return interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(strlen(ptr)));
 }
 
 
@@ -1305,7 +1305,7 @@
     sqInt address;
 
 	address = (sqInt)thunkEntry;
-	interpreterProxy->popthenPush(1, interpreterProxy->positive32BitIntegerFor(address));
+	interpreterProxy->methodReturnValue(interpreterProxy->positive32BitIntegerFor(address));
 }
 
 
@@ -1339,7 +1339,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = byteAt(addr);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1375,7 +1375,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	byteAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1409,7 +1409,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = longAt(addr);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1444,7 +1444,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	longAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1482,7 +1482,7 @@
 	unsignedlonglongvaluePtr = ((unsigned long long*) addr);
 	unsignedlonglongvalue = *unsignedlonglongvaluePtr;
 	valueOop = interpreterProxy->positive64BitIntegerFor(unsignedlonglongvalue);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1523,7 +1523,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	unsignedlonglongvaluePtr = ((unsigned long long*) addr);
 	*unsignedlonglongvaluePtr = unsignedlonglongvalue;
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1557,7 +1557,7 @@
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	value = shortAt(addr);
 	valueOop = interpreterProxy->positive32BitIntegerFor(value);
-	return interpreterProxy->popthenPush(2, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1593,7 +1593,7 @@
 	? (rcvr + BaseHeaderSize) + BytesPerOop
 	: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;
 	shortAtput(addr, value);
-	return interpreterProxy->popthenPush(3, valueOop);
+	return interpreterProxy->methodReturnValue(valueOop);
 }
 
 
@@ -1613,12 +1613,14 @@
 {
     sqInt array;
     sqInt errCode;
+    sqInt mac;
     sqInt result;
 
 	array = interpreterProxy->stackValue(0);
 	if (!(interpreterProxy->isArray(array))) {
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
+	mac = interpreterProxy->methodArgumentCount();
 	errCode = callIA32DoubleReturn(interpreterProxy->firstIndexableField(array),	/* arg vec */
 													interpreterProxy->stSizeOf(array)			/* nargs */,
 													2											/* funcOffset*/,
@@ -1627,7 +1629,7 @@
 		return interpreterProxy->primitiveFailFor(errCode);
 	}
 	result = interpreterProxy->stackValue(1);
-	interpreterProxy->popthenPush(3, result);
+	interpreterProxy->popthenPush(mac + 1, result);
 }
 
 
@@ -1647,12 +1649,14 @@
 {
     sqInt array;
     sqInt errCode;
+    sqInt mac;
     sqInt result;
 
 	array = interpreterProxy->stackValue(0);
 	if (!(interpreterProxy->isArray(array))) {
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
+	mac = interpreterProxy->methodArgumentCount();
 	errCode = callIA32FloatReturn(interpreterProxy->firstIndexableField(array),	/* arg vec */
 												interpreterProxy->stSizeOf(array)				/* nargs */,
 												2												/* funcOffset*/,
@@ -1661,7 +1665,7 @@
 		return interpreterProxy->primitiveFailFor(errCode);
 	}
 	result = interpreterProxy->stackValue(1);
-	interpreterProxy->popthenPush(3, result);
+	interpreterProxy->popthenPush(mac + 1, result);
 }
 
 
@@ -1681,12 +1685,14 @@
 {
     sqInt array;
     sqInt errCode;
+    sqInt mac;
     sqInt result;
 
 	array = interpreterProxy->stackValue(0);
 	if (!(interpreterProxy->isArray(array))) {
 		return interpreterProxy->primitiveFailFor(PrimErrBadArgument);
 	}
+	mac = interpreterProxy->methodArgumentCount();
 	errCode = callIA32IntegralReturn(interpreterProxy->firstIndexableField(array),	/* arg vec */
 													interpreterProxy->stSizeOf(array)			/* nargs */,
 													2											/* funcOffset*/,
@@ -1695,7 +1701,7 @@
 		return interpreterProxy->primitiveFailFor(errCode);
 	}
 	result = interpreterProxy->stackValue(1);
-	interpreterProxy->popthenPush(3, result);
+	interpreterProxy->popthenPush(mac + 1, result);
 }
 
 



More information about the Vm-dev mailing list