[Vm-dev] [commit][2640] CogVM source as per VMMaker.oscog-eem.240.
commits at squeakvm.org
commits at squeakvm.org
Thu Dec 20 20:39:21 UTC 2012
Revision: 2640
Author: eliot
Date: 2012-12-20 12:39:20 -0800 (Thu, 20 Dec 2012)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.240.
Back out of the wrong-headed attempt to give compact class indices
to long header objects in changeClassOf:to:, and comment why
(markAndTrace: reuses header type bits and depends on compact
class and size fields to reconstruct type bits after traverse).
Consequently fix isClassOfNonImm:equalTo:compactClassIndex: so
it will still accept long-header objects that are insances of compact
classes but don't have a compact class index.
Clean-up accesses to the compactClassesArray so that they go
through the compactClassAt: where appropriate.
Use the short-hand class determinators such as isInstanceOfClassFloat:
in place of the long-winded is:instanceOf:compactClassIndex:.
Remove obsolete use of cCode: 'magnitude >> 32' in the integer
conversion routines signed64BitIntegerFor: et al now that Slang
generates the correct cases for right-shift.
Eliminate the compactClassTable accessor. CompactClasses and splOb:
are both in scope in CogObjectRepresentationForSqueakV3.
Override sweepPhase in NewObjectMemory and hence eliminate
initializeFreeBlocksPreSweep.
Fix off-by-one error in okayOop:.
Make longPrintOop: print header type info.
Make allAccessibleObjectsOk answer a result.
Don't inline loadInitialContext for gdb breakpointing convenience.
Declare some constant variables as const in the Cogit.
Don't use SA_ONSTACK if NEED_SIGALTSTACK is 0. (default is 1, so this isn't a
change, except for experimenting).
Fix nscogbuild/unixbuild/HowToBuild (thanks Bob).
Modified Paths:
--------------
branches/Cog/nscogbuild/unixbuild/HowToBuild
branches/Cog/nscogsrc/vm/cogit.c
branches/Cog/nscogsrc/vm/cogit.h
branches/Cog/nscogsrc/vm/cogmethod.h
branches/Cog/nscogsrc/vm/cointerp.c
branches/Cog/nscogsrc/vm/cointerp.h
branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
branches/Cog/nscogsrc/vm/interp.h
branches/Cog/nscogsrc/vm/vmCallback.h
branches/Cog/platforms/unix/vm/sqUnixITimerHeartbeat.c
branches/Cog/platforms/unix/vm/sqUnixITimerTickerHeartbeat.c
branches/Cog/src/vm/cogit.c
branches/Cog/src/vm/cogit.h
branches/Cog/src/vm/cogmethod.h
branches/Cog/src/vm/cointerp.c
branches/Cog/src/vm/cointerp.h
branches/Cog/src/vm/cointerpmt.c
branches/Cog/src/vm/cointerpmt.h
branches/Cog/src/vm/gcc3x-cointerp.c
branches/Cog/src/vm/gcc3x-cointerpmt.c
branches/Cog/src/vm/interp.h
branches/Cog/src/vm/vmCallback.h
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nscogbuild/unixbuild/HowToBuild
===================================================================
--- branches/Cog/nscogbuild/unixbuild/HowToBuild 2012-12-18 18:39:16 UTC (rev 2639)
+++ branches/Cog/nscogbuild/unixbuild/HowToBuild 2012-12-20 20:39:20 UTC (rev 2640)
@@ -14,25 +14,30 @@
2. Check out the following sources from svn (if you haven't already - if you're
reading this in unixbuild its likely you've already got the sources)
svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms
- svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src
+ svn co http://www.squeakvm.org/svn/squeak/branches/Cog/nscogsrc
svn co http://www.squeakvm.org/svn/squeak/branches/Cog/nscogbuild
-3. Open a shell, cd into the unixbuild/bld directory and execute
- ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS="-lpthread -luuid"
+3. Open a shell, cd into the nscogbuild/unixbuild/bld directory and execute the
+ mvm script. This installs a VM in the nsvmlinux directory alongside
+ nscogsrc et al. Alternatively you can configure your own VM, e.g. with
+ ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=0" LIBS="-lpthread -luuid" LDFLAGS=-Wl,-z,now
make install prefix=WhereYouWantTheVmToGo
N.B. On Ubuntu *do not* supply "LIBS="-lpthread -luuid"", i.e. use
- ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0"
+ ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=0" LDFLAGS=-Wl,-z,now
-4. At the end of it you'll get a new VM in the path provided via -prefix
+4. At the end of it you'll get a new VM in nsvmlinux, or in the path provided
+ via -prefix
N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
-3a. For an assert-enabled VM do
- ../../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak --with-src=nscogsrc CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS="-lpthread -luuid"
+3a. For an assert-enabled VM use the astbld directory's mvm and find a vm in
+ nsvmlinuxast, or do
+ ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" LIBS="-lpthread -luuid" LDFLAGS=-Wl,-z,now
-3b. For a full debug VM do
- ../../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak --with-src=nscogsrc CFLAGS="-g3 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=1" LIBS="-lpthread -luuid"
+3b. For a full debug VM use the dbgbld's mvm and find a vm in nsvmlinuxdbg,
+ or do
+ CFLAGS="-g -O0 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" LIBS="-lpthread -luuid" LDFLAGS=-Wl,-z,now
3c. If you're building the VM on a 64-bit OS, you'll need a compiler which can
compile and link to 32-bit binaries. On most Linuxes the gcc-multilib package
Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c 2012-12-18 18:39:16 UTC (rev 2639)
+++ branches/Cog/nscogsrc/vm/cogit.c 2012-12-20 20:39:20 UTC (rev 2640)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.234 uuid: 66acafd1-cad0-4f20-b786-ab8f48201d82
+ CCodeGenerator VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.234 uuid: 66acafd1-cad0-4f20-b786-ab8f48201d82
+ StackToRegisterMappingCogit VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.234 uuid: 66acafd1-cad0-4f20-b786-ab8f48201d82 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -152,6 +152,7 @@
#define CmpRdRd 96
#define CmpRR 75
#define COGMTVM 0
+#define CompactClasses 28
#define ConstZero 1
#define ConvertRRd 102
#define CPUID 106
@@ -1047,7 +1048,7 @@
static AbstractInstruction aMethodLabel;
static sqInt annotationIndex;
static InstructionAnnotation * annotations;
-static AbstractInstruction *backEnd = &aMethodLabel;
+static const AbstractInstruction *backEnd = &aMethodLabel;
static usqInt baseAddress;
static sqInt blockCount;
static AbstractInstruction * blockEntryLabel;
@@ -3817,7 +3818,7 @@
sqInt initialAnnotationIndex;
sqInt initialOpcodeIndex;
sqInt initialStackPtr;
- sqInt (*pushNilSizeFunction)(sqInt) = v3or4PushNilSize;
+ const sqInt (*pushNilSizeFunction)(sqInt) = v3or4PushNilSize;
sqInt result;
sqInt savedNeedsFrame;
sqInt savedNumArgs;
@@ -9831,7 +9832,7 @@
/* begin Jump: */
jumpGotClass = genoperand(Jump, ((sqInt)0));
assert(BaseHeaderSize == BytesPerWord);
- jmpTarget(jumpCompact, annotateobjRef(gMoveMwrR(compactClassTable(), destReg, scratchReg), compactClassTable()));
+ jmpTarget(jumpCompact, annotateobjRef(gMoveMwrR(splObj(CompactClasses), destReg, scratchReg), splObj(CompactClasses)));
jmpTarget(jumpGotClass, gMoveMwrR((InstanceSpecificationIndex << ShiftForWord) + BytesPerWord, scratchReg, destReg));
return 0;
}
@@ -9880,7 +9881,7 @@
/* begin Jump: */
jumpGotClass2 = genoperand(Jump, ((sqInt)0));
assert(BaseHeaderSize == BytesPerWord);
- jmpTarget(jumpCompact, annotateobjRef(gMoveMwrR(compactClassTable(), scratchReg, destReg), compactClassTable()));
+ jmpTarget(jumpCompact, annotateobjRef(gMoveMwrR(splObj(CompactClasses), scratchReg, destReg), splObj(CompactClasses)));
jmpTarget(jumpGotClass, jmpTarget(jumpGotClass2, gLabel()));
return 0;
}
@@ -16951,7 +16952,7 @@
{
BytecodeDescriptor *descriptor;
sqInt end;
- sqInt (*isPushNilFunction)(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt) = v3or4IsPushNil;
+ const sqInt (*isPushNilFunction)(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt) = v3or4IsPushNil;
sqInt nExts;
sqInt pc;
sqInt pushingNils;
Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h 2012-12-18 18:39:16 UTC (rev 2639)
+++ branches/Cog/nscogsrc/vm/cogit.h 2012-12-20 20:39:20 UTC (rev 2640)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.234 uuid: 66acafd1-cad0-4f20-b786-ab8f48201d82
+ CCodeGenerator VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
*/
Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h 2012-12-18 18:39:16 UTC (rev 2639)
+++ branches/Cog/nscogsrc/vm/cogmethod.h 2012-12-20 20:39:20 UTC (rev 2640)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.234 uuid: 66acafd1-cad0-4f20-b786-ab8f48201d82
+ CCodeGenerator VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
*/
typedef struct {
Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2012-12-18 18:39:16 UTC (rev 2639)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2012-12-20 20:39:20 UTC (rev 2640)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.239 uuid: 3087e16d-bf3c-4fdc-b2ec-14791deff66f
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
from
- CoInterpreter VMMaker.oscog-eem.239 uuid: 3087e16d-bf3c-4fdc-b2ec-14791deff66f
+ CoInterpreter VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.239 uuid: 3087e16d-bf3c-4fdc-b2ec-14791deff66f " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.240 uuid: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -123,7 +123,6 @@
#define ClassBlockClosure 36
#define ClassBlockClosureCompactIndex 0
#define ClassByteArray 26
-#define ClassByteString 6
#define ClassByteStringCompactIndex 11
#define ClassCharacter 19
#define ClassExternalAddress 43
@@ -448,7 +447,6 @@
sqInt compactClassAt(sqInt ccIndex);
sqInt compactClassIndexOfHeader(sqInt header);
sqInt compactClassIndexOf(sqInt oop);
-sqInt compactClassTable(void);
static sqInt compare31or32Bitsequal(sqInt obj1, sqInt obj2);
void compilationBreakpointFor(sqInt selectorOop);
static sqInt containOnlyOops(sqInt array);
@@ -616,7 +614,6 @@
static sqInt isContext(sqInt oop);
sqInt isFloatObject(sqInt oop);
static sqInt isFree(StackPage * self_in_isFree);
-static sqInt isFreeObject(sqInt oop);
sqInt isIndexable(sqInt oop);
sqInt isInMemory(sqInt address);
sqInt isIntegerObject(sqInt objectPointer);
@@ -1104,7 +1101,6 @@
static sqInt sizeBitsOf(sqInt oop);
usqInt sizeOfAlienData(sqInt oop);
sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader);
-static sqInt sizeOfFree(sqInt oop);
sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader);
sqInt sizeOfSTArrayFromCPrimitive(void *cPtr);
sqInt slotSizeOf(sqInt oop);
@@ -1186,20 +1182,20 @@
_iss usqInt method;
_iss sqInt bytecodeSetSelector;
_iss usqInt instructionPointer;
+_iss sqInt argumentCount;
_iss sqInt nilObj;
-_iss sqInt argumentCount;
_iss usqInt freeStart;
_iss sqInt messageSelector;
_iss usqInt newMethod;
_iss usqInt youngStart;
_iss StackPage * pages;
_iss char * stackBasePlus1;
-_iss sqInt lkupClass;
_iss usqInt endOfMemory;
_iss sqInt rootTableCount;
_iss sqInt trueObj;
_iss sqInt falseObj;
_iss sqInt remapBufferCount;
+_iss sqInt lkupClass;
_iss sqInt traceLogIndex;
_iss sqInt bytesPerPage;
_iss char * stackLimit;
@@ -1932,7 +1928,7 @@
0 };
static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
static usqInt heapBase;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.239";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.240";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
volatile int sendTrace;
@@ -1991,8 +1987,6 @@
sqInt
interpret(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
- sqInt activeContext;
- sqInt activeProc;
sqInt currentBytecode;
sqInt extA;
sqInt extB;
@@ -2013,16 +2007,7 @@
sqMakeMemoryNotExecutableFromTo(((usqInt)(startOfMemory())), ((usqInt)GIV(memoryLimit)));
sqMakeMemoryNotExecutableFromTo(((usqInt)theStackMemory), (((usqInt)theStackMemory)) + stackPagesBytes);
initializeStacknumSlotspageSizestackLimitOffsetstackPageHeadroom(theStackMemory, ((sqInt) stackPagesBytes >> 2), ((sqInt) stackPageBytes >> 2), (IFrameSlots + 64) * BytesPerWord, (stackPageHeadroomBytes()) + 1024);
- /* begin loadInitialContext */
- VM_LABEL(0loadInitialContext);
- null;
- if ((checkForLeaks & 1) != 0) {
- clearLeakMapAndMapAccessibleObjects();
- assert(checkHeapIntegrity());
- }
- activeProc = longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex << ShiftForWord));
- activeContext = longAt((activeProc + BaseHeaderSize) + (SuspendedContextIndex << ShiftForWord));
- marryContextInNewStackPageAndInitializeInterpreterRegisters(activeContext);
+ loadInitialContext();
ioInitHeartbeat();
initialEnterSmalltalkExecutive();
return null;
@@ -4139,7 +4124,7 @@
? ((longAt(localFP + FoxMethod)) & MFMethodFlagIsBlockFlag) != 0
: (byteAt((localFP + FoxIFrameFlags) + 3)) != 0))) {
goto commonCallerReturn;
- goto l230;
+ goto l267;
}
closure = longAt(localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
? (mframeCogMethod(localFP)->cmNumArgs)
@@ -4176,11 +4161,11 @@
theMethod = longAt((home + BaseHeaderSize) + (MethodIndex << ShiftForWord));
if ((primitiveIndexOfMethodheader(theMethod, headerOf(theMethod))) == 198) {
unwindContextOrNilOrZero = home;
- goto l231;
+ goto l268;
}
}
unwindContextOrNilOrZero = ctxtOrNilOrZero;
- l231: /* end internalFindUnwindThroughContext: */;
+ l268: /* end internalFindUnwindThroughContext: */;
if (unwindContextOrNilOrZero == GIV(nilObj)) {
/* error: can't find home on chain; cannot return */
@@ -4194,10 +4179,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext = longAt(localFP + FoxThisContext);
- goto l232;
+ goto l269;
}
ourContext = marryFrameSP(localFP, localSP);
- l232: /* end ensureFrameIsMarried:SP: */;
+ l269: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
/* begin internalPush: */
@@ -4205,7 +4190,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
GIV(argumentCount) = 1;
goto normalSend;
- goto l230;
+ goto l267;
}
if (unwindContextOrNilOrZero != 0) {
/* begin internalAboutToReturn:through: */
@@ -4217,10 +4202,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext1 = longAt(localFP + FoxThisContext);
- goto l233;
+ goto l270;
}
ourContext1 = marryFrameSP(localFP, localSP);
- l233: /* end ensureFrameIsMarried:SP: */;
+ l270: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext1);
/* begin internalPush: */
@@ -4230,7 +4215,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorAboutToReturn << ShiftForWord));
GIV(argumentCount) = 2;
goto normalSend;
- goto l230;
+ goto l267;
}
contextToReturnTo = null;
if (((longAt((home + BaseHeaderSize) + (SenderIndex << ShiftForWord))) & 1)) {
@@ -4289,10 +4274,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext2 = longAt(localFP + FoxThisContext);
- goto l234;
+ goto l271;
}
ourContext2 = marryFrameSP(localFP, localSP);
- l234: /* end ensureFrameIsMarried:SP: */;
+ l271: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext2);
/* begin internalPush: */
@@ -4300,7 +4285,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord));
GIV(argumentCount) = 1;
goto normalSend;
- goto l230;
+ goto l267;
}
}
assert(pageListIsWellFormed());
@@ -4416,7 +4401,7 @@
;
ceEnterCogCodePopReceiverReg();
null;
- goto l230;
+ goto l267;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -4436,7 +4421,7 @@
null;
}
- l230: /* end case */;
+ l267: /* end case */;
break;
case 121:
/* returnTrue */
@@ -4558,27 +4543,27 @@
fp = (thePage->headFP);
if (fp == theFP) {
frameAbove = 0;
- goto l236;
+ goto l273;
}
while (((callerFP = frameCallerFP(fp))) != 0) {
if (callerFP == theFP) {
frameAbove = fp;
- goto l236;
+ goto l273;
}
fp = callerFP;
}
error("did not find theFP in stack page");
frameAbove = 0;
- l236: /* end findFrameAbove:inPage: */;
+ l273: /* end findFrameAbove:inPage: */;
/* begin newStackPage */
lruOrFree = (mostRecentlyUsedPage()->nextPage);
if (isFree(lruOrFree)) {
newPage = lruOrFree;
- goto l237;
+ goto l274;
}
divorceFramesIn(lruOrFree);
newPage = lruOrFree;
- l237: /* end newStackPage */;
+ l274: /* end newStackPage */;
assert(newPage == GIV(stackPage));
moveFramesInthroughtoPage(thePage, frameAbove, newPage);
markStackPageMostRecentlyUsed(newPage);
@@ -4602,7 +4587,7 @@
longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer));
GIV(stackPointer) = sp2;
ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SelectorCannotReturn << ShiftForWord)), contextToReturnFrom, 1);
- goto l235;
+ goto l272;
}
GIV(instructionPointer) = 0;
thePage = makeBaseFrameFor(contextToReturnTo);
@@ -4641,7 +4626,7 @@
;
ceEnterCogCodePopReceiverReg();
null;
- goto l235;
+ goto l272;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -4661,7 +4646,7 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
null;
- goto l235;
+ goto l272;
}
/* begin frameCallerSavedIP: */
localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
@@ -4691,7 +4676,7 @@
;
ceEnterCogCodePopReceiverReg();
null;
- goto l235;
+ goto l272;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -4710,7 +4695,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l235: /* end case */;
+ l272: /* end case */;
break;
case 126:
/* dynamicSuperSendBytecode */
@@ -4718,6 +4703,7 @@
sqInt mClassMixin;
sqInt mixinApplication;
sqInt rcvr;
+ sqInt ccIndex;
VM_LABEL(0dynamicSuperSendBytecode);
GIV(argumentCount) = byteAtPointer(++localIP);
@@ -4726,7 +4712,11 @@
GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((byteAtPointer(++localIP)) + LiteralStart) << ShiftForWord));
rcvr = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop));
mClassMixin = methodClassOf(GIV(method));
- mixinApplication = findApplicationOfTargetMixinstartingAtBehavior(mClassMixin, fetchClassOf(rcvr));
+ mixinApplication = findApplicationOfTargetMixinstartingAtBehavior(mClassMixin, ((rcvr & 1)
+ ? longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord))
+ : (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0
+ ? (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask
+ : longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)))));
GIV(lkupClass) = longAt((mixinApplication + BaseHeaderSize) + (SuperclassIndex << ShiftForWord));
goto commonSend;
}
@@ -4934,23 +4924,11 @@
VM_LABEL(0normalSend);
rcvr = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop));
- /* begin fetchClassOf: */
- if ((rcvr & 1)) {
- GIV(lkupClass) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord));
- goto l238;
- }
- if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
- GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l238;
- }
- else {
-
- /* look up compact class */
-
- GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l238;
- }
- l238: /* end fetchClassOf: */;
+ GIV(lkupClass) = ((rcvr & 1)
+ ? longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassInteger << ShiftForWord))
+ : (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0
+ ? (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask
+ : longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord))));
assert(GIV(lkupClass) != (nilObject()));
/* goto commonSend */
}
@@ -5007,7 +4985,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l242;
+ goto l278;
}
/* second probe */
@@ -5018,7 +4996,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l242;
+ goto l278;
}
probe = (((usqInt) hash) >> 2) & MethodCacheMask;
if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -5026,10 +5004,10 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l242;
+ goto l278;
}
ok = 0;
- l242: /* end lookupInMethodCacheSel:class: */;
+ l278: /* end lookupInMethodCacheSel:class: */;
if (ok) {
/* begin ifAppropriateCompileToNativeCode:selector: */
VM_LABEL(0ifAppropriateCompileToNativeCodeselector);
@@ -5084,31 +5062,31 @@
if (localPrimIndex >= 264) {
longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + ((localPrimIndex - 264) << ShiftForWord)));
1;
- goto l240;
+ goto l276;
}
if (localPrimIndex == 256) {
1;
- goto l240;
+ goto l276;
}
if (localPrimIndex == 257) {
longAtPointerput(localSP, GIV(trueObj));
1;
- goto l240;
+ goto l276;
}
if (localPrimIndex == 258) {
longAtPointerput(localSP, GIV(falseObj));
1;
- goto l240;
+ goto l276;
}
if (localPrimIndex == 259) {
longAtPointerput(localSP, GIV(nilObj));
1;
- goto l240;
+ goto l276;
}
longAtPointerput(localSP, (((localPrimIndex - 261) << 1) | 1));
1;
- l240: /* end internalQuickPrimitiveResponse */;
- goto l239;
+ l276: /* end internalQuickPrimitiveResponse */;
+ goto l275;
}
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -5158,7 +5136,7 @@
returntoExecutive(popStack(), 1);
browserPluginReturnIfNeeded();
null;
- goto l239;
+ goto l275;
}
}
if (methodHasCogMethod(GIV(newMethod))) {
@@ -5248,11 +5226,11 @@
table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (PrimErrTableIndex << ShiftForWord));
if (GIV(primFailCode) <= (((sqInt) (lastPointerOf(table)) >> 2))) {
errorCode = longAt((table + BaseHeaderSize) + ((GIV(primFailCode) - 1) << ShiftForWord));
- goto l241;
+ goto l277;
}
}
errorCode = ((GIV(primFailCode) << 1) | 1);
- l241: /* end getErrorObjectFromPrimFailCode */;
+ l277: /* end getErrorObjectFromPrimFailCode */;
longAtPointerput(localSP, errorCode);
}
GIV(primFailCode) = 0;
@@ -5276,7 +5254,7 @@
localFP = pointerForOop(GIV(framePointer));
}
}
- l239: /* end internalExecuteNewMethod */;
+ l275: /* end internalExecuteNewMethod */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
@@ -6250,9 +6228,9 @@
char *sp;
sqInt isFloat;
double result1;
- sqInt ccIndex;
sqInt isFloat1;
double result2;
+ sqInt ccIndex;
sqInt ccIndex1;
VM_LABEL(0bytecodePrimAdd);
@@ -6285,19 +6263,24 @@
goto l14;
}
/* begin floatValueOf: */
- VM_LABEL(0floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((rcvr & 1)) {
isFloat = 0;
goto l16;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((rcvr & 1)));
ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;
+ if (ccIndex == 0) {
+ isFloat = ((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l20;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat = ClassFloatCompactIndex == ccIndex;
- goto l16;
+ goto l20;
}
- isFloat = (ccIndex == 0)
- && (((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
+ isFloat = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)));
+ l20: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
l16: /* end is:instanceOf:compactClassIndex: */;
if (isFloat) {
;
@@ -6318,19 +6301,24 @@
goto l15;
}
/* begin floatValueOf: */
- VM_LABEL(1floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((arg & 1)) {
isFloat1 = 0;
goto l18;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((arg & 1)));
ccIndex1 = (((usqInt) (longAt(arg))) >> 12) & 31;
+ if (ccIndex1 == 0) {
+ isFloat1 = ((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l21;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat1 = ClassFloatCompactIndex == ccIndex1;
- goto l18;
+ goto l21;
}
- isFloat1 = (ccIndex1 == 0)
- && (((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
+ isFloat1 = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex1 - 1) << ShiftForWord)));
+ l21: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
l18: /* end is:instanceOf:compactClassIndex: */;
if (isFloat1) {
;
@@ -6380,9 +6368,9 @@
char *sp;
sqInt isFloat;
double result1;
- sqInt ccIndex;
sqInt isFloat1;
double result2;
+ sqInt ccIndex;
sqInt ccIndex1;
VM_LABEL(0bytecodePrimSubtract);
@@ -6397,7 +6385,7 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
null;
- goto l20;
+ goto l22;
}
}
else {
@@ -6412,69 +6400,79 @@
/* begin loadFloatOrIntFrom: */
if ((rcvr & 1)) {
rcvr1 = ((double) ((rcvr >> 1)) );
- goto l21;
+ goto l23;
}
/* begin floatValueOf: */
- VM_LABEL(2floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((rcvr & 1)) {
isFloat = 0;
- goto l23;
+ goto l25;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((rcvr & 1)));
ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;
+ if (ccIndex == 0) {
+ isFloat = ((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l29;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat = ClassFloatCompactIndex == ccIndex;
- goto l23;
+ goto l29;
}
- isFloat = (ccIndex == 0)
- && (((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l23: /* end is:instanceOf:compactClassIndex: */;
+ isFloat = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)));
+ l29: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l25: /* end is:instanceOf:compactClassIndex: */;
if (isFloat) {
;
fetchFloatAtinto(rcvr + BaseHeaderSize, result1);
rcvr1 = result1;
- goto l24;
+ goto l26;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
rcvr1 = 0.0;
- l24: /* end floatValueOf: */;
- l21: /* end loadFloatOrIntFrom: */;
+ l26: /* end floatValueOf: */;
+ l23: /* end loadFloatOrIntFrom: */;
/* begin loadFloatOrIntFrom: */
if ((arg & 1)) {
arg1 = ((double) ((arg >> 1)) );
- goto l22;
+ goto l24;
}
/* begin floatValueOf: */
- VM_LABEL(3floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((arg & 1)) {
isFloat1 = 0;
- goto l25;
+ goto l27;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((arg & 1)));
ccIndex1 = (((usqInt) (longAt(arg))) >> 12) & 31;
+ if (ccIndex1 == 0) {
+ isFloat1 = ((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l30;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat1 = ClassFloatCompactIndex == ccIndex1;
- goto l25;
+ goto l30;
}
- isFloat1 = (ccIndex1 == 0)
- && (((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l25: /* end is:instanceOf:compactClassIndex: */;
+ isFloat1 = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex1 - 1) << ShiftForWord)));
+ l30: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l27: /* end is:instanceOf:compactClassIndex: */;
if (isFloat1) {
;
fetchFloatAtinto(arg + BaseHeaderSize, result2);
arg1 = result2;
- goto l26;
+ goto l28;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
arg1 = 0.0;
- l26: /* end floatValueOf: */;
- l22: /* end loadFloatOrIntFrom: */;
+ l28: /* end floatValueOf: */;
+ l24: /* end loadFloatOrIntFrom: */;
if (!GIV(primFailCode)) {
/* begin pop:thenPushFloat: */
longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 - arg1));
@@ -6490,14 +6488,14 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
null;
- goto l20;
+ goto l22;
}
}
GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((1 * 2) << ShiftForWord));
GIV(argumentCount) = 1;
goto normalSend;
}
- l20: /* end case */;
+ l22: /* end case */;
break;
case 178:
/* bytecodePrimLessThan */
@@ -6509,9 +6507,9 @@
double rcvr1;
sqInt isFloat;
double result;
- sqInt ccIndex;
sqInt isFloat1;
double result1;
+ sqInt ccIndex;
sqInt ccIndex1;
VM_LABEL(0bytecodePrimLessThan);
@@ -6530,7 +6528,7 @@
goto booleanCheatFalse;
}
null;
- goto l27;
+ goto l31;
}
/* begin initPrimCall */
GIV(primFailCode) = 0;
@@ -6538,69 +6536,79 @@
/* begin loadFloatOrIntFrom: */
if ((rcvr & 1)) {
rcvr1 = ((double) ((rcvr >> 1)) );
- goto l28;
+ goto l32;
}
/* begin floatValueOf: */
- VM_LABEL(4floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((rcvr & 1)) {
isFloat = 0;
- goto l30;
+ goto l34;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((rcvr & 1)));
ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;
+ if (ccIndex == 0) {
+ isFloat = ((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l38;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat = ClassFloatCompactIndex == ccIndex;
- goto l30;
+ goto l38;
}
- isFloat = (ccIndex == 0)
- && (((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l30: /* end is:instanceOf:compactClassIndex: */;
+ isFloat = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)));
+ l38: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l34: /* end is:instanceOf:compactClassIndex: */;
if (isFloat) {
;
fetchFloatAtinto(rcvr + BaseHeaderSize, result);
rcvr1 = result;
- goto l31;
+ goto l35;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
rcvr1 = 0.0;
- l31: /* end floatValueOf: */;
- l28: /* end loadFloatOrIntFrom: */;
+ l35: /* end floatValueOf: */;
+ l32: /* end loadFloatOrIntFrom: */;
/* begin loadFloatOrIntFrom: */
if ((arg & 1)) {
arg1 = ((double) ((arg >> 1)) );
- goto l29;
+ goto l33;
}
/* begin floatValueOf: */
- VM_LABEL(5floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((arg & 1)) {
isFloat1 = 0;
- goto l32;
+ goto l36;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((arg & 1)));
ccIndex1 = (((usqInt) (longAt(arg))) >> 12) & 31;
+ if (ccIndex1 == 0) {
+ isFloat1 = ((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l39;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat1 = ClassFloatCompactIndex == ccIndex1;
- goto l32;
+ goto l39;
}
- isFloat1 = (ccIndex1 == 0)
- && (((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l32: /* end is:instanceOf:compactClassIndex: */;
+ isFloat1 = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex1 - 1) << ShiftForWord)));
+ l39: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l36: /* end is:instanceOf:compactClassIndex: */;
if (isFloat1) {
;
fetchFloatAtinto(arg + BaseHeaderSize, result1);
arg1 = result1;
- goto l33;
+ goto l37;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
arg1 = 0.0;
- l33: /* end floatValueOf: */;
- l29: /* end loadFloatOrIntFrom: */;
+ l37: /* end floatValueOf: */;
+ l33: /* end loadFloatOrIntFrom: */;
aBool = rcvr1 < arg1;
if (!GIV(primFailCode)) {
/* begin booleanCheat: */
@@ -6611,13 +6619,13 @@
goto booleanCheatFalse;
}
null;
- goto l27;
+ goto l31;
}
GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((2 * 2) << ShiftForWord));
GIV(argumentCount) = 1;
goto normalSend;
}
- l27: /* end case */;
+ l31: /* end case */;
booleanCheatTrue:
/* booleanCheatTrue */
@@ -6642,7 +6650,7 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
null;
- goto l243;
+ goto l279;
}
if (bytecode == 172) {
@@ -6653,7 +6661,7 @@
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
null;
- goto l243;
+ goto l279;
}
if (bytecode > 167) {
@@ -6665,7 +6673,7 @@
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
null;
- goto l243;
+ goto l279;
}
}
currentBytecode = bytecode + GIV(bytecodeSetSelector);
@@ -6673,7 +6681,7 @@
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), GIV(trueObj));
}
- l243: /* end case */;
+ l279: /* end case */;
break;
case 179:
/* bytecodePrimGreaterThan */
@@ -6685,9 +6693,9 @@
double rcvr1;
sqInt isFloat;
double result;
- sqInt ccIndex;
sqInt isFloat1;
double result1;
+ sqInt ccIndex;
sqInt ccIndex1;
VM_LABEL(0bytecodePrimGreaterThan);
@@ -6706,7 +6714,7 @@
/* goto booleanCheatFalse */
}
null;
- goto l34;
+ goto l40;
}
/* begin initPrimCall */
GIV(primFailCode) = 0;
@@ -6714,69 +6722,79 @@
/* begin loadFloatOrIntFrom: */
if ((rcvr & 1)) {
rcvr1 = ((double) ((rcvr >> 1)) );
- goto l35;
+ goto l41;
}
/* begin floatValueOf: */
- VM_LABEL(6floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((rcvr & 1)) {
isFloat = 0;
- goto l37;
+ goto l43;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((rcvr & 1)));
ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;
+ if (ccIndex == 0) {
+ isFloat = ((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l47;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat = ClassFloatCompactIndex == ccIndex;
- goto l37;
+ goto l47;
}
- isFloat = (ccIndex == 0)
- && (((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l37: /* end is:instanceOf:compactClassIndex: */;
+ isFloat = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)));
+ l47: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l43: /* end is:instanceOf:compactClassIndex: */;
if (isFloat) {
;
fetchFloatAtinto(rcvr + BaseHeaderSize, result);
rcvr1 = result;
- goto l38;
+ goto l44;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
rcvr1 = 0.0;
- l38: /* end floatValueOf: */;
- l35: /* end loadFloatOrIntFrom: */;
+ l44: /* end floatValueOf: */;
+ l41: /* end loadFloatOrIntFrom: */;
/* begin loadFloatOrIntFrom: */
if ((arg & 1)) {
arg1 = ((double) ((arg >> 1)) );
- goto l36;
+ goto l42;
}
/* begin floatValueOf: */
- VM_LABEL(7floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((arg & 1)) {
isFloat1 = 0;
- goto l39;
+ goto l45;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((arg & 1)));
ccIndex1 = (((usqInt) (longAt(arg))) >> 12) & 31;
+ if (ccIndex1 == 0) {
+ isFloat1 = ((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l48;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat1 = ClassFloatCompactIndex == ccIndex1;
- goto l39;
+ goto l48;
}
- isFloat1 = (ccIndex1 == 0)
- && (((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l39: /* end is:instanceOf:compactClassIndex: */;
+ isFloat1 = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex1 - 1) << ShiftForWord)));
+ l48: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l45: /* end is:instanceOf:compactClassIndex: */;
if (isFloat1) {
;
fetchFloatAtinto(arg + BaseHeaderSize, result1);
arg1 = result1;
- goto l40;
+ goto l46;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
arg1 = 0.0;
- l40: /* end floatValueOf: */;
- l36: /* end loadFloatOrIntFrom: */;
+ l46: /* end floatValueOf: */;
+ l42: /* end loadFloatOrIntFrom: */;
aBool = rcvr1 > arg1;
if (!GIV(primFailCode)) {
/* begin booleanCheat: */
@@ -6787,13 +6805,13 @@
goto booleanCheatFalse;
}
null;
- goto l34;
+ goto l40;
}
GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((3 * 2) << ShiftForWord));
GIV(argumentCount) = 1;
goto normalSend;
}
- l34: /* end case */;
+ l40: /* end case */;
booleanCheatFalse:
/* booleanCheatFalse */
@@ -6818,7 +6836,7 @@
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
null;
- goto l244;
+ goto l280;
}
if (bytecode == 172) {
@@ -6830,14 +6848,14 @@
currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector);
null;
- goto l244;
+ goto l280;
}
currentBytecode = bytecode + GIV(bytecodeSetSelector);
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), GIV(falseObj));
}
- l244: /* end case */;
+ l280: /* end case */;
break;
case 180:
/* bytecodePrimLessOrEqual */
@@ -6849,9 +6867,9 @@
double rcvr1;
sqInt isFloat;
double result;
- sqInt ccIndex;
sqInt isFloat1;
double result1;
+ sqInt ccIndex;
sqInt ccIndex1;
VM_LABEL(0bytecodePrimLessOrEqual);
@@ -6870,7 +6888,7 @@
goto booleanCheatFalse;
}
null;
- goto l41;
+ goto l49;
}
/* begin initPrimCall */
GIV(primFailCode) = 0;
@@ -6878,69 +6896,79 @@
/* begin loadFloatOrIntFrom: */
if ((rcvr & 1)) {
rcvr1 = ((double) ((rcvr >> 1)) );
- goto l42;
+ goto l50;
}
/* begin floatValueOf: */
- VM_LABEL(8floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((rcvr & 1)) {
isFloat = 0;
- goto l44;
+ goto l52;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((rcvr & 1)));
ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;
+ if (ccIndex == 0) {
+ isFloat = ((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l56;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat = ClassFloatCompactIndex == ccIndex;
- goto l44;
+ goto l56;
}
- isFloat = (ccIndex == 0)
- && (((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l44: /* end is:instanceOf:compactClassIndex: */;
+ isFloat = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)));
+ l56: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l52: /* end is:instanceOf:compactClassIndex: */;
if (isFloat) {
;
fetchFloatAtinto(rcvr + BaseHeaderSize, result);
rcvr1 = result;
- goto l45;
+ goto l53;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
rcvr1 = 0.0;
- l45: /* end floatValueOf: */;
- l42: /* end loadFloatOrIntFrom: */;
+ l53: /* end floatValueOf: */;
+ l50: /* end loadFloatOrIntFrom: */;
/* begin loadFloatOrIntFrom: */
if ((arg & 1)) {
arg1 = ((double) ((arg >> 1)) );
- goto l43;
+ goto l51;
}
/* begin floatValueOf: */
- VM_LABEL(9floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((arg & 1)) {
isFloat1 = 0;
- goto l46;
+ goto l54;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((arg & 1)));
ccIndex1 = (((usqInt) (longAt(arg))) >> 12) & 31;
+ if (ccIndex1 == 0) {
+ isFloat1 = ((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l57;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat1 = ClassFloatCompactIndex == ccIndex1;
- goto l46;
+ goto l57;
}
- isFloat1 = (ccIndex1 == 0)
- && (((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l46: /* end is:instanceOf:compactClassIndex: */;
+ isFloat1 = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex1 - 1) << ShiftForWord)));
+ l57: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l54: /* end is:instanceOf:compactClassIndex: */;
if (isFloat1) {
;
fetchFloatAtinto(arg + BaseHeaderSize, result1);
arg1 = result1;
- goto l47;
+ goto l55;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
arg1 = 0.0;
- l47: /* end floatValueOf: */;
- l43: /* end loadFloatOrIntFrom: */;
+ l55: /* end floatValueOf: */;
+ l51: /* end loadFloatOrIntFrom: */;
aBool = rcvr1 <= arg1;
if (!GIV(primFailCode)) {
/* begin booleanCheat: */
@@ -6951,13 +6979,13 @@
goto booleanCheatFalse;
}
null;
- goto l41;
+ goto l49;
}
GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((4 * 2) << ShiftForWord));
GIV(argumentCount) = 1;
goto normalSend;
}
- l41: /* end case */;
+ l49: /* end case */;
break;
case 181:
/* bytecodePrimGreaterOrEqual */
@@ -6969,9 +6997,9 @@
double rcvr1;
sqInt isFloat;
double result;
- sqInt ccIndex;
sqInt isFloat1;
double result1;
+ sqInt ccIndex;
sqInt ccIndex1;
VM_LABEL(0bytecodePrimGreaterOrEqual);
@@ -6990,7 +7018,7 @@
goto booleanCheatFalse;
}
null;
- goto l48;
+ goto l58;
}
/* begin initPrimCall */
GIV(primFailCode) = 0;
@@ -6998,69 +7026,79 @@
/* begin loadFloatOrIntFrom: */
if ((rcvr & 1)) {
rcvr1 = ((double) ((rcvr >> 1)) );
- goto l49;
+ goto l59;
}
/* begin floatValueOf: */
- VM_LABEL(10floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((rcvr & 1)) {
isFloat = 0;
- goto l51;
+ goto l61;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((rcvr & 1)));
ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;
+ if (ccIndex == 0) {
+ isFloat = ((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l65;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat = ClassFloatCompactIndex == ccIndex;
- goto l51;
+ goto l65;
}
- isFloat = (ccIndex == 0)
- && (((longAt(rcvr - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l51: /* end is:instanceOf:compactClassIndex: */;
+ isFloat = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord)));
+ l65: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l61: /* end is:instanceOf:compactClassIndex: */;
if (isFloat) {
;
fetchFloatAtinto(rcvr + BaseHeaderSize, result);
rcvr1 = result;
- goto l52;
+ goto l62;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
rcvr1 = 0.0;
- l52: /* end floatValueOf: */;
- l49: /* end loadFloatOrIntFrom: */;
+ l62: /* end floatValueOf: */;
+ l59: /* end loadFloatOrIntFrom: */;
/* begin loadFloatOrIntFrom: */
if ((arg & 1)) {
arg1 = ((double) ((arg >> 1)) );
- goto l50;
+ goto l60;
}
/* begin floatValueOf: */
- VM_LABEL(11floatValueOf);
/* begin is:instanceOf:compactClassIndex: */
if ((arg & 1)) {
isFloat1 = 0;
- goto l53;
+ goto l63;
}
+ /* begin isClassOfNonImm:equalTo:compactClassIndex: */
+ assert(!((arg & 1)));
ccIndex1 = (((usqInt) (longAt(arg))) >> 12) & 31;
+ if (ccIndex1 == 0) {
+ isFloat1 = ((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord)));
+ goto l66;
+ }
if (ClassFloatCompactIndex != 0) {
isFloat1 = ClassFloatCompactIndex == ccIndex1;
- goto l53;
+ goto l66;
}
- isFloat1 = (ccIndex1 == 0)
- && (((longAt(arg - BaseHeaderSize)) & AllButTypeMask) == (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))));
- l53: /* end is:instanceOf:compactClassIndex: */;
+ isFloat1 = (longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << ShiftForWord))) == (longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex1 - 1) << ShiftForWord)));
+ l66: /* end isClassOfNonImm:equalTo:compactClassIndex: */;
+ l63: /* end is:instanceOf:compactClassIndex: */;
if (isFloat1) {
;
fetchFloatAtinto(arg + BaseHeaderSize, result1);
arg1 = result1;
- goto l54;
+ goto l64;
}
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
arg1 = 0.0;
- l54: /* end floatValueOf: */;
- l50: /* end loadFloatOrIntFrom: */;
+ l64: /* end floatValueOf: */;
+ l60: /* end loadFloatOrIntFrom: */;
aBool = rcvr1 >= arg1;
if (!GIV(primFailCode)) {
/* begin booleanCheat: */
@@ -7071,13 +7109,13 @@
goto booleanCheatFalse;
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list