[Vm-dev] [commit][3231] CogVM source as per VMMaker.oscog-eem.1023
commits at squeakvm.org
commits at squeakvm.org
Sun Jan 18 01:07:10 UTC 2015
Revision: 3231
Author: eliot
Date: 2015-01-17 17:07:07 -0800 (Sat, 17 Jan 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1023
Spur:
Rename and correct ensureSemaphoreForwardedThroughContext: to
ensureSemaphoreUnforwardedThroughContext:, its intended function.
Make shouldRemapObj: filter-out objects already in newSpace
since mapStackPages, via mapInterpreterOops, can visit objects
twice in a scavenge, GC, compact sequence.
General:
Speed up assert engines by using addressIsInPage: instead of stackPageFor:.
Modified Paths:
--------------
branches/Cog/nscogsrc/vm/cointerp.c
branches/Cog/nscogsrc/vm/cointerp.h
branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
branches/Cog/nsspursrc/vm/cointerp.c
branches/Cog/nsspursrc/vm/cointerp.h
branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
branches/Cog/nsspurstacksrc/vm/interp.c
branches/Cog/sistasrc/vm/cointerp.c
branches/Cog/sistasrc/vm/cointerp.h
branches/Cog/sistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cointerp.c
branches/Cog/spursrc/vm/cointerp.h
branches/Cog/spursrc/vm/gcc3x-cointerp.c
branches/Cog/spurstack64src/vm/gcc3x-interp.c
branches/Cog/spurstack64src/vm/interp.c
branches/Cog/spurstacksrc/vm/gcc3x-interp.c
branches/Cog/spurstacksrc/vm/interp.c
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/stacksrc/vm/gcc3x-interp.c
branches/Cog/stacksrc/vm/interp.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2015-01-18 01:07:07 UTC (rev 3231)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
from
- CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2101,7 +2101,7 @@
/* 575 */ (void (*)(void))0,
0 };
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1022";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1023";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -4835,7 +4835,6 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- null;
goto l300;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
@@ -4853,7 +4852,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- null;
+ /* return self */
l300: /* end baseFrameReturn */;
goto l299;
}
@@ -13472,10 +13471,9 @@
sqInt methodField1;
sqInt theIP;
- assertl(GIV(stackPage) == (stackPageFor(lifp)), ln);
assertl(GIV(stackPage) == (mostRecentlyUsedPage()), ln);
+ assertl(addressIsInPage(GIV(stackPage), lifp), ln);
assert(deferStackLimitSmashAroundwith(assertValidStackLimits, ln));
- assertl(lifp < ((GIV(stackPage)->baseAddress)), ln);
assertl(lisp < lifp, ln);
assertl(lifp > lisp, ln);
assertl(lisp >= (((GIV(stackPage)->realStackLimit)) - (stackLimitOffset())), ln);
@@ -20379,7 +20377,7 @@
null;
return 0;
}
- /* begin ensureSemaphoreForwardedThroughContext: */
+ /* begin ensureSemaphoreUnforwardedThroughContext: */
return resumepreemptedYieldingIffrom(removeFirstLinkOfList(aSemaphore), GIV(preemptionYields), CSSignal);
}
@@ -22723,12 +22721,10 @@
ok = 0;
}
if (asserta(!(isFree(page)))) {
- if (!(asserta((stackPageFor((page->baseFP))) == page))) {
+ if (!(asserta((addressIsInPage(page, (page->baseFP)))
+ && (addressIsInPage(page, (page->headSP)))))) {
ok = 0;
}
- if (!(asserta((stackPageFor((page->headSP))) == page))) {
- ok = 0;
- }
}
else {
ok = 0;
Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2015-01-18 01:07:07 UTC (rev 3231)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2015-01-18 01:07:07 UTC (rev 3231)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
from
- CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2104,7 +2104,7 @@
/* 575 */ (void (*)(void))0,
0 };
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1022";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1023";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -4844,7 +4844,6 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- null;
goto l300;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
@@ -4862,7 +4861,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- null;
+ /* return self */
l300: /* end baseFrameReturn */;
goto l299;
}
@@ -13481,10 +13480,9 @@
sqInt methodField1;
sqInt theIP;
- assertl(GIV(stackPage) == (stackPageFor(lifp)), ln);
assertl(GIV(stackPage) == (mostRecentlyUsedPage()), ln);
+ assertl(addressIsInPage(GIV(stackPage), lifp), ln);
assert(deferStackLimitSmashAroundwith(assertValidStackLimits, ln));
- assertl(lifp < ((GIV(stackPage)->baseAddress)), ln);
assertl(lisp < lifp, ln);
assertl(lifp > lisp, ln);
assertl(lisp >= (((GIV(stackPage)->realStackLimit)) - (stackLimitOffset())), ln);
@@ -20388,7 +20386,7 @@
null;
return 0;
}
- /* begin ensureSemaphoreForwardedThroughContext: */
+ /* begin ensureSemaphoreUnforwardedThroughContext: */
return resumepreemptedYieldingIffrom(removeFirstLinkOfList(aSemaphore), GIV(preemptionYields), CSSignal);
}
@@ -22732,12 +22730,10 @@
ok = 0;
}
if (asserta(!(isFree(page)))) {
- if (!(asserta((stackPageFor((page->baseFP))) == page))) {
+ if (!(asserta((addressIsInPage(page, (page->baseFP)))
+ && (addressIsInPage(page, (page->headSP)))))) {
ok = 0;
}
- if (!(asserta((stackPageFor((page->headSP))) == page))) {
- ok = 0;
- }
}
else {
ok = 0;
Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nsspursrc/vm/cointerp.c 2015-01-18 01:07:07 UTC (rev 3231)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
from
- CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2354,7 +2354,7 @@
/*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
};
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1022";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1023";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -8860,7 +8860,7 @@
/* bytecodePrimBitShift */
{
sqInt integerArgument;
- sqLong integerReceiver;
+ usqInt integerReceiver;
sqInt shifted;
char *sp;
@@ -8920,7 +8920,7 @@
null;
goto l76;
}
- shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
+ shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
}
shifted = positive32BitIntegerFor(shifted);
/* begin pop:thenPush: */
@@ -11606,7 +11606,7 @@
/* bytecodePrimBitShift */
{
sqInt integerArgument;
- sqLong integerReceiver;
+ usqInt integerReceiver;
sqInt shifted;
char *sp;
@@ -11666,7 +11666,7 @@
null;
goto l183;
}
- shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
+ shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
}
shifted = positive32BitIntegerFor(shifted);
/* begin pop:thenPush: */
@@ -14617,10 +14617,9 @@
sqInt methodField1;
sqInt theIP;
- assertl(GIV(stackPage) == (stackPageFor(lifp)), ln);
assertl(GIV(stackPage) == (mostRecentlyUsedPage()), ln);
+ assertl(addressIsInPage(GIV(stackPage), lifp), ln);
assert(deferStackLimitSmashAroundwith(assertValidStackLimits, ln));
- assertl(lifp < ((GIV(stackPage)->baseAddress)), ln);
assertl(lisp < lifp, ln);
assertl(lifp > lisp, ln);
assertl(lisp >= (((GIV(stackPage)->realStackLimit)) - (stackLimitOffset())), ln);
@@ -18998,8 +18997,8 @@
if ((selector != 0)
&& (((selector & 3) == 0)
&& ((((longAt(selector)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(selector)))),
- isReallyYoungObject(selector)))))) {
+ || ((isReallyYoungObject(selector))
+ && (!(oopisGreaterThanOrEqualToandLessThan(selector, ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(primTraceLog)[i] = (remapObj(selector));
}
}
@@ -19009,8 +19008,8 @@
if ((selector != 0)
&& (((selector & 3) == 0)
&& ((((longAt(selector)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(selector)))),
- isReallyYoungObject(selector)))))) {
+ || ((isReallyYoungObject(selector))
+ && (!(oopisGreaterThanOrEqualToandLessThan(selector, ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(primTraceLog)[i] = (remapObj(selector));
}
}
@@ -19061,8 +19060,8 @@
oop = longAt(theSP);
if (((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))))) {
longAtput(theSP, remapObj(oop));
}
theSP += BytesPerWord;
@@ -19071,8 +19070,8 @@
? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0
: (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) {
if ((((longAt(longAt(theFP + FoxThisContext))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(longAt(theFP + FoxThisContext))))),
- isReallyYoungObject(longAt(theFP + FoxThisContext))))) {
+ || ((isReallyYoungObject(longAt(theFP + FoxThisContext)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(longAt(theFP + FoxThisContext), ((futureSpace()).start), futureSurvivorStart()))))) {
longAtput(theFP + FoxThisContext, remapObj(longAt(theFP + FoxThisContext)));
}
assert((isMarriedOrWidowedContext(frameContext(theFP)))
@@ -19081,8 +19080,8 @@
}
if (!((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()))) {
if ((((longAt(longAt(theFP + FoxMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(longAt(theFP + FoxMethod))))),
- isReallyYoungObject(longAt(theFP + FoxMethod))))) {
+ || ((isReallyYoungObject(longAt(theFP + FoxMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(longAt(theFP + FoxMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
if (theIPPtr != 0) {
theIP = longAt(theIPPtr);
if (theIP == (ceReturnToInterpreterPC())) {
@@ -19110,8 +19109,8 @@
oop = longAt(theSP);
if (((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))))) {
longAtput(theSP, remapObj(oop));
}
theSP += BytesPerWord;
@@ -19147,15 +19146,15 @@
intOrClass = GIV(traceLog)[i];
if (((intOrClass & 3) == 0)
&& ((((longAt(intOrClass)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(intOrClass)))),
- isReallyYoungObject(intOrClass))))) {
+ || ((isReallyYoungObject(intOrClass))
+ && (!(oopisGreaterThanOrEqualToandLessThan(intOrClass, ((futureSpace()).start), futureSurvivorStart())))))) {
GIV(traceLog)[i] = (remapObj(intOrClass));
}
selectorOrMethod = GIV(traceLog)[i + 1];
if (((selectorOrMethod & 3) == 0)
&& ((((longAt(selectorOrMethod)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(selectorOrMethod)))),
- isReallyYoungObject(selectorOrMethod))))) {
+ || ((isReallyYoungObject(selectorOrMethod))
+ && (!(oopisGreaterThanOrEqualToandLessThan(selectorOrMethod, ((futureSpace()).start), futureSurvivorStart())))))) {
GIV(traceLog)[i + 1] = (remapObj(selectorOrMethod));
}
}
@@ -24791,7 +24790,10 @@
static sqInt
synchronousSignal(sqInt aSemaphore)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
+ sqInt ctxt;
sqInt excessSignals;
+ sqInt proc;
+ sqInt referent;
if (isEmptyList(aSemaphore)) {
@@ -24813,14 +24815,39 @@
null;
return 0;
}
- /* begin ensureSemaphoreForwardedThroughContext: */
- if (isForwarded(longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << (shiftForWord()))))) {
+ /* begin ensureSemaphoreUnforwardedThroughContext: */
+ proc = longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << (shiftForWord())));
+ if (((longAt(proc)) & (0x3FFFFF - 8)) == 0) {
+ followForwardedObjectFieldstoDepth(aSemaphore, 1);
+ proc = longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << (shiftForWord())));
+ }
+ assert(!((isForwarded(proc))));
+ ctxt = longAt((proc + BaseHeaderSize) + (SuspendedContextIndex << (shiftForWord())));
+ if (((longAt(ctxt)) & (0x3FFFFF - 8)) == 0) {
+ /* begin followForwarded: */
+ assert(isUnambiguouslyForwarder(ctxt));
+ referent = longAt((ctxt + BaseHeaderSize) + (0 << (shiftForWord())));
+ while (((referent & 3) == 0)
+ && (((longAt(referent)) & 0x3FFFFF) == 8)) {
+ referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+ }
+ ctxt = referent;
+ /* begin storePointer:ofObject:withValue: */
+ assert(!(isForwarded(proc)));
+ if (isOldObject(proc)) {
- /* 0 = aSemaphore, 1 = aProcess. Hence references to suspendedContext will /not/ be forwarded. */
+ /* most stores into young objects */
- followForwardedObjectFieldstoDepth(aSemaphore, 1);
+ if (((ctxt & 3) == 0)
+ && ((((usqInt) ctxt)) < (((usqInt) GIV(newSpaceLimit))))) {
+ /* begin possibleRootStoreInto: */
+ if (!(((((usqInt) (longAt(proc))) >> 29) & 1) != 0)) {
+ remember(proc);
+ }
+ }
+ }
+ longAtput((proc + BaseHeaderSize) + (SuspendedContextIndex << (shiftForWord())), ctxt);
}
- assert(!((isForwarded(fetchPointerofObject(SuspendedContextIndex, fetchPointerofObject(FirstLinkIndex, aSemaphore))))));
return resumepreemptedYieldingIffrom(removeFirstLinkOfList(aSemaphore), GIV(preemptionYields), CSSignal);
}
@@ -27583,12 +27610,10 @@
ok = 0;
}
if (asserta(!(isFree(page)))) {
- if (!(asserta((stackPageFor((page->baseFP))) == page))) {
+ if (!(asserta((addressIsInPage(page, (page->baseFP)))
+ && (addressIsInPage(page, (page->headSP)))))) {
ok = 0;
}
- if (!(asserta((stackPageFor((page->headSP))) == page))) {
- ok = 0;
- }
}
else {
ok = 0;
@@ -29341,7 +29366,7 @@
primitiveBitShift(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt integerArgument;
- sqLong integerReceiver;
+ usqInt integerReceiver;
sqInt shifted;
char *sp;
@@ -29388,7 +29413,7 @@
}
return;
}
- shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
+ shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
}
shifted = positive32BitIntegerFor(shifted);
/* begin pop:thenPush: */
@@ -42045,8 +42070,8 @@
mapInterpreterOops();
/* begin mapExtraRoots */
if ((((longAt(GIV(specialObjectsOop))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(specialObjectsOop))))),
- isReallyYoungObject(GIV(specialObjectsOop))))) {
+ || ((isReallyYoungObject(GIV(specialObjectsOop)))
+ && (!(isInFutureSpace(GIV(specialObjectsOop)))))) {
GIV(specialObjectsOop) = remapObj(GIV(specialObjectsOop));
}
assert(GIV(remapBufferCount) == 0);
@@ -42055,8 +42080,8 @@
if (!(((oop & 3) != 0)
|| (((longAt(oop)) & 0x3FFFFF) == 0))) {
if ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop)))) {
+ || ((isReallyYoungObject(oop))
+ && (!(isInFutureSpace(oop))))) {
(GIV(extraRoots)[i])[0] = (remapObj(oop));
}
}
@@ -49721,14 +49746,21 @@
&& ((((longAt(objOop)) & 0x3FFFFF) == 0)
&& ((oopisLessThanOrEqualTo(addressAfter(objOop), GIV(endOfMemory)))
&& (((((chunk = longAt((objOop + BaseHeaderSize) + (0 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
- && (((bytesInObject(objOop)) < (32 * 8))
+ || (((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0)))
+ && ((!((bytesInObject(objOop)) >= (32 * 8)))
|| (((((chunk = longAt((objOop + BaseHeaderSize) + (2 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))
&& (((((chunk = longAt((objOop + BaseHeaderSize) + (3 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))
&& ((((chunk = longAt((objOop + BaseHeaderSize) + (4 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))))))));
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))))))));
}
@@ -60358,14 +60390,19 @@
/* Answer if the obj should be scavenged (or simply followed). The method is
- called shouldRemapObj: for compatibility with ObjectMemory. */
+ called shouldRemapObj: for compatibility with ObjectMemory. We test for
+ being already
+ scavenged because mapStackPages via mapInterpeeterOops may be applied
+ twice in the context of a global GC where a scavenge, followed by a
+ scan-mark-free, and
+ final compaction passes may result in scvenged fields being visited twice. */
sqInt
shouldRemapObj(sqInt objOop)
{
return (((longAt(objOop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(objOop)))),
- isReallyYoungObject(objOop)));
+ || ((isReallyYoungObject(objOop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(objOop, ((futureSpace()).start), futureSurvivorStart()))));
}
@@ -60377,8 +60414,8 @@
{
return ((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))));
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))));
}
@@ -67685,8 +67722,8 @@
mapPrimTraceLog();
/* begin mapVMRegisters */
if ((((longAt(GIV(method))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(method))))),
- isReallyYoungObject(GIV(method))))) {
+ || ((isReallyYoungObject(GIV(method)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(method), ((futureSpace()).start), futureSurvivorStart()))))) {
/* i.e. interpreter instructionPointer in method as opposed to machine code? */
@@ -67700,8 +67737,8 @@
}
if (((GIV(newMethod) & 3) == 0)
&& ((((longAt(GIV(newMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(newMethod))))),
- isReallyYoungObject(GIV(newMethod)))))) {
+ || ((isReallyYoungObject(GIV(newMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(newMethod), ((futureSpace()).start), futureSurvivorStart())))))) {
/* maybe oop due to object-as-method */
@@ -67709,18 +67746,18 @@
}
/* begin mapProfileState */
if ((((longAt(GIV(profileProcess))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileProcess))))),
- isReallyYoungObject(GIV(profileProcess))))) {
+ || ((isReallyYoungObject(GIV(profileProcess)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileProcess), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileProcess) = remapObj(GIV(profileProcess));
}
if ((((longAt(GIV(profileMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileMethod))))),
- isReallyYoungObject(GIV(profileMethod))))) {
+ || ((isReallyYoungObject(GIV(profileMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileMethod) = remapObj(GIV(profileMethod));
}
if ((((longAt(GIV(profileSemaphore))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileSemaphore))))),
- isReallyYoungObject(GIV(profileSemaphore))))) {
+ || ((isReallyYoungObject(GIV(profileSemaphore)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileSemaphore), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileSemaphore) = remapObj(GIV(profileSemaphore));
}
sqLowLevelMFence();
@@ -67730,8 +67767,8 @@
}
else {
if ((((longAt(GIV(longRunningPrimitiveCheckMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(longRunningPrimitiveCheckMethod))))),
- isReallyYoungObject(GIV(longRunningPrimitiveCheckMethod))))) {
+ || ((isReallyYoungObject(GIV(longRunningPrimitiveCheckMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(longRunningPrimitiveCheckMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(longRunningPrimitiveCheckMethod) = remapObj(GIV(longRunningPrimitiveCheckMethod));
}
}
@@ -67739,8 +67776,8 @@
}
if (!(GIV(longRunningPrimitiveCheckSemaphore) == null)) {
if ((((longAt(GIV(longRunningPrimitiveCheckSemaphore))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(longRunningPrimitiveCheckSemaphore))))),
- isReallyYoungObject(GIV(longRunningPrimitiveCheckSemaphore))))) {
+ || ((isReallyYoungObject(GIV(longRunningPrimitiveCheckSemaphore)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(longRunningPrimitiveCheckSemaphore), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(longRunningPrimitiveCheckSemaphore) = remapObj(GIV(longRunningPrimitiveCheckSemaphore));
}
}
@@ -67749,29 +67786,29 @@
oop = GIV(suspendedCallbacks)[i];
if (((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))))) {
GIV(suspendedCallbacks)[i] = (remapObj(oop));
}
oop = GIV(suspendedMethods)[i];
if ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop)))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(suspendedMethods)[i] = (remapObj(oop));
}
}
if ((GIV(tempOop) != 0)
&& (((GIV(tempOop) & 3) == 0)
&& ((((longAt(GIV(tempOop))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(tempOop))))),
- isReallyYoungObject(GIV(tempOop))))))) {
+ || ((isReallyYoungObject(GIV(tempOop)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(tempOop), ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(tempOop) = remapObj(GIV(tempOop));
}
if ((GIV(tempOop2) != 0)
&& (((GIV(tempOop2) & 3) == 0)
&& ((((longAt(GIV(tempOop2))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(tempOop2))))),
- isReallyYoungObject(GIV(tempOop2))))))) {
+ || ((isReallyYoungObject(GIV(tempOop2)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(tempOop2), ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(tempOop2) = remapObj(GIV(tempOop2));
}
}
Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nsspursrc/vm/cointerp.h 2015-01-18 01:07:07 UTC (rev 3231)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-01-18 01:07:07 UTC (rev 3231)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
from
- CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2357,7 +2357,7 @@
/*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
};
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1022";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1023";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -8869,7 +8869,7 @@
/* bytecodePrimBitShift */
{
sqInt integerArgument;
- sqLong integerReceiver;
+ usqInt integerReceiver;
sqInt shifted;
char *sp;
@@ -8929,7 +8929,7 @@
null;
goto l76;
}
- shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
+ shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
}
shifted = positive32BitIntegerFor(shifted);
/* begin pop:thenPush: */
@@ -11615,7 +11615,7 @@
/* bytecodePrimBitShift */
{
sqInt integerArgument;
- sqLong integerReceiver;
+ usqInt integerReceiver;
sqInt shifted;
char *sp;
@@ -11675,7 +11675,7 @@
null;
goto l183;
}
- shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
+ shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
}
shifted = positive32BitIntegerFor(shifted);
/* begin pop:thenPush: */
@@ -14626,10 +14626,9 @@
sqInt methodField1;
sqInt theIP;
- assertl(GIV(stackPage) == (stackPageFor(lifp)), ln);
assertl(GIV(stackPage) == (mostRecentlyUsedPage()), ln);
+ assertl(addressIsInPage(GIV(stackPage), lifp), ln);
assert(deferStackLimitSmashAroundwith(assertValidStackLimits, ln));
- assertl(lifp < ((GIV(stackPage)->baseAddress)), ln);
assertl(lisp < lifp, ln);
assertl(lifp > lisp, ln);
assertl(lisp >= (((GIV(stackPage)->realStackLimit)) - (stackLimitOffset())), ln);
@@ -19007,8 +19006,8 @@
if ((selector != 0)
&& (((selector & 3) == 0)
&& ((((longAt(selector)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(selector)))),
- isReallyYoungObject(selector)))))) {
+ || ((isReallyYoungObject(selector))
+ && (!(oopisGreaterThanOrEqualToandLessThan(selector, ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(primTraceLog)[i] = (remapObj(selector));
}
}
@@ -19018,8 +19017,8 @@
if ((selector != 0)
&& (((selector & 3) == 0)
&& ((((longAt(selector)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(selector)))),
- isReallyYoungObject(selector)))))) {
+ || ((isReallyYoungObject(selector))
+ && (!(oopisGreaterThanOrEqualToandLessThan(selector, ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(primTraceLog)[i] = (remapObj(selector));
}
}
@@ -19070,8 +19069,8 @@
oop = longAt(theSP);
if (((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))))) {
longAtput(theSP, remapObj(oop));
}
theSP += BytesPerWord;
@@ -19080,8 +19079,8 @@
? ((longAt(theFP + FoxMethod)) & MFMethodFlagHasContextFlag) != 0
: (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) {
if ((((longAt(longAt(theFP + FoxThisContext))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(longAt(theFP + FoxThisContext))))),
- isReallyYoungObject(longAt(theFP + FoxThisContext))))) {
+ || ((isReallyYoungObject(longAt(theFP + FoxThisContext)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(longAt(theFP + FoxThisContext), ((futureSpace()).start), futureSurvivorStart()))))) {
longAtput(theFP + FoxThisContext, remapObj(longAt(theFP + FoxThisContext)));
}
assert((isMarriedOrWidowedContext(frameContext(theFP)))
@@ -19090,8 +19089,8 @@
}
if (!((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()))) {
if ((((longAt(longAt(theFP + FoxMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(longAt(theFP + FoxMethod))))),
- isReallyYoungObject(longAt(theFP + FoxMethod))))) {
+ || ((isReallyYoungObject(longAt(theFP + FoxMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(longAt(theFP + FoxMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
if (theIPPtr != 0) {
theIP = longAt(theIPPtr);
if (theIP == (ceReturnToInterpreterPC())) {
@@ -19119,8 +19118,8 @@
oop = longAt(theSP);
if (((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))))) {
longAtput(theSP, remapObj(oop));
}
theSP += BytesPerWord;
@@ -19156,15 +19155,15 @@
intOrClass = GIV(traceLog)[i];
if (((intOrClass & 3) == 0)
&& ((((longAt(intOrClass)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(intOrClass)))),
- isReallyYoungObject(intOrClass))))) {
+ || ((isReallyYoungObject(intOrClass))
+ && (!(oopisGreaterThanOrEqualToandLessThan(intOrClass, ((futureSpace()).start), futureSurvivorStart())))))) {
GIV(traceLog)[i] = (remapObj(intOrClass));
}
selectorOrMethod = GIV(traceLog)[i + 1];
if (((selectorOrMethod & 3) == 0)
&& ((((longAt(selectorOrMethod)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(selectorOrMethod)))),
- isReallyYoungObject(selectorOrMethod))))) {
+ || ((isReallyYoungObject(selectorOrMethod))
+ && (!(oopisGreaterThanOrEqualToandLessThan(selectorOrMethod, ((futureSpace()).start), futureSurvivorStart())))))) {
GIV(traceLog)[i + 1] = (remapObj(selectorOrMethod));
}
}
@@ -24800,7 +24799,10 @@
static sqInt
synchronousSignal(sqInt aSemaphore)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
+ sqInt ctxt;
sqInt excessSignals;
+ sqInt proc;
+ sqInt referent;
if (isEmptyList(aSemaphore)) {
@@ -24822,14 +24824,39 @@
null;
return 0;
}
- /* begin ensureSemaphoreForwardedThroughContext: */
- if (isForwarded(longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << (shiftForWord()))))) {
+ /* begin ensureSemaphoreUnforwardedThroughContext: */
+ proc = longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << (shiftForWord())));
+ if (((longAt(proc)) & (0x3FFFFF - 8)) == 0) {
+ followForwardedObjectFieldstoDepth(aSemaphore, 1);
+ proc = longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << (shiftForWord())));
+ }
+ assert(!((isForwarded(proc))));
+ ctxt = longAt((proc + BaseHeaderSize) + (SuspendedContextIndex << (shiftForWord())));
+ if (((longAt(ctxt)) & (0x3FFFFF - 8)) == 0) {
+ /* begin followForwarded: */
+ assert(isUnambiguouslyForwarder(ctxt));
+ referent = longAt((ctxt + BaseHeaderSize) + (0 << (shiftForWord())));
+ while (((referent & 3) == 0)
+ && (((longAt(referent)) & 0x3FFFFF) == 8)) {
+ referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+ }
+ ctxt = referent;
+ /* begin storePointer:ofObject:withValue: */
+ assert(!(isForwarded(proc)));
+ if (isOldObject(proc)) {
- /* 0 = aSemaphore, 1 = aProcess. Hence references to suspendedContext will /not/ be forwarded. */
+ /* most stores into young objects */
- followForwardedObjectFieldstoDepth(aSemaphore, 1);
+ if (((ctxt & 3) == 0)
+ && ((((usqInt) ctxt)) < (((usqInt) GIV(newSpaceLimit))))) {
+ /* begin possibleRootStoreInto: */
+ if (!(((((usqInt) (longAt(proc))) >> 29) & 1) != 0)) {
+ remember(proc);
+ }
+ }
+ }
+ longAtput((proc + BaseHeaderSize) + (SuspendedContextIndex << (shiftForWord())), ctxt);
}
- assert(!((isForwarded(fetchPointerofObject(SuspendedContextIndex, fetchPointerofObject(FirstLinkIndex, aSemaphore))))));
return resumepreemptedYieldingIffrom(removeFirstLinkOfList(aSemaphore), GIV(preemptionYields), CSSignal);
}
@@ -27592,12 +27619,10 @@
ok = 0;
}
if (asserta(!(isFree(page)))) {
- if (!(asserta((stackPageFor((page->baseFP))) == page))) {
+ if (!(asserta((addressIsInPage(page, (page->baseFP)))
+ && (addressIsInPage(page, (page->headSP)))))) {
ok = 0;
}
- if (!(asserta((stackPageFor((page->headSP))) == page))) {
- ok = 0;
- }
}
else {
ok = 0;
@@ -29350,7 +29375,7 @@
primitiveBitShift(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt integerArgument;
- sqLong integerReceiver;
+ usqInt integerReceiver;
sqInt shifted;
char *sp;
@@ -29397,7 +29422,7 @@
}
return;
}
- shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
+ shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
}
shifted = positive32BitIntegerFor(shifted);
/* begin pop:thenPush: */
@@ -42054,8 +42079,8 @@
mapInterpreterOops();
/* begin mapExtraRoots */
if ((((longAt(GIV(specialObjectsOop))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(specialObjectsOop))))),
- isReallyYoungObject(GIV(specialObjectsOop))))) {
+ || ((isReallyYoungObject(GIV(specialObjectsOop)))
+ && (!(isInFutureSpace(GIV(specialObjectsOop)))))) {
GIV(specialObjectsOop) = remapObj(GIV(specialObjectsOop));
}
assert(GIV(remapBufferCount) == 0);
@@ -42064,8 +42089,8 @@
if (!(((oop & 3) != 0)
|| (((longAt(oop)) & 0x3FFFFF) == 0))) {
if ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop)))) {
+ || ((isReallyYoungObject(oop))
+ && (!(isInFutureSpace(oop))))) {
(GIV(extraRoots)[i])[0] = (remapObj(oop));
}
}
@@ -49730,14 +49755,21 @@
&& ((((longAt(objOop)) & 0x3FFFFF) == 0)
&& ((oopisLessThanOrEqualTo(addressAfter(objOop), GIV(endOfMemory)))
&& (((((chunk = longAt((objOop + BaseHeaderSize) + (0 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
- && (((bytesInObject(objOop)) < (32 * 8))
+ || (((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0)))
+ && ((!((bytesInObject(objOop)) >= (32 * 8)))
|| (((((chunk = longAt((objOop + BaseHeaderSize) + (2 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))
&& (((((chunk = longAt((objOop + BaseHeaderSize) + (3 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))
&& ((((chunk = longAt((objOop + BaseHeaderSize) + (4 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))))))));
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))))))));
}
@@ -60367,14 +60399,19 @@
/* Answer if the obj should be scavenged (or simply followed). The method is
- called shouldRemapObj: for compatibility with ObjectMemory. */
+ called shouldRemapObj: for compatibility with ObjectMemory. We test for
+ being already
+ scavenged because mapStackPages via mapInterpeeterOops may be applied
+ twice in the context of a global GC where a scavenge, followed by a
+ scan-mark-free, and
+ final compaction passes may result in scvenged fields being visited twice. */
sqInt
shouldRemapObj(sqInt objOop)
{
return (((longAt(objOop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(objOop)))),
- isReallyYoungObject(objOop)));
+ || ((isReallyYoungObject(objOop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(objOop, ((futureSpace()).start), futureSurvivorStart()))));
}
@@ -60386,8 +60423,8 @@
{
return ((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))));
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))));
}
@@ -67694,8 +67731,8 @@
mapPrimTraceLog();
/* begin mapVMRegisters */
if ((((longAt(GIV(method))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(method))))),
- isReallyYoungObject(GIV(method))))) {
+ || ((isReallyYoungObject(GIV(method)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(method), ((futureSpace()).start), futureSurvivorStart()))))) {
/* i.e. interpreter instructionPointer in method as opposed to machine code? */
@@ -67709,8 +67746,8 @@
}
if (((GIV(newMethod) & 3) == 0)
&& ((((longAt(GIV(newMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(newMethod))))),
- isReallyYoungObject(GIV(newMethod)))))) {
+ || ((isReallyYoungObject(GIV(newMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(newMethod), ((futureSpace()).start), futureSurvivorStart())))))) {
/* maybe oop due to object-as-method */
@@ -67718,18 +67755,18 @@
}
/* begin mapProfileState */
if ((((longAt(GIV(profileProcess))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileProcess))))),
- isReallyYoungObject(GIV(profileProcess))))) {
+ || ((isReallyYoungObject(GIV(profileProcess)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileProcess), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileProcess) = remapObj(GIV(profileProcess));
}
if ((((longAt(GIV(profileMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileMethod))))),
- isReallyYoungObject(GIV(profileMethod))))) {
+ || ((isReallyYoungObject(GIV(profileMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileMethod) = remapObj(GIV(profileMethod));
}
if ((((longAt(GIV(profileSemaphore))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileSemaphore))))),
- isReallyYoungObject(GIV(profileSemaphore))))) {
+ || ((isReallyYoungObject(GIV(profileSemaphore)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileSemaphore), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileSemaphore) = remapObj(GIV(profileSemaphore));
}
sqLowLevelMFence();
@@ -67739,8 +67776,8 @@
}
else {
if ((((longAt(GIV(longRunningPrimitiveCheckMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(longRunningPrimitiveCheckMethod))))),
- isReallyYoungObject(GIV(longRunningPrimitiveCheckMethod))))) {
+ || ((isReallyYoungObject(GIV(longRunningPrimitiveCheckMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(longRunningPrimitiveCheckMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(longRunningPrimitiveCheckMethod) = remapObj(GIV(longRunningPrimitiveCheckMethod));
}
}
@@ -67748,8 +67785,8 @@
}
if (!(GIV(longRunningPrimitiveCheckSemaphore) == null)) {
if ((((longAt(GIV(longRunningPrimitiveCheckSemaphore))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(longRunningPrimitiveCheckSemaphore))))),
- isReallyYoungObject(GIV(longRunningPrimitiveCheckSemaphore))))) {
+ || ((isReallyYoungObject(GIV(longRunningPrimitiveCheckSemaphore)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(longRunningPrimitiveCheckSemaphore), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(longRunningPrimitiveCheckSemaphore) = remapObj(GIV(longRunningPrimitiveCheckSemaphore));
}
}
@@ -67758,29 +67795,29 @@
oop = GIV(suspendedCallbacks)[i];
if (((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop))))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))))) {
GIV(suspendedCallbacks)[i] = (remapObj(oop));
}
oop = GIV(suspendedMethods)[i];
if ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isReallyYoungObject(oop)))) {
+ || ((isReallyYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(suspendedMethods)[i] = (remapObj(oop));
}
}
if ((GIV(tempOop) != 0)
&& (((GIV(tempOop) & 3) == 0)
&& ((((longAt(GIV(tempOop))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(tempOop))))),
- isReallyYoungObject(GIV(tempOop))))))) {
+ || ((isReallyYoungObject(GIV(tempOop)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(tempOop), ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(tempOop) = remapObj(GIV(tempOop));
}
if ((GIV(tempOop2) != 0)
&& (((GIV(tempOop2) & 3) == 0)
&& ((((longAt(GIV(tempOop2))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(tempOop2))))),
- isReallyYoungObject(GIV(tempOop2))))))) {
+ || ((isReallyYoungObject(GIV(tempOop2)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(tempOop2), ((futureSpace()).start), futureSurvivorStart()))))))) {
GIV(tempOop2) = remapObj(GIV(tempOop2));
}
}
Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2015-01-15 21:47:03 UTC (rev 3230)
+++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2015-01-18 01:07:07 UTC (rev 3231)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
from
- StackInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac
+ StackInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98
*/
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1022 uuid: 69a59ffb-cfbd-4b9e-af74-7c2eb662beac " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1023 uuid: 3b0b931e-e8b1-4155-ac38-8a078ddcec98 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2102,7 +2102,7 @@
/* 575 */ (void (*)(void))0,
0 };
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1022";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1023";
volatile int sendTrace;
sqInt suppressHeartbeatFlag;
@@ -26289,12 +26289,10 @@
ok = 0;
}
if (asserta(!(isFree(page)))) {
- if (!(asserta((stackPageFor((page->baseFP))) == page))) {
+ if (!(asserta((addressIsInPage(page, (page->baseFP)))
+ && (addressIsInPage(page, (page->headSP)))))) {
ok = 0;
}
- if (!(asserta((stackPageFor((page->headSP))) == page))) {
- ok = 0;
- }
}
else {
ok = 0;
@@ -28231,8 +28229,8 @@
mapInterpreterOops();
/* begin mapExtraRoots */
if ((((longAt(GIV(specialObjectsOop))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(specialObjectsOop))))),
- isYoungObject(GIV(specialObjectsOop))))) {
+ || ((isYoungObject(GIV(specialObjectsOop)))
+ && (!(isInFutureSpace(GIV(specialObjectsOop)))))) {
GIV(specialObjectsOop) = remapObj(GIV(specialObjectsOop));
}
assert(GIV(remapBufferCount) == 0);
@@ -28241,8 +28239,8 @@
if (!(((oop & 3) != 0)
|| (((longAt(oop)) & 0x3FFFFF) == 0))) {
if ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isYoungObject(oop)))) {
+ || ((isYoungObject(oop))
+ && (!(isInFutureSpace(oop))))) {
(GIV(extraRoots)[i])[0] = (remapObj(oop));
}
}
@@ -35964,14 +35962,21 @@
&& ((((longAt(objOop)) & 0x3FFFFF) == 0)
&& ((oopisLessThanOrEqualTo(addressAfter(objOop), GIV(endOfMemory)))
&& (((((chunk = longAt((objOop + BaseHeaderSize) + (0 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
- && (((bytesInObject(objOop)) < (32 * 8))
+ || (((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0)))
+ && ((!((bytesInObject(objOop)) >= (32 * 8)))
|| (((((chunk = longAt((objOop + BaseHeaderSize) + (2 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))
&& (((((chunk = longAt((objOop + BaseHeaderSize) + (3 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))
&& ((((chunk = longAt((objOop + BaseHeaderSize) + (4 << (shiftForWord()))))) == 0)
- || (((longAt(chunk)) & 0x3FFFFF) == 0))))))));
+ || ((((chunk & 3) == 0)
+ && (((longAt(chunk)) & 0x3FFFFF) == 0))
+ && ((bytesInObject(chunk)) >= (32 * 8))))))))));
}
@@ -46457,14 +46462,19 @@
/* Answer if the obj should be scavenged (or simply followed). The method is
- called shouldRemapObj: for compatibility with ObjectMemory. */
+ called shouldRemapObj: for compatibility with ObjectMemory. We test for
+ being already
+ scavenged because mapStackPages via mapInterpeeterOops may be applied
+ twice in the context of a global GC where a scavenge, followed by a
+ scan-mark-free, and
+ final compaction passes may result in scvenged fields being visited twice. */
sqInt
shouldRemapObj(sqInt objOop)
{
return (((longAt(objOop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(objOop)))),
- isYoungObject(objOop)));
+ || ((isYoungObject(objOop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(objOop, ((futureSpace()).start), futureSurvivorStart()))));
}
@@ -46476,8 +46486,8 @@
{
return ((oop & 3) == 0)
&& ((((longAt(oop)) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(oop)))),
- isYoungObject(oop))));
+ || ((isYoungObject(oop))
+ && (!(oopisGreaterThanOrEqualToandLessThan(oop, ((futureSpace()).start), futureSurvivorStart())))));
}
@@ -48667,14 +48677,13 @@
assertValidExecutionPointersimbarline(usqInt lip, char *lfp, char *lsp, sqInt inInterpreter, sqInt ln)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
assertl(inInterpreter, ln);
- assertl(GIV(stackPage) == (stackPageFor(lfp)), ln);
assertl(GIV(stackPage) == (mostRecentlyUsedPage()), ln);
/* begin assertValidStackLimits: */
assertl((GIV(stackLimit) == ((GIV(stackPage)->realStackLimit)))
|| (GIV(stackLimit) == (((char *) (((usqInt) -1))))), ln);
assertl((((GIV(stackPage)->stackLimit)) == ((GIV(stackPage)->realStackLimit)))
|| (((GIV(stackPage)->stackLimit)) == (((char *) (((usqInt) -1))))), ln);
- assertl(lfp < ((GIV(stackPage)->baseAddress)), ln);
+ assertl(addressIsInPage(GIV(stackPage), lfp), ln);
assertl(lsp < lfp, ln);
assertl(lfp > lsp, ln);
assertl(lsp >= (((GIV(stackPage)->realStackLimit)) - (stackLimitOffset())), ln);
@@ -54701,8 +54710,8 @@
/* begin mapTraceLogs */
/* begin mapVMRegisters */
if ((((longAt(GIV(method))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(method))))),
- isYoungObject(GIV(method))))) {
+ || ((isYoungObject(GIV(method)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(method), ((futureSpace()).start), futureSurvivorStart()))))) {
/* *rel to method */
@@ -54712,8 +54721,8 @@
}
if (((GIV(newMethod) & 3) == 0)
&& ((((longAt(GIV(newMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(newMethod))))),
- isYoungObject(GIV(newMethod)))))) {
+ || ((isYoungObject(GIV(newMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(newMethod), ((futureSpace()).start), futureSurvivorStart())))))) {
/* maybe oop due to object-as-method */
@@ -54721,18 +54730,18 @@
}
/* begin mapProfileState */
if ((((longAt(GIV(profileProcess))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileProcess))))),
- isYoungObject(GIV(profileProcess))))) {
+ || ((isYoungObject(GIV(profileProcess)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileProcess), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileProcess) = remapObj(GIV(profileProcess));
}
if ((((longAt(GIV(profileMethod))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileMethod))))),
- isYoungObject(GIV(profileMethod))))) {
+ || ((isYoungObject(GIV(profileMethod)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileMethod), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileMethod) = remapObj(GIV(profileMethod));
}
if ((((longAt(GIV(profileSemaphore))) & (0x3FFFFF - 8)) == 0)
- || ((assert(!((isInFutureSpace(GIV(profileSemaphore))))),
- isYoungObject(GIV(profileSemaphore))))) {
+ || ((isYoungObject(GIV(profileSemaphore)))
+ && (!(oopisGreaterThanOrEqualToandLessThan(GIV(profileSemaphore), ((futureSpace()).start), futureSurvivorStart()))))) {
GIV(profileSemaphore) = remapObj(GIV(profileSemaphore));
}
sqLowLevelMFence();
@@ -54742,8 +54751,8 @@
}
else {
if ((((longAt(GIV(longRunningPrimitiveCheckMethod))) & (0x3FFFFF - 8)) == 0)
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list