[Vm-dev] [commit][3248] CogVM source as per VMMaker.oscog-eem.1044
commits at squeakvm.org
commits at squeakvm.org
Thu Feb 5 00:50:59 UTC 2015
Revision: 3248
Author: eliot
Date: 2015-02-04 16:50:56 -0800 (Wed, 04 Feb 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1044
Nope. The fix is to make ensureBehaviorHash: inlineable.
Modified Paths:
--------------
branches/Cog/nscogsrc/vm/cointerp.c
branches/Cog/nscogsrc/vm/cointerp.h
branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
branches/Cog/nsspursrc/vm/cointerp.c
branches/Cog/nsspursrc/vm/cointerp.h
branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
branches/Cog/nsspurstacksrc/vm/interp.c
branches/Cog/sistasrc/vm/cointerp.c
branches/Cog/sistasrc/vm/cointerp.h
branches/Cog/sistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cointerp.c
branches/Cog/spursrc/vm/cointerp.h
branches/Cog/spursrc/vm/gcc3x-cointerp.c
branches/Cog/spurstack64src/vm/gcc3x-interp.c
branches/Cog/spurstack64src/vm/interp.c
branches/Cog/spurstacksrc/vm/gcc3x-interp.c
branches/Cog/spurstacksrc/vm/interp.c
branches/Cog/src/vm/cointerp.c
branches/Cog/src/vm/cointerp.h
branches/Cog/src/vm/cointerpmt.c
branches/Cog/src/vm/cointerpmt.h
branches/Cog/src/vm/gcc3x-cointerp.c
branches/Cog/src/vm/gcc3x-cointerpmt.c
branches/Cog/stacksrc/vm/gcc3x-interp.c
branches/Cog/stacksrc/vm/interp.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2015-02-05 00:15:02 UTC (rev 3247)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2015-02-05 00:50:56 UTC (rev 3248)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
from
- CoInterpreter VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7
+ CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2097,7 +2097,7 @@
/* 575 */ (void (*)(void))0,
0 };
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1040";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1044";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2015-02-05 00:15:02 UTC (rev 3247)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2015-02-05 00:50:56 UTC (rev 3248)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
*/
Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2015-02-05 00:15:02 UTC (rev 3247)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2015-02-05 00:50:56 UTC (rev 3248)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
from
- CoInterpreter VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7
+ CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1040 uuid: be108ef5-00a3-425b-b228-16515cc447c7 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2100,7 +2100,7 @@
/* 575 */ (void (*)(void))0,
0 };
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1040";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1044";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c 2015-02-05 00:15:02 UTC (rev 3247)
+++ branches/Cog/nsspursrc/vm/cointerp.c 2015-02-05 00:50:56 UTC (rev 3248)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
from
- CoInterpreter VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d
+ CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2352,7 +2352,7 @@
/*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
};
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1042";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1044";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -5102,7 +5102,7 @@
if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) {
goto commonCallerReturn;
- goto l220;
+ goto l219;
}
closure = longAt(localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
? ((mframeCogMethod(localFP))->cmNumArgs)
@@ -5155,10 +5155,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext = longAt(localFP + FoxThisContext);
- goto l224;
+ goto l223;
}
ourContext = marryFrameSP(localFP, localSP);
- l224: /* end ensureFrameIsMarried:SP: */;
+ l223: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
/* begin internalPush: */
@@ -5167,7 +5167,7 @@
GIV(argumentCount) = 1;
goto normalSend;
/* return self */
- goto l220;
+ goto l219;
}
if (unwindContextOrNilOrZero != 0) {
/* begin internalAboutToReturn:through: */
@@ -5177,10 +5177,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext1 = longAt(localFP + FoxThisContext);
- goto l221;
+ goto l220;
}
ourContext1 = marryFrameSP(localFP, localSP);
- l221: /* end ensureFrameIsMarried:SP: */;
+ l220: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext1);
/* begin internalPush: */
@@ -5191,7 +5191,7 @@
GIV(argumentCount) = 2;
goto normalSend;
/* return self */
- goto l220;
+ goto l219;
}
contextToReturnTo = null;
if (((longAt((home + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) {
@@ -5248,10 +5248,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext2 = longAt(localFP + FoxThisContext);
- goto l223;
+ goto l222;
}
ourContext2 = marryFrameSP(localFP, localSP);
- l223: /* end ensureFrameIsMarried:SP: */;
+ l222: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext2);
/* begin internalPush: */
@@ -5260,7 +5260,7 @@
GIV(argumentCount) = 1;
goto normalSend;
/* return self */
- goto l220;
+ goto l219;
}
}
assert(pageListIsWellFormed());
@@ -5379,11 +5379,11 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l222;
+ goto l221;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
- l222: /* end maybeReturnToMachineCodeFrame */;
+ l221: /* end maybeReturnToMachineCodeFrame */;
/* begin setMethod: */
assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory()));
GIV(method) = longAt(localFP + FoxMethod);
@@ -5397,7 +5397,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l220: /* end case */;
+ l219: /* end case */;
break;
case 121:
/* returnTrue */
@@ -5516,27 +5516,27 @@
fp = (thePage->headFP);
if (fp == theFP) {
frameAbove = 0;
- goto l227;
+ goto l226;
}
while (((callerFP = frameCallerFP(fp))) != 0) {
if (callerFP == theFP) {
frameAbove = fp;
- goto l227;
+ goto l226;
}
fp = callerFP;
}
error("did not find theFP in stack page");
frameAbove = 0;
- l227: /* end findFrameAbove:inPage: */;
+ l226: /* end findFrameAbove:inPage: */;
/* begin newStackPage */
lruOrFree = ((mostRecentlyUsedPage())->nextPage);
if (isFree(lruOrFree)) {
newPage = lruOrFree;
- goto l228;
+ goto l227;
}
divorceFramesIn(lruOrFree);
newPage = lruOrFree;
- l228: /* end newStackPage */;
+ l227: /* end newStackPage */;
assert(newPage == GIV(stackPage));
moveFramesInthroughtoPage(thePage, frameAbove, newPage);
markStackPageMostRecentlyUsed(newPage);
@@ -5560,7 +5560,7 @@
longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer));
GIV(stackPointer) = sp2;
ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << (shiftForWord()))), contextToReturnFrom, 1);
- goto l226;
+ goto l225;
}
GIV(instructionPointer) = 0;
thePage = makeBaseFrameFor(contextToReturnTo);
@@ -5598,7 +5598,7 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l226;
+ goto l225;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -5616,8 +5616,8 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
/* return self */
- l226: /* end baseFrameReturn */;
- goto l225;
+ l225: /* end baseFrameReturn */;
+ goto l224;
}
/* begin frameCallerSavedIP: */
localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
@@ -5645,7 +5645,7 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l225;
+ goto l224;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -5662,7 +5662,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l225: /* end case */;
+ l224: /* end case */;
break;
case 126:
case 127:
@@ -5691,10 +5691,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext = longAt(localFP + FoxThisContext);
- goto l229;
+ goto l228;
}
ourContext = marryFrameSP(localFP, localSP);
- l229: /* end ensureFrameIsMarried:SP: */;
+ l228: /* end ensureFrameIsMarried:SP: */;
localIP -= 1;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
@@ -6008,10 +6008,10 @@
classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt) lkupClassTag) >> 10) << (shiftForWord())));
if (classTablePage == GIV(nilObj)) {
classOrInteger = null;
- goto l236;
+ goto l235;
}
classOrInteger = longAt((classTablePage + BaseHeaderSize) + ((lkupClassTag & ((1 << 10) - 1)) << (shiftForWord())));
- l236: /* end classAtIndex: */;
+ l235: /* end classAtIndex: */;
GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger;
GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector);
GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter;
@@ -6037,7 +6037,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l231;
+ goto l230;
}
/* second probe */
@@ -6048,7 +6048,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l231;
+ goto l230;
}
probe = (((usqInt) hash) >> 2) & MethodCacheMask;
if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -6056,10 +6056,10 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l231;
+ goto l230;
}
ok = 0;
- l231: /* end inlineLookupInMethodCacheSel:classTag: */;
+ l230: /* end inlineLookupInMethodCacheSel:classTag: */;
if (ok) {
/* begin ifAppropriateCompileToNativeCode:selector: */
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << (shiftForWord())));
@@ -6117,7 +6117,7 @@
maybeFlagMethodAsInterpreted(GIV(newMethod));
}
}
- goto l234;
+ goto l233;
}
}
/* begin classForClassTag: */
@@ -6128,10 +6128,10 @@
classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt) lkupClassTag) >> 10) << (shiftForWord())));
if (classTablePage1 == GIV(nilObj)) {
GIV(lkupClass) = null;
- goto l230;
+ goto l229;
}
GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + ((lkupClassTag & ((1 << 10) - 1)) << (shiftForWord())));
- l230: /* end classAtIndex: */;
+ l229: /* end classAtIndex: */;
lookupMethodInClass(GIV(lkupClass));
/* begin internalizeIPandSP */
assert(GIV(instructionPointer) != (ceReturnToInterpreterPC()));
@@ -6140,7 +6140,7 @@
localFP = pointerForOop(GIV(framePointer));
addNewMethodToCache(GIV(lkupClass));
}
- l234: /* end internalFindNewMethod */;
+ l233: /* end internalFindNewMethod */;
/* begin internalExecuteNewMethod */
if (primitiveFunctionPointer != 0) {
if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) {
@@ -6153,31 +6153,31 @@
/* begin internalStackTopPut: */
longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((localPrimIndex - 264) << (shiftForWord()))));
1;
- goto l232;
+ goto l231;
}
if (localPrimIndex == 256) {
1;
- goto l232;
+ goto l231;
}
if (localPrimIndex == 257) {
longAtPointerput(localSP, GIV(trueObj));
1;
- goto l232;
+ goto l231;
}
if (localPrimIndex == 258) {
longAtPointerput(localSP, GIV(falseObj));
1;
- goto l232;
+ goto l231;
}
if (localPrimIndex == 259) {
longAtPointerput(localSP, GIV(nilObj));
1;
- goto l232;
+ goto l231;
}
longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1));
1;
- l232: /* end internalQuickPrimitiveResponse */;
- goto l233;
+ l231: /* end internalQuickPrimitiveResponse */;
+ goto l232;
}
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -6241,7 +6241,7 @@
returntoExecutive(popStack(), 1);
browserPluginReturnIfNeeded();
null;
- goto l233;
+ goto l232;
}
}
if (methodHasCogMethod(GIV(newMethod))) {
@@ -6318,11 +6318,11 @@
table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (PrimErrTableIndex << (shiftForWord())));
if (GIV(primFailCode) <= ((lastPointerOf(table)) / BytesPerWord)) {
errorCode = longAt((table + BaseHeaderSize) + ((GIV(primFailCode) - 1) << (shiftForWord())));
- goto l235;
+ goto l234;
}
}
errorCode = ((GIV(primFailCode) << 1) | 1);
- l235: /* end getErrorObjectFromPrimFailCode */;
+ l234: /* end getErrorObjectFromPrimFailCode */;
longAtPointerput(localSP, errorCode);
}
GIV(primFailCode) = 0;
@@ -6346,7 +6346,7 @@
localFP = pointerForOop(GIV(framePointer));
}
}
- l233: /* end internalExecuteNewMethod */;
+ l232: /* end internalExecuteNewMethod */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
@@ -6731,8 +6731,8 @@
sqInt classPointer;
sqInt err;
sqInt err1;
- sqInt newHash;
- sqInt newHash1;
+ sqInt hash;
+ sqInt hash1;
sqInt objOop;
sqInt objOop1;
sqInt referent;
@@ -6750,38 +6750,33 @@
superclass = objOop;
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(superclass));
- if (((newHash = (long32At(superclass + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(superclass))) {
+ if (((hash = (long32At(superclass + 4)) & 0x3FFFFF)) != 0) {
+ hash;
+ }
+ else {
+ if (objCouldBeClassObj(superclass)) {
+ if (((err = enterIntoClassTable(superclass))) != 0) {
+ -err;
+ }
+ else {
+ (long32At(superclass + 4)) & 0x3FFFFF;
+ }
+ }
+ else {
-PrimErrBadReceiver;
- goto l237;
}
- if (((err = enterIntoClassTable(superclass))) != 0) {
- -err;
- goto l237;
- }
- newHash = (long32At(superclass + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == superclass);
}
- newHash;
- l237: /* end ensureBehaviorHash: */;
/* begin classTagForClass: */
assert(addressCouldBeClassObj(superclass));
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(superclass));
- if (((newHash1 = (long32At(superclass + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(superclass))) {
- lkupClassTag = -PrimErrBadReceiver;
- goto l238;
- }
- if (((err1 = enterIntoClassTable(superclass))) != 0) {
- lkupClassTag = -err1;
- goto l238;
- }
- newHash1 = (long32At(superclass + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash1)) == superclass);
- }
- lkupClassTag = newHash1;
- l238: /* end ensureBehaviorHash: */;
+ lkupClassTag = (((hash1 = (long32At(superclass + 4)) & 0x3FFFFF)) != 0
+ ? hash1
+ : (objCouldBeClassObj(superclass)
+ ? (((err1 = enterIntoClassTable(superclass))) != 0
+ ? -err1
+ : (long32At(superclass + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
/* begin ensureReceiverUnforwarded */
if ((((longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop))) & 3) == 0)
&& (((longAt(longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)))) & 0x3FFFFF) == 8)) {
@@ -7798,7 +7793,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l239;
+ goto l236;
}
if (bytecode == 172) {
@@ -7808,7 +7803,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l239;
+ goto l236;
}
if (bytecode > 167) {
@@ -7819,7 +7814,7 @@
localIP = (localIP + offset) + 1;
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
- goto l239;
+ goto l236;
}
}
currentBytecode = bytecode + GIV(bytecodeSetSelector);
@@ -7827,7 +7822,7 @@
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), GIV(trueObj));
}
- l239: /* end case */;
+ l236: /* end case */;
break;
case 179:
/* bytecodePrimGreaterThan */
@@ -7944,7 +7939,7 @@
localIP = (localIP + (bytecode - 151)) + 1;
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
- goto l240;
+ goto l237;
}
if (bytecode == 172) {
@@ -7955,14 +7950,14 @@
localIP = (localIP + offset) + 1;
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
- goto l240;
+ goto l237;
}
currentBytecode = bytecode + GIV(bytecodeSetSelector);
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), GIV(falseObj));
}
- l240: /* end case */;
+ l237: /* end case */;
break;
case 180:
/* bytecodePrimLessOrEqual */
@@ -10499,7 +10494,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l241;
+ goto l238;
}
if (bytecode == 244) {
@@ -10509,7 +10504,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l241;
+ goto l238;
}
if (bytecode == 243) {
@@ -10520,7 +10515,7 @@
localIP = (localIP + offset) + 1;
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
- goto l241;
+ goto l238;
}
}
currentBytecode = bytecode + GIV(bytecodeSetSelector);
@@ -10528,7 +10523,7 @@
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), GIV(trueObj));
}
- l241: /* end case */;
+ l238: /* end case */;
break;
case 339: /*83*/
/* bytecodePrimGreaterThanV4 */
@@ -10645,7 +10640,7 @@
localIP = (localIP + (bytecode - 207)) + 1;
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
- goto l242;
+ goto l239;
}
if (bytecode == 244) {
@@ -10656,14 +10651,14 @@
localIP = (localIP + offset) + 1;
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
- goto l242;
+ goto l239;
}
currentBytecode = bytecode + GIV(bytecodeSetSelector);
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), GIV(falseObj));
}
- l242: /* end case */;
+ l239: /* end case */;
break;
case 340: /*84*/
/* bytecodePrimLessOrEqualV4 */
@@ -13553,12 +13548,12 @@
sqInt byte;
sqInt classObj;
sqInt err;
+ sqInt hash;
sqInt i;
sqInt mClassMixin;
sqInt mixin;
sqInt mixinApplication;
sqInt mixinApplication1;
- sqInt newHash;
sqInt objOop;
sqInt oop;
sqInt tagBits;
@@ -13604,20 +13599,13 @@
assert(addressCouldBeClassObj(classObj));
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(classObj))) {
- lkupClassTag = -PrimErrBadReceiver;
- goto l212;
- }
- if (((err = enterIntoClassTable(classObj))) != 0) {
- lkupClassTag = -err;
- goto l212;
- }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
- }
- lkupClassTag = newHash;
- l212: /* end ensureBehaviorHash: */;
+ lkupClassTag = (((hash = (long32At(classObj + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(classObj)
+ ? (((err = enterIntoClassTable(classObj))) != 0
+ ? -err
+ : (long32At(classObj + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
goto commonSend;
}
break;
@@ -13636,7 +13624,7 @@
localIP += offset;
/* begin ifBackwardsCheckForEvents: */
if (offset >= 0) {
- goto l213;
+ goto l212;
}
if (localSP < GIV(stackLimit)) {
/* begin externalizeIPandSP */
@@ -13653,7 +13641,7 @@
localSP = pointerForOop(GIV(stackPointer));
localFP = pointerForOop(GIV(framePointer));
if (switched) {
- goto l213;
+ goto l212;
}
}
backwardJumpCountByte = byteAt(localFP + ((VMBIGENDIAN
@@ -13683,7 +13671,7 @@
byteAtput(localFP + ((VMBIGENDIAN
? (FoxIFrameFlags + BytesPerWord) - 1
: FoxIFrameFlags)), backwardJumpCountByte);
- l213: /* end ifBackwardsCheckForEvents: */;
+ l212: /* end ifBackwardsCheckForEvents: */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
@@ -13714,7 +13702,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorMustBeBoolean << (shiftForWord())));
GIV(argumentCount) = 0;
goto normalSend;
- goto l214;
+ goto l213;
}
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
@@ -13722,7 +13710,7 @@
}
/* begin internalPop: */
localSP += 1 * BytesPerOop;
- l214: /* end jumplfTrueBy: */;
+ l213: /* end jumplfTrueBy: */;
}
break;
case 500: /*244*/
@@ -13750,7 +13738,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorMustBeBoolean << (shiftForWord())));
GIV(argumentCount) = 0;
goto normalSend;
- goto l215;
+ goto l214;
}
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
@@ -13758,7 +13746,7 @@
}
/* begin internalPop: */
localSP += 1 * BytesPerOop;
- l215: /* end jumplfFalseBy: */;
+ l214: /* end jumplfFalseBy: */;
}
break;
case 501: /*245*/
@@ -13804,15 +13792,15 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
null;
- goto l216;
+ goto l215;
}
else {
goto respondToUnknownBytecode;
- goto l216;
+ goto l215;
}
}
- l216: /* end case */;
+ l215: /* end case */;
break;
case 509: /*253*/
/* extPushClosureBytecode */
@@ -13847,10 +13835,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
context = longAt(localFP + FoxThisContext);
- goto l217;
+ goto l216;
}
context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop));
- l217: /* end ensureFrameIsMarried:SP: */;
+ l216: /* end ensureFrameIsMarried:SP: */;
/* begin closureIn:numArgs:instructionPointer:numCopiedValues: */
initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize);
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
@@ -13874,13 +13862,13 @@
if ((GIV(freeStart) + numBytes) > (((eden()).limit))) {
error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:");
newClosure1 = 0;
- goto l218;
+ goto l217;
}
}
long64Atput(newObj, (((((usqLong) (ClosureFirstCopiedValueIndex + numCopied))) << 56) + (3 << 24)) + ClassBlockClosureCompactIndex);
GIV(freeStart) += numBytes;
newClosure1 = newObj;
- l218: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+ l217: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
/* begin storePointerUnchecked:ofObject:withValue: */
assert(!(isForwarded(newClosure1)));
@@ -15084,6 +15072,7 @@
CogMethod *cogMethod1;
sqInt err;
sqInt errSelIdx;
+ sqInt hash;
sqInt mClassMixin;
sqInt methodHeader;
sqInt methodHeader1;
@@ -15091,7 +15080,6 @@
sqInt mixinApplication;
sqInt mixinApplication1;
CogMethod *newCogMethod;
- sqInt newHash;
sqInt objOop;
sqInt tagBits;
sqInt top;
@@ -15129,20 +15117,13 @@
assert(addressCouldBeClassObj(classObj));
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(classObj))) {
- classTag = -PrimErrBadReceiver;
- goto l1;
- }
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classTag = -err;
- goto l1;
- }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
- }
- classTag = newHash;
-l1: /* end ensureBehaviorHash: */;
+ classTag = (((hash = (long32At(classObj + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(classObj)
+ ? (((err = enterIntoClassTable(classObj))) != 0
+ ? -err
+ : (long32At(classObj + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
GIV(argumentCount) = numArgs;
if (lookupInMethodCacheSelclassTag(selector, classTag)) {
@@ -15914,10 +15895,10 @@
CogMethod *cogMethod1;
sqInt err;
sqInt errSelIdx;
+ sqInt hash;
sqInt methodHeader;
sqInt methodHeader1;
CogMethod *newCogMethod;
- sqInt newHash;
sqInt objOop;
sqInt tagBits;
sqInt top;
@@ -15954,20 +15935,13 @@
assert(addressCouldBeClassObj(classObj));
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(classObj))) {
- classTag = -PrimErrBadReceiver;
- goto l1;
- }
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classTag = -err;
- goto l1;
- }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
- }
- classTag = newHash;
- l1: /* end ensureBehaviorHash: */;
+ classTag = (((hash = (long32At(classObj + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(classObj)
+ ? (((err = enterIntoClassTable(classObj))) != 0
+ ? -err
+ : (long32At(classObj + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
}
GIV(argumentCount) = numArgs;
if (lookupInMethodCacheSelclassTag(selector, classTag)) {
@@ -28251,28 +28225,21 @@
primitiveBehaviorHash(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt err;
+ sqInt hash;
sqInt hashOrError;
- sqInt newHash;
char *sp;
assert((isNonImmediate(stackTop()))
&& (addressCouldBeClassObj(stackTop())));
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(longAt(GIV(stackPointer))));
- if (((newHash = (long32At((longAt(GIV(stackPointer))) + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(longAt(GIV(stackPointer))))) {
- hashOrError = -PrimErrBadReceiver;
- goto l1;
- }
- if (((err = enterIntoClassTable(longAt(GIV(stackPointer))))) != 0) {
- hashOrError = -err;
- goto l1;
- }
- newHash = (long32At((longAt(GIV(stackPointer))) + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == (longAt(GIV(stackPointer))));
- }
- hashOrError = newHash;
-l1: /* end ensureBehaviorHash: */;
+ hashOrError = (((hash = (long32At((longAt(GIV(stackPointer))) + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(longAt(GIV(stackPointer)))
+ ? (((err = enterIntoClassTable(longAt(GIV(stackPointer))))) != 0
+ ? -err
+ : (long32At((longAt(GIV(stackPointer))) + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
if (hashOrError >= 0) {
/* begin pop:thenPushInteger: */
longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((hashOrError << 1) | 1));
@@ -34175,8 +34142,8 @@
sqInt classObj;
sqInt classObj1;
sqInt err;
+ sqInt hash;
sqInt instSpec;
- sqInt newHash;
sqInt newObj;
sqInt newObj1;
usqInt numBytes;
@@ -34200,28 +34167,21 @@
if (!((instSpec <= 1)
|| (instSpec == 5))) {
obj = null;
- goto l3;
+ goto l2;
}
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(classObj1));
- if (((newHash = (long32At(classObj1 + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(classObj1))) {
- classIndex = -PrimErrBadReceiver;
- goto l1;
- }
- if (((err = enterIntoClassTable(classObj1))) != 0) {
- classIndex = -err;
- goto l1;
- }
- newHash = (long32At(classObj1 + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj1);
- }
- classIndex = newHash;
-l1: /* end ensureBehaviorHash: */;
+ classIndex = (((hash = (long32At(classObj1 + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(classObj1)
+ ? (((err = enterIntoClassTable(classObj1))) != 0
+ ? -err
+ : (long32At(classObj1 + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
if (classIndex < 0) {
GIV(primFailCode) = -classIndex;
obj = null;
- goto l3;
+ goto l2;
}
numSlots = classFormat & ((1 << 16) - 1);
/* begin allocateSlots:format:classIndex: */
@@ -34242,7 +34202,7 @@
forceInterruptCheck();
}
newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, instSpec, classIndex);
- goto l2;
+ goto l1;
}
if (numSlots >= 0xFF) {
@@ -34260,7 +34220,7 @@
assert((newObj1 % (allocationUnit())) == 0);
GIV(freeStart) += numBytes;
newObj = newObj1;
-l2: /* end allocateSlots:format:classIndex: */;
+l1: /* end allocateSlots:format:classIndex: */;
if (!(newObj == null)) {
/* begin fillObj:numSlots:with: */
assert(oopisLessThan(((newObj + BaseHeaderSize) + (numSlots * BytesPerOop)) - 1, addressAfter(newObj)));
@@ -34270,7 +34230,7 @@
}
}
obj = newObj;
-l3: /* end instantiateClass: */;
+l2: /* end instantiateClass: */;
if (obj == null) {
/* begin primitiveFailFor: */
reasonCode = (isFixedSizePointerFormat(instSpecOfClassFormat(((longAt(((longAt(GIV(stackPointer))) + BaseHeaderSize) + (InstanceSpecificationIndex << (shiftForWord())))) >> 1)))
@@ -34294,11 +34254,11 @@
sqInt classFormat;
sqInt classIndex;
sqInt err;
+ sqInt hash;
sqInt header;
sqInt i;
sqInt instSpec;
sqInt literalCount;
- sqInt newHash;
sqInt newObj;
sqInt newObj1;
usqInt numBytes;
@@ -34327,35 +34287,28 @@
instSpec = (((usqInt) classFormat) >> 16) & 0x1F;
if (instSpec != 24) {
theMethod = null;
- goto l3;
+ goto l2;
}
numSlots = (size + 3) / 4;
instSpec += (4 - size) & 3;
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(class));
- if (((newHash = (long32At(class + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(class))) {
- classIndex = -PrimErrBadReceiver;
- goto l2;
- }
- if (((err = enterIntoClassTable(class))) != 0) {
- classIndex = -err;
- goto l2;
- }
- newHash = (long32At(class + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == class);
- }
- classIndex = newHash;
-l2: /* end ensureBehaviorHash: */;
+ classIndex = (((hash = (long32At(class + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(class)
+ ? (((err = enterIntoClassTable(class))) != 0
+ ? -err
+ : (long32At(class + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
if (classIndex < 0) {
GIV(primFailCode) = -classIndex;
theMethod = null;
- goto l3;
+ goto l2;
}
if (numSlots > ((1 << 16) - 1)) {
if (numSlots > (((512 * 1024) * 1024) - 1)) {
theMethod = null;
- goto l3;
+ goto l2;
}
newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, ((numSlots == 0
? 8
@@ -34411,7 +34364,7 @@
}
}
theMethod = newObj;
-l3: /* end instantiateCompiledMethodClass:indexableSize: */;
+l2: /* end instantiateCompiledMethodClass:indexableSize: */;
if (!(theMethod)) {
/* begin primitiveFailFor: */
reasonCode = (isCompiledMethodFormat(instSpecOfClassFormat(((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << (shiftForWord())))) >> 1)))
@@ -35064,9 +35017,9 @@
sqInt currentClass;
sqInt delta;
sqInt err;
+ sqInt hash;
sqInt index;
sqInt lookupClass;
- sqInt newHash;
usqInt numSlots;
sqInt objOop;
sqInt offset;
@@ -35106,7 +35059,7 @@
if (!(((argumentArray & 3) == 0)
&& (((((usqInt) (longAt(argumentArray))) >> 24) & 0x1F) == 2))) {
GIV(primFailCode) = PrimErrBadArgument;
- goto l2;
+ goto l1;
}
/* begin numSlotsOf: */
flag("endianness");
@@ -35117,7 +35070,7 @@
: numSlots);
if (arraySize > LargeContextSlots) {
GIV(primFailCode) = PrimErrBadNumArgs;
- goto l2;
+ goto l1;
}
/* Push newMethod to save it in case of failure,
@@ -35159,20 +35112,13 @@
assert(addressCouldBeClassObj(lookupClass)),
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(lookupClass)),
- (((newHash = (long32At(lookupClass + 4)) & 0x3FFFFF)) == 0
- ? ((!(objCouldBeClassObj(lookupClass))
- ? (-PrimErrBadReceiver,
- goto l1)
- : 0),
- (((err = enterIntoClassTable(lookupClass))) != 0
- ? (-err,
- goto l1)
- : 0),
- (newHash = (long32At(lookupClass + 4)) & 0x3FFFFF),
- assert((classAtIndex(newHash)) == lookupClass))
- : 0),
- newHash,
- l1: /* end ensureBehaviorHash: */)));
+ (((hash = (long32At(lookupClass + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(lookupClass)
+ ? (((err = enterIntoClassTable(lookupClass))) != 0
+ ? -err
+ : (long32At(lookupClass + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver)))));
if ((((GIV(newMethod) & 3) == 0)
&& (((((usqInt) (longAt(GIV(newMethod)))) >> 24) & 0x1F) >= 24))
&& ((argumentCountOf(GIV(newMethod))) != GIV(argumentCount))) {
@@ -35187,7 +35133,7 @@
GIV(stackPointer) += BytesPerWord;
GIV(newMethod) = ((sqInt) top);
GIV(primFailCode) = PrimErrBadNumArgs;
- goto l2;
+ goto l1;
}
/* +2 = receiver + saved newMethod */
@@ -35203,7 +35149,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
null;
-l2: /* end primitiveObject:perform:withArguments:lookedUpIn: */;
+l1: /* end primitiveObject:perform:withArguments:lookedUpIn: */;
}
static void
@@ -35214,8 +35160,8 @@
usqInt arraySize;
sqInt delta;
sqInt err;
+ sqInt hash;
sqInt index;
- sqInt newHash;
usqInt numSlots;
sqInt offset;
sqInt performArgCount;
@@ -35235,7 +35181,7 @@
if (!(((argumentArray & 3) == 0)
&& (((((usqInt) (longAt(argumentArray))) >> 24) & 0x1F) == 2))) {
GIV(primFailCode) = PrimErrBadArgument;
- goto l2;
+ goto l1;
}
/* begin numSlotsOf: */
flag("endianness");
@@ -35246,7 +35192,7 @@
: numSlots);
if (arraySize > LargeContextSlots) {
GIV(primFailCode) = PrimErrBadNumArgs;
- goto l2;
+ goto l1;
}
/* Push newMethod to save it in case of failure,
@@ -35295,7 +35241,7 @@
GIV(stackPointer) += BytesPerWord;
GIV(newMethod) = ((sqInt) top);
GIV(primFailCode) = PrimErrBadNumArgs;
- goto l2;
+ goto l1;
}
/* +2 = receiver + saved newMethod */
@@ -35311,7 +35257,7 @@
/* begin initPrimCall */
GIV(primFailCode) = 0;
null;
-l2: /* end primitiveObject:perform:withArguments:lookedUpIn: */;
+l1: /* end primitiveObject:perform:withArguments:lookedUpIn: */;
}
@@ -39888,8 +39834,8 @@
sqInt classIndex;
sqInt err;
sqInt fillValue;
+ sqInt hash;
sqInt instSpec;
- sqInt newHash;
sqInt newObj;
sqInt newObj1;
usqInt numBytes;
@@ -39950,20 +39896,13 @@
if (classIndex == 0) {
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(classObj))) {
- classIndex = -PrimErrBadReceiver;
- goto l1;
- }
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classIndex = -err;
- goto l1;
- }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
- }
- classIndex = newHash;
- l1: /* end ensureBehaviorHash: */;
+ classIndex = (((hash = (long32At(classObj + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(classObj)
+ ? (((err = enterIntoClassTable(classObj))) != 0
+ ? -err
+ : (long32At(classObj + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
if (classIndex < 0) {
GIV(primFailCode) = -classIndex;
return null;
@@ -39999,7 +39938,7 @@
forceInterruptCheck();
}
newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, instSpec, classIndex);
- goto l2;
+ goto l1;
}
if (numSlots >= 0xFF) {
@@ -40017,7 +39956,7 @@
assert((newObj1 % (allocationUnit())) == 0);
GIV(freeStart) += numBytes;
newObj = newObj1;
- l2: /* end allocateSlots:format:classIndex: */;
+ l1: /* end allocateSlots:format:classIndex: */;
}
if (!(newObj == null)) {
/* begin fillObj:numSlots:with: */
@@ -44593,22 +44532,18 @@
classTagForClass(sqInt classObj)
{
sqInt err;
- sqInt newHash;
+ sqInt hash;
assert(addressCouldBeClassObj(classObj));
/* begin ensureBehaviorHash: */
assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(classObj))) {
- return -PrimErrBadReceiver;
- }
- if (((err = enterIntoClassTable(classObj))) != 0) {
- return -err;
- }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
- }
- return newHash;
+ return (((hash = (long32At(classObj + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(classObj)
+ ? (((err = enterIntoClassTable(classObj))) != 0
+ ? -err
+ : (long32At(classObj + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
}
sqInt
@@ -45725,20 +45660,16 @@
ensureBehaviorHash(sqInt aBehavior)
{
sqInt err;
- sqInt newHash;
+ sqInt hash;
assert(addressCouldBeClassObj(aBehavior));
- if (((newHash = (long32At(aBehavior + 4)) & 0x3FFFFF)) == 0) {
- if (!(objCouldBeClassObj(aBehavior))) {
- return -PrimErrBadReceiver;
- }
- if (((err = enterIntoClassTable(aBehavior))) != 0) {
- return -err;
- }
- newHash = (long32At(aBehavior + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == aBehavior);
- }
- return newHash;
+ return (((hash = (long32At(aBehavior + 4)) & 0x3FFFFF)) != 0
+ ? hash
+ : (objCouldBeClassObj(aBehavior)
+ ? (((err = enterIntoClassTable(aBehavior))) != 0
+ ? -err
+ : (long32At(aBehavior + 4)) & 0x3FFFFF)
+ : -PrimErrBadReceiver));
}
Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h 2015-02-05 00:15:02 UTC (rev 3247)
+++ branches/Cog/nsspursrc/vm/cointerp.h 2015-02-05 00:50:56 UTC (rev 3248)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
*/
Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-02-05 00:15:02 UTC (rev 3247)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-02-05 00:50:56 UTC (rev 3248)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
from
- CoInterpreter VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d
+ CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1042 uuid: cd14932f-16ef-41a5-8212-83e584ac417d " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1044 uuid: e04ad0a1-2b15-4561-a3ed-1a4d4d6d58c8 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -2355,7 +2355,7 @@
/*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
};
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1042";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1044";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -5111,7 +5111,7 @@
if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) {
goto commonCallerReturn;
- goto l220;
+ goto l219;
}
closure = longAt(localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
? ((mframeCogMethod(localFP))->cmNumArgs)
@@ -5164,10 +5164,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext = longAt(localFP + FoxThisContext);
- goto l224;
+ goto l223;
}
ourContext = marryFrameSP(localFP, localSP);
- l224: /* end ensureFrameIsMarried:SP: */;
+ l223: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
/* begin internalPush: */
@@ -5176,7 +5176,7 @@
GIV(argumentCount) = 1;
goto normalSend;
/* return self */
- goto l220;
+ goto l219;
}
if (unwindContextOrNilOrZero != 0) {
/* begin internalAboutToReturn:through: */
@@ -5186,10 +5186,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext1 = longAt(localFP + FoxThisContext);
- goto l221;
+ goto l220;
}
ourContext1 = marryFrameSP(localFP, localSP);
- l221: /* end ensureFrameIsMarried:SP: */;
+ l220: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext1);
/* begin internalPush: */
@@ -5200,7 +5200,7 @@
GIV(argumentCount) = 2;
goto normalSend;
/* return self */
- goto l220;
+ goto l219;
}
contextToReturnTo = null;
if (((longAt((home + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) {
@@ -5257,10 +5257,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext2 = longAt(localFP + FoxThisContext);
- goto l223;
+ goto l222;
}
ourContext2 = marryFrameSP(localFP, localSP);
- l223: /* end ensureFrameIsMarried:SP: */;
+ l222: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext2);
/* begin internalPush: */
@@ -5269,7 +5269,7 @@
GIV(argumentCount) = 1;
goto normalSend;
/* return self */
- goto l220;
+ goto l219;
}
}
assert(pageListIsWellFormed());
@@ -5388,11 +5388,11 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l222;
+ goto l221;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
- l222: /* end maybeReturnToMachineCodeFrame */;
+ l221: /* end maybeReturnToMachineCodeFrame */;
/* begin setMethod: */
assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory()));
GIV(method) = longAt(localFP + FoxMethod);
@@ -5406,7 +5406,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l220: /* end case */;
+ l219: /* end case */;
BREAK;
CASE(121)
/* returnTrue */
@@ -5525,27 +5525,27 @@
fp = (thePage->headFP);
if (fp == theFP) {
frameAbove = 0;
- goto l227;
+ goto l226;
}
while (((callerFP = frameCallerFP(fp))) != 0) {
if (callerFP == theFP) {
frameAbove = fp;
- goto l227;
+ goto l226;
}
fp = callerFP;
}
error("did not find theFP in stack page");
frameAbove = 0;
- l227: /* end findFrameAbove:inPage: */;
+ l226: /* end findFrameAbove:inPage: */;
/* begin newStackPage */
lruOrFree = ((mostRecentlyUsedPage())->nextPage);
if (isFree(lruOrFree)) {
newPage = lruOrFree;
- goto l228;
+ goto l227;
}
divorceFramesIn(lruOrFree);
newPage = lruOrFree;
- l228: /* end newStackPage */;
+ l227: /* end newStackPage */;
assert(newPage == GIV(stackPage));
moveFramesInthroughtoPage(thePage, frameAbove, newPage);
markStackPageMostRecentlyUsed(newPage);
@@ -5569,7 +5569,7 @@
longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer));
GIV(stackPointer) = sp2;
ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << (shiftForWord()))), contextToReturnFrom, 1);
- goto l226;
+ goto l225;
}
GIV(instructionPointer) = 0;
thePage = makeBaseFrameFor(contextToReturnTo);
@@ -5607,7 +5607,7 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l226;
+ goto l225;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -5625,8 +5625,8 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
/* return self */
- l226: /* end baseFrameReturn */;
- goto l225;
+ l225: /* end baseFrameReturn */;
+ goto l224;
}
/* begin frameCallerSavedIP: */
localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
@@ -5654,7 +5654,7 @@
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l225;
+ goto l224;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -5671,7 +5671,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l225: /* end case */;
+ l224: /* end case */;
BREAK;
CASE(126)
CASE(127)
@@ -5700,10 +5700,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext = longAt(localFP + FoxThisContext);
- goto l229;
+ goto l228;
}
ourContext = marryFrameSP(localFP, localSP);
- l229: /* end ensureFrameIsMarried:SP: */;
+ l228: /* end ensureFrameIsMarried:SP: */;
localIP -= 1;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
@@ -6017,10 +6017,10 @@
classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt) lkupClassTag) >> 10) << (shiftForWord())));
if (classTablePage == GIV(nilObj)) {
classOrInteger = null;
- goto l236;
+ goto l235;
}
classOrInteger = longAt((classTablePage + BaseHeaderSize) + ((lkupClassTag & ((1 << 10) - 1)) << (shiftForWord())));
- l236: /* end classAtIndex: */;
+ l235: /* end classAtIndex: */;
GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger;
GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector);
GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter;
@@ -6046,7 +6046,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l231;
+ goto l230;
}
/* second probe */
@@ -6057,7 +6057,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l231;
+ goto l230;
}
probe = (((usqInt) hash) >> 2) & MethodCacheMask;
if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -6065,10 +6065,10 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l231;
+ goto l230;
}
ok = 0;
- l231: /* end inlineLookupInMethodCacheSel:classTag: */;
+ l230: /* end inlineLookupInMethodCacheSel:classTag: */;
if (ok) {
/* begin ifAppropriateCompileToNativeCode:selector: */
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << (shiftForWord())));
@@ -6126,7 +6126,7 @@
maybeFlagMethodAsInterpreted(GIV(newMethod));
}
}
- goto l234;
+ goto l233;
}
}
/* begin classForClassTag: */
@@ -6137,10 +6137,10 @@
classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + ((((usqInt) lkupClassTag) >> 10) << (shiftForWord())));
if (classTablePage1 == GIV(nilObj)) {
GIV(lkupClass) = null;
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list