[Vm-dev] [commit] r2450 - Newspeak CogVM source as per
VMMaker.oscog-eem.96. Fix explicit outer in Cogit.
commits at squeakvm.org
commits at squeakvm.org
Thu Jul 7 23:58:25 UTC 2011
Author: eliot
Date: 2011-07-07 16:58:25 -0700 (Thu, 07 Jul 2011)
New Revision: 2450
Modified:
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/platforms/win32/vm/sqWin32Alloc.c
branches/Cog/platforms/win32/vm/sqWin32Args.c
Log:
Newspeak CogVM source as per VMMaker.oscog-eem.96. Fix explicit outer in Cogit.
Fix command-line processing on win32 so -breaksel:selec isn't mangled to elec.
Fix test of return value of VirtualAlloc on win32.
Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/nscogsrc/vm/cogit.c 2011-07-07 23:58:25 UTC (rev 2450)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGenerator VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
from
- SimpleStackBasedCogit VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ SimpleStackBasedCogit VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
*/
-static char __buildInfo[] = "SimpleStackBasedCogit VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00 " __DATE__ ;
+static char __buildInfo[] = "SimpleStackBasedCogit VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -1121,7 +1121,7 @@
{ duplicateTopBytecode, (sqInt (*)(unsigned char,...))0, 1, 0, 1, needsFrameNever, 0, 0, 0, 0, 0, 0, 0, 0 },
{ genPushActiveContextBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ genPushNewArrayBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { genPushExplicitOuterSendReceiverBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 },
+ { genPushExplicitOuterSendReceiverBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0 },
{ genPushRemoteTempLongBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ genStoreRemoteTempLongBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ genStoreAndPopRemoteTempLongBytecode, (sqInt (*)(unsigned char,...))0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
@@ -9908,7 +9908,7 @@
assert((levelOop & 1));
assert(needsFrame);
/* begin MoveCq:R: */
- genoperandoperand(MoveCqR, (levelOop >> 1), ClassReg);
+ genoperandoperand(MoveCqR, (levelOop >> 1), SendNumArgsReg);
CallRT(ceExplicitReceiverTrampoline);
/* begin PushR: */
genoperand(PushR, ReceiverResultReg);
Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/nscogsrc/vm/cogit.h 2011-07-07 23:58:25 UTC (rev 2450)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGenerator VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
*/
Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/nscogsrc/vm/cogmethod.h 2011-07-07 23:58:25 UTC (rev 2450)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGenerator VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
*/
typedef struct {
Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2011-07-07 23:58:25 UTC (rev 2450)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGeneratorGlobalStructure * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
from
- CoInterpreter VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -1161,9 +1161,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;
@@ -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.92";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_*_VMMaker.oscog-eem.96";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
volatile int sendTrace;
@@ -40608,9 +40608,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)
@@ -40657,6 +40658,7 @@
char *sp9;
sqInt table;
+ assertCStackWellAligned();
if (recordPrimTrace()) {
/* begin fastLogPrim: */
GIV(primTraceLog)[GIV(primTraceLogIndex)] = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorInvokeCallback << ShiftForWord)));
@@ -40866,6 +40868,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)
@@ -40904,6 +40910,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/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2011-07-07 23:58:25 UTC (rev 2450)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGeneratorGlobalStructure * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
*/
Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-07-07 23:58:25 UTC (rev 2450)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CCodeGeneratorGlobalStructure * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
from
- CoInterpreter VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00
+ CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.92 uuid: 8e895f7e-f712-4117-8e8a-cbc8ebf37b00 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter * VMMaker.oscog-eem.96 uuid: b9686449-0418-4b93-b40f-40049e108776 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -1164,9 +1164,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;
@@ -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.92";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_*_VMMaker.oscog-eem.96";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
volatile int sendTrace;
@@ -40612,9 +40612,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)
@@ -40661,6 +40662,7 @@
char *sp9;
sqInt table;
+ assertCStackWellAligned();
if (recordPrimTrace()) {
/* begin fastLogPrim: */
GIV(primTraceLog)[GIV(primTraceLogIndex)] = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorInvokeCallback << ShiftForWord)));
@@ -40870,6 +40872,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)
@@ -40908,6 +40914,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/platforms/win32/vm/sqWin32Alloc.c
===================================================================
--- branches/Cog/platforms/win32/vm/sqWin32Alloc.c 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/platforms/win32/vm/sqWin32Alloc.c 2011-07-07 23:58:25 UTC (rev 2450)
@@ -193,7 +193,7 @@
{
DWORD previous;
- if (VirtualProtect(startAddr,
+ if (!VirtualProtect(startAddr,
endAddr - startAddr + 1,
PAGE_EXECUTE_READWRITE,
&previous))
@@ -205,7 +205,7 @@
{
DWORD previous;
- if (VirtualProtect(startAddr,
+ if (!VirtualProtect(startAddr,
endAddr - startAddr + 1,
PAGE_READWRITE,
&previous))
Modified: branches/Cog/platforms/win32/vm/sqWin32Args.c
===================================================================
--- branches/Cog/platforms/win32/vm/sqWin32Args.c 2011-07-07 19:04:04 UTC (rev 2449)
+++ branches/Cog/platforms/win32/vm/sqWin32Args.c 2011-07-07 23:58:25 UTC (rev 2450)
@@ -133,7 +133,18 @@
return string; /* done */
string += arglen;
- if(*string) *(string++) = 0;
+ /* can't just bash the string; if we have -breaksel:at:put: this would
+ * truncate breaksel to t:put:.
+ */
+ if (*string)
+ if (*string == ' ')
+ *(string++) = 0;
+ else {
+ char save = *string;
+ *string = 0;
+ vmOptions[numOptionsVM - 1] = strdup(vmOptions[numOptionsVM - 1]);
+ *string = save;
+ }
while(*string && *string == ' ') string++; /* skip blanks */
More information about the Vm-dev
mailing list