Revision: 3102 Author: eliot Date: 2014-10-13 13:51:55 -0700 (Mon, 13 Oct 2014) Log Message: ----------- CogVM source as per VMMaker.oscog-eem.897 Fix old V3 NewObjectMemory bug in fullGC. sweepPhaseForFullGC failed to update freeStart at the end of its sweep which could leave a partial object between the last object and freeStart, causing subsequent crashes in enumeration. This fixes an occasional crash in muO's release process: MuODeployer makeImageRelease Modified Paths: -------------- branches/Cog/nscogsrc/plugins/BitBltPlugin/BitBltPlugin.c 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/spurstacksrc/vm/gcc3x-interp.c branches/Cog/spurstacksrc/vm/interp.c branches/Cog/src/plugins/BitBltPlugin/BitBltPlugin.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/plugins/BitBltPlugin/BitBltPlugin.c =================================================================== --- branches/Cog/nscogsrc/plugins/BitBltPlugin/BitBltPlugin.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nscogsrc/plugins/BitBltPlugin/BitBltPlugin.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.787 uuid: 4b38ebc1-339f-4523-a9fc-047923108211 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - BitBltSimulation VMMaker.oscog-eem.787 uuid: 4b38ebc1-339f-4523-a9fc-047923108211 + BitBltSimulation VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.787 uuid: 4b38ebc1-339f-4523-a9fc-047923108211 " __DATE__ ; +static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; @@ -344,9 +344,9 @@ }; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "BitBltPlugin VMMaker.oscog-eem.787 (i)" + "BitBltPlugin VMMaker.oscog-eem.897 (i)" #else - "BitBltPlugin VMMaker.oscog-eem.787 (e)" + "BitBltPlugin VMMaker.oscog-eem.897 (e)" #endif ; static sqInt noHalftone; @@ -1262,7 +1262,7 @@ affectedL = (affectedR = (affectedT = (affectedB = 0))); copyBitsRule41Test(); - if (!(!(failed()))) { + if (failed()) { return primitiveFail(); } if ((combinationRule == 30) || (combinationRule == 0x1F)) { @@ -1365,7 +1365,7 @@ sqInt t; copyBitsRule41Test(); - if (!(!(failed()))) { + if (failed()) { return primitiveFail(); } /* begin tryCopyingBitsQuickly */ @@ -1653,11 +1653,11 @@ ungammaLookupTable = null; if ((methodArgumentCount()) >= 2) { componentAlphaModeAlpha = stackIntegerValue((methodArgumentCount()) - 2); - if (!(!(failed()))) { + if (failed()) { return primitiveFail(); } componentAlphaModeColor = stackIntegerValue((methodArgumentCount()) - 1); - if (!(!(failed()))) { + if (failed()) { return primitiveFail(); } if ((methodArgumentCount()) == 4) { @@ -1674,7 +1674,7 @@ else { if ((methodArgumentCount()) == 1) { componentAlphaModeColor = stackIntegerValue(0); - if (!(!(failed()))) { + if (failed()) { return primitiveFail(); } } Modified: branches/Cog/nscogsrc/vm/cointerp.c =================================================================== --- branches/Cog/nscogsrc/vm/cointerp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nscogsrc/vm/cointerp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -808,6 +808,7 @@ sqInt characterValueOf(sqInt oop); static sqInt checkHeapIntegrity(void); sqInt checkOkayOop(usqInt oop); +static sqInt checkOopIntegritynamed(sqInt obj, char *name) NoDbgRegParms; sqInt clone(sqInt obj); static sqInt defaultEdenBytes(void); static sqInt eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) NoDbgRegParms; @@ -851,7 +852,7 @@ void printWronglySizedContexts(sqInt printContexts); static void restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut) NoDbgRegParms; static void runLeakCheckerForFullGC(sqInt fullGCFlag) NoDbgRegParms; -static usqInt safeObjectAfter(sqInt oop) NoDbgRegParms; +static sqInt safeObjectAfter(sqInt oop) NoDbgRegParms; static sqInt safePrintStringOf(sqInt oop) NoDbgRegParms; static sqInt shortentoIndexableSize(sqInt obj, sqInt nSlots) NoDbgRegParms; static sqInt sizeBitsOfSafe(sqInt oop) NoDbgRegParms; @@ -879,7 +880,6 @@ sqInt characterTable(void); sqInt checkedLongAt(sqInt byteAddress); sqInt checkOopHasOkayClass(usqInt obj); -static sqInt checkOopIntegritynamed(sqInt obj, char *name) NoDbgRegParms; static sqInt checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i) NoDbgRegParms; sqInt classAlien(void); sqInt classArray(void); @@ -2084,7 +2084,7 @@ /* 574 */ (void (*)(void))0, /* 575 */ (void (*)(void))0, 0 }; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.895"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.897"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5355,7 +5355,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -17139,7 +17140,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -20314,7 +20316,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -35579,7 +35582,21 @@ return 1; } +static sqInt +checkOopIntegritynamed(sqInt obj, char *name) +{ + if ((heapMapAtWord(pointerForOop(obj))) != 0) { + return 1; + } + print(name); + print(" leak "); + printHex(obj); + /* begin cr */ + printf("\n"); + return 0; +} + /* Return a shallow copy of the given object. May cause GC. Assume: Oop is a real object, not a small integer. Override to assert it's not a married context and maybe fix cloned @@ -36754,15 +36771,17 @@ sqInt header1; sqInt header2; sqInt header3; + sqInt header4; usqInt lastWord; sqInt newFreeChunk; sqInt newOop; - usqInt next; + sqInt next; sqInt oop; sqInt realHeader; sqInt sz; sqInt sz1; sqInt sz2; + sqInt sz3; sqInt target; usqInt w; @@ -36773,7 +36792,21 @@ /* begin objectAfterWhileForwarding: */ header2 = longAt(oop); if ((header2 & MarkBit) == 0) { - next = ((sqInt) (objectAfter(oop))); + /* begin objectAfter: */ + if (!(asserta(oopisLessThan(oop, GIV(freeStart))))) { + error("no objects after the end of memory"); + } + if (((longAt(oop)) & TypeMask) == HeaderTypeFree) { + sz2 = (longAt(oop)) & AllButTypeMask; + } + else { + /* begin sizeBitsOf: */ + header3 = longAt(oop); + sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass + ? (longAt(oop - (BytesPerWord * 2))) & LongSizeMask + : header3 & SizeMask); + } + next = (oop + sz2) + (headerTypeBytes[(longAt(oop + sz2)) & TypeMask]); goto l1; } fwdBlock1 = (header2 & AllButMarkBitAndTypeMask) << 1; @@ -36788,7 +36821,7 @@ else { sz1 = realHeader & SizeMask; } - next = ((sqInt) ((oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]))); + next = (oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]); l1: /* end objectAfterWhileForwarding: */; if (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) { @@ -36842,18 +36875,18 @@ } /* begin safeObjectAfter: */ if (((longAt(newFreeChunk)) & TypeMask) == HeaderTypeFree) { - sz2 = (longAt(newFreeChunk)) & AllButTypeMask; + sz3 = (longAt(newFreeChunk)) & AllButTypeMask; } else { /* begin sizeBitsOf: */ - header3 = longAt(newFreeChunk); - sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass + header4 = longAt(newFreeChunk); + sz3 = ((header4 & TypeMask) == HeaderTypeSizeAndClass ? (longAt(newFreeChunk - (BytesPerWord * 2))) & LongSizeMask - : header3 & SizeMask); + : header4 & SizeMask); } - next = ((newFreeChunk + sz2) >= GIV(freeStart) + next = ((newFreeChunk + sz3) >= GIV(freeStart) ? GIV(freeStart) - : (newFreeChunk + sz2) + (headerTypeBytes[(longAt(newFreeChunk + sz2)) & TypeMask])); + : (newFreeChunk + sz3) + (headerTypeBytes[(longAt(newFreeChunk + sz3)) & TypeMask])); assert((next == GIV(freeStart)) || (next == (oopFromChunk(GIV(compEnd))))); if (next == GIV(freeStart)) { @@ -38726,7 +38759,7 @@ given object or free chunk in memory. Return freeStart when enumeration is complete. This is for assertion checking only. */ -static usqInt +static sqInt safeObjectAfter(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt header; @@ -39576,7 +39609,10 @@ longAtput(freeChunk, (freeChunkSize & LongSizeMask) | HeaderTypeFree); } - if (!(oop == GIV(endOfMemory))) { + if (oop == GIV(endOfMemory)) { + GIV(freeStart) = GIV(endOfMemory); + } + else { error("sweep failed to find exact end of memory"); } if (firstFree == null) { @@ -40199,20 +40235,6 @@ } static sqInt -checkOopIntegritynamed(sqInt obj, char *name) -{ - if ((heapMapAtWord(pointerForOop(obj))) != 0) { - return 1; - } - print(name); - print(" leak "); - printHex(obj); - /* begin cr */ - printf("\n"); - return 0; -} - -static sqInt checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i) { if ((heapMapAtWord(pointerForOop(obj))) != 0) { @@ -53793,7 +53815,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) Modified: branches/Cog/nscogsrc/vm/cointerp.h =================================================================== --- branches/Cog/nscogsrc/vm/cointerp.h 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nscogsrc/vm/cointerp.h 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -811,6 +811,7 @@ sqInt characterValueOf(sqInt oop); static sqInt checkHeapIntegrity(void); sqInt checkOkayOop(usqInt oop); +static sqInt checkOopIntegritynamed(sqInt obj, char *name) NoDbgRegParms; sqInt clone(sqInt obj); static sqInt defaultEdenBytes(void); static sqInt eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) NoDbgRegParms; @@ -854,7 +855,7 @@ void printWronglySizedContexts(sqInt printContexts); static void restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut) NoDbgRegParms; static void runLeakCheckerForFullGC(sqInt fullGCFlag) NoDbgRegParms; -static usqInt safeObjectAfter(sqInt oop) NoDbgRegParms; +static sqInt safeObjectAfter(sqInt oop) NoDbgRegParms; static sqInt safePrintStringOf(sqInt oop) NoDbgRegParms; static sqInt shortentoIndexableSize(sqInt obj, sqInt nSlots) NoDbgRegParms; static sqInt sizeBitsOfSafe(sqInt oop) NoDbgRegParms; @@ -882,7 +883,6 @@ sqInt characterTable(void); sqInt checkedLongAt(sqInt byteAddress); sqInt checkOopHasOkayClass(usqInt obj); -static sqInt checkOopIntegritynamed(sqInt obj, char *name) NoDbgRegParms; static sqInt checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i) NoDbgRegParms; sqInt classAlien(void); sqInt classArray(void); @@ -2087,7 +2087,7 @@ /* 574 */ (void (*)(void))0, /* 575 */ (void (*)(void))0, 0 }; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.895"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.897"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5364,7 +5364,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -17148,7 +17149,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -20323,7 +20325,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -35588,7 +35591,21 @@ return 1; } +static sqInt +checkOopIntegritynamed(sqInt obj, char *name) +{ + if ((heapMapAtWord(pointerForOop(obj))) != 0) { + return 1; + } + print(name); + print(" leak "); + printHex(obj); + /* begin cr */ + printf("\n"); + return 0; +} + /* Return a shallow copy of the given object. May cause GC. Assume: Oop is a real object, not a small integer. Override to assert it's not a married context and maybe fix cloned @@ -36763,15 +36780,17 @@ sqInt header1; sqInt header2; sqInt header3; + sqInt header4; usqInt lastWord; sqInt newFreeChunk; sqInt newOop; - usqInt next; + sqInt next; sqInt oop; sqInt realHeader; sqInt sz; sqInt sz1; sqInt sz2; + sqInt sz3; sqInt target; usqInt w; @@ -36782,7 +36801,21 @@ /* begin objectAfterWhileForwarding: */ header2 = longAt(oop); if ((header2 & MarkBit) == 0) { - next = ((sqInt) (objectAfter(oop))); + /* begin objectAfter: */ + if (!(asserta(oopisLessThan(oop, GIV(freeStart))))) { + error("no objects after the end of memory"); + } + if (((longAt(oop)) & TypeMask) == HeaderTypeFree) { + sz2 = (longAt(oop)) & AllButTypeMask; + } + else { + /* begin sizeBitsOf: */ + header3 = longAt(oop); + sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass + ? (longAt(oop - (BytesPerWord * 2))) & LongSizeMask + : header3 & SizeMask); + } + next = (oop + sz2) + (headerTypeBytes[(longAt(oop + sz2)) & TypeMask]); goto l1; } fwdBlock1 = (header2 & AllButMarkBitAndTypeMask) << 1; @@ -36797,7 +36830,7 @@ else { sz1 = realHeader & SizeMask; } - next = ((sqInt) ((oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]))); + next = (oop + sz1) + (headerTypeBytes[(longAt(oop + sz1)) & TypeMask]); l1: /* end objectAfterWhileForwarding: */; if (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) { @@ -36851,18 +36884,18 @@ } /* begin safeObjectAfter: */ if (((longAt(newFreeChunk)) & TypeMask) == HeaderTypeFree) { - sz2 = (longAt(newFreeChunk)) & AllButTypeMask; + sz3 = (longAt(newFreeChunk)) & AllButTypeMask; } else { /* begin sizeBitsOf: */ - header3 = longAt(newFreeChunk); - sz2 = ((header3 & TypeMask) == HeaderTypeSizeAndClass + header4 = longAt(newFreeChunk); + sz3 = ((header4 & TypeMask) == HeaderTypeSizeAndClass ? (longAt(newFreeChunk - (BytesPerWord * 2))) & LongSizeMask - : header3 & SizeMask); + : header4 & SizeMask); } - next = ((newFreeChunk + sz2) >= GIV(freeStart) + next = ((newFreeChunk + sz3) >= GIV(freeStart) ? GIV(freeStart) - : (newFreeChunk + sz2) + (headerTypeBytes[(longAt(newFreeChunk + sz2)) & TypeMask])); + : (newFreeChunk + sz3) + (headerTypeBytes[(longAt(newFreeChunk + sz3)) & TypeMask])); assert((next == GIV(freeStart)) || (next == (oopFromChunk(GIV(compEnd))))); if (next == GIV(freeStart)) { @@ -38735,7 +38768,7 @@ given object or free chunk in memory. Return freeStart when enumeration is complete. This is for assertion checking only. */ -static usqInt +static sqInt safeObjectAfter(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt header; @@ -39585,7 +39618,10 @@ longAtput(freeChunk, (freeChunkSize & LongSizeMask) | HeaderTypeFree); } - if (!(oop == GIV(endOfMemory))) { + if (oop == GIV(endOfMemory)) { + GIV(freeStart) = GIV(endOfMemory); + } + else { error("sweep failed to find exact end of memory"); } if (firstFree == null) { @@ -40208,20 +40244,6 @@ } static sqInt -checkOopIntegritynamed(sqInt obj, char *name) -{ - if ((heapMapAtWord(pointerForOop(obj))) != 0) { - return 1; - } - print(name); - print(" leak "); - printHex(obj); - /* begin cr */ - printf("\n"); - return 0; -} - -static sqInt checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i) { if ((heapMapAtWord(pointerForOop(obj))) != 0) { @@ -53802,7 +53824,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) Modified: branches/Cog/nsspursrc/vm/cointerp.c =================================================================== --- branches/Cog/nsspursrc/vm/cointerp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nsspursrc/vm/cointerp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1125,6 +1125,7 @@ static sqInt pushonObjStack(sqInt objOop, sqInt objStack) NoDbgRegParms; static sqInt rawHashBitsOf(sqInt objOop) NoDbgRegParms; static void rebuildFreeListsForPigCompact(void); +static sqInt remapBufferCount(void); sqInt remapObj(sqInt objOop); sqInt rememberedBitShift(void); sqInt removeGCRoot(sqInt *varLoc); @@ -2322,7 +2323,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.895"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.897"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5614,7 +5615,6 @@ GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - null; goto l294; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); @@ -5632,7 +5632,7 @@ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - null; + /* return self */ l294: /* end baseFrameReturn */; goto l293; } @@ -6253,15 +6253,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -19466,15 +19466,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -22839,15 +22839,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -51829,7 +51829,13 @@ assert(GIV(totalFreeOldSpace) == (totalFreeListBytes())); } +static sqInt +remapBufferCount(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return GIV(remapBufferCount); +} + /* Scavenge or simply follow objOop. Answer the new location of objOop. The send should have been guarded by a send of shouldRemapOop:. The method is called remapObj: for compatibility with ObjectMemory. */ @@ -66210,15 +66216,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) Modified: branches/Cog/nsspursrc/vm/cointerp.h =================================================================== --- branches/Cog/nsspursrc/vm/cointerp.h 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nsspursrc/vm/cointerp.h 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1128,6 +1128,7 @@ static sqInt pushonObjStack(sqInt objOop, sqInt objStack) NoDbgRegParms; static sqInt rawHashBitsOf(sqInt objOop) NoDbgRegParms; static void rebuildFreeListsForPigCompact(void); +static sqInt remapBufferCount(void); sqInt remapObj(sqInt objOop); sqInt rememberedBitShift(void); sqInt removeGCRoot(sqInt *varLoc); @@ -2325,7 +2326,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.895"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.897"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5623,7 +5624,6 @@ GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - null; goto l294; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); @@ -5641,7 +5641,7 @@ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - null; + /* return self */ l294: /* end baseFrameReturn */; goto l293; } @@ -6262,15 +6262,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -19475,15 +19475,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -22848,15 +22848,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -51838,7 +51838,13 @@ assert(GIV(totalFreeOldSpace) == (totalFreeListBytes())); } +static sqInt +remapBufferCount(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return GIV(remapBufferCount); +} + /* Scavenge or simply follow objOop. Answer the new location of objOop. The send should have been guarded by a send of shouldRemapOop:. The method is called remapObj: for compatibility with ObjectMemory. */ @@ -66219,15 +66225,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c =================================================================== --- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - StackInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + StackInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -876,6 +876,7 @@ static sqInt pushonObjStack(sqInt objOop, sqInt objStack) NoDbgRegParms; static sqInt rawHashBitsOf(sqInt objOop) NoDbgRegParms; static void rebuildFreeListsForPigCompact(void); +static sqInt remapBufferCount(void); sqInt remapObj(sqInt objOop); sqInt rememberedBitShift(void); sqInt removeGCRoot(sqInt *varLoc); @@ -2070,7 +2071,7 @@ 0 }; char * breakSelector; sqInt breakSelectorLength = -1; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.895"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.897"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -5762,15 +5763,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -20409,15 +20410,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -40424,7 +40425,13 @@ assert(GIV(totalFreeOldSpace) == (totalFreeListBytes())); } +static sqInt +remapBufferCount(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return GIV(remapBufferCount); +} + /* Scavenge or simply follow objOop. Answer the new location of objOop. The send should have been guarded by a send of shouldRemapOop:. The method is called remapObj: for compatibility with ObjectMemory. */ @@ -49380,15 +49387,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -57694,15 +57701,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -57826,15 +57833,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -58055,15 +58062,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -59351,15 +59358,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) Modified: branches/Cog/nsspurstacksrc/vm/interp.c =================================================================== --- branches/Cog/nsspurstacksrc/vm/interp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/nsspurstacksrc/vm/interp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - StackInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + StackInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -873,6 +873,7 @@ static sqInt pushonObjStack(sqInt objOop, sqInt objStack) NoDbgRegParms; static sqInt rawHashBitsOf(sqInt objOop) NoDbgRegParms; static void rebuildFreeListsForPigCompact(void); +static sqInt remapBufferCount(void); sqInt remapObj(sqInt objOop); sqInt rememberedBitShift(void); sqInt removeGCRoot(sqInt *varLoc); @@ -2067,7 +2068,7 @@ 0 }; char * breakSelector; sqInt breakSelectorLength = -1; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.895"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.897"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -5753,15 +5754,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -20400,15 +20401,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -40415,7 +40416,13 @@ assert(GIV(totalFreeOldSpace) == (totalFreeListBytes())); } +static sqInt +remapBufferCount(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return GIV(remapBufferCount); +} + /* Scavenge or simply follow objOop. Answer the new location of objOop. The send should have been guarded by a send of shouldRemapOop:. The method is called remapObj: for compatibility with ObjectMemory. */ @@ -49371,15 +49378,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -57685,15 +57692,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -57817,15 +57824,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -58046,15 +58053,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -59342,15 +59349,15 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - if (1 - && ((!(!GIV(primFailCode))) + if ((!(!GIV(primFailCode))) && ((((GIV(newMethod) & 3) == 0) && (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24)) - && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod)))))))) { + && (checkForAndFollowForwardedPrimitiveStateFor(primitiveIndexOfMethodheader(GIV(newMethod), methodHeaderOf(GIV(newMethod))))))) { /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); } + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Wed Oct 8 12:17:32 PDT 2014 + Mon Oct 13 13:50:53 PDT 2014 Modified: branches/Cog/sistasrc/vm/cointerp.c =================================================================== --- branches/Cog/sistasrc/vm/cointerp.c 2014-10-11 20:52:22 UTC (rev 3101) +++ branches/Cog/sistasrc/vm/cointerp.c 2014-10-13 20:51:55 UTC (rev 3102) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 from - CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 + CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.895 uuid: 2c674935-8b94-45ff-b8fc-59fb78830eb3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.897 uuid: fcc5e4e2-808e-4ab1-97ae-079cc4b9d7b8 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -807,6 +807,7 @@ sqInt characterValueOf(sqInt oop); static sqInt checkHeapIntegrity(void); sqInt checkOkayOop(usqInt oop); +static sqInt checkOopIntegritynamed(sqInt obj, char *name) NoDbgRegParms; sqInt clone(sqInt obj); static sqInt defaultEdenBytes(void); static sqInt eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) NoDbgRegParms; @@ -878,7 +879,6 @@ sqInt characterTable(void); sqInt checkedLongAt(sqInt byteAddress); sqInt checkOopHasOkayClass(usqInt obj); -static sqInt checkOopIntegritynamed(sqInt obj, char *name) NoDbgRegParms; static sqInt checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i) NoDbgRegParms; sqInt classAlien(void); sqInt classArray(void); @@ -2081,7 +2081,7 @@ /* 574 */ (void (*)(void))0, /* 575 */ (void (*)(void))0, 0 }; -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.895]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.897]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5359,7 +5359,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -17171,7 +17172,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -20333,7 +20335,8 @@ /* begin initPrimCall */ GIV(primFailCode) = 0; dispatchFunctionPointer(primitiveFunctionPointer); - + assert((remapBufferCount()) == 0); + /* begin maybeFailForLastObjectOverwrite */ if (checkAllocFiller) { if (((freeStart()) < GIV(scavengeThreshold)) @@ -35650,7 +35653,21 @@ return 1; } +static sqInt +checkOopIntegritynamed(sqInt obj, char *name) +{ + if ((heapMapAtWord(pointerForOop(obj))) != 0) { + return 1; + } + print(name); + print(" leak "); + printHex(obj); + /* begin cr */ + printf("\n"); + return 0; +} + /* Return a shallow copy of the given object. May cause GC. Assume: Oop is a real object, not a small integer. Override to assert it's not a married context and maybe fix cloned @@ -39647,7 +39664,10 @@ longAtput(freeChunk, (freeChunkSize & LongSizeMask) | HeaderTypeFree); } - if (!(oop == GIV(endOfMemory))) { + if (oop == GIV(endOfMemory)) { + GIV(freeStart) = GIV(endOfMemory); + } + else { error("sweep failed to find exact end of memory"); } if (firstFree == null) { @@ -40270,20 +40290,6 @@ } static sqInt -checkOopIntegritynamed(sqInt obj, char *name) -{ - if ((heapMapAtWord(pointerForOop(obj))) != 0) { - return 1; - } - print(name); - print(" leak "); - printHex(obj); - /* begin cr */ - printf("\n"); - return 0; -} - -static sqInt checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i) { @@ Diff output truncated at 50000 characters. @@ |
Free forum by Nabble | Edit this page |