[Vm-dev] [commit][3728] CogVM source as per VMMaker.oscog-eem.1865
commits at squeakvm.org
commits at squeakvm.org
Tue May 24 01:07:08 UTC 2016
Revision: 3728
Author: eliot
Date: 2016-05-23 18:07:07 -0700 (Mon, 23 May 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1865
Fix two bugs in ephemerons (found by Gille Polito - thanks!).
1. obj stack extension must happen with marking set to true if new pages aren't
to be GC'ed. So move the assignments to marking out into markObjects: where
they can surround nilUnmarkedWeaklingSlots.
2. fireAllUnscannedEphemerons needs to enumerate the unscannedEphemerons set
properly, an oop at a time.
Use bytesPerOop instead of wordSize throughout unscannedEphemerons access for
consistency.
Fix the Spur implementation of becomeForward:copyHash: for becomming immediates
with copyHash false. Fix the scavenger's referenceCountRememberedReferents:
for forwarding to immediates, and add a printRememberedSet convenience.
Make primitiveDoPrimitiveWithArgs usable as a mirror primitive, such that no
message needs to be sent to the receiver to evaluate a primitive on it. This
would make possible Context>>receiver: obj tryPrimitive: idx withArgs: args.
Use symbolic constants for the primitive numbers of the primitive-executing
primitives. Provide support for running the leak checker after an external
primtiive call in the StackInterpreter (for debugging leaks in t' GdbARMPlugin).
Modified Paths:
--------------
branches/Cog/nsspur64src/vm/cogit.h
branches/Cog/nsspur64src/vm/cointerp.c
branches/Cog/nsspur64src/vm/cointerp.h
branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
branches/Cog/nsspursrc/vm/cogit.h
branches/Cog/nsspursrc/vm/cointerp.c
branches/Cog/nsspursrc/vm/cointerp.h
branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
branches/Cog/nsspurstack64src/vm/interp.c
branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
branches/Cog/nsspurstacksrc/vm/interp.c
branches/Cog/processors/ARM/exploration/Makefile
branches/Cog/spur64src/vm/cogit.h
branches/Cog/spur64src/vm/cointerp.c
branches/Cog/spur64src/vm/cointerp.h
branches/Cog/spur64src/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cogit.h
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cogit.h
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/cogit.h
branches/Cog/src/vm/cointerp.c
branches/Cog/src/vm/cointerp.h
branches/Cog/src/vm/cointerpmt.c
branches/Cog/src/vm/cointerpmt.h
branches/Cog/src/vm/gcc3x-cointerp.c
branches/Cog/src/vm/gcc3x-cointerpmt.c
branches/Cog/stacksrc/vm/gcc3x-interp.c
branches/Cog/stacksrc/vm/interp.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h 2016-05-24 00:32:16 UTC (rev 3727)
+++ branches/Cog/nsspur64src/vm/cogit.h 2016-05-24 01:07:07 UTC (rev 3728)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1860 uuid: 4d58d995-ee0c-4330-9190-adfa038e8f24
+ CCodeGenerator VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47
*/
Modified: branches/Cog/nsspur64src/vm/cointerp.c
===================================================================
--- branches/Cog/nsspur64src/vm/cointerp.c 2016-05-24 00:32:16 UTC (rev 3727)
+++ branches/Cog/nsspur64src/vm/cointerp.c 2016-05-24 01:07:07 UTC (rev 3728)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1860 uuid: 4d58d995-ee0c-4330-9190-adfa038e8f24
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47
from
- CoInterpreter VMMaker.oscog-eem.1860 uuid: 4d58d995-ee0c-4330-9190-adfa038e8f24
+ CoInterpreter VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1860 uuid: 4d58d995-ee0c-4330-9190-adfa038e8f24 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1865 uuid: 2aa4b0e0-004d-4599-896a-084a749a2c47 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -172,6 +172,7 @@
#define FoxSavedFP 0
#define FoxThisContext -16
#define FullClosureFirstCopiedValueIndex 4
+#define GCCheckPrimCall 64
#define GCModeBecome 8
#define GCModeFreeSpace 32
#define GCModeFull 1
@@ -281,6 +282,9 @@
#define PrimErrWritePastObject 17
#define PrimitiveExternalCallIndex 117
#define PrimNoErr 0
+#define PrimNumberDoExternalCall 218
+#define PrimNumberExternalCall 117
+#define PrimNumberFFICall 120
#define PrimTraceLogSize 256
#define PriorityIndex 2
#define ProcessListsIndex 0
@@ -919,6 +923,7 @@
static sqInt NoDbgRegParms isonWeaklingList(sqInt oop, sqInt listHead);
static usqInt newSpaceCapacity(void);
static sqInt noUnfiredEphemeronsAtEndOfRememberedSet(void);
+extern void printRememberedSet(void);
static void processEphemerons(void);
static void processWeaklings(void);
static sqInt NoDbgRegParms processWeakSurvivor(sqInt weakObj);
@@ -1424,6 +1429,7 @@
static sqInt NoDbgRegParms marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop, sqInt stackDeltaForCurrentFrame);
static void NoDbgRegParms marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext);
static sqInt NoDbgRegParms marryFrameSP(char *theFP, char *theSP);
+static sqInt NoDbgRegParms maybeLeakCheckExternalPrimCall(sqInt aMethodObj);
static sqInt NoDbgRegParms maybeSelectorOfMethod(sqInt methodObj);
extern sqInt methodArgumentCount(void);
extern sqInt methodArg(sqInt index);
@@ -1623,8 +1629,8 @@
_iss char * stackBasePlus1;
_iss sqInt weaklingStack;
_iss sqInt trueObj;
+_iss usqInt newSpaceStart;
_iss sqInt falseObj;
-_iss usqInt newSpaceStart;
_iss sqInt hiddenRootsObj;
_iss SpurSegmentInfo * segments;
_iss sqInt lkupClassTag;
@@ -1669,9 +1675,10 @@
_iss sqInt futureSurvivorStart;
_iss sqInt longRunningPrimitiveCheckMethod;
_iss char * objStackInvalidBecause;
+_iss sqInt tempOop2;
_iss sqInt ephemeronList;
_iss usqInt freeOldSpaceStart;
-_iss sqInt tempOop2;
+_iss sqInt tempOop3;
_iss sqInt tenureThreshold;
_iss sqInt extraRootCount;
_iss sqInt growHeadroom;
@@ -1700,6 +1707,7 @@
_iss usqLong statGCEndUsecs;
_iss sqInt weakList;
_iss sqInt externalPrimitiveTableFirstFreeIndex;
+_iss sqInt marking;
_iss sqInt thisClassIndex;
_iss sqInt firstSegmentSize;
_iss usqLong gcStartUsecs;
@@ -1711,7 +1719,6 @@
_iss sqInt lastHash;
_iss sqInt lastMethodCacheProbeWrite;
_iss sqInt longRunningPrimitiveCheckSequenceNumber;
-_iss sqInt marking;
_iss usqInt memory;
_iss sqInt numCompactionPasses;
_iss sqInt scavengeInProgress;
@@ -2435,8 +2442,9 @@
/*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0,-1,-1,-1,-1,-1,
/*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
};
+sqInt checkedPluginName;
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1860";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1865";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -6206,6 +6214,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -13233,6 +13242,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -13595,6 +13605,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -14063,6 +14074,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -14533,6 +14545,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -17802,16 +17815,16 @@
/* For the method-executing primitives, failure could have been in those primitives or the
primitives of the methods they execute. Find out which failed by seeing what is in effect. */
accessorDepth = primitiveAccessorDepthTable[primIndex];
- if (((primIndex == 117)
+ if (((primIndex == PrimNumberExternalCall)
&& (primitiveFunctionPointer != primitiveExternalCall))
- || ((primIndex == 218)
+ || ((primIndex == PrimNumberDoExternalCall)
&& (primitiveFunctionPointer != primitiveDoNamedPrimitiveWithArgs))) {
accessorDepth = ((fetchPointerofObject(2, longAt((GIV(newMethod) + BaseHeaderSize) + (((long)(0 + LiteralStart)) << (shiftForWord()))))) >> 3);
}
else {
assert(saneFunctionPointerForFailureOfPrimIndex(primIndex));
}
- assert(((accessorDepth >= -127) && (accessorDepth <= 0x7F)));
+ assert(((accessorDepth >= -1) && (accessorDepth <= 4)));
if (accessorDepth >= 0) {
for (index = 0; index <= GIV(argumentCount); index += 1) {
oop = longAt(GIV(stackPointer) + (index * BytesPerWord));
@@ -19599,6 +19612,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -23810,8 +23824,8 @@
if (GIV(profileSemaphore) != GIV(nilObj)) {
baseFlags = baseFlags | PrimCallCollectsProfileSamples;
}
- if ((primIndex == 117)
- || (primIndex == 120)) {
+ if ((primIndex == PrimNumberExternalCall)
+ || (primIndex == PrimNumberFFICall)) {
/* For callbacks */
baseFlags = baseFlags | PrimCallMayCallBack;
@@ -25711,6 +25725,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
dispatchFunctionPointer(primitiveFunctionPointer);
+ assert(maybeLeakCheckExternalPrimCall(GIV(newMethod)));
/* begin maybeRetryFailureDueToForwarding */
if (GIV(primFailCode)
&& (checkForAndFollowForwardedPrimitiveState())) {
@@ -41189,7 +41204,7 @@
sqInt oopRcvr;
sqInt oopResult;
usqLong result;
- sqInt resultIsNegative;
+ int resultIsNegative;
char *sp;
oopArg = longAt(GIV(stackPointer) + (0 * BytesPerWord));
@@ -42991,7 +43006,7 @@
sqInt fmt;
usqInt instBytes;
sqInt instFormat;
- usqInt newFormat;
+ sqInt newFormat;
sqInt normalizedInstFormat;
usqInt numBytes;
usqInt numSlots;
@@ -44053,12 +44068,28 @@
long population[MaxRTRefCount + 1];
sqInt refCount;
sqInt referent;
+ sqInt referent1;
memset(population, 0, (sizeof(long)) * (MaxRTRefCount + 1));
assert(allNewSpaceObjectsHaveZeroRTRefCount());
/* begin referenceCountRememberedReferents: */
for (i1 = 0; i1 < GIV(rememberedSetSize); i1 += 1) {
elephant = GIV(rememberedSet)[i1];
+ if (((longAt(elephant)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
+ /* begin followForwarded: */
+ assert(isUnambiguouslyForwarder(elephant));
+ referent1 = longAt((elephant + BaseHeaderSize) + (0LL << (shiftForWord())));
+ while (((referent1 & (tagMask())) == 0)
+ && (((longAt(referent1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
+ referent1 = longAt((referent1 + BaseHeaderSize) + (0LL << (shiftForWord())));
+ }
+ elephant = referent1;
+ if (elephant & (tagMask())) {
+
+ /* take care if elephant forwarded to an immediate */
+ elephant = GIV(nilObj);
+ }
+ }
for (j1 = 0, jLimiT = ((numPointerSlotsOf(elephant)) - 1); j1 <= jLimiT; j1 += 1) {
referent = longAt((elephant + BaseHeaderSize) + (((long)j1) << (shiftForWord())));
if (((referent & (tagMask())) == 0)
@@ -44498,6 +44529,23 @@
}
+/* Print the objects in the remembered set. */
+
+ /* SpurGenerationScavenger>>#printRememberedSet */
+void
+printRememberedSet(void)
+{ DECL_MAYBE_SQ_GLOBAL_STRUCT
+ sqInt i;
+
+ for (i = 0; i < GIV(rememberedSetSize); i += 1) {
+ printNum(i);
+ /* begin space */
+ putchar(' ');
+ shortPrintOop(GIV(rememberedSet)[i]);
+ }
+}
+
+
/* There are ephemerons to be scavenged. Scavenge them and fire any whose
keys are
still in pastSpace and/or eden. The unscavenged ephemerons in this cycle
@@ -47022,7 +47070,7 @@
sqInt objOop;
sqInt p;
- for (p = ((GIV(unscannedEphemerons).start)); p <= (((GIV(unscannedEphemerons).top)) - BytesPerOop); p += 1) {
+ for (p = ((GIV(unscannedEphemerons).start)); p <= (((GIV(unscannedEphemerons).top)) - BytesPerOop); p += BytesPerOop) {
/* begin keyOfEphemeron: */
objOop = longAt(p);
assert((isNonImmediate(objOop))
@@ -47095,7 +47143,7 @@
sqInt effectsFlags1;
sqInt errCode;
sqInt fieldOffset;
- usqInt fieldOffset1;
+ sqInt fieldOffset1;
sqInt fmt;
sqInt hash;
sqInt header;
@@ -47155,20 +47203,20 @@
sp = longAt((array1 + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
if (!((((sp) & 7) == 1))) {
contextSize = 0;
- goto l17;
+ goto l16;
}
assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(array1)));
contextSize = (sp >> 3);
- l17: /* end fetchStackPointerOf: */;
+ l16: /* end fetchStackPointerOf: */;
fieldOffset = (((CtxtTempFrameStart - 1) + contextSize) * BytesPerOop) + BaseHeaderSize;
- goto l18;
+ goto l17;
}
fieldOffset = (((numSlotsOf(array1)) - 1) * BytesPerOop) + BaseHeaderSize;
- goto l18;
+ goto l17;
}
if (fmt < (firstCompiledMethodFormat())) {
fieldOffset = 0;
- goto l18;
+ goto l17;
}
/* begin methodHeaderOf: */
assert(isCompiledMethod(array1));
@@ -47182,7 +47230,7 @@
header = ((((CogMethod *) header1))->methodHeader);
}
fieldOffset = ((((literalCountOfMethodHeader(header)) + LiteralStart) - 1) * BytesPerOop) + BaseHeaderSize;
- l18: /* end lastPointerOf: */;
+ l17: /* end lastPointerOf: */;
/* same size as array2 */
effectsFlags = (size = 0);
@@ -47267,14 +47315,14 @@
}
if (!(((errCode = isOopValidBecome(oop1))) == 0)) {
ec = errCode;
- goto l21;
+ goto l20;
}
effectsFlags1 = effectsFlags1 | (becomeEffectFlagsFor(oop1));
fieldOffset1 -= BytesPerOop;
}
GIV(becomeEffectsFlags) = effectsFlags1;
ec = 0;
- l21: /* end containsOnlyValidBecomeObjects: */;
+ l20: /* end containsOnlyValidBecomeObjects: */;
}
if (ec != 0) {
GIV(becomeEffectsFlags) = 0;
@@ -47461,17 +47509,18 @@
long32Atput(obj21 + 4, ((((long32At(obj21 + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash);
}
if ((isOldObject(obj11))
- && (isYoungObject(obj21))) {
+ && (((obj21 & (tagMask())) == 0)
+ && (oopisLessThan(obj21, GIV(newSpaceLimit))))) {
GIV(becomeEffectsFlags) = GIV(becomeEffectsFlags) | OldBecameNewFlag;
}
- assert(!((isForwarded(obj21))));
+ assert(!((isOopForwarded(obj21))));
/* begin followField:ofObject: */
objOop4 = longAt((array1 + BaseHeaderSize) + (((long)i1) << (shiftForWord())));
if (((objOop4 & (tagMask())) == 0)
&& (((longAt(objOop4)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) {
objOop4 = fixFollowedFieldofObjectwithInitialValue(i1, array1, objOop4);
}
- assert(!(isForwarded(obj21)));
+ assert(!(isOopForwarded(obj21)));
}
}
}
@@ -55916,7 +55965,7 @@
/* Now remove the inactive ephemeron from the set, and scan-mark it.
Scan-marking it may add more ephemerons to the set. */
foundInactive = 1;
- (GIV(unscannedEphemerons).top = ((GIV(unscannedEphemerons).top)) - BytesPerWord);
+ (GIV(unscannedEphemerons).top = ((GIV(unscannedEphemerons).top)) - BytesPerOop);
if (((GIV(unscannedEphemerons).top)) > ptr) {
longAtput(ptr, longAt((GIV(unscannedEphemerons).top)));
}
@@ -56168,7 +56217,7 @@
l2: /* end markAndTrace: */;
}
else {
- ptr += BytesPerWord;
+ ptr += BytesPerOop;
}
}
return foundInactive;
@@ -56194,6 +56243,7 @@
sqInt classTablePage;
sqInt contextSize;
sqInt contextSize1;
+ sqInt contextSize10;
sqInt contextSize11;
sqInt contextSize12;
sqInt contextSize2;
@@ -56209,6 +56259,7 @@
sqInt contextSize9;
sqInt field;
sqInt field1;
+ sqInt field10;
sqInt field11;
sqInt field12;
sqInt field2;
@@ -56224,6 +56275,7 @@
sqInt field9;
sqInt fmt;
sqInt fmt1;
+ sqInt fmt10;
sqInt fmt11;
sqInt fmt12;
sqInt fmt2;
@@ -56241,6 +56293,7 @@
sqInt format11;
sqInt format110;
sqInt format111;
+ sqInt format1110;
sqInt format112;
sqInt format113;
sqInt format114;
@@ -56250,6 +56303,7 @@
sqInt format118;
sqInt format119;
sqInt format12;
+ sqInt format120;
sqInt format121;
sqInt format122;
sqInt format13;
@@ -56271,6 +56325,7 @@
sqInt header1;
sqInt header10;
sqInt header11;
+ sqInt header110;
sqInt header111;
sqInt header112;
sqInt header12;
@@ -56285,6 +56340,7 @@
sqInt header18;
sqInt header19;
sqInt header2;
+ sqInt header20;
sqInt header21;
sqInt header22;
sqInt header3;
@@ -56305,6 +56361,7 @@
sqInt iLimiT;
sqInt index;
sqInt index1;
+ sqInt index10;
sqInt index11;
sqInt index12;
sqInt index2;
@@ -56323,6 +56380,7 @@
sqInt largestFree;
sqInt numLiterals;
sqInt numLiterals1;
+ sqInt numLiterals10;
sqInt numLiterals11;
sqInt numLiterals12;
sqInt numLiterals2;
@@ -56340,6 +56398,7 @@
usqInt numSlots1;
usqInt numSlots10;
usqInt numSlots11;
+ usqInt numSlots110;
usqInt numSlots111;
usqInt numSlots112;
usqInt numSlots12;
@@ -56354,6 +56413,7 @@
usqInt numSlots18;
usqInt numSlots19;
usqInt numSlots2;
+ usqInt numSlots20;
usqInt numSlots21;
usqInt numSlots22;
usqInt numSlots3;
@@ -56368,6 +56428,7 @@
usqInt numSlots9;
sqInt numStrongSlots;
sqInt numStrongSlots1;
+ sqInt numStrongSlots10;
sqInt numStrongSlots11;
sqInt numStrongSlots12;
sqInt numStrongSlots2;
@@ -56387,6 +56448,7 @@
sqInt objOop110;
sqInt objOop111;
sqInt objOop112;
+ sqInt objOop113;
sqInt objOop12;
sqInt objOop121;
sqInt objOop122;
@@ -56408,8 +56470,10 @@
sqInt objOop4;
sqInt objOop41;
sqInt objOop5;
+ sqInt objOop6;
sqInt objToScan;
sqInt objToScan1;
+ sqInt objToScan10;
sqInt objToScan11;
sqInt objToScan12;
sqInt objToScan2;
@@ -56432,6 +56496,7 @@
sqInt referent4;
int scanLargeObject;
int scanLargeObject1;
+ int scanLargeObject10;
int scanLargeObject11;
int scanLargeObject12;
int scanLargeObject2;
@@ -56448,6 +56513,7 @@
usqInt sizeOfUnusedEden;
sqInt sp;
sqInt sp1;
+ sqInt sp10;
sqInt sp11;
sqInt sp12;
sqInt sp2;
@@ -56465,6 +56531,7 @@
numStrongSlots = 0;
numStrongSlots1 = 0;
+ numStrongSlots10 = 0;
numStrongSlots11 = 0;
numStrongSlots12 = 0;
numStrongSlots2 = 0;
@@ -56501,14 +56568,11 @@
ensureRoomOnObjStackAt(MarkStackRootIndex);
/* begin initializeWeaklingStack */
ensureRoomOnObjStackAt(WeaklingStackRootIndex);
+ GIV(marking) = 1;
/* begin markAccessibleObjectsAndFireEphemerons */
+ assert(GIV(marking));
assert(validClassTableRootPages());
assert(allBridgesMarked());
-
- /* This must come first to enable stack page reclamation. It clears
- the trace flags on stack pages and so must precede any marking.
- Otherwise it will clear the trace flags of reached pages. */
- GIV(marking) = 1;
/* begin initStackPageGC */
if (GIV(stackPage) != 0) {
/* begin externalWriteBackHeadFramePointers */
@@ -56534,9 +56598,9 @@
markAndTraceObjStackandContents(GIV(weaklingStack), 0);
markAndTraceObjStackandContents(GIV(mournQueue), 1);
/* begin setIsMarkedOf:to: */
- objOop19 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((long)RememberedSetRootIndex) << (shiftForWord())));
- assert(!(isFreeObject(objOop19)));
- longAtput(objOop19, (longAt(objOop19)) | (1LL << 55));
+ objOop110 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((long)RememberedSetRootIndex) << (shiftForWord())));
+ assert(!(isFreeObject(objOop110)));
+ longAtput(objOop110, (longAt(objOop110)) | (1LL << 55));
/* begin setIsMarkedOf:to: */
assert((firstIndexableField(objectAfter(GIV(trueObj)))) == GIV(freeLists));
objOop21 = objectAfter(GIV(trueObj));
@@ -56547,35 +56611,35 @@
/* inline markAndShouldScan: */
if (GIV(hiddenRootsObj) & (tagMask())) {
- goto l69;
+ goto l77;
}
assert(!(isForwarded(GIV(hiddenRootsObj))));
if (((((usqInt) (longAt(GIV(hiddenRootsObj)))) >> 55) & 1) != 0) {
- goto l69;
+ goto l77;
}
/* begin setIsMarkedOf:to: */
assert(!(isFreeObject(GIV(hiddenRootsObj))));
longAtput(GIV(hiddenRootsObj), (longAt(GIV(hiddenRootsObj))) | (1LL << 55));
- format117 = (((usqInt) (longAt(GIV(hiddenRootsObj)))) >> (formatShift())) & (formatMask());
- if ((format117 >= (sixtyFourBitIndexableFormat()))
- && (format117 < (firstCompiledMethodFormat()))) {
+ format119 = (((usqInt) (longAt(GIV(hiddenRootsObj)))) >> (formatShift())) & (formatMask());
+ if ((format119 >= (sixtyFourBitIndexableFormat()))
+ && (format119 < (firstCompiledMethodFormat()))) {
/* avoid pushing non-pointer objects on the markStack. */
/* Avoid tracing classes of non-objects on the heap, e.g. IRC caches, Sista counters. */
if (((longAt(GIV(hiddenRootsObj))) & (classIndexMask())) > (lastClassIndexPun())) {
markAndTraceClassOf(GIV(hiddenRootsObj));
}
- goto l69;
+ goto l77;
}
- if (format117 == (weakArrayFormat())) {
+ if (format119 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
pushonObjStack(GIV(hiddenRootsObj), GIV(weaklingStack));
- goto l69;
+ goto l77;
}
- if ((format117 == 5)
+ if ((format119 == 5)
&& (activeAndDeferredScan(GIV(hiddenRootsObj)))) {
- goto l69;
+ goto l77;
}
/* end markAndShouldScan:; fall through */
;
@@ -56583,211 +56647,211 @@
/* To avoid overflowing the mark stack when we encounter large objects, we
push the obj, then its numStrongSlots, and then index the object from the stack. */
- objToScan8 = GIV(hiddenRootsObj);
+ objToScan9 = GIV(hiddenRootsObj);
do {
- if (objToScan8 & (tagMask())) {
- scanLargeObject8 = 1;
+ if (objToScan9 & (tagMask())) {
+ scanLargeObject9 = 1;
}
else {
/* begin numStrongSlotsOfInephemeral: */
- fmt8 = (((usqInt) (longAt(objToScan8))) >> (formatShift())) & (formatMask());
- assert((fmt8 != (ephemeronFormat()))
- || (isMarked(keyOfEphemeron(objToScan8))));
- if (fmt8 <= 5) {
+ fmt9 = (((usqInt) (longAt(objToScan9))) >> (formatShift())) & (formatMask());
+ assert((fmt9 != (ephemeronFormat()))
+ || (isMarked(keyOfEphemeron(objToScan9))));
+ if (fmt9 <= 5) {
/* begin numSlotsOf: */
flag("endianness");
- assert((classIndexOf(objToScan8)) > (isForwardedObjectClassIndexPun()));
- numSlots18 = byteAt(objToScan8 + 7);
- numSlots9 = (numSlots18 == (numSlotsMask())
- ? ((usqInt) (((unsigned long)(((long)(longAt(objToScan8 - BaseHeaderSize))) << 8)))) >> 8
- : numSlots18);
- if (fmt8 <= 2) {
- numStrongSlots8 = numSlots9;
- goto l70;
+ assert((classIndexOf(objToScan9)) > (isForwardedObjectClassIndexPun()));
+ numSlots19 = byteAt(objToScan9 + 7);
+ numSlots10 = (numSlots19 == (numSlotsMask())
+ ? ((usqInt) (((unsigned long)(((long)(longAt(objToScan9 - BaseHeaderSize))) << 8)))) >> 8
+ : numSlots19);
+ if (fmt9 <= 2) {
+ numStrongSlots9 = numSlots10;
+ goto l78;
}
- if (fmt8 == (indexablePointersFormat())) {
- if (((longAt(objToScan8)) & (classIndexMask())) == ClassMethodContextCompactIndex) {
- setTraceFlagOnContextsFramesPageIfNeeded(objToScan8);
+ if (fmt9 == (indexablePointersFormat())) {
+ if (((longAt(objToScan9)) & (classIndexMask())) == ClassMethodContextCompactIndex) {
+ setTraceFlagOnContextsFramesPageIfNeeded(objToScan9);
/* begin fetchStackPointerOf: */
- sp8 = longAt((objToScan8 + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
- if (!((((sp8) & 7) == 1))) {
- contextSize8 = 0;
- goto l81;
+ sp9 = longAt((objToScan9 + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
+ if (!((((sp9) & 7) == 1))) {
+ contextSize9 = 0;
+ goto l89;
}
- assert((ReceiverIndex + ((sp8 >> 3))) < (lengthOf(objToScan8)));
- contextSize8 = (sp8 >> 3);
- l81: /* end fetchStackPointerOf: */;
- numStrongSlots8 = CtxtTempFrameStart + contextSize8;
- goto l70;
+ assert((ReceiverIndex + ((sp9 >> 3))) < (lengthOf(objToScan9)));
+ contextSize9 = (sp9 >> 3);
+ l89: /* end fetchStackPointerOf: */;
+ numStrongSlots9 = CtxtTempFrameStart + contextSize9;
+ goto l78;
}
- numStrongSlots8 = numSlots9;
- goto l70;
+ numStrongSlots9 = numSlots10;
+ goto l78;
}
- if (fmt8 == (weakArrayFormat())) {
+ if (fmt9 == (weakArrayFormat())) {
/* begin fixedFieldsOfClass: */
- objOop111 = fetchClassOfNonImm(objToScan8);
+ objOop111 = fetchClassOfNonImm(objToScan9);
/* begin fixedFieldsOfClassFormat: */
- numStrongSlots8 = (((longAt((objOop111 + BaseHeaderSize) + (((long)InstanceSpecificationIndex) << (shiftForWord())))) >> 3)) & ((1LL << (fixedFieldsFieldWidth())) - 1);
- goto l70;
+ numStrongSlots9 = (((longAt((objOop111 + BaseHeaderSize) + (((long)InstanceSpecificationIndex) << (shiftForWord())))) >> 3)) & ((1LL << (fixedFieldsFieldWidth())) - 1);
+ goto l78;
}
}
- if (fmt8 == 7) {
- numStrongSlots8 = 1;
- goto l70;
+ if (fmt9 == 7) {
+ numStrongSlots9 = 1;
+ goto l78;
}
- if (fmt8 < (firstCompiledMethodFormat())) {
- numStrongSlots8 = 0;
- goto l70;
+ if (fmt9 < (firstCompiledMethodFormat())) {
+ numStrongSlots9 = 0;
+ goto l78;
}
/* begin methodHeaderOf: */
- assert(isCompiledMethod(objToScan8));
- header18 = longAt((objToScan8 + BaseHeaderSize) + (((long)HeaderIndex) << (shiftForWord())));
- if ((((header18) & 7) == 1)) {
- header9 = header18;
+ assert(isCompiledMethod(objToScan9));
+ header19 = longAt((objToScan9 + BaseHeaderSize) + (((long)HeaderIndex) << (shiftForWord())));
+ if ((((header19) & 7) == 1)) {
+ header10 = header19;
}
else {
- assert((((usqInt)header18)) < GIV(newSpaceStart));
- assert((((((CogMethod *) header18))->objectHeader)) == (nullHeaderForMachineCodeMethod()));
- header9 = ((((CogMethod *) header18))->methodHeader);
+ assert((((usqInt)header19)) < GIV(newSpaceStart));
+ assert((((((CogMethod *) header19))->objectHeader)) == (nullHeaderForMachineCodeMethod()));
+ header10 = ((((CogMethod *) header19))->methodHeader);
}
/* begin literalCountOfMethodHeader: */
- assert((((header9) & 7) == 1));
- numLiterals8 = ((header9 >> 3)) & AlternateHeaderNumLiteralsMask;
- numStrongSlots8 = numLiterals8 + LiteralStart;
- l70: /* end numStrongSlotsOfInephemeral: */;
- scanLargeObject8 = numStrongSlots8 > 64;
+ assert((((header10) & 7) == 1));
+ numLiterals9 = ((header10 >> 3)) & AlternateHeaderNumLiteralsMask;
+ numStrongSlots9 = numLiterals9 + LiteralStart;
+ l78: /* end numStrongSlotsOfInephemeral: */;
+ scanLargeObject9 = numStrongSlots9 > 64;
}
- if (scanLargeObject8) {
+ if (scanLargeObject9) {
/* scanning a large object. scan until hitting an unmarked object, then switch to it, if any. */
- if (objToScan8 & (tagMask())) {
- index8 = (objToScan8 >> 3);
- objToScan8 = topOfObjStack(GIV(markStack));
+ if (objToScan9 & (tagMask())) {
+ index9 = (objToScan9 >> 3);
+ objToScan9 = topOfObjStack(GIV(markStack));
}
else {
- index8 = numStrongSlots8;
- markAndTraceClassOf(objToScan8);
+ index9 = numStrongSlots9;
+ markAndTraceClassOf(objToScan9);
}
- while (index8 > 0) {
- index8 -= 1;
- field8 = longAt((objToScan8 + BaseHeaderSize) + (((long)index8) << (shiftForWord())));
- if ((field8 & (tagMask())) == 0) {
- if (((longAt(field8)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
+ while (index9 > 0) {
+ index9 -= 1;
+ field9 = longAt((objToScan9 + BaseHeaderSize) + (((long)index9) << (shiftForWord())));
+ if ((field9 & (tagMask())) == 0) {
+ if (((longAt(field9)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
/* fixFollowedField: is /not/ inlined */
- field8 = fixFollowedFieldofObjectwithInitialValue(index8, objToScan8, field8);
+ field9 = fixFollowedFieldofObjectwithInitialValue(index9, objToScan9, field9);
}
- if (field8 & (tagMask())) {
- goto l68;
+ if (field9 & (tagMask())) {
+ goto l76;
}
- assert(!(isForwarded(field8)));
- if (((((usqInt) (longAt(field8))) >> 55) & 1) != 0) {
- goto l68;
+ assert(!(isForwarded(field9)));
+ if (((((usqInt) (longAt(field9))) >> 55) & 1) != 0) {
+ goto l76;
}
/* begin setIsMarkedOf:to: */
- assert(!(isFreeObject(field8)));
- longAtput(field8, (longAt(field8)) | (1LL << 55));
- format121 = (((usqInt) (longAt(field8))) >> (formatShift())) & (formatMask());
+ assert(!(isFreeObject(field9)));
+ longAtput(field9, (longAt(field9)) | (1LL << 55));
+ format121 = (((usqInt) (longAt(field9))) >> (formatShift())) & (formatMask());
if ((format121 >= (sixtyFourBitIndexableFormat()))
&& (format121 < (firstCompiledMethodFormat()))) {
/* avoid pushing non-pointer objects on the markStack. */
/* Avoid tracing classes of non-objects on the heap, e.g. IRC caches, Sista counters. */
- if (((longAt(field8)) & (classIndexMask())) > (lastClassIndexPun())) {
- markAndTraceClassOf(field8);
+ if (((longAt(field9)) & (classIndexMask())) > (lastClassIndexPun())) {
+ markAndTraceClassOf(field9);
}
- goto l68;
+ goto l76;
}
if (format121 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
- pushonObjStack(field8, GIV(weaklingStack));
- goto l68;
+ pushonObjStack(field9, GIV(weaklingStack));
+ goto l76;
}
if ((format121 == 5)
- && (activeAndDeferredScan(field8))) {
- goto l68;
+ && (activeAndDeferredScan(field9))) {
+ goto l76;
}
/* end markAndShouldScan:; fall through */
- if (index8 > 0) {
- if ((topOfObjStack(GIV(markStack))) != objToScan8) {
- pushonObjStack(objToScan8, GIV(markStack));
+ if (index9 > 0) {
+ if ((topOfObjStack(GIV(markStack))) != objToScan9) {
+ pushonObjStack(objToScan9, GIV(markStack));
}
- pushonObjStack(((index8 << 3) | 1), GIV(markStack));
+ pushonObjStack(((index9 << 3) | 1), GIV(markStack));
}
- objToScan8 = field8;
- index8 = -1;
- l68: ;
+ objToScan9 = field9;
+ index9 = -1;
+ l76: ;
}
}
- if (index8 >= 0) {
+ if (index9 >= 0) {
/* if loop terminated without finding an unmarked referent, switch to top of stack. */
- objToScan8 = popObjStack(GIV(markStack));
- if (objToScan8 == GIV(hiddenRootsObj)) {
- objToScan8 = popObjStack(GIV(markStack));
+ objToScan9 = popObjStack(GIV(markStack));
+ if (objToScan9 == GIV(hiddenRootsObj)) {
+ objToScan9 = popObjStack(GIV(markStack));
}
}
}
else {
/* scanning a small object. scan, marking, pushing unmarked referents, then switch to the top of the stack. */
- index8 = numStrongSlots8;
- markAndTraceClassOf(objToScan8);
- while (index8 > 0) {
- index8 -= 1;
- field8 = longAt((objToScan8 + BaseHeaderSize) + (((long)index8) << (shiftForWord())));
- if ((field8 & (tagMask())) == 0) {
- if (((longAt(field8)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
+ index9 = numStrongSlots9;
+ markAndTraceClassOf(objToScan9);
+ while (index9 > 0) {
+ index9 -= 1;
+ field9 = longAt((objToScan9 + BaseHeaderSize) + (((long)index9) << (shiftForWord())));
+ if ((field9 & (tagMask())) == 0) {
+ if (((longAt(field9)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
/* fixFollowedField: is /not/ inlined */
- field8 = fixFollowedFieldofObjectwithInitialValue(index8, objToScan8, field8);
+ field9 = fixFollowedFieldofObjectwithInitialValue(index9, objToScan9, field9);
}
- if (field8 & (tagMask())) {
- goto l79;
+ if (field9 & (tagMask())) {
+ goto l87;
}
- assert(!(isForwarded(field8)));
- if (((((usqInt) (longAt(field8))) >> 55) & 1) != 0) {
- goto l79;
+ assert(!(isForwarded(field9)));
+ if (((((usqInt) (longAt(field9))) >> 55) & 1) != 0) {
+ goto l87;
}
/* begin setIsMarkedOf:to: */
- assert(!(isFreeObject(field8)));
- longAtput(field8, (longAt(field8)) | (1LL << 55));
- format121 = (((usqInt) (longAt(field8))) >> (formatShift())) & (formatMask());
+ assert(!(isFreeObject(field9)));
+ longAtput(field9, (longAt(field9)) | (1LL << 55));
+ format121 = (((usqInt) (longAt(field9))) >> (formatShift())) & (formatMask());
if ((format121 >= (sixtyFourBitIndexableFormat()))
&& (format121 < (firstCompiledMethodFormat()))) {
/* avoid pushing non-pointer objects on the markStack. */
/* Avoid tracing classes of non-objects on the heap, e.g. IRC caches, Sista counters. */
- if (((longAt(field8)) & (classIndexMask())) > (lastClassIndexPun())) {
- markAndTraceClassOf(field8);
+ if (((longAt(field9)) & (classIndexMask())) > (lastClassIndexPun())) {
+ markAndTraceClassOf(field9);
}
- goto l79;
+ goto l87;
}
if (format121 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
- pushonObjStack(field8, GIV(weaklingStack));
- goto l79;
+ pushonObjStack(field9, GIV(weaklingStack));
+ goto l87;
}
if ((format121 == 5)
- && (activeAndDeferredScan(field8))) {
- goto l79;
+ && (activeAndDeferredScan(field9))) {
+ goto l87;
}
/* end markAndShouldScan:; fall through */
- pushonObjStack(field8, GIV(markStack));
- if (((byteAt(field8 + 7)) > 64)
- && (((numStrongSlots8 = numStrongSlotsOfInephemeral(field8))) > 64)) {
- pushonObjStack(((numStrongSlots8 << 3) | 1), GIV(markStack));
+ pushonObjStack(field9, GIV(markStack));
+ if (((byteAt(field9 + 7)) > 64)
+ && (((numStrongSlots9 = numStrongSlotsOfInephemeral(field9))) > 64)) {
+ pushonObjStack(((numStrongSlots9 << 3) | 1), GIV(markStack));
}
- l79: ;
+ l87: ;
}
}
- objToScan8 = popObjStack(GIV(markStack));
+ objToScan9 = popObjStack(GIV(markStack));
}
- } while(objToScan8 != null);
- l69: /* end markAndTrace: */;
- goto l84;
+ } while(objToScan9 != null);
+ l77: /* end markAndTrace: */;
+ goto l92;
}
/* begin setIsMarkedOf:to: */
assert(!(isFreeObject(GIV(hiddenRootsObj))));
@@ -56796,35 +56860,35 @@
/* inline markAndShouldScan: */
if (GIV(classTableFirstPage) & (tagMask())) {
- goto l74;
+ goto l82;
}
assert(!(isForwarded(GIV(classTableFirstPage))));
if (((((usqInt) (longAt(GIV(classTableFirstPage)))) >> 55) & 1) != 0) {
- goto l74;
+ goto l82;
}
/* begin setIsMarkedOf:to: */
assert(!(isFreeObject(GIV(classTableFirstPage))));
longAtput(GIV(classTableFirstPage), (longAt(GIV(classTableFirstPage))) | (1LL << 55));
- format116 = (((usqInt) (longAt(GIV(classTableFirstPage)))) >> (formatShift())) & (formatMask());
- if ((format116 >= (sixtyFourBitIndexableFormat()))
- && (format116 < (firstCompiledMethodFormat()))) {
+ format118 = (((usqInt) (longAt(GIV(classTableFirstPage)))) >> (formatShift())) & (formatMask());
+ if ((format118 >= (sixtyFourBitIndexableFormat()))
+ && (format118 < (firstCompiledMethodFormat()))) {
/* avoid pushing non-pointer objects on the markStack. */
/* Avoid tracing classes of non-objects on the heap, e.g. IRC caches, Sista counters. */
if (((longAt(GIV(classTableFirstPage))) & (classIndexMask())) > (lastClassIndexPun())) {
markAndTraceClassOf(GIV(classTableFirstPage));
}
- goto l74;
+ goto l82;
}
- if (format116 == (weakArrayFormat())) {
+ if (format118 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
pushonObjStack(GIV(classTableFirstPage), GIV(weaklingStack));
- goto l74;
+ goto l82;
}
- if ((format116 == 5)
+ if ((format118 == 5)
&& (activeAndDeferredScan(GIV(classTableFirstPage)))) {
- goto l74;
+ goto l82;
}
/* end markAndShouldScan:; fall through */
;
@@ -56852,7 +56916,7 @@
: numSlots111);
if (fmt11 <= 2) {
numStrongSlots11 = numSlots21;
- goto l77;
+ goto l85;
}
if (fmt11 == (indexablePointersFormat())) {
if (((longAt(objToScan11)) & (classIndexMask())) == ClassMethodContextCompactIndex) {
@@ -56861,32 +56925,32 @@
sp11 = longAt((objToScan11 + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
if (!((((sp11) & 7) == 1))) {
contextSize11 = 0;
- goto l71;
+ goto l79;
}
assert((ReceiverIndex + ((sp11 >> 3))) < (lengthOf(objToScan11)));
contextSize11 = (sp11 >> 3);
- l71: /* end fetchStackPointerOf: */;
+ l79: /* end fetchStackPointerOf: */;
numStrongSlots11 = CtxtTempFrameStart + contextSize11;
- goto l77;
+ goto l85;
}
numStrongSlots11 = numSlots21;
- goto l77;
+ goto l85;
}
if (fmt11 == (weakArrayFormat())) {
/* begin fixedFieldsOfClass: */
objOop121 = fetchClassOfNonImm(objToScan11);
/* begin fixedFieldsOfClassFormat: */
numStrongSlots11 = (((longAt((objOop121 + BaseHeaderSize) + (((long)InstanceSpecificationIndex) << (shiftForWord())))) >> 3)) & ((1LL << (fixedFieldsFieldWidth())) - 1);
- goto l77;
+ goto l85;
}
}
if (fmt11 == 7) {
numStrongSlots11 = 1;
- goto l77;
+ goto l85;
}
if (fmt11 < (firstCompiledMethodFormat())) {
numStrongSlots11 = 0;
- goto l77;
+ goto l85;
}
/* begin methodHeaderOf: */
assert(isCompiledMethod(objToScan11));
@@ -56903,7 +56967,7 @@
assert((((header21) & 7) == 1));
numLiterals11 = ((header21 >> 3)) & AlternateHeaderNumLiteralsMask;
numStrongSlots11 = numLiterals11 + LiteralStart;
- l77: /* end numStrongSlotsOfInephemeral: */;
+ l85: /* end numStrongSlotsOfInephemeral: */;
scanLargeObject11 = numStrongSlots11 > 64;
}
if (scanLargeObject11) {
@@ -56927,11 +56991,11 @@
field11 = fixFollowedFieldofObjectwithInitialValue(index11, objToScan11, field11);
}
if (field11 & (tagMask())) {
- goto l73;
+ goto l81;
}
assert(!(isForwarded(field11)));
if (((((usqInt) (longAt(field11))) >> 55) & 1) != 0) {
- goto l73;
+ goto l81;
}
/* begin setIsMarkedOf:to: */
assert(!(isFreeObject(field11)));
@@ -56945,17 +57009,17 @@
if (((longAt(field11)) & (classIndexMask())) > (lastClassIndexPun())) {
markAndTraceClassOf(field11);
}
- goto l73;
+ goto l81;
}
if (format131 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
pushonObjStack(field11, GIV(weaklingStack));
- goto l73;
+ goto l81;
}
if ((format131 == 5)
&& (activeAndDeferredScan(field11))) {
- goto l73;
+ goto l81;
}
/* end markAndShouldScan:; fall through */
if (index11 > 0) {
@@ -56966,7 +57030,7 @@
}
objToScan11 = field11;
index11 = -1;
- l73: ;
+ l81: ;
}
}
if (index11 >= 0) {
@@ -56993,11 +57057,11 @@
field11 = fixFollowedFieldofObjectwithInitialValue(index11, objToScan11, field11);
}
if (field11 & (tagMask())) {
- goto l67;
+ goto l75;
}
assert(!(isForwarded(field11)));
if (((((usqInt) (longAt(field11))) >> 55) & 1) != 0) {
- goto l67;
+ goto l75;
}
/* begin setIsMarkedOf:to: */
assert(!(isFreeObject(field11)));
@@ -57011,17 +57075,17 @@
if (((longAt(field11)) & (classIndexMask())) > (lastClassIndexPun())) {
markAndTraceClassOf(field11);
}
- goto l67;
+ goto l75;
}
if (format131 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
pushonObjStack(field11, GIV(weaklingStack));
- goto l67;
+ goto l75;
}
if ((format131 == 5)
&& (activeAndDeferredScan(field11))) {
- goto l67;
+ goto l75;
}
/* end markAndShouldScan:; fall through */
pushonObjStack(field11, GIV(markStack));
@@ -57029,20 +57093,20 @@
&& (((numStrongSlots11 = numStrongSlotsOfInephemeral(field11))) > 64)) {
pushonObjStack(((numStrongSlots11 << 3) | 1), GIV(markStack));
}
- l67: ;
+ l75: ;
}
}
objToScan11 = popObjStack(GIV(markStack));
}
} while(objToScan11 != null);
-l74: /* end markAndTrace: */;
+l82: /* end markAndTrace: */;
for (i4 = 1; i4 < GIV(numClassTablePages); i4 += 1) {
/* begin setIsMarkedOf:to: */
- objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((long)i4) << (shiftForWord())));
- assert(!(isFreeObject(objOop4)));
- longAtput(objOop4, (longAt(objOop4)) | (1LL << 55));
+ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((long)i4) << (shiftForWord())));
+ assert(!(isFreeObject(objOop5)));
+ longAtput(objOop5, (longAt(objOop5)) | (1LL << 55));
}
-l84: /* end markAndTraceHiddenRoots */;
+l92: /* end markAndTraceHiddenRoots */;
/* begin markAndTraceExtraRoots */
assert(GIV(remapBufferCount) == 0);
for (i = 1; i <= GIV(extraRootCount); i += 1) {
@@ -57109,7 +57173,7 @@
: numSlots1);
if (fmt <= 2) {
numStrongSlots = numSlots;
- goto l31;
+ goto l34;
}
if (fmt == (indexablePointersFormat())) {
if (((longAt(objToScan)) & (classIndexMask())) == ClassMethodContextCompactIndex) {
@@ -57118,32 +57182,32 @@
sp = longAt((objToScan + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
if (!((((sp) & 7) == 1))) {
contextSize = 0;
- goto l29;
+ goto l32;
}
assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objToScan)));
contextSize = (sp >> 3);
- l29: /* end fetchStackPointerOf: */;
+ l32: /* end fetchStackPointerOf: */;
numStrongSlots = CtxtTempFrameStart + contextSize;
- goto l31;
+ goto l34;
}
numStrongSlots = numSlots;
- goto l31;
+ goto l34;
}
if (fmt == (weakArrayFormat())) {
/* begin fixedFieldsOfClass: */
objOop11 = fetchClassOfNonImm(objToScan);
/* begin fixedFieldsOfClassFormat: */
numStrongSlots = (((longAt((objOop11 + BaseHeaderSize) + (((long)InstanceSpecificationIndex) << (shiftForWord())))) >> 3)) & ((1LL << (fixedFieldsFieldWidth())) - 1);
- goto l31;
+ goto l34;
}
}
if (fmt == 7) {
numStrongSlots = 1;
- goto l31;
+ goto l34;
}
if (fmt < (firstCompiledMethodFormat())) {
numStrongSlots = 0;
- goto l31;
+ goto l34;
}
/* begin methodHeaderOf: */
assert(isCompiledMethod(objToScan));
@@ -57160,7 +57224,7 @@
assert((((header) & 7) == 1));
numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask;
numStrongSlots = numLiterals + LiteralStart;
- l31: /* end numStrongSlotsOfInephemeral: */;
+ l34: /* end numStrongSlotsOfInephemeral: */;
scanLargeObject = numStrongSlots > 64;
}
if (scanLargeObject) {
@@ -57303,39 +57367,39 @@
markAndTraceTraceLog();
markAndTracePrimTraceLog();
/* begin markAndTrace: */
- objOop3 = GIV(specialObjectsOop);
+ objOop4 = GIV(specialObjectsOop);
/* inline markAndShouldScan: */
- if (objOop3 & (tagMask())) {
- goto l12;
+ if (objOop4 & (tagMask())) {
+ goto l13;
}
- assert(!(isForwarded(objOop3)));
- if (((((usqInt) (longAt(objOop3))) >> 55) & 1) != 0) {
- goto l12;
+ assert(!(isForwarded(objOop4)));
+ if (((((usqInt) (longAt(objOop4))) >> 55) & 1) != 0) {
+ goto l13;
}
/* begin setIsMarkedOf:to: */
- assert(!(isFreeObject(objOop3)));
- longAtput(objOop3, (longAt(objOop3)) | (1LL << 55));
- format18 = (((usqInt) (longAt(objOop3))) >> (formatShift())) & (formatMask());
- if ((format18 >= (sixtyFourBitIndexableFormat()))
- && (format18 < (firstCompiledMethodFormat()))) {
+ assert(!(isFreeObject(objOop4)));
+ longAtput(objOop4, (longAt(objOop4)) | (1LL << 55));
+ format19 = (((usqInt) (longAt(objOop4))) >> (formatShift())) & (formatMask());
+ if ((format19 >= (sixtyFourBitIndexableFormat()))
+ && (format19 < (firstCompiledMethodFormat()))) {
/* avoid pushing non-pointer objects on the markStack. */
/* Avoid tracing classes of non-objects on the heap, e.g. IRC caches, Sista counters. */
- if (((longAt(objOop3)) & (classIndexMask())) > (lastClassIndexPun())) {
- markAndTraceClassOf(objOop3);
+ if (((longAt(objOop4)) & (classIndexMask())) > (lastClassIndexPun())) {
+ markAndTraceClassOf(objOop4);
}
- goto l12;
+ goto l13;
}
- if (format18 == (weakArrayFormat())) {
+ if (format19 == (weakArrayFormat())) {
/* push weaklings on the weakling stack to scan later */
- pushonObjStack(objOop3, GIV(weaklingStack));
- goto l12;
+ pushonObjStack(objOop4, GIV(weaklingStack));
+ goto l13;
}
- if ((format18 == 5)
- && (activeAndDeferredScan(objOop3))) {
- goto l12;
+ if ((format19 == 5)
+ && (activeAndDeferredScan(objOop4))) {
+ goto l13;
}
/* end markAndShouldScan:; fall through */
;
@@ -57343,65 +57407,65 @@
/* To avoid overflowing the mark stack when we encounter large objects, we
push the obj, then its numStrongSlots, and then index the object from the stack. */
- objToScan7 = objOop3;
+ objToScan8 = objOop4;
do {
- if (objToScan7 & (tagMask())) {
- scanLargeObject7 = 1;
+ if (objToScan8 & (tagMask())) {
+ scanLargeObject8 = 1;
}
else {
/* begin numStrongSlotsOfInephemeral: */
- fmt1 = (((usqInt) (longAt(objToScan7))) >> (formatShift())) & (formatMask());
+ fmt1 = (((usqInt) (longAt(objToScan8))) >> (formatShift())) & (formatMask());
assert((fmt1 != (ephemeronFormat()))
- || (isMarked(keyOfEphemeron(objToScan7))));
+ || (isMarked(keyOfEphemeron(objToScan8))));
if (fmt1 <= 5) {
/* begin numSlotsOf: */
flag("endianness");
- assert((classIndexOf(objToScan7)) > (isForwardedObjectClassIndexPun()));
- numSlots11 = byteAt(objToScan7 + 7);
+ assert((classIndexOf(objToScan8)) > (isForwardedObjectClassIndexPun()));
+ numSlots11 = byteAt(objToScan8 + 7);
numSlots2 = (numSlots11 == (numSlotsMask())
- ? ((usqInt) (((unsigned long)(((long)(longAt(objToScan7 - BaseHeaderSize))) << 8)))) >> 8
+ ? ((usqInt) (((unsigned long)(((long)(longAt(objToScan8 - BaseHeaderSize))) << 8)))) >> 8
: numSlots11);
if (fmt1 <= 2) {
- numStrongSlots7 = numSlots2;
- goto l36;
+ numStrongSlots8 = numSlots2;
+ goto l39;
}
if (fmt1 == (indexablePointersFormat())) {
- if (((longAt(objToScan7)) & (classIndexMask())) == ClassMethodContextCompactIndex) {
- setTraceFlagOnContextsFramesPageIfNeeded(objToScan7);
+ if (((longAt(objToScan8)) & (classIndexMask())) == ClassMethodContextCompactIndex) {
+ setTraceFlagOnContextsFramesPageIfNeeded(objToScan8);
/* begin fetchStackPointerOf: */
- sp1 = longAt((objToScan7 + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
+ sp1 = longAt((objToScan8 + BaseHeaderSize) + (((long)StackPointerIndex) << (shiftForWord())));
if (!((((sp1) & 7) == 1))) {
contextSize1 = 0;
- goto l34;
+ goto l37;
}
- assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objToScan7)));
+ assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objToScan8)));
contextSize1 = (sp1 >> 3);
- l34: /* end fetchStackPointerOf: */;
- numStrongSlots7 = CtxtTempFrameStart + contextSize1;
- goto l36;
+ l37: /* end fetchStackPointerOf: */;
+ numStrongSlots8 = CtxtTempFrameStart + contextSize1;
+ goto l39;
}
- numStrongSlots7 = numSlots2;
- goto l36;
+ numStrongSlots8 = numSlots2;
+ goto l39;
}
if (fmt1 == (weakArrayFormat())) {
/* begin fixedFieldsOfClass: */
- objOop12 = fetchClassOfNonImm(objToScan7);
+ objOop12 = fetchClassOfNonImm(objToScan8);
/* begin fixedFieldsOfClassFormat: */
- numStrongSlots7 = (((longAt((objOop12 + BaseHeaderSize) + (((long)InstanceSpecificationIndex) << (shiftForWord())))) >> 3)) & ((1LL << (fixedFieldsFieldWidth())) - 1);
- goto l36;
+ numStrongSlots8 = (((longAt((objOop12 + BaseHeaderSize) + (((long)InstanceSpecificationIndex) << (shiftForWord())))) >> 3)) & ((1LL << (fixedFieldsFieldWidth())) - 1);
+ goto l39;
}
}
if (fmt1 == 7) {
- numStrongSlots7 = 1;
- goto l36;
+ numStrongSlots8 = 1;
+ goto l39;
}
if (fmt1 < (firstCompiledMethodFormat())) {
- numStrongSlots7 = 0;
- goto l36;
+ numStrongSlots8 = 0;
+ goto l39;
}
/* begin methodHeaderOf: */
- assert(isCompiledMethod(objToScan7));
- header11 = longAt((objToScan7 + BaseHeaderSize) + (((long)HeaderIndex) << (shiftForWord())));
+ assert(isCompiledMethod(objToScan8));
+ header11 = longAt((objToScan8 + BaseHeaderSize) + (((long)HeaderIndex) << (shiftForWord())));
if ((((header11) & 7) == 1)) {
header2 = header11;
}
@@ -57413,142 +57477,142 @@
/* begin literalCountOfMethodHeader: */
assert((((header2) & 7) == 1));
numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask;
- numStrongSlots7 = numLiterals1 + LiteralStart;
- l36: /* end numStrongSlotsOfInephemeral: */;
- scanLargeObject7 = numStrongSlots7 > 64;
+ numStrongSlots8 = numLiterals1 + LiteralStart;
+ l39: /* end numStrongSlotsOfInephemeral: */;
+ scanLargeObject8 = numStrongSlots8 > 64;
}
- if (scanLargeObject7) {
+ if (scanLargeObject8) {
/* scanning a large object. scan until hitting an unmarked object, then switch to it, if any. */
- if (objToScan7 & (tagMask())) {
- index7 = (objToScan7 >> 3);
- objToScan7 = topOfObjStack(GIV(markStack));
+ if (objToScan8 & (tagMask())) {
+ index8 = (objToScan8 >> 3);
+ objToScan8 = topOfObjStack(GIV(markStack));
}
else {
- index7 = numStrongSlots7;
- markAndTraceClassOf(objToScan7);
+ index8 = numStrongSlots8;
+ markAndTraceClassOf(objToScan8);
}
- while (index7 > 0) {
- index7 -= 1;
- field7 = longAt((objToScan7 + BaseHeaderSize) + (((long)index7) << (shiftForWord())));
- if ((field7 & (tagMask())) == 0) {
- if (((longAt(field7)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
+ while (index8 > 0) {
+ index8 -= 1;
+ field8 = longAt((objToScan8 + BaseHeaderSize) + (((long)index8) << (shiftForWord())));
+ if ((field8 & (tagMask())) == 0) {
+ if (((longAt(field8)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) {
/* fixFollowedField: is /not/ inlined */
- field7 = fixFollowedFieldofObjectwithInitialValue(index7, objToScan7, field7);
+ field8 = fixFollowedFieldofObjectwithInitialValue(index8, objToScan8, field8);
}
- if (field7 & (tagMask())) {
- goto l25;
+ if (field8 & (tagMask())) {
+ goto l28;
}
- assert(!(isForwarded(field7)));
- if (((((usqInt) (longAt(field7))) >> 55) & 1) != 0) {
- goto l25;
+ assert(!(isForwarded(field8)));
+ if (((((usqInt) (longAt(field8))) >> 55) & 1) != 0) {
+ goto l28;
}
/* begin setIsMarkedOf:to: */
- assert(!(isFreeObject(field7)));
- longAtput(field7, (longAt(field7)) | (1LL << 55));
- format115 = (((usqInt) (longAt(field7))) >> (formatShift())) & (formatMask());
- if ((format115 >= (sixtyFourBitIndexableFormat()))
- && (format115 < (firstCompiledMethodFormat()))) {
+ assert(!(isFreeObject(field8)));
+ longAtput(field8, (longAt(field8)) | (1LL << 55));
+ format117 = (((usqInt) (longAt(field8))) >> (formatShift())) & (formatMask());
+ if ((format117 >= (sixtyFourBitIndexableFormat()))
+ && (format117 < (firstCompiledMethodFormat()))) {
/* avoid pushing non-pointer objects on the markStack. */
/* Avoid tracing classes of non-objects on the heap, e.g. IRC caches, Sista counters. */
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list