From cd94cc6107330d0d9683b356258133127f460c95 Mon Sep 17 00:00:00 2001 From: Eliot Miranda Date: Fri, 27 Sep 2024 07:46:42 -0700 Subject: [PATCH] CogVM source as per VMMaker.oscog-eem.3457 Mark a couple of Sista interpreter support methods since they access localSP. Now that the inliner eliminates unnecessary duplication in switch statements simplify sistaMappedInlinePrimitive: --- src/spur32.sista/cointerp.c | 656 ++++++++++++++++++++---------- src/spur32.sista/gcc3x-cointerp.c | 656 ++++++++++++++++++++---------- src/spur64.sista/cointerp.c | 628 ++++++++++++++++++---------- src/spur64.sista/gcc3x-cointerp.c | 628 ++++++++++++++++++---------- 4 files changed, 1702 insertions(+), 866 deletions(-) diff --git a/src/spur32.sista/cointerp.c b/src/spur32.sista/cointerp.c index ae3149a789..0914c3b827 100644 --- a/src/spur32.sista/cointerp.c +++ b/src/spur32.sista/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 from - CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1990,7 +1990,7 @@ static signed short primitiveMetadataTable[MaxPrimitiveIndex + 2 /* 584 */] = { /*78*/ 0, 0, /*80*/ -256,-256,-256, 4, 4, 0, 0x100, 0, 0x200,-256,-256, 0, 0, 0, 0x100,-256, 0,-256, /*98*/ 0, 0, -/*100*/ 260, 0x200, 0x200, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256, +/*100*/ 260, 0x200, 0x100, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256, /*115*/ 0x100, 0, 12, 260, 0, /*120*/ 524, 0x100,-256,-256, 1, 0, 0, 0, 0,-255,-256, 0, 0, 0, 0,-256, 0,-256,-256, /*139*/ 0, @@ -2664,7 +2664,7 @@ sqInt debugCallbackInvokes; sqInt debugCallbackReturns; sqInt cannotDeferDisplayUpdates; sqInt checkedPluginName; -const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3456]"; +const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3457]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; char expensiveAsserts = 0; int (*showSurfaceFn)(sqIntptr_t, int, int, int, int); @@ -4649,7 +4649,7 @@ interpret(void) theFP = ((char *) 0); if (!(byteAt((localFP + FoxIFrameFlags) + 3))) { goto commonCallerReturn; - goto l131; + goto l135; } /* begin writeBackHeadFramePointers */ @@ -4695,10 +4695,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l133; + goto l137; } ourContext = marryFrameSP(localFP, localSP); -l133: /* end ensureFrameIsMarried:SP: */; +l137: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4706,7 +4706,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l131; + goto l135; } /* begin followObjField:ofObject: */ @@ -4728,10 +4728,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l135; + goto l139; } ourContext = marryFrameSP(localFP, localSP); -l135: /* end ensureFrameIsMarried:SP: */; +l139: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4739,7 +4739,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l131; + goto l135; } if (unwindContextOrNilOrZero) { /* begin internalAboutToReturn:through: */ @@ -4750,10 +4750,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l136; + goto l140; } ourContext = marryFrameSP(localFP, localSP); -l136: /* end ensureFrameIsMarried:SP: */; +l140: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4762,7 +4762,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l131; + goto l135; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + ((((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -4816,10 +4816,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l132; + goto l136; } ourContext = marryFrameSP(localFP, localSP); -l132: /* end ensureFrameIsMarried:SP: */; +l136: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4827,7 +4827,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l131; + goto l135; } } assert(pageListIsWellFormed()); @@ -4945,11 +4945,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l134; + goto l138; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } -l134: /* end maybeReturnToMachineCodeFrame */; +l138: /* end maybeReturnToMachineCodeFrame */; aMethodObj = longAt(localFP + FoxMethod); /* begin setMethod: */ @@ -4979,7 +4979,7 @@ interpret(void) /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l131:; +l135:; break; case 121: // returnTrue case 345: // 89 returnTrue @@ -5092,26 +5092,26 @@ l131:; fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l138; + goto l142; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l138; + goto l142; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; -l138: /* end findFrameAbove:inPage: */; +l142: /* end findFrameAbove:inPage: */; /* begin newStackPage */ newPage = (GIV(mostRecentlyUsedPage)->nextPage); if (!((newPage->baseFP))) { - goto l139; + goto l143; } divorceFramesIn(newPage); -l139: /* end newStackPage */; +l143: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5138,7 +5138,7 @@ l131:; longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l137; + goto l141; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5177,7 +5177,7 @@ l131:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l137; + goto l141; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5210,7 +5210,7 @@ l131:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l137; + goto l141; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((/* frameNumArgs: */ @@ -5238,7 +5238,7 @@ l131:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l137; + goto l141; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5271,7 +5271,7 @@ l131:; /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l137:; +l141:; break; case 126: // unknownBytecode case 127: // unknownBytecode @@ -5307,10 +5307,10 @@ l137:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l140; + goto l144; } ourContext = marryFrameSP(localFP, localSP); -l140: /* end ensureFrameIsMarried:SP: */; +l144: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ @@ -5705,7 +5705,7 @@ l137:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l143; + goto l147; } /* second probe */ @@ -5714,17 +5714,17 @@ l137:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l143; + goto l147; } probe = (((usqInt)(hash)) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l143; + goto l147; } - goto l142; -l143:; + goto l146; +l147:; /* begin ifAppropriateCompileToNativeCode:selector: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + ((((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -5754,8 +5754,8 @@ l143:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l146; -l142:; + goto l150; +l146:; /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -5803,7 +5803,7 @@ l142:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l141; + goto l145; } } @@ -5819,11 +5819,11 @@ l142:; classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l145; + goto l149; } fieldIndex = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); -l145: /* end classForClassTag: */; +l149: /* end classForClassTag: */; assert((GIV(lkupClass)) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -5834,8 +5834,8 @@ l142:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); -l146:; -l141: /* end internalFindNewMethodOrdinary */; +l150:; +l145: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer) { @@ -5847,30 +5847,30 @@ l146:; && (localPrimIndex < 520)); if (localPrimIndex >= 264) { longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((((usqInt)((localPrimIndex - 264)) << (shiftForWord())))))); - goto l144; + goto l148; } if (localPrimIndex == 0x100) { - goto l144; + goto l148; } if (localPrimIndex == 0x101) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l144; + goto l148; } if (localPrimIndex == 258) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l144; + goto l148; } if (localPrimIndex == 259) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l144; + goto l148; } /* internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l144; + goto l148; } /* begin externalizeIPandSP */ @@ -5931,7 +5931,7 @@ l146:; if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l144; + goto l148; } } @@ -6013,7 +6013,7 @@ l146:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - goto l144; + goto l148; } /* begin iframeSavedIP:put: */ @@ -6033,7 +6033,7 @@ l146:; localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); -l144: /* end internalExecuteNewMethod */; +l148: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8521,7 +8521,7 @@ l24:; /* short jumpIfFalse 152 - 159 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l147; + goto l151; } if (bytecode == 172) { @@ -8531,7 +8531,7 @@ l24:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l147; + goto l151; } if (bytecode > 167) { @@ -8541,7 +8541,7 @@ l24:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l147; + goto l151; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8549,7 +8549,7 @@ l24:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l147:; +l151:; break; case 179: // bytecodePrimGreaterThan { @@ -8612,7 +8612,7 @@ l147:; /* begin jump: */ localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l148; + goto l152; } if (bytecode == 172) { @@ -8622,14 +8622,14 @@ l147:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l148; + goto l152; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l148:; +l152:; break; case 180: // bytecodePrimLessOrEqual { @@ -10105,7 +10105,7 @@ l148:; /* short jumpIfFalse 192 - 199 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l149; + goto l153; } if (bytecode == 239) { @@ -10115,7 +10115,7 @@ l148:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l149; + goto l153; } if (bytecode == 238) { @@ -10125,7 +10125,7 @@ l148:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l149; + goto l153; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10133,7 +10133,7 @@ l148:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l149:; +l153:; break; case 355: // 99 bytecodePrimGreaterThanSistaV1 { @@ -10196,7 +10196,7 @@ l149:; /* begin jump: */ localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l150; + goto l154; } if (bytecode == 239) { @@ -10206,14 +10206,14 @@ l149:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l150; + goto l154; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l150:; +l154:; break; case 356: // 100 bytecodePrimLessOrEqualSistaV1 { @@ -10492,10 +10492,10 @@ l104:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l151; + goto l155; } ourContext = marryFrameSP(localFP, localSP); -l151: /* end ensureFrameIsMarried:SP: */; +l155: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -10909,7 +10909,270 @@ l104:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - if (((primIndex >= 154) && (primIndex <= 157))) { + switch (primIndex) { + case 50: + /* begin mappedEnsureEnoughWords */ + top = longAtPointer(localSP); + assert((top & 1)); + slots = (top >> 1); + assert(slots >= 0); + + /* begin checkForAvailableSlots: */ + if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { + ok = 1; + goto l113; + } + GIV(needGCFlag) = 1; + ok = 0; +l113: /* end checkForAvailableSlots: */; + if (!ok) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + checkForEventsMayContextSwitch(1); + browserPluginReturnIfNeeded(); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + break; + case 150: + + /* 150 immCheckPointerAt:put: + pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l112; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l112: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 151: + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l115; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l115: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 152: + + /* 152 immCheckMaybeContextPointerAt:put: + pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l111; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l111: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 153: + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l114; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l114: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 154: + case 155: + case 156: + case 157: /* begin mappedImmcheckDataAtPut: */ assert(((primIndex >= 154) && (primIndex <= 157))); arg1 = longAtPointer(localSP + (1 * BytesPerOop)); @@ -10935,7 +11198,7 @@ l104:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l110; + goto l116; } switch (primIndex) { case 154: @@ -10973,59 +11236,7 @@ l104:; default: error("Case not found and no otherwise clause"); } - goto l110; - } - switch (primIndex) { - case 50: - /* begin mappedEnsureEnoughWords */ - top = longAtPointer(localSP); - assert((top & 1)); - slots = (top >> 1); - assert(slots >= 0); - - /* begin checkForAvailableSlots: */ - if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { - ok = 1; - goto l111; - } - GIV(needGCFlag) = 1; - ok = 0; -l111: /* end checkForAvailableSlots: */; - if (!ok) { - /* begin externalizeIPandSP */ - assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); - GIV(instructionPointer) = oopForPointer(localIP); - GIV(stackPointer) = localSP; - GIV(framePointer) = localFP; - checkForEventsMayContextSwitch(1); - browserPluginReturnIfNeeded(); - - /* begin internalizeIPandSP */ - assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); - localIP = pointerForOop(GIV(instructionPointer)); - localSP = pointerForOop(GIV(stackPointer)); - localFP = pointerForOop(GIV(framePointer)); - } - break; - case 150: - - /* 150 immCheckPointerAt:put: - pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 151: - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 152: - - /* 152 immCheckMaybeContextPointerAt:put: - pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); - break; - case 153: - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); +l116:; break; case 200: /* begin mappedDirectCall */ @@ -11141,7 +11352,7 @@ l104:; /* begin internalPop: */ localSP += 1 * BytesPerOop; if (((0 - offset) + 1) >= 0) { - goto l112; + goto l110; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11159,7 +11370,7 @@ l104:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l112; + goto l110; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11189,7 +11400,7 @@ l104:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l112: /* end ifBackwardsCheckForEvents: */; +l110: /* end ifBackwardsCheckForEvents: */; localIP -= 1; /* begin fetchNextBytecode */ @@ -11200,7 +11411,6 @@ l104:; localIP -= 3; goto respondToUnknownBytecode; } -l110: /* end sistaMappedInlinePrimitive: */; } break; case 493: // 237 extUnconditionalJump @@ -11223,7 +11433,7 @@ l104:; /* begin ifBackwardsCheckForEvents: */ if ((offset + bcpcDelta) >= 0) { - goto l113; + goto l117; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11241,7 +11451,7 @@ l104:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l113; + goto l117; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11271,7 +11481,7 @@ l104:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l113: /* end ifBackwardsCheckForEvents: */; +l117: /* end ifBackwardsCheckForEvents: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11301,14 +11511,14 @@ l104:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l114; + goto l118; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l114:; +l118:; } break; case 495: // 239 extJumpIfFalse @@ -11335,14 +11545,14 @@ l114:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l115; + goto l119; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l115:; +l119:; } break; case 496: // 240 extStoreAndPopReceiverVariableBytecode @@ -11404,7 +11614,7 @@ l115:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l116; + goto l120; } /* begin frameOfMarriedContext: */ @@ -11427,7 +11637,7 @@ l115:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l116; + goto l120; } /* begin externalizeIPandSP */ @@ -11468,7 +11678,7 @@ l115:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l116: /* end instVar:ofContext:put: */; +l120: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11483,7 +11693,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l117; + goto l121; } # endif // IMMUTABILITY @@ -11505,7 +11715,7 @@ l115:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), value); -l117: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l121: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11547,7 +11757,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l118; + goto l122; } # endif // IMMUTABILITY @@ -11569,7 +11779,7 @@ l115:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), value); -l118: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l122: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11655,7 +11865,7 @@ l115:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l119; + goto l123; } /* begin frameOfMarriedContext: */ @@ -11678,7 +11888,7 @@ l115:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l119; + goto l123; } /* begin externalizeIPandSP */ @@ -11719,7 +11929,7 @@ l115:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l119: /* end instVar:ofContext:put: */; +l123: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11734,7 +11944,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l120; + goto l124; } # endif // IMMUTABILITY @@ -11756,7 +11966,7 @@ l115:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), anObject); -l120: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l124: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11795,7 +12005,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l121; + goto l125; } # endif // IMMUTABILITY @@ -11817,7 +12027,7 @@ l115:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), anObject); -l121: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l125: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11922,11 +12132,11 @@ l115:; assert((header & 1)), /* literalCountOfAlternateHeader: */ ((header >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize)) + 3 /* sizeOfCallPrimitiveBytecode: */)) { - goto l122; + goto l126; } localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } prim = ((((usqInt)((byte2 - 128)) << 8))) + byte1; primSet = ((prim) >> 13) & 3; @@ -11938,7 +12148,7 @@ l115:; /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 2000) { primIndex = prim - 1000; @@ -11955,7 +12165,7 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l122; + goto l126; } if (primIndex <= 6) { /* begin unarySizeInlinePrimitive: */ @@ -11986,18 +12196,18 @@ l115:; /* bytes (the common case), including CompiledMethod */ resultUsqInt = numBytes - (fmt & 7); - goto l124; + goto l128; } if (fmt <= (sixtyFourBitIndexableFormat())) { resultUsqInt = ((sqInt) numBytes); - goto l124; + goto l128; } if (fmt >= (firstShortFormat())) { resultUsqInt = numBytes - (((fmt & 3) << 1)); - goto l124; + goto l128; } resultUsqInt = numBytes - (((fmt & 1) << 2)); -l124: /* end numBytesOf: */; +l128: /* end numBytesOf: */; break; case 3: assert(isShorts(top)); @@ -12018,13 +12228,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, ((resultUsqInt << 1) | 1)); - goto l122; + goto l126; } if (primIndex < 11) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 12) { /* begin unaryNewInlinePrimitive: */ @@ -12036,13 +12246,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l122; + goto l126; } if (primIndex < 20) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 24) { /* begin unaryHashInlinePrimitive: */ @@ -12114,13 +12324,13 @@ l115:; default: error("Case not found and no otherwise clause"); } - goto l122; + goto l126; } if (primIndex < 30) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 32) { /* begin unaryConvertInlinePrimitive: */ @@ -12150,13 +12360,13 @@ l115:; default: error("Case not found and no otherwise clause"); } - goto l122; + goto l126; } if (primIndex < 39) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 40) { /* begin unaryUnforwardInlinePrimitive: */ @@ -12179,7 +12389,7 @@ l115:; /* begin internalStackTopPut: */ longAtPointerput(localSP, aValue); } - goto l122; + goto l126; } if (primIndex == 41) { /* begin unaryPossibleRootInlinePrimitive */ @@ -12194,13 +12404,13 @@ l115:; remember(top); } } - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 3000) { primIndex = prim - 2000; @@ -12253,13 +12463,13 @@ l115:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 1) | 1)); - goto l122; + goto l126; } if (primIndex < 16) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 20) { /* begin binarySmiBitInlinePrimitive: */ @@ -12298,13 +12508,13 @@ l115:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 1) | 1)); - goto l122; + goto l126; } if (primIndex < 32) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 37) { /* begin binarySmiCompInlinePrimitive: */ @@ -12344,7 +12554,7 @@ l115:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l122; + goto l126; } if (primIndex <= 39) { /* begin binaryCompInlinePrimitive: */ @@ -12368,13 +12578,13 @@ l115:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l122; + goto l126; } if (primIndex < 48) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 49) { /* begin binaryNewInlinePrimitive: */ @@ -12394,10 +12604,10 @@ l115:; GIV(primFailCode) = 1; } size = null; - goto l125; + goto l129; } size = valueSqInt; - goto l125; + goto l129; } if (((top & (tagMask())) != 0)) { /* begin primitiveFail */ @@ -12405,7 +12615,7 @@ l115:; GIV(primFailCode) = 1; } size = 0; - goto l125; + goto l129; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -12418,7 +12628,7 @@ l115:; GIV(primFailCode) = 1; } size = 0; - goto l125; + goto l129; } /* begin numBytesOfBytes: */ @@ -12435,15 +12645,15 @@ l115:; GIV(primFailCode) = 1; } size = 0; - goto l125; + goto l129; } if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((top + BaseHeaderSize)))))); - goto l125; + goto l129; } size = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((top + BaseHeaderSize)))))); -l125: /* end positiveMachineIntegerValueOf: */; +l129: /* end positiveMachineIntegerValueOf: */; resultSqInt = instantiateClassindexableSize(classObj, size); /* begin internalPop: */ @@ -12451,13 +12661,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l122; + goto l126; } if (primIndex < 64) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 69) { /* begin binaryAtInlinePrimitive: */ @@ -12514,7 +12724,7 @@ l115:; assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) { resultSqInt = ((integerValue << 1) | 1); - goto l126; + goto l130; } objFormat = (firstByteFormat()) + ((4) & (BytesPerWord - 1)); @@ -12537,13 +12747,13 @@ l115:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newLargeInteger = 0; - goto l123; + goto l127; } } long64Atput(newObj, ((((((usqLong) 1)) << (numSlotsFullShift()))) + ((((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); GIV(freeStart) += numBytes; newLargeInteger = newObj; -l123: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l127: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue)); @@ -12551,7 +12761,7 @@ l115:; /* storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0); resultSqInt = newLargeInteger; -l126: /* end positive32BitIntegerFor: */; +l130: /* end positive32BitIntegerFor: */; break; case 69: assert(isLong64s(rec)); @@ -12567,13 +12777,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 4000) { /* begin trinaryInlinePrimitive: */ @@ -12694,7 +12904,7 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l122; + goto l126; } if ((prim - 3000) == 21) { len = ((longAtPointer(localSP)) >> 1); @@ -12711,7 +12921,7 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l122; + goto l126; } } } @@ -12721,20 +12931,20 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 5000) { /* begin quaternaryInlinePrimitive: */ /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 6000) { /* begin quinaryInlinePrimitive: */ @@ -12750,7 +12960,7 @@ l115:; /* begin internalPop: */ localSP += 4 * BytesPerOop; if (destLimit < destIndex) { - goto l122; + goto l126; } if (!(/* isYoung: */ ((!(dest & (tagMask())))) @@ -12767,13 +12977,13 @@ l115:; assert(!(isOopForwarded(dest))); longAtput((dest + BaseHeaderSize) + ((((usqInt)((destIndex + i)) << (shiftForWord())))), oop); } - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 7000) { /* begin jumpUnaryInlinePrimitive: */ @@ -12786,13 +12996,13 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 1 * BytesPerOop; - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 8000) { /* begin jumpBinaryInlinePrimitive: */ @@ -12844,7 +13054,7 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 2 * BytesPerOop; - goto l122; + goto l126; } /* begin jumpTrinaryInlinePrimitive: */ @@ -12931,7 +13141,7 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l122; + goto l126; } } localIP += offset; @@ -12946,12 +13156,12 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l122; + goto l126; } localIP -= 3; goto respondToUnknownBytecode; } -l122: /* end case */; +l126: /* end case */; break; case 505: // 249 extPushFullClosureBytecode { @@ -13012,10 +13222,10 @@ l115:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l127; + goto l131; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l127: /* end ensureFrameIsMarried:SP: */; +l131: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ @@ -13041,13 +13251,13 @@ l115:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l128; + goto l132; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l128: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l132: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -13125,10 +13335,10 @@ l115:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l129; + goto l133; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l129: /* end ensureFrameIsMarried:SP: */; +l133: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -13153,13 +13363,13 @@ l115:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l130; + goto l134; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l130: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l134: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -40274,7 +40484,7 @@ primitiveSubtractLargeIntegers(void) sqInt oopRcvr; sqInt oopResult; usqLong result; - int resultIsNegative; + sqInt resultIsNegative; char *sp; oopArg = longAt(GIV(stackPointer)); @@ -62766,7 +62976,7 @@ updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr) assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(obj))); contextSize = (sp >> 1); l2: /* end fetchStackPointerOf: */; - numPointerSlots = ((usqInt) (CtxtTempFrameStart + contextSize)); + numPointerSlots = CtxtTempFrameStart + contextSize; goto l3; } @@ -63350,7 +63560,7 @@ prepareForSnapshot(void) sqInt largeChild; sqInt newEndOfMemory; sqInt next; - usqInt node; + sqInt node; SpurSegmentInfo *seg; sqInt smallChild; sqInt treeNode; @@ -67507,14 +67717,13 @@ static sqInt getErrorObjectFromPrimFailCode(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt classIndex; - usqInt clone; - usqInt errObj; + sqInt clone; + sqInt errObj; sqInt i; usqInt newObj; usqInt numBytes; usqInt numSlots; usqInt numSlotsUsqInt; - sqInt objOop; sqInt table; sqInt valuePointer; @@ -67526,13 +67735,12 @@ getErrorObjectFromPrimFailCode(void) ? longAt(table - BaseHeaderSize) : numSlots)))) { /* begin followField:ofObject: */ - objOop = longAt((table + BaseHeaderSize) + ((((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); + errObj = longAt((table + BaseHeaderSize) + ((((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); if (/* isOopForwarded: */ - ((!(objOop & (tagMask())))) - && ((!((longAt(objOop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) { - objOop = fixFollowedFieldofObjectwithInitialValue(GIV(primFailCode) - 1, table, objOop); + ((!(errObj & (tagMask())))) + && ((!((longAt(errObj)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) { + errObj = fixFollowedFieldofObjectwithInitialValue(GIV(primFailCode) - 1, table, errObj); } - errObj = objOop; if (((((usqInt)((longAt(errObj)))) >> (formatShift())) & (formatMask())) == 1 /* nonIndexablePointerFormat */) { /* begin cloneErrorObj: */ /* begin numSlotsOf: */ diff --git a/src/spur32.sista/gcc3x-cointerp.c b/src/spur32.sista/gcc3x-cointerp.c index 408df89f1c..9945ba017c 100644 --- a/src/spur32.sista/gcc3x-cointerp.c +++ b/src/spur32.sista/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 from - CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1993,7 +1993,7 @@ static signed short primitiveMetadataTable[MaxPrimitiveIndex + 2 /* 584 */] = { /*78*/ 0, 0, /*80*/ -256,-256,-256, 4, 4, 0, 0x100, 0, 0x200,-256,-256, 0, 0, 0, 0x100,-256, 0,-256, /*98*/ 0, 0, -/*100*/ 260, 0x200, 0x200, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256, +/*100*/ 260, 0x200, 0x100, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256, /*115*/ 0x100, 0, 12, 260, 0, /*120*/ 524, 0x100,-256,-256, 1, 0, 0, 0, 0,-255,-256, 0, 0, 0, 0,-256, 0,-256,-256, /*139*/ 0, @@ -2667,7 +2667,7 @@ sqInt debugCallbackInvokes; sqInt debugCallbackReturns; sqInt cannotDeferDisplayUpdates; sqInt checkedPluginName; -const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3456]"; +const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3457]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; char expensiveAsserts = 0; int (*showSurfaceFn)(sqIntptr_t, int, int, int, int); @@ -4658,7 +4658,7 @@ interpret(void) theFP = ((char *) 0); if (!(byteAt((localFP + FoxIFrameFlags) + 3))) { goto commonCallerReturn; - goto l131; + goto l135; } /* begin writeBackHeadFramePointers */ @@ -4704,10 +4704,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l133; + goto l137; } ourContext = marryFrameSP(localFP, localSP); -l133: /* end ensureFrameIsMarried:SP: */; +l137: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4715,7 +4715,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l131; + goto l135; } /* begin followObjField:ofObject: */ @@ -4737,10 +4737,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l135; + goto l139; } ourContext = marryFrameSP(localFP, localSP); -l135: /* end ensureFrameIsMarried:SP: */; +l139: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4748,7 +4748,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l131; + goto l135; } if (unwindContextOrNilOrZero) { /* begin internalAboutToReturn:through: */ @@ -4759,10 +4759,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l136; + goto l140; } ourContext = marryFrameSP(localFP, localSP); -l136: /* end ensureFrameIsMarried:SP: */; +l140: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4771,7 +4771,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l131; + goto l135; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + ((((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -4825,10 +4825,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l132; + goto l136; } ourContext = marryFrameSP(localFP, localSP); -l132: /* end ensureFrameIsMarried:SP: */; +l136: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4836,7 +4836,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l131; + goto l135; } } assert(pageListIsWellFormed()); @@ -4954,11 +4954,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l134; + goto l138; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } -l134: /* end maybeReturnToMachineCodeFrame */; +l138: /* end maybeReturnToMachineCodeFrame */; aMethodObj = longAt(localFP + FoxMethod); /* begin setMethod: */ @@ -4988,7 +4988,7 @@ interpret(void) /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l131:; +l135:; BREAK; CASE(121) // returnTrue CASE(345) // 89 returnTrue @@ -5101,26 +5101,26 @@ l131:; fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l138; + goto l142; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l138; + goto l142; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; -l138: /* end findFrameAbove:inPage: */; +l142: /* end findFrameAbove:inPage: */; /* begin newStackPage */ newPage = (GIV(mostRecentlyUsedPage)->nextPage); if (!((newPage->baseFP))) { - goto l139; + goto l143; } divorceFramesIn(newPage); -l139: /* end newStackPage */; +l143: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5147,7 +5147,7 @@ l131:; longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l137; + goto l141; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5186,7 +5186,7 @@ l131:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l137; + goto l141; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5219,7 +5219,7 @@ l131:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l137; + goto l141; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((/* frameNumArgs: */ @@ -5247,7 +5247,7 @@ l131:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l137; + goto l141; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5280,7 +5280,7 @@ l131:; /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l137:; +l141:; BREAK; CASE(126) // unknownBytecode CASE(127) // unknownBytecode @@ -5316,10 +5316,10 @@ l137:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l140; + goto l144; } ourContext = marryFrameSP(localFP, localSP); -l140: /* end ensureFrameIsMarried:SP: */; +l144: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ @@ -5714,7 +5714,7 @@ l137:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l143; + goto l147; } /* second probe */ @@ -5723,17 +5723,17 @@ l137:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l143; + goto l147; } probe = (((usqInt)(hash)) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l143; + goto l147; } - goto l142; -l143:; + goto l146; +l147:; /* begin ifAppropriateCompileToNativeCode:selector: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + ((((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -5763,8 +5763,8 @@ l143:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l146; -l142:; + goto l150; +l146:; /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -5812,7 +5812,7 @@ l142:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l141; + goto l145; } } @@ -5828,11 +5828,11 @@ l142:; classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l145; + goto l149; } fieldIndex = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); -l145: /* end classForClassTag: */; +l149: /* end classForClassTag: */; assert((GIV(lkupClass)) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -5843,8 +5843,8 @@ l142:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); -l146:; -l141: /* end internalFindNewMethodOrdinary */; +l150:; +l145: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer) { @@ -5856,30 +5856,30 @@ l146:; && (localPrimIndex < 520)); if (localPrimIndex >= 264) { longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((((usqInt)((localPrimIndex - 264)) << (shiftForWord())))))); - goto l144; + goto l148; } if (localPrimIndex == 0x100) { - goto l144; + goto l148; } if (localPrimIndex == 0x101) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l144; + goto l148; } if (localPrimIndex == 258) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l144; + goto l148; } if (localPrimIndex == 259) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l144; + goto l148; } /* internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l144; + goto l148; } /* begin externalizeIPandSP */ @@ -5940,7 +5940,7 @@ l146:; if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l144; + goto l148; } } @@ -6022,7 +6022,7 @@ l146:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - goto l144; + goto l148; } /* begin iframeSavedIP:put: */ @@ -6042,7 +6042,7 @@ l146:; localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); -l144: /* end internalExecuteNewMethod */; +l148: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8530,7 +8530,7 @@ l24:; /* short jumpIfFalse 152 - 159 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l147; + goto l151; } if (bytecode == 172) { @@ -8540,7 +8540,7 @@ l24:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l147; + goto l151; } if (bytecode > 167) { @@ -8550,7 +8550,7 @@ l24:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l147; + goto l151; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8558,7 +8558,7 @@ l24:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l147:; +l151:; BREAK; CASE(179) // bytecodePrimGreaterThan { @@ -8621,7 +8621,7 @@ l147:; /* begin jump: */ localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l148; + goto l152; } if (bytecode == 172) { @@ -8631,14 +8631,14 @@ l147:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l148; + goto l152; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l148:; +l152:; BREAK; CASE(180) // bytecodePrimLessOrEqual { @@ -10114,7 +10114,7 @@ l148:; /* short jumpIfFalse 192 - 199 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l149; + goto l153; } if (bytecode == 239) { @@ -10124,7 +10124,7 @@ l148:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l149; + goto l153; } if (bytecode == 238) { @@ -10134,7 +10134,7 @@ l148:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l149; + goto l153; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10142,7 +10142,7 @@ l148:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l149:; +l153:; BREAK; CASE(355) // 99 bytecodePrimGreaterThanSistaV1 { @@ -10205,7 +10205,7 @@ l149:; /* begin jump: */ localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l150; + goto l154; } if (bytecode == 239) { @@ -10215,14 +10215,14 @@ l149:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l150; + goto l154; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l150:; +l154:; BREAK; CASE(356) // 100 bytecodePrimLessOrEqualSistaV1 { @@ -10501,10 +10501,10 @@ l104:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l151; + goto l155; } ourContext = marryFrameSP(localFP, localSP); -l151: /* end ensureFrameIsMarried:SP: */; +l155: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -10918,7 +10918,270 @@ l104:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - if (((primIndex >= 154) && (primIndex <= 157))) { + switch (primIndex) { + case 50: + /* begin mappedEnsureEnoughWords */ + top = longAtPointer(localSP); + assert((top & 1)); + slots = (top >> 1); + assert(slots >= 0); + + /* begin checkForAvailableSlots: */ + if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { + ok = 1; + goto l113; + } + GIV(needGCFlag) = 1; + ok = 0; +l113: /* end checkForAvailableSlots: */; + if (!ok) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + checkForEventsMayContextSwitch(1); + browserPluginReturnIfNeeded(); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + break; + case 150: + + /* 150 immCheckPointerAt:put: + pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l112; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l112: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 151: + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l115; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l115: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 152: + + /* 152 immCheckMaybeContextPointerAt:put: + pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l111; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l111: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 153: + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((arg1 & 1)); + argIntAdjusted = ((arg1 >> 1)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 1) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l114; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l114: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 154: + case 155: + case 156: + case 157: /* begin mappedImmcheckDataAtPut: */ assert(((primIndex >= 154) && (primIndex <= 157))); arg1 = longAtPointer(localSP + (1 * BytesPerOop)); @@ -10944,7 +11207,7 @@ l104:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l110; + goto l116; } switch (primIndex) { case 154: @@ -10982,59 +11245,7 @@ l104:; default: error("Case not found and no otherwise clause"); } - goto l110; - } - switch (primIndex) { - case 50: - /* begin mappedEnsureEnoughWords */ - top = longAtPointer(localSP); - assert((top & 1)); - slots = (top >> 1); - assert(slots >= 0); - - /* begin checkForAvailableSlots: */ - if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { - ok = 1; - goto l111; - } - GIV(needGCFlag) = 1; - ok = 0; -l111: /* end checkForAvailableSlots: */; - if (!ok) { - /* begin externalizeIPandSP */ - assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); - GIV(instructionPointer) = oopForPointer(localIP); - GIV(stackPointer) = localSP; - GIV(framePointer) = localFP; - checkForEventsMayContextSwitch(1); - browserPluginReturnIfNeeded(); - - /* begin internalizeIPandSP */ - assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); - localIP = pointerForOop(GIV(instructionPointer)); - localSP = pointerForOop(GIV(stackPointer)); - localFP = pointerForOop(GIV(framePointer)); - } - break; - case 150: - - /* 150 immCheckPointerAt:put: - pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 151: - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 152: - - /* 152 immCheckMaybeContextPointerAt:put: - pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); - break; - case 153: - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); +l116:; break; case 200: /* begin mappedDirectCall */ @@ -11150,7 +11361,7 @@ l104:; /* begin internalPop: */ localSP += 1 * BytesPerOop; if (((0 - offset) + 1) >= 0) { - goto l112; + goto l110; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11168,7 +11379,7 @@ l104:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l112; + goto l110; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11198,7 +11409,7 @@ l104:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l112: /* end ifBackwardsCheckForEvents: */; +l110: /* end ifBackwardsCheckForEvents: */; localIP -= 1; /* begin fetchNextBytecode */ @@ -11209,7 +11420,6 @@ l104:; localIP -= 3; goto respondToUnknownBytecode; } -l110: /* end sistaMappedInlinePrimitive: */; } BREAK; CASE(493) // 237 extUnconditionalJump @@ -11232,7 +11442,7 @@ l104:; /* begin ifBackwardsCheckForEvents: */ if ((offset + bcpcDelta) >= 0) { - goto l113; + goto l117; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11250,7 +11460,7 @@ l104:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l113; + goto l117; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11280,7 +11490,7 @@ l104:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l113: /* end ifBackwardsCheckForEvents: */; +l117: /* end ifBackwardsCheckForEvents: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11310,14 +11520,14 @@ l104:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l114; + goto l118; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l114:; +l118:; } BREAK; CASE(495) // 239 extJumpIfFalse @@ -11344,14 +11554,14 @@ l114:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l115; + goto l119; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l115:; +l119:; } BREAK; CASE(496) // 240 extStoreAndPopReceiverVariableBytecode @@ -11413,7 +11623,7 @@ l115:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l116; + goto l120; } /* begin frameOfMarriedContext: */ @@ -11436,7 +11646,7 @@ l115:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l116; + goto l120; } /* begin externalizeIPandSP */ @@ -11477,7 +11687,7 @@ l115:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l116: /* end instVar:ofContext:put: */; +l120: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11492,7 +11702,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l117; + goto l121; } # endif // IMMUTABILITY @@ -11514,7 +11724,7 @@ l115:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), value); -l117: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l121: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11556,7 +11766,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l118; + goto l122; } # endif // IMMUTABILITY @@ -11578,7 +11788,7 @@ l115:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), value); -l118: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l122: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11664,7 +11874,7 @@ l115:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l119; + goto l123; } /* begin frameOfMarriedContext: */ @@ -11687,7 +11897,7 @@ l115:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l119; + goto l123; } /* begin externalizeIPandSP */ @@ -11728,7 +11938,7 @@ l115:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l119: /* end instVar:ofContext:put: */; +l123: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11743,7 +11953,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l120; + goto l124; } # endif // IMMUTABILITY @@ -11765,7 +11975,7 @@ l115:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), anObject); -l120: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l124: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11804,7 +12014,7 @@ l115:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l121; + goto l125; } # endif // IMMUTABILITY @@ -11826,7 +12036,7 @@ l115:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), anObject); -l121: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l125: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11931,11 +12141,11 @@ l115:; assert((header & 1)), /* literalCountOfAlternateHeader: */ ((header >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize)) + 3 /* sizeOfCallPrimitiveBytecode: */)) { - goto l122; + goto l126; } localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } prim = ((((usqInt)((byte2 - 128)) << 8))) + byte1; primSet = ((prim) >> 13) & 3; @@ -11947,7 +12157,7 @@ l115:; /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 2000) { primIndex = prim - 1000; @@ -11964,7 +12174,7 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l122; + goto l126; } if (primIndex <= 6) { /* begin unarySizeInlinePrimitive: */ @@ -11995,18 +12205,18 @@ l115:; /* bytes (the common case), including CompiledMethod */ resultUsqInt = numBytes - (fmt & 7); - goto l124; + goto l128; } if (fmt <= (sixtyFourBitIndexableFormat())) { resultUsqInt = ((sqInt) numBytes); - goto l124; + goto l128; } if (fmt >= (firstShortFormat())) { resultUsqInt = numBytes - (((fmt & 3) << 1)); - goto l124; + goto l128; } resultUsqInt = numBytes - (((fmt & 1) << 2)); -l124: /* end numBytesOf: */; +l128: /* end numBytesOf: */; break; case 3: assert(isShorts(top)); @@ -12027,13 +12237,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, ((resultUsqInt << 1) | 1)); - goto l122; + goto l126; } if (primIndex < 11) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 12) { /* begin unaryNewInlinePrimitive: */ @@ -12045,13 +12255,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l122; + goto l126; } if (primIndex < 20) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 24) { /* begin unaryHashInlinePrimitive: */ @@ -12123,13 +12333,13 @@ l115:; default: error("Case not found and no otherwise clause"); } - goto l122; + goto l126; } if (primIndex < 30) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 32) { /* begin unaryConvertInlinePrimitive: */ @@ -12159,13 +12369,13 @@ l115:; default: error("Case not found and no otherwise clause"); } - goto l122; + goto l126; } if (primIndex < 39) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 40) { /* begin unaryUnforwardInlinePrimitive: */ @@ -12188,7 +12398,7 @@ l115:; /* begin internalStackTopPut: */ longAtPointerput(localSP, aValue); } - goto l122; + goto l126; } if (primIndex == 41) { /* begin unaryPossibleRootInlinePrimitive */ @@ -12203,13 +12413,13 @@ l115:; remember(top); } } - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 3000) { primIndex = prim - 2000; @@ -12262,13 +12472,13 @@ l115:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 1) | 1)); - goto l122; + goto l126; } if (primIndex < 16) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 20) { /* begin binarySmiBitInlinePrimitive: */ @@ -12307,13 +12517,13 @@ l115:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 1) | 1)); - goto l122; + goto l126; } if (primIndex < 32) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 37) { /* begin binarySmiCompInlinePrimitive: */ @@ -12353,7 +12563,7 @@ l115:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l122; + goto l126; } if (primIndex <= 39) { /* begin binaryCompInlinePrimitive: */ @@ -12377,13 +12587,13 @@ l115:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l122; + goto l126; } if (primIndex < 48) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 49) { /* begin binaryNewInlinePrimitive: */ @@ -12403,10 +12613,10 @@ l115:; GIV(primFailCode) = 1; } size = null; - goto l125; + goto l129; } size = valueSqInt; - goto l125; + goto l129; } if (((top & (tagMask())) != 0)) { /* begin primitiveFail */ @@ -12414,7 +12624,7 @@ l115:; GIV(primFailCode) = 1; } size = 0; - goto l125; + goto l129; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -12427,7 +12637,7 @@ l115:; GIV(primFailCode) = 1; } size = 0; - goto l125; + goto l129; } /* begin numBytesOfBytes: */ @@ -12444,15 +12654,15 @@ l115:; GIV(primFailCode) = 1; } size = 0; - goto l125; + goto l129; } if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((top + BaseHeaderSize)))))); - goto l125; + goto l129; } size = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((top + BaseHeaderSize)))))); -l125: /* end positiveMachineIntegerValueOf: */; +l129: /* end positiveMachineIntegerValueOf: */; resultSqInt = instantiateClassindexableSize(classObj, size); /* begin internalPop: */ @@ -12460,13 +12670,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l122; + goto l126; } if (primIndex < 64) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (primIndex <= 69) { /* begin binaryAtInlinePrimitive: */ @@ -12523,7 +12733,7 @@ l115:; assert(!((hasSixtyFourBitImmediates()))); if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) { resultSqInt = ((integerValue << 1) | 1); - goto l126; + goto l130; } objFormat = (firstByteFormat()) + ((4) & (BytesPerWord - 1)); @@ -12546,13 +12756,13 @@ l115:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newLargeInteger = 0; - goto l123; + goto l127; } } long64Atput(newObj, ((((((usqLong) 1)) << (numSlotsFullShift()))) + ((((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); GIV(freeStart) += numBytes; newLargeInteger = newObj; -l123: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l127: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue)); @@ -12560,7 +12770,7 @@ l115:; /* storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0); resultSqInt = newLargeInteger; -l126: /* end positive32BitIntegerFor: */; +l130: /* end positive32BitIntegerFor: */; break; case 69: assert(isLong64s(rec)); @@ -12576,13 +12786,13 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 4000) { /* begin trinaryInlinePrimitive: */ @@ -12703,7 +12913,7 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l122; + goto l126; } if ((prim - 3000) == 21) { len = ((longAtPointer(localSP)) >> 1); @@ -12720,7 +12930,7 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l122; + goto l126; } } } @@ -12730,20 +12940,20 @@ l115:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 5000) { /* begin quaternaryInlinePrimitive: */ /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 6000) { /* begin quinaryInlinePrimitive: */ @@ -12759,7 +12969,7 @@ l115:; /* begin internalPop: */ localSP += 4 * BytesPerOop; if (destLimit < destIndex) { - goto l122; + goto l126; } if (!(/* isYoung: */ ((!(dest & (tagMask())))) @@ -12776,13 +12986,13 @@ l115:; assert(!(isOopForwarded(dest))); longAtput((dest + BaseHeaderSize) + ((((usqInt)((destIndex + i)) << (shiftForWord())))), oop); } - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 7000) { /* begin jumpUnaryInlinePrimitive: */ @@ -12795,13 +13005,13 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 1 * BytesPerOop; - goto l122; + goto l126; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l122; + goto l126; } if (prim < 8000) { /* begin jumpBinaryInlinePrimitive: */ @@ -12853,7 +13063,7 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 2 * BytesPerOop; - goto l122; + goto l126; } /* begin jumpTrinaryInlinePrimitive: */ @@ -12940,7 +13150,7 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l122; + goto l126; } } localIP += offset; @@ -12955,12 +13165,12 @@ l115:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l122; + goto l126; } localIP -= 3; goto respondToUnknownBytecode; } -l122: /* end case */; +l126: /* end case */; BREAK; CASE(505) // 249 extPushFullClosureBytecode { @@ -13021,10 +13231,10 @@ l115:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l127; + goto l131; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l127: /* end ensureFrameIsMarried:SP: */; +l131: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ @@ -13050,13 +13260,13 @@ l115:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l128; + goto l132; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l128: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l132: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -13134,10 +13344,10 @@ l115:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l129; + goto l133; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l129: /* end ensureFrameIsMarried:SP: */; +l133: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -13162,13 +13372,13 @@ l115:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l130; + goto l134; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l130: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l134: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -40283,7 +40493,7 @@ primitiveSubtractLargeIntegers(void) sqInt oopRcvr; sqInt oopResult; usqLong result; - int resultIsNegative; + sqInt resultIsNegative; char *sp; oopArg = longAt(GIV(stackPointer)); @@ -62775,7 +62985,7 @@ updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr) assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(obj))); contextSize = (sp >> 1); l2: /* end fetchStackPointerOf: */; - numPointerSlots = ((usqInt) (CtxtTempFrameStart + contextSize)); + numPointerSlots = CtxtTempFrameStart + contextSize; goto l3; } @@ -63359,7 +63569,7 @@ prepareForSnapshot(void) sqInt largeChild; sqInt newEndOfMemory; sqInt next; - usqInt node; + sqInt node; SpurSegmentInfo *seg; sqInt smallChild; sqInt treeNode; @@ -67516,14 +67726,13 @@ static sqInt getErrorObjectFromPrimFailCode(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt classIndex; - usqInt clone; - usqInt errObj; + sqInt clone; + sqInt errObj; sqInt i; usqInt newObj; usqInt numBytes; usqInt numSlots; usqInt numSlotsUsqInt; - sqInt objOop; sqInt table; sqInt valuePointer; @@ -67535,13 +67744,12 @@ getErrorObjectFromPrimFailCode(void) ? longAt(table - BaseHeaderSize) : numSlots)))) { /* begin followField:ofObject: */ - objOop = longAt((table + BaseHeaderSize) + ((((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); + errObj = longAt((table + BaseHeaderSize) + ((((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); if (/* isOopForwarded: */ - ((!(objOop & (tagMask())))) - && ((!((longAt(objOop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) { - objOop = fixFollowedFieldofObjectwithInitialValue(GIV(primFailCode) - 1, table, objOop); + ((!(errObj & (tagMask())))) + && ((!((longAt(errObj)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) { + errObj = fixFollowedFieldofObjectwithInitialValue(GIV(primFailCode) - 1, table, errObj); } - errObj = objOop; if (((((usqInt)((longAt(errObj)))) >> (formatShift())) & (formatMask())) == 1 /* nonIndexablePointerFormat */) { /* begin cloneErrorObj: */ /* begin numSlotsOf: */ diff --git a/src/spur64.sista/cointerp.c b/src/spur64.sista/cointerp.c index e5bf2a6af0..d6f84f99af 100644 --- a/src/spur64.sista/cointerp.c +++ b/src/spur64.sista/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 from - CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2686,7 +2686,7 @@ sqInt debugCallbackInvokes; sqInt debugCallbackReturns; sqInt cannotDeferDisplayUpdates; sqInt checkedPluginName; -const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3456]"; +const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3457]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; int displayWidth; int displayDepth; @@ -4678,7 +4678,7 @@ interpret(void) theFP = ((char *) 0); if (!(byteAt((localFP + FoxIFrameFlags) + 3))) { goto commonCallerReturn; - goto l123; + goto l127; } /* begin writeBackHeadFramePointers */ @@ -4724,10 +4724,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l125; + goto l129; } ourContext = marryFrameSP(localFP, localSP); -l125: /* end ensureFrameIsMarried:SP: */; +l129: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4735,7 +4735,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l123; + goto l127; } /* begin followObjField:ofObject: */ @@ -4757,10 +4757,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l127; + goto l131; } ourContext = marryFrameSP(localFP, localSP); -l127: /* end ensureFrameIsMarried:SP: */; +l131: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4768,7 +4768,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l123; + goto l127; } if (unwindContextOrNilOrZero) { /* begin internalAboutToReturn:through: */ @@ -4779,10 +4779,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l128; + goto l132; } ourContext = marryFrameSP(localFP, localSP); -l128: /* end ensureFrameIsMarried:SP: */; +l132: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4791,7 +4791,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l123; + goto l127; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + ((((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -4845,10 +4845,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l124; + goto l128; } ourContext = marryFrameSP(localFP, localSP); -l124: /* end ensureFrameIsMarried:SP: */; +l128: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4856,7 +4856,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l123; + goto l127; } } assert(pageListIsWellFormed()); @@ -4974,11 +4974,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l126; + goto l130; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } -l126: /* end maybeReturnToMachineCodeFrame */; +l130: /* end maybeReturnToMachineCodeFrame */; aMethodObj = longAt(localFP + FoxMethod); /* begin setMethod: */ @@ -5008,7 +5008,7 @@ interpret(void) /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l123:; +l127:; break; case 121: // returnTrue case 345: // 89 returnTrue @@ -5121,26 +5121,26 @@ l123:; fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l130; + goto l134; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l130; + goto l134; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; -l130: /* end findFrameAbove:inPage: */; +l134: /* end findFrameAbove:inPage: */; /* begin newStackPage */ newPage = (GIV(mostRecentlyUsedPage)->nextPage); if (!((newPage->baseFP))) { - goto l131; + goto l135; } divorceFramesIn(newPage); -l131: /* end newStackPage */; +l135: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5167,7 +5167,7 @@ l123:; longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l129; + goto l133; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5206,7 +5206,7 @@ l123:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l129; + goto l133; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5239,7 +5239,7 @@ l123:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l129; + goto l133; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((/* frameNumArgs: */ @@ -5267,7 +5267,7 @@ l123:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l129; + goto l133; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5300,7 +5300,7 @@ l123:; /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l129:; +l133:; break; case 126: // unknownBytecode case 127: // unknownBytecode @@ -5336,10 +5336,10 @@ l129:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l132; + goto l136; } ourContext = marryFrameSP(localFP, localSP); -l132: /* end ensureFrameIsMarried:SP: */; +l136: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ @@ -5730,7 +5730,7 @@ l129:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l135; + goto l139; } /* second probe */ @@ -5739,17 +5739,17 @@ l129:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l135; + goto l139; } probe = (((usqInt)(hash)) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l135; + goto l139; } - goto l134; -l135:; + goto l138; +l139:; /* begin ifAppropriateCompileToNativeCode:selector: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + ((((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -5779,8 +5779,8 @@ l135:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l138; -l134:; + goto l142; +l138:; /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -5828,7 +5828,7 @@ l134:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l133; + goto l137; } } @@ -5844,11 +5844,11 @@ l134:; classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l137; + goto l141; } fieldIndex = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); -l137: /* end classForClassTag: */; +l141: /* end classForClassTag: */; assert((GIV(lkupClass)) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -5859,8 +5859,8 @@ l134:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); -l138:; -l133: /* end internalFindNewMethodOrdinary */; +l142:; +l137: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer) { @@ -5872,30 +5872,30 @@ l138:; && (localPrimIndex < 520)); if (localPrimIndex >= 264) { longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((((usqInt)((localPrimIndex - 264)) << (shiftForWord())))))); - goto l136; + goto l140; } if (localPrimIndex == 0x100) { - goto l136; + goto l140; } if (localPrimIndex == 0x101) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l136; + goto l140; } if (localPrimIndex == 258) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l136; + goto l140; } if (localPrimIndex == 259) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l136; + goto l140; } /* internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l136; + goto l140; } /* begin externalizeIPandSP */ @@ -5956,7 +5956,7 @@ l138:; if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l136; + goto l140; } } @@ -6038,7 +6038,7 @@ l138:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - goto l136; + goto l140; } /* begin iframeSavedIP:put: */ @@ -6058,7 +6058,7 @@ l138:; localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); -l136: /* end internalExecuteNewMethod */; +l140: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8566,7 +8566,7 @@ l22:; /* short jumpIfFalse 152 - 159 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l139; + goto l143; } if (bytecode == 172) { @@ -8576,7 +8576,7 @@ l22:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l139; + goto l143; } if (bytecode > 167) { @@ -8586,7 +8586,7 @@ l22:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l139; + goto l143; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8594,7 +8594,7 @@ l22:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l139:; +l143:; break; case 179: // bytecodePrimGreaterThan { @@ -8657,7 +8657,7 @@ l139:; /* begin jump: */ localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l140; + goto l144; } if (bytecode == 172) { @@ -8667,14 +8667,14 @@ l139:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l140; + goto l144; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l140:; +l144:; break; case 180: // bytecodePrimLessOrEqual { @@ -10157,7 +10157,7 @@ l140:; /* short jumpIfFalse 192 - 199 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l141; + goto l145; } if (bytecode == 239) { @@ -10167,7 +10167,7 @@ l140:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l141; + goto l145; } if (bytecode == 238) { @@ -10177,7 +10177,7 @@ l140:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l141; + goto l145; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10185,7 +10185,7 @@ l140:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l141:; +l145:; break; case 355: // 99 bytecodePrimGreaterThanSistaV1 { @@ -10248,7 +10248,7 @@ l141:; /* begin jump: */ localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l142; + goto l146; } if (bytecode == 239) { @@ -10258,14 +10258,14 @@ l141:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l142; + goto l146; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l142:; +l146:; break; case 356: // 100 bytecodePrimLessOrEqualSistaV1 { @@ -10544,10 +10544,10 @@ l98:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l143; + goto l147; } ourContext = marryFrameSP(localFP, localSP); -l143: /* end ensureFrameIsMarried:SP: */; +l147: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -10959,7 +10959,270 @@ l98:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - if (((primIndex >= 154) && (primIndex <= 157))) { + switch (primIndex) { + case 50: + /* begin mappedEnsureEnoughWords */ + top = longAtPointer(localSP); + assert((((top) & 7) == 1)); + slots = (top >> 3); + assert(slots >= 0); + + /* begin checkForAvailableSlots: */ + if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { + ok = 1; + goto l107; + } + GIV(needGCFlag) = 1; + ok = 0; +l107: /* end checkForAvailableSlots: */; + if (!ok) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + checkForEventsMayContextSwitch(1); + browserPluginReturnIfNeeded(); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + break; + case 150: + + /* 150 immCheckPointerAt:put: + pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l106; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l106: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 151: + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l109; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l109: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 152: + + /* 152 immCheckMaybeContextPointerAt:put: + pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l105; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l105: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 153: + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l108; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l108: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 154: + case 155: + case 156: + case 157: /* begin mappedImmcheckDataAtPut: */ assert(((primIndex >= 154) && (primIndex <= 157))); arg1 = longAtPointer(localSP + (1 * BytesPerOop)); @@ -10985,7 +11248,7 @@ l98:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l104; + goto l110; } switch (primIndex) { case 154: @@ -11023,59 +11286,7 @@ l98:; default: error("Case not found and no otherwise clause"); } - goto l104; - } - switch (primIndex) { - case 50: - /* begin mappedEnsureEnoughWords */ - top = longAtPointer(localSP); - assert((((top) & 7) == 1)); - slots = (top >> 3); - assert(slots >= 0); - - /* begin checkForAvailableSlots: */ - if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { - ok = 1; - goto l105; - } - GIV(needGCFlag) = 1; - ok = 0; -l105: /* end checkForAvailableSlots: */; - if (!ok) { - /* begin externalizeIPandSP */ - assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); - GIV(instructionPointer) = oopForPointer(localIP); - GIV(stackPointer) = localSP; - GIV(framePointer) = localFP; - checkForEventsMayContextSwitch(1); - browserPluginReturnIfNeeded(); - - /* begin internalizeIPandSP */ - assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); - localIP = pointerForOop(GIV(instructionPointer)); - localSP = pointerForOop(GIV(stackPointer)); - localFP = pointerForOop(GIV(framePointer)); - } - break; - case 150: - - /* 150 immCheckPointerAt:put: - pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 151: - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 152: - - /* 152 immCheckMaybeContextPointerAt:put: - pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); - break; - case 153: - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); +l110:; break; case 200: /* begin mappedDirectCall */ @@ -11191,7 +11402,7 @@ l98:; /* begin internalPop: */ localSP += 1 * BytesPerOop; if (((0 - offset) + 1) >= 0) { - goto l106; + goto l104; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11209,7 +11420,7 @@ l98:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l106; + goto l104; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11239,7 +11450,7 @@ l98:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l106: /* end ifBackwardsCheckForEvents: */; +l104: /* end ifBackwardsCheckForEvents: */; localIP -= 1; /* begin fetchNextBytecode */ @@ -11250,7 +11461,6 @@ l98:; localIP -= 3; goto respondToUnknownBytecode; } -l104: /* end sistaMappedInlinePrimitive: */; } break; case 493: // 237 extUnconditionalJump @@ -11273,7 +11483,7 @@ l98:; /* begin ifBackwardsCheckForEvents: */ if ((offset + bcpcDelta) >= 0) { - goto l107; + goto l111; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11291,7 +11501,7 @@ l98:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l107; + goto l111; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11321,7 +11531,7 @@ l98:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l107: /* end ifBackwardsCheckForEvents: */; +l111: /* end ifBackwardsCheckForEvents: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11351,14 +11561,14 @@ l98:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l108; + goto l112; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l108:; +l112:; } break; case 495: // 239 extJumpIfFalse @@ -11385,14 +11595,14 @@ l108:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l109; + goto l113; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l109:; +l113:; } break; case 496: // 240 extStoreAndPopReceiverVariableBytecode @@ -11454,7 +11664,7 @@ l109:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l110; + goto l114; } /* begin frameOfMarriedContext: */ @@ -11477,7 +11687,7 @@ l109:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l110; + goto l114; } /* begin externalizeIPandSP */ @@ -11518,7 +11728,7 @@ l109:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l110: /* end instVar:ofContext:put: */; +l114: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11533,7 +11743,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l111; + goto l115; } # endif // IMMUTABILITY @@ -11555,7 +11765,7 @@ l109:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), value); -l111: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l115: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11597,7 +11807,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l112; + goto l116; } # endif // IMMUTABILITY @@ -11619,7 +11829,7 @@ l109:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), value); -l112: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l116: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11705,7 +11915,7 @@ l109:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l113; + goto l117; } /* begin frameOfMarriedContext: */ @@ -11728,7 +11938,7 @@ l109:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l113; + goto l117; } /* begin externalizeIPandSP */ @@ -11769,7 +11979,7 @@ l109:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l113: /* end instVar:ofContext:put: */; +l117: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11784,7 +11994,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l114; + goto l118; } # endif // IMMUTABILITY @@ -11806,7 +12016,7 @@ l109:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), anObject); -l114: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l118: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11845,7 +12055,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l115; + goto l119; } # endif // IMMUTABILITY @@ -11867,7 +12077,7 @@ l109:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), anObject); -l115: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l119: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11968,11 +12178,11 @@ l109:; assert((((header) & 7) == 1)), /* literalCountOfAlternateHeader: */ ((header >> 3)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize)) + 3 /* sizeOfCallPrimitiveBytecode: */)) { - goto l116; + goto l120; } localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } prim = ((((usqInt)((byte2 - 128)) << 8))) + byte1; primSet = ((prim) >> 13) & 3; @@ -11984,7 +12194,7 @@ l109:; /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 2000) { primIndex = prim - 1000; @@ -12001,7 +12211,7 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l116; + goto l120; } if (primIndex <= 6) { /* begin unarySizeInlinePrimitive: */ @@ -12032,18 +12242,18 @@ l109:; /* bytes (the common case), including CompiledMethod */ resultUsqInt = numBytes - (fmt & 7); - goto l117; + goto l121; } if (fmt <= (sixtyFourBitIndexableFormat())) { resultUsqInt = ((sqInt) numBytes); - goto l117; + goto l121; } if (fmt >= (firstShortFormat())) { resultUsqInt = numBytes - (((fmt & 3) << 1)); - goto l117; + goto l121; } resultUsqInt = numBytes - (((fmt & 1) << 2)); -l117: /* end numBytesOf: */; +l121: /* end numBytesOf: */; break; case 3: assert(isShorts(top)); @@ -12064,13 +12274,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, ((resultUsqInt << 3) | 1)); - goto l116; + goto l120; } if (primIndex < 11) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 12) { /* begin unaryNewInlinePrimitive: */ @@ -12082,13 +12292,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l116; + goto l120; } if (primIndex < 20) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 24) { /* begin unaryHashInlinePrimitive: */ @@ -12168,13 +12378,13 @@ l109:; default: error("Case not found and no otherwise clause"); } - goto l116; + goto l120; } if (primIndex < 30) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 32) { /* begin unaryConvertInlinePrimitive: */ @@ -12212,13 +12422,13 @@ l109:; default: error("Case not found and no otherwise clause"); } - goto l116; + goto l120; } if (primIndex < 39) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 40) { /* begin unaryUnforwardInlinePrimitive: */ @@ -12241,7 +12451,7 @@ l109:; /* begin internalStackTopPut: */ longAtPointerput(localSP, aValue); } - goto l116; + goto l120; } if (primIndex == 41) { /* begin unaryPossibleRootInlinePrimitive */ @@ -12256,13 +12466,13 @@ l109:; remember(top); } } - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 3000) { primIndex = prim - 2000; @@ -12315,13 +12525,13 @@ l109:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 3) | 1)); - goto l116; + goto l120; } if (primIndex < 16) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 20) { /* begin binarySmiBitInlinePrimitive: */ @@ -12360,13 +12570,13 @@ l109:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 3) | 1)); - goto l116; + goto l120; } if (primIndex < 32) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 37) { /* begin binarySmiCompInlinePrimitive: */ @@ -12406,7 +12616,7 @@ l109:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l116; + goto l120; } if (primIndex <= 39) { /* begin binaryCompInlinePrimitive: */ @@ -12430,13 +12640,13 @@ l109:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l116; + goto l120; } if (primIndex < 48) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 49) { /* begin binaryNewInlinePrimitive: */ @@ -12456,10 +12666,10 @@ l109:; GIV(primFailCode) = 1; } size = null; - goto l118; + goto l122; } size = value; - goto l118; + goto l122; } if (((top & (tagMask())) != 0)) { /* begin primitiveFail */ @@ -12467,7 +12677,7 @@ l109:; GIV(primFailCode) = 1; } size = 0; - goto l118; + goto l122; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -12480,7 +12690,7 @@ l109:; GIV(primFailCode) = 1; } size = 0; - goto l118; + goto l122; } /* begin numBytesOfBytes: */ @@ -12497,15 +12707,15 @@ l109:; GIV(primFailCode) = 1; } size = 0; - goto l118; + goto l122; } if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((top + BaseHeaderSize)))); - goto l118; + goto l122; } size = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((top + BaseHeaderSize)))))); -l118: /* end positiveMachineIntegerValueOf: */; +l122: /* end positiveMachineIntegerValueOf: */; resultSqInt = instantiateClassindexableSize(classObj, size); /* begin internalPop: */ @@ -12513,13 +12723,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l116; + goto l120; } if (primIndex < 64) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 69) { /* begin binaryAtInlinePrimitive: */ @@ -12585,13 +12795,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 4000) { /* begin trinaryInlinePrimitive: */ @@ -12712,7 +12922,7 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l116; + goto l120; } if ((prim - 3000) == 21) { len = ((longAtPointer(localSP)) >> 3); @@ -12729,7 +12939,7 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l116; + goto l120; } } } @@ -12739,20 +12949,20 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 5000) { /* begin quaternaryInlinePrimitive: */ /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 6000) { /* begin quinaryInlinePrimitive: */ @@ -12768,7 +12978,7 @@ l109:; /* begin internalPop: */ localSP += 4 * BytesPerOop; if (destLimit < destIndex) { - goto l116; + goto l120; } if (!(/* isYoung: */ ((!(dest & (tagMask())))) @@ -12785,13 +12995,13 @@ l109:; assert(!(isOopForwarded(dest))); longAtput((dest + BaseHeaderSize) + ((((usqInt)((destIndex + i)) << (shiftForWord())))), oop); } - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 7000) { /* begin jumpUnaryInlinePrimitive: */ @@ -12804,13 +13014,13 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 1 * BytesPerOop; - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 8000) { /* begin jumpBinaryInlinePrimitive: */ @@ -12862,7 +13072,7 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 2 * BytesPerOop; - goto l116; + goto l120; } /* begin jumpTrinaryInlinePrimitive: */ @@ -12941,7 +13151,7 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l116; + goto l120; } } localIP += offset; @@ -12956,12 +13166,12 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l116; + goto l120; } localIP -= 3; goto respondToUnknownBytecode; } -l116: /* end case */; +l120: /* end case */; break; case 505: // 249 extPushFullClosureBytecode { @@ -13022,10 +13232,10 @@ l109:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l119; + goto l123; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l119: /* end ensureFrameIsMarried:SP: */; +l123: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ @@ -13051,13 +13261,13 @@ l109:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l120; + goto l124; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l120: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l124: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -13135,10 +13345,10 @@ l109:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l121; + goto l125; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l121: /* end ensureFrameIsMarried:SP: */; +l125: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -13163,13 +13373,13 @@ l109:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l122; + goto l126; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l122: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l126: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -40928,7 +41138,7 @@ primitiveSubtractLargeIntegers(void) sqInt oopRcvr; sqInt oopResult; usqLong result; - int resultIsNegative; + sqInt resultIsNegative; char *sp; oopArg = longAt(GIV(stackPointer)); diff --git a/src/spur64.sista/gcc3x-cointerp.c b/src/spur64.sista/gcc3x-cointerp.c index 4340b45472..ceff963baf 100644 --- a/src/spur64.sista/gcc3x-cointerp.c +++ b/src/spur64.sista/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 from - CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 + CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3456 uuid: e316760f-1758-4b6b-aa08-f84bc7c44ef3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3457 uuid: 15c9d051-7a93-4be7-b9d3-aea4a78b8561 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2689,7 +2689,7 @@ sqInt debugCallbackInvokes; sqInt debugCallbackReturns; sqInt cannotDeferDisplayUpdates; sqInt checkedPluginName; -const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3456]"; +const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3457]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; int displayWidth; int displayDepth; @@ -4687,7 +4687,7 @@ interpret(void) theFP = ((char *) 0); if (!(byteAt((localFP + FoxIFrameFlags) + 3))) { goto commonCallerReturn; - goto l123; + goto l127; } /* begin writeBackHeadFramePointers */ @@ -4733,10 +4733,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l125; + goto l129; } ourContext = marryFrameSP(localFP, localSP); -l125: /* end ensureFrameIsMarried:SP: */; +l129: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4744,7 +4744,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l123; + goto l127; } /* begin followObjField:ofObject: */ @@ -4766,10 +4766,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l127; + goto l131; } ourContext = marryFrameSP(localFP, localSP); -l127: /* end ensureFrameIsMarried:SP: */; +l131: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4777,7 +4777,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l123; + goto l127; } if (unwindContextOrNilOrZero) { /* begin internalAboutToReturn:through: */ @@ -4788,10 +4788,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l128; + goto l132; } ourContext = marryFrameSP(localFP, localSP); -l128: /* end ensureFrameIsMarried:SP: */; +l132: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4800,7 +4800,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l123; + goto l127; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + ((((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -4854,10 +4854,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l124; + goto l128; } ourContext = marryFrameSP(localFP, localSP); -l124: /* end ensureFrameIsMarried:SP: */; +l128: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -4865,7 +4865,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l123; + goto l127; } } assert(pageListIsWellFormed()); @@ -4983,11 +4983,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l126; + goto l130; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } -l126: /* end maybeReturnToMachineCodeFrame */; +l130: /* end maybeReturnToMachineCodeFrame */; aMethodObj = longAt(localFP + FoxMethod); /* begin setMethod: */ @@ -5017,7 +5017,7 @@ interpret(void) /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l123:; +l127:; BREAK; CASE(121) // returnTrue CASE(345) // 89 returnTrue @@ -5130,26 +5130,26 @@ l123:; fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l130; + goto l134; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l130; + goto l134; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; -l130: /* end findFrameAbove:inPage: */; +l134: /* end findFrameAbove:inPage: */; /* begin newStackPage */ newPage = (GIV(mostRecentlyUsedPage)->nextPage); if (!((newPage->baseFP))) { - goto l131; + goto l135; } divorceFramesIn(newPage); -l131: /* end newStackPage */; +l135: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5176,7 +5176,7 @@ l123:; longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l129; + goto l133; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5215,7 +5215,7 @@ l123:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l129; + goto l133; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5248,7 +5248,7 @@ l123:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l129; + goto l133; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((/* frameNumArgs: */ @@ -5276,7 +5276,7 @@ l123:; GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l129; + goto l133; } localIP = pointerForOop(((usqInt)(longAt(localFP + FoxIFSavedIP)))); } @@ -5309,7 +5309,7 @@ l123:; /* internalStackTopPut: */ longAtPointerput(localSP, localReturnValue); } -l129:; +l133:; BREAK; CASE(126) // unknownBytecode CASE(127) // unknownBytecode @@ -5345,10 +5345,10 @@ l129:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l132; + goto l136; } ourContext = marryFrameSP(localFP, localSP); -l132: /* end ensureFrameIsMarried:SP: */; +l136: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ @@ -5739,7 +5739,7 @@ l129:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l135; + goto l139; } /* second probe */ @@ -5748,17 +5748,17 @@ l129:; && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l135; + goto l139; } probe = (((usqInt)(hash)) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe + MethodCacheClass]) == lkupClassTag)) { GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); - goto l135; + goto l139; } - goto l134; -l135:; + goto l138; +l139:; /* begin ifAppropriateCompileToNativeCode:selector: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + ((((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -5788,8 +5788,8 @@ l135:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l138; -l134:; + goto l142; +l138:; /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -5837,7 +5837,7 @@ l134:; maybeFlagMethodAsInterpreted(GIV(newMethod)); } } - goto l133; + goto l137; } } @@ -5853,11 +5853,11 @@ l134:; classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l137; + goto l141; } fieldIndex = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + ((((usqInt)(fieldIndex) << (shiftForWord()))))); -l137: /* end classForClassTag: */; +l141: /* end classForClassTag: */; assert((GIV(lkupClass)) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -5868,8 +5868,8 @@ l134:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); -l138:; -l133: /* end internalFindNewMethodOrdinary */; +l142:; +l137: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer) { @@ -5881,30 +5881,30 @@ l138:; && (localPrimIndex < 520)); if (localPrimIndex >= 264) { longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((((usqInt)((localPrimIndex - 264)) << (shiftForWord())))))); - goto l136; + goto l140; } if (localPrimIndex == 0x100) { - goto l136; + goto l140; } if (localPrimIndex == 0x101) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l136; + goto l140; } if (localPrimIndex == 258) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l136; + goto l140; } if (localPrimIndex == 259) { /* internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l136; + goto l140; } /* internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l136; + goto l140; } /* begin externalizeIPandSP */ @@ -5965,7 +5965,7 @@ l138:; if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l136; + goto l140; } } @@ -6047,7 +6047,7 @@ l138:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - goto l136; + goto l140; } /* begin iframeSavedIP:put: */ @@ -6067,7 +6067,7 @@ l138:; localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); -l136: /* end internalExecuteNewMethod */; +l140: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -8575,7 +8575,7 @@ l22:; /* short jumpIfFalse 152 - 159 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l139; + goto l143; } if (bytecode == 172) { @@ -8585,7 +8585,7 @@ l22:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l139; + goto l143; } if (bytecode > 167) { @@ -8595,7 +8595,7 @@ l22:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l139; + goto l143; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8603,7 +8603,7 @@ l22:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l139:; +l143:; BREAK; CASE(179) // bytecodePrimGreaterThan { @@ -8666,7 +8666,7 @@ l139:; /* begin jump: */ localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l140; + goto l144; } if (bytecode == 172) { @@ -8676,14 +8676,14 @@ l139:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l140; + goto l144; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l140:; +l144:; BREAK; CASE(180) // bytecodePrimLessOrEqual { @@ -10166,7 +10166,7 @@ l140:; /* short jumpIfFalse 192 - 199 */ /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l141; + goto l145; } if (bytecode == 239) { @@ -10176,7 +10176,7 @@ l140:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l141; + goto l145; } if (bytecode == 238) { @@ -10186,7 +10186,7 @@ l140:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l141; + goto l145; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10194,7 +10194,7 @@ l140:; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } -l141:; +l145:; BREAK; CASE(355) // 99 bytecodePrimGreaterThanSistaV1 { @@ -10257,7 +10257,7 @@ l141:; /* begin jump: */ localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l142; + goto l146; } if (bytecode == 239) { @@ -10267,14 +10267,14 @@ l141:; /* begin jump: */ localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l142; + goto l146; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } -l142:; +l146:; BREAK; CASE(356) // 100 bytecodePrimLessOrEqualSistaV1 { @@ -10553,10 +10553,10 @@ l98:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l143; + goto l147; } ourContext = marryFrameSP(localFP, localSP); -l143: /* end ensureFrameIsMarried:SP: */; +l147: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -10968,7 +10968,270 @@ l98:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - if (((primIndex >= 154) && (primIndex <= 157))) { + switch (primIndex) { + case 50: + /* begin mappedEnsureEnoughWords */ + top = longAtPointer(localSP); + assert((((top) & 7) == 1)); + slots = (top >> 3); + assert(slots >= 0); + + /* begin checkForAvailableSlots: */ + if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { + ok = 1; + goto l107; + } + GIV(needGCFlag) = 1; + ok = 0; +l107: /* end checkForAvailableSlots: */; + if (!ok) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + checkForEventsMayContextSwitch(1); + browserPluginReturnIfNeeded(); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + break; + case 150: + + /* 150 immCheckPointerAt:put: + pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l106; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l106: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 151: + /* begin mappedImmcheckStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert(isPointers(rec)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + assert(argIntAdjusted >= 0); + assert(argIntAdjusted < (numSlotsOfAny(rec))); + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l109; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l109: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + break; + case 152: + + /* 152 immCheckMaybeContextPointerAt:put: + pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ + /* We could ignore the store check but we don't care in the interpreter */ + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l105; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l105: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 153: + /* begin mappedImmcheckMaybeContextStoreCheckPointerAtPut */ + rec = longAtPointer(localSP + (2 * BytesPerOop)); + arg1 = longAtPointer(localSP + (1 * BytesPerOop)); + assert((((arg1) & 7) == 1)); + argIntAdjusted = ((arg1 >> 3)) - 1; + result = longAtPointer(localSP); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += 2 * BytesPerOop), result); + if (argIntAdjusted <= ReceiverIndex) { + /* begin externalizeIPandSP */ + assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalInstVarofContextput(argIntAdjusted, rec, result); + + /* begin internalizeIPandSP */ + assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ +# if IMMUTABILITY + assert(!((isImmediate(rec)))); + if ((((usqInt)((longAt(rec)))) >> (immutableBitShift())) & 1) { + /* begin cannotAssign:to:withIndex: */ + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rec); + longAtPointerput((localSP -= BytesPerOop), result); + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(argIntAdjusted + 1) << 3) | 1)); + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l108; + } +# endif // IMMUTABILITY + + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rec))); + if ((/* begin isOldObject: */ + assert(isNonImmediate(rec)), + oopisGreaterThanOrEqualTo(rec, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (/* isYoung: */ + ((!(result & (tagMask())))) + && (oopisLessThan(result, GIV(oldSpaceStart)))) { + /* begin possibleRootStoreInto: */ + if (!((((usqInt)((longAt(rec)))) >> (rememberedBitShift())) & 1)) { + remember(rec); + } + } + } + longAtput((rec + BaseHeaderSize) + ((((usqInt)(argIntAdjusted) << (shiftForWord())))), result); +l108: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + break; + case 154: + case 155: + case 156: + case 157: /* begin mappedImmcheckDataAtPut: */ assert(((primIndex >= 154) && (primIndex <= 157))); arg1 = longAtPointer(localSP + (1 * BytesPerOop)); @@ -10994,7 +11257,7 @@ l98:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l104; + goto l110; } switch (primIndex) { case 154: @@ -11032,59 +11295,7 @@ l98:; default: error("Case not found and no otherwise clause"); } - goto l104; - } - switch (primIndex) { - case 50: - /* begin mappedEnsureEnoughWords */ - top = longAtPointer(localSP); - assert((((top) & 7) == 1)); - slots = (top >> 3); - assert(slots >= 0); - - /* begin checkForAvailableSlots: */ - if ((GIV(freeStart) + (BytesPerOop * slots)) <= GIV(scavengeThreshold)) { - ok = 1; - goto l105; - } - GIV(needGCFlag) = 1; - ok = 0; -l105: /* end checkForAvailableSlots: */; - if (!ok) { - /* begin externalizeIPandSP */ - assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); - GIV(instructionPointer) = oopForPointer(localIP); - GIV(stackPointer) = localSP; - GIV(framePointer) = localFP; - checkForEventsMayContextSwitch(1); - browserPluginReturnIfNeeded(); - - /* begin internalizeIPandSP */ - assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); - localIP = pointerForOop(GIV(instructionPointer)); - localSP = pointerForOop(GIV(stackPointer)); - localFP = pointerForOop(GIV(framePointer)); - } - break; - case 150: - - /* 150 immCheckPointerAt:put: - pointer object (Fixed sized or not) and not a context, Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 151: - mappedImmcheckStoreCheckPointerAtPut(); - break; - case 152: - - /* 152 immCheckMaybeContextPointerAt:put: - pointer object (Fixed sized or not), Smi, Anything => arg2 (1-based, optimised if arg1 is a constant) */ - /* We could ignore the store check but we don't care in the interpreter */ - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); - break; - case 153: - mappedImmcheckMaybeContextStoreCheckPointerAtPut(); +l110:; break; case 200: /* begin mappedDirectCall */ @@ -11200,7 +11411,7 @@ l98:; /* begin internalPop: */ localSP += 1 * BytesPerOop; if (((0 - offset) + 1) >= 0) { - goto l106; + goto l104; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11218,7 +11429,7 @@ l98:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l106; + goto l104; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11248,7 +11459,7 @@ l98:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l106: /* end ifBackwardsCheckForEvents: */; +l104: /* end ifBackwardsCheckForEvents: */; localIP -= 1; /* begin fetchNextBytecode */ @@ -11259,7 +11470,6 @@ l98:; localIP -= 3; goto respondToUnknownBytecode; } -l104: /* end sistaMappedInlinePrimitive: */; } BREAK; CASE(493) // 237 extUnconditionalJump @@ -11282,7 +11492,7 @@ l98:; /* begin ifBackwardsCheckForEvents: */ if ((offset + bcpcDelta) >= 0) { - goto l107; + goto l111; } if (localSP < GIV(stackLimit)) { /* begin externalizeIPandSP */ @@ -11300,7 +11510,7 @@ l98:; localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); if (switched) { - goto l107; + goto l111; } } backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN @@ -11330,7 +11540,7 @@ l98:; byteAtput(localFP + ((VMBIGENDIAN ? (FoxIFrameFlags + BytesPerWord) - 1 : FoxIFrameFlags)), backwardJumpCountByte); -l107: /* end ifBackwardsCheckForEvents: */; +l111: /* end ifBackwardsCheckForEvents: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11360,14 +11570,14 @@ l98:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l108; + goto l112; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l108:; +l112:; } BREAK; CASE(495) // 239 extJumpIfFalse @@ -11394,14 +11604,14 @@ l108:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); GIV(argumentCount) = 0; goto normalSend; - goto l109; + goto l113; } /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } localSP += 1 * BytesPerOop; -l109:; +l113:; } BREAK; CASE(496) // 240 extStoreAndPopReceiverVariableBytecode @@ -11463,7 +11673,7 @@ l109:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l110; + goto l114; } /* begin frameOfMarriedContext: */ @@ -11486,7 +11696,7 @@ l109:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l110; + goto l114; } /* begin externalizeIPandSP */ @@ -11527,7 +11737,7 @@ l109:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l110: /* end instVar:ofContext:put: */; +l114: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11542,7 +11752,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l111; + goto l115; } # endif // IMMUTABILITY @@ -11564,7 +11774,7 @@ l109:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), value); -l111: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l115: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11606,7 +11816,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l112; + goto l116; } # endif // IMMUTABILITY @@ -11628,7 +11838,7 @@ l109:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), value); -l112: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l116: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11714,7 +11924,7 @@ l109:; if (variableIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(obj); } - goto l113; + goto l117; } /* begin frameOfMarriedContext: */ @@ -11737,7 +11947,7 @@ l109:; else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l113; + goto l117; } /* begin externalizeIPandSP */ @@ -11778,7 +11988,7 @@ l109:; localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); -l113: /* end instVar:ofContext:put: */; +l117: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -11793,7 +12003,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l114; + goto l118; } # endif // IMMUTABILITY @@ -11815,7 +12025,7 @@ l109:; } } longAtput((obj + BaseHeaderSize) + ((((usqInt)(variableIndex) << (shiftForWord())))), anObject); -l114: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l118: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } /* begin fetchNextBytecode */ @@ -11854,7 +12064,7 @@ l109:; GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + ((((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l115; + goto l119; } # endif // IMMUTABILITY @@ -11876,7 +12086,7 @@ l109:; } } longAtput((litVar + BaseHeaderSize) + ((((usqInt)(ValueIndex) << (shiftForWord())))), anObject); -l115: /* end storePointerImmutabilityCheck:ofObject:withValue: */; +l119: /* end storePointerImmutabilityCheck:ofObject:withValue: */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11977,11 +12187,11 @@ l109:; assert((((header) & 7) == 1)), /* literalCountOfAlternateHeader: */ ((header >> 3)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize)) + 3 /* sizeOfCallPrimitiveBytecode: */)) { - goto l116; + goto l120; } localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } prim = ((((usqInt)((byte2 - 128)) << 8))) + byte1; primSet = ((prim) >> 13) & 3; @@ -11993,7 +12203,7 @@ l109:; /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 2000) { primIndex = prim - 1000; @@ -12010,7 +12220,7 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l116; + goto l120; } if (primIndex <= 6) { /* begin unarySizeInlinePrimitive: */ @@ -12041,18 +12251,18 @@ l109:; /* bytes (the common case), including CompiledMethod */ resultUsqInt = numBytes - (fmt & 7); - goto l117; + goto l121; } if (fmt <= (sixtyFourBitIndexableFormat())) { resultUsqInt = ((sqInt) numBytes); - goto l117; + goto l121; } if (fmt >= (firstShortFormat())) { resultUsqInt = numBytes - (((fmt & 3) << 1)); - goto l117; + goto l121; } resultUsqInt = numBytes - (((fmt & 1) << 2)); -l117: /* end numBytesOf: */; +l121: /* end numBytesOf: */; break; case 3: assert(isShorts(top)); @@ -12073,13 +12283,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, ((resultUsqInt << 3) | 1)); - goto l116; + goto l120; } if (primIndex < 11) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 12) { /* begin unaryNewInlinePrimitive: */ @@ -12091,13 +12301,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l116; + goto l120; } if (primIndex < 20) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 24) { /* begin unaryHashInlinePrimitive: */ @@ -12177,13 +12387,13 @@ l109:; default: error("Case not found and no otherwise clause"); } - goto l116; + goto l120; } if (primIndex < 30) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 32) { /* begin unaryConvertInlinePrimitive: */ @@ -12221,13 +12431,13 @@ l109:; default: error("Case not found and no otherwise clause"); } - goto l116; + goto l120; } if (primIndex < 39) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 40) { /* begin unaryUnforwardInlinePrimitive: */ @@ -12250,7 +12460,7 @@ l109:; /* begin internalStackTopPut: */ longAtPointerput(localSP, aValue); } - goto l116; + goto l120; } if (primIndex == 41) { /* begin unaryPossibleRootInlinePrimitive */ @@ -12265,13 +12475,13 @@ l109:; remember(top); } } - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 3000) { primIndex = prim - 2000; @@ -12324,13 +12534,13 @@ l109:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 3) | 1)); - goto l116; + goto l120; } if (primIndex < 16) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 20) { /* begin binarySmiBitInlinePrimitive: */ @@ -12369,13 +12579,13 @@ l109:; /* #internalStackTopPutIntegerObjectOf: #internalStackTopPut: */ longAtPointerput(localSP, (((usqInt)resultSqInt << 3) | 1)); - goto l116; + goto l120; } if (primIndex < 32) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 37) { /* begin binarySmiCompInlinePrimitive: */ @@ -12415,7 +12625,7 @@ l109:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l116; + goto l120; } if (primIndex <= 39) { /* begin binaryCompInlinePrimitive: */ @@ -12439,13 +12649,13 @@ l109:; (resultInt ? GIV(trueObj) : GIV(falseObj))); - goto l116; + goto l120; } if (primIndex < 48) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 49) { /* begin binaryNewInlinePrimitive: */ @@ -12465,10 +12675,10 @@ l109:; GIV(primFailCode) = 1; } size = null; - goto l118; + goto l122; } size = value; - goto l118; + goto l122; } if (((top & (tagMask())) != 0)) { /* begin primitiveFail */ @@ -12476,7 +12686,7 @@ l109:; GIV(primFailCode) = 1; } size = 0; - goto l118; + goto l122; } /* begin isClassOfNonImm:equalTo:compactClassIndex: */ @@ -12489,7 +12699,7 @@ l109:; GIV(primFailCode) = 1; } size = 0; - goto l118; + goto l122; } /* begin numBytesOfBytes: */ @@ -12506,15 +12716,15 @@ l109:; GIV(primFailCode) = 1; } size = 0; - goto l118; + goto l122; } if (((sizeof(usqIntptr_t)) == 8) && (bs > 4)) { size = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((top + BaseHeaderSize)))); - goto l118; + goto l122; } size = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((top + BaseHeaderSize)))))); -l118: /* end positiveMachineIntegerValueOf: */; +l122: /* end positiveMachineIntegerValueOf: */; resultSqInt = instantiateClassindexableSize(classObj, size); /* begin internalPop: */ @@ -12522,13 +12732,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l116; + goto l120; } if (primIndex < 64) { /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (primIndex <= 69) { /* begin binaryAtInlinePrimitive: */ @@ -12594,13 +12804,13 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, resultSqInt); - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 4000) { /* begin trinaryInlinePrimitive: */ @@ -12721,7 +12931,7 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, result); - goto l116; + goto l120; } if ((prim - 3000) == 21) { len = ((longAtPointer(localSP)) >> 3); @@ -12738,7 +12948,7 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l116; + goto l120; } } } @@ -12748,20 +12958,20 @@ l109:; /* internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 5000) { /* begin quaternaryInlinePrimitive: */ /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 6000) { /* begin quinaryInlinePrimitive: */ @@ -12777,7 +12987,7 @@ l109:; /* begin internalPop: */ localSP += 4 * BytesPerOop; if (destLimit < destIndex) { - goto l116; + goto l120; } if (!(/* isYoung: */ ((!(dest & (tagMask())))) @@ -12794,13 +13004,13 @@ l109:; assert(!(isOopForwarded(dest))); longAtput((dest + BaseHeaderSize) + ((((usqInt)((destIndex + i)) << (shiftForWord())))), oop); } - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 7000) { /* begin jumpUnaryInlinePrimitive: */ @@ -12813,13 +13023,13 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 1 * BytesPerOop; - goto l116; + goto l120; } /* begin unknownInlinePrimitive */ localIP -= 3; goto respondToUnknownBytecode; - goto l116; + goto l120; } if (prim < 8000) { /* begin jumpBinaryInlinePrimitive: */ @@ -12871,7 +13081,7 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 2 * BytesPerOop; - goto l116; + goto l120; } /* begin jumpTrinaryInlinePrimitive: */ @@ -12950,7 +13160,7 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l116; + goto l120; } } localIP += offset; @@ -12965,12 +13175,12 @@ l109:; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); localSP += 3 * BytesPerOop; - goto l116; + goto l120; } localIP -= 3; goto respondToUnknownBytecode; } -l116: /* end case */; +l120: /* end case */; BREAK; CASE(505) // 249 extPushFullClosureBytecode { @@ -13031,10 +13241,10 @@ l109:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l119; + goto l123; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l119: /* end ensureFrameIsMarried:SP: */; +l123: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ @@ -13060,13 +13270,13 @@ l109:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l120; + goto l124; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l120: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l124: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -13144,10 +13354,10 @@ l109:; : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l121; + goto l125; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); -l121: /* end ensureFrameIsMarried:SP: */; +l125: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -13172,13 +13382,13 @@ l109:; if ((GIV(freeStart) + numBytes) > (((GIV(eden)).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure = 0; - goto l122; + goto l126; } } long64Atput(newObj, ((((((usqLong) numSlots)) << (numSlotsFullShift()))) + ((((usqInt)((indexablePointersFormat())) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure = newObj; -l122: /* end eeInstantiateSmallClassIndex:format:numSlots: */; +l126: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure))); @@ -40937,7 +41147,7 @@ primitiveSubtractLargeIntegers(void) sqInt oopRcvr; sqInt oopResult; usqLong result; - int resultIsNegative; + sqInt resultIsNegative; char *sp; oopArg = longAt(GIV(stackPointer));