[Vm-dev] [commit][3643] CogVM source as per VMMaker.oscog-eem.1722
commits at squeakvm.org
commits at squeakvm.org
Fri Mar 11 01:42:55 UTC 2016
Revision: 3643
Author: eliot
Date: 2016-03-10 17:42:54 -0800 (Thu, 10 Mar 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1722
V3:
Fix simulation of fetchLong64:ofObject: and hence in signed64BitValueOf: et al.
Spur:
Resolve the conflict between 32-bit and 64-bit tag assignments. In 32-bits we
have 1=even SmallIntegers, 2=Characters, 3=odd SmallIntegers, and in 64-bits we
had 1=SmallIntegers, 2=Characters, 3=SmallFloats. Hence we would want
SmallFloat64's identityHash to be 3, which conflicts with 32 bits' odd
SmallIntegers. Change is for 64-bits to use 1=SmallIntegers, 2=Characters,
4=SmallFloats. This also means single-bit tests in the Cogit, which produces
better code, and no scratch registers to hold masked tags.
Hence roll the 64-bit Spur image format version number from 68019 to 68021.
Delegate to the object memories to determine the image format version number.
Add noInlineObjectAfter:limit: for a slighly less verbose initializeObjectMemory:
Turn the various class pun constants into macros for more readable C.
Modified Paths:
--------------
branches/Cog/nsspur64src/vm/cogit.h
branches/Cog/nsspur64src/vm/cogitX64.c
branches/Cog/nsspur64src/vm/cointerp.c
branches/Cog/nsspur64src/vm/cointerp.h
branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
branches/Cog/nsspursrc/vm/cogit.h
branches/Cog/nsspursrc/vm/cogitARMv5.c
branches/Cog/nsspursrc/vm/cogitIA32.c
branches/Cog/nsspursrc/vm/cogitMIPSEL.c
branches/Cog/nsspursrc/vm/cointerp.c
branches/Cog/nsspursrc/vm/cointerp.h
branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
branches/Cog/nsspurstack64src/vm/interp.c
branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
branches/Cog/nsspurstacksrc/vm/interp.c
branches/Cog/scripts/svnci
branches/Cog/spur64src/vm/cogit.h
branches/Cog/spur64src/vm/cogitX64.c
branches/Cog/spur64src/vm/cointerp.c
branches/Cog/spur64src/vm/cointerp.h
branches/Cog/spur64src/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cogit.h
branches/Cog/spursistasrc/vm/cogitARMv5.c
branches/Cog/spursistasrc/vm/cogitIA32.c
branches/Cog/spursistasrc/vm/cogitMIPSEL.c
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cogit.h
branches/Cog/spursrc/vm/cogitARMv5.c
branches/Cog/spursrc/vm/cogitIA32.c
branches/Cog/spursrc/vm/cogitMIPSEL.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/plugins/BitBltPlugin/BitBltPlugin.c
branches/Cog/src/vm/cogit.h
branches/Cog/src/vm/cogitARMv5.c
branches/Cog/src/vm/cogitIA32.c
branches/Cog/src/vm/cogitMIPSEL.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/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h 2016-03-09 09:00:31 UTC (rev 3642)
+++ branches/Cog/nsspur64src/vm/cogit.h 2016-03-11 01:42:54 UTC (rev 3643)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1716 uuid: 9115c93b-f425-4118-96e7-7130adeff1f2
+ CCodeGenerator VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe
*/
Modified: branches/Cog/nsspur64src/vm/cogitX64.c
===================================================================
--- branches/Cog/nsspur64src/vm/cogitX64.c 2016-03-09 09:00:31 UTC (rev 3642)
+++ branches/Cog/nsspur64src/vm/cogitX64.c 2016-03-11 01:42:54 UTC (rev 3643)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1707 uuid: 6073be04-c0ce-4791-8ada-b2d1ec54f4a4
+ CCodeGenerator VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1707 uuid: 6073be04-c0ce-4791-8ada-b2d1ec54f4a4
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1707 uuid: 6073be04-c0ce-4791-8ada-b2d1ec54f4a4 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -768,12 +768,12 @@
static sqInt NoDbgRegParms genGetOverflowSlotsOfinto(sqInt srcReg, sqInt destReg);
static sqInt NoDbgRegParms genGetSmallFloatValueOfscratchinto(sqInt oopReg, sqInt scratch, sqInt dpReg);
static AbstractInstruction * NoDbgRegParms genJumpIsSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
-static AbstractInstruction * NoDbgRegParms genJumpNotCharacterscratchReg(sqInt reg, sqInt scratch);
+static AbstractInstruction * NoDbgRegParms genJumpNotCharacter(sqInt reg);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallFloatValueBitsscratch(sqInt reg, sqInt exponent);
-static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegersInandScratchscratch(sqInt aRegister, sqInt scratchA, sqInt scratchB);
+static AbstractInstruction * NoDbgRegParms genJumpNotSmallFloat(sqInt reg);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
-static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerscratchReg(sqInt reg, sqInt scratch);
-static AbstractInstruction * NoDbgRegParms genJumpSmallIntegerscratchReg(sqInt reg, sqInt scratch);
+static AbstractInstruction * NoDbgRegParms genJumpNotSmallInteger(sqInt reg);
+static AbstractInstruction * NoDbgRegParms genJumpSmallInteger(sqInt aRegister);
static sqInt genPrimitiveAt(void);
static sqInt genPrimitiveAtPut(void);
static sqInt genPrimitiveIdentityHash(void);
@@ -4361,7 +4361,7 @@
/* begin genMarshallNArgs:arg:arg:arg:arg: */
if (numArgs == 0) {
((AbstractInstruction *) backEnd);
- goto l2;
+ goto l15;
}
if (regOrConst0 < NoReg) {
/* begin MoveCq:R: */
@@ -4375,7 +4375,7 @@
}
if (numArgs == 1) {
((AbstractInstruction *) backEnd);
- goto l2;
+ goto l15;
}
if (regOrConst1 < NoReg) {
/* begin MoveCq:R: */
@@ -4389,7 +4389,7 @@
}
if (numArgs == 2) {
((AbstractInstruction *) backEnd);
- goto l2;
+ goto l15;
}
# if ABI == SysV
@@ -4405,7 +4405,7 @@
}
if (numArgs == 3) {
((AbstractInstruction *) backEnd);
- goto l2;
+ goto l15;
}
if (regOrConst3 < NoReg) {
/* begin MoveCq:R: */
@@ -4434,7 +4434,7 @@
}
if (numArgs == 3) {
((AbstractInstruction *) backEnd);
- goto l2;
+ goto l15;
}
if (regOrConst3 < NoReg) {
/* begin MoveCq:R: */
@@ -4451,7 +4451,7 @@
assert(numArgs <= 4);
((AbstractInstruction *) backEnd);
-l2: /* end genMarshallNArgs:arg:arg:arg:arg: */;
+l15: /* end genMarshallNArgs:arg:arg:arg:arg: */;
/* begin CallFullRT: */
callTarget = ((usqInt)aRoutine);
/* begin CallFull: */
@@ -5834,12 +5834,12 @@
generateMapAtstart(sqInt addressOrNull, sqInt startAddress)
{
unsigned char annotation;
- sqInt delta;
+ usqInt delta;
sqInt i;
AbstractInstruction *instruction;
sqInt length;
- sqInt location;
- sqInt mapEntry;
+ usqInt location;
+ usqInt mapEntry;
sqInt maxDelta;
usqInt mcpc;
@@ -10878,7 +10878,8 @@
/* begin MoveMw:r:R: */
anInstruction = genoperandoperandoperand(MoveMwrR, BaseHeaderSize, methodReg, headerReg);
- jumpNotCogged = genJumpSmallIntegerscratchReg(headerReg, scratchReg);
+ /* begin genJumpSmallInteger:scratchReg: */
+ jumpNotCogged = genJumpSmallInteger(headerReg);
/* begin MoveMw:r:R: */
offset = offsetof(CogMethod, methodHeader);
/* begin gen:quickConstant:operand:operand: */
@@ -10912,7 +10913,8 @@
assert(0 < (numRegArgs()));
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genRemoveSmallIntegerTagsInScratchReg(ClassReg);
/* begin AddR:R: */
genoperandoperand(AddRR, ReceiverResultReg, ClassReg);
@@ -10961,9 +10963,8 @@
}
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
-
- /* Whether the SmallInteger tags are zero or non-zero, anding them together will preserve them. */
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
/* begin AndR:R: */
genoperandoperand(AndRR, Arg0Reg, ReceiverResultReg);
/* begin genPrimReturn */
@@ -10985,9 +10986,8 @@
}
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
-
- /* Whether the SmallInteger tags are zero or non-zero, oring them together will preserve them. */
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
/* begin OrR:R: */
genoperandoperand(OrRR, Arg0Reg, ReceiverResultReg);
/* begin genPrimReturn */
@@ -11056,7 +11056,8 @@
assert(0 < (numRegArgs()));
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genConvertSmallIntegerToIntegerInReg(ClassReg);
if (!(setsConditionCodesFor(lastOpcode(), JumpNegative))) {
/* begin CmpCq:R: */
@@ -11120,9 +11121,8 @@
}
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
-
- /* Clear one or the other tag so that xoring will preserve them. */
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genRemoveSmallIntegerTagsInScratchReg(Arg0Reg);
/* begin XorR:R: */
genoperandoperand(XorRR, Arg0Reg, ReceiverResultReg);
@@ -11186,10 +11186,8 @@
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
-
- /* We must shift away the tags, not just subtract them, so that the
- overflow case doesn't actually overflow the machine instruction. */
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
if (!(setsConditionCodesFor(lastOpcode(), JumpZero))) {
/* begin CmpCq:R: */
@@ -11247,10 +11245,8 @@
assert(0 < (numRegArgs()));
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
-
- /* We must shift away the tags, not just subtract them, so that the
- overflow case doesn't actually overflow the machine instruction. */
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
/* begin JumpZero: */
jumpZero = genConditionalBranchoperand(JumpZero, ((sqInt)0));
@@ -11424,7 +11420,8 @@
assert(0 < (numRegArgs()));
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genRemoveSmallIntegerTagsInScratchReg(ClassReg);
/* begin JumpZero: */
jumpZero = genConditionalBranchoperand(JumpZero, ((sqInt)0));
@@ -11478,7 +11475,8 @@
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
/* begin MoveR:R: */
genoperandoperand(MoveRR, ReceiverResultReg, Arg1Reg);
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
genRemoveSmallIntegerTagsInScratchReg(Arg1Reg);
/* begin MulR:R: */
@@ -11539,10 +11537,8 @@
assert(0 < (numRegArgs()));
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, ClassReg);
-
- /* We must shift away the tags, not just subtract them, so that the
- overflow case doesn't actually overflow the machine instruction. */
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
if (!(setsConditionCodesFor(lastOpcode(), JumpZero))) {
/* begin CmpCq:R: */
@@ -11676,7 +11672,8 @@
}
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
- jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
/* begin MoveR:R: */
genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
/* begin SubR:R: */
@@ -11708,7 +11705,8 @@
}
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
- jumpFail = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpFail = genJumpNotSmallInteger(Arg0Reg);
/* begin CmpR:R: */
genoperandoperand(CmpRR, Arg0Reg, ReceiverResultReg);
jumpTrue = genConditionalBranchoperand(jumpOpcode, 0);
@@ -11976,23 +11974,27 @@
/* Convert the SmallFloat in reg to its identityHash as a SmallInteger.
- Rotate the sign bit from bit 3 (zero-relative) the sign bit. This
- implicitly sets
- SmallInteger tags (3 >> 1 = 1). c.f.
- Spur64BitMemoryManager>>rotatedFloatBitsOf: */
+ Rotate the sign bit from bit 3 (zero-relative) to the sign bit.
+ c.f. Spur64BitMemoryManager>>rotatedFloatBitsOf: */
/* CogObjectRepresentationFor64BitSpur>>#genConvertSmallFloatToSmallFloatHashAsIntegerInReg:scratch: */
static sqInt NoDbgRegParms
genConvertSmallFloatToSmallFloatHashAsIntegerInRegscratch(sqInt reg, sqInt scratch)
{
+ AbstractInstruction *anInstruction;
sqInt quickConstant;
+ sqInt quickConstant1;
- assert((((usqInt) (smallFloatTag())) >> 1) == (smallIntegerTag()));
+ assert(((((usqInt) (smallFloatTag())) >> 1) - (smallIntegerTag())) == (smallIntegerTag()));
/* begin LogicalShiftRightCq:R: */
genoperandoperand(LogicalShiftRightCqR, 1, reg);
gAndCqRR(1LL << ((numTagBits()) - 1), reg, scratch);
/* begin SubR:R: */
genoperandoperand(SubRR, scratch, reg);
+ /* begin SubCq:R: */
+ quickConstant1 = (((usqInt) (smallFloatTag())) >> 1) - (smallIntegerTag());
+ /* begin gen:quickConstant:operand: */
+ anInstruction = genoperandoperand(SubCqR, quickConstant1, reg);
/* begin LogicalShiftLeftCq:R: */
quickConstant = 0x3F - ((numTagBits()) - 1);
genoperandoperand(LogicalShiftLeftCqR, quickConstant, scratch);
@@ -12059,8 +12061,6 @@
static sqInt NoDbgRegParms
genFloatArithmeticpreOpCheckboxed(sqInt arithmeticOperator, AbstractInstruction *(*preOpCheckOrNil)(int rcvrReg, int argReg), sqInt rcvrBoxed)
{
- AbstractInstruction *anInstruction;
- AbstractInstruction *anInstruction1;
AbstractInstruction *doOp;
AbstractInstruction *jumpFailAlloc;
AbstractInstruction *jumpFailCheck;
@@ -12068,8 +12068,6 @@
AbstractInstruction *jumpNotBoxedFloat;
AbstractInstruction *jumpNotSmallFloat;
AbstractInstruction *jumpNotSmallInteger;
- sqInt quickConstant;
- sqInt quickConstant1;
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
@@ -12079,18 +12077,7 @@
else {
genGetSmallFloatValueOfscratchinto(ReceiverResultReg, TempReg, DPFPReg0);
}
- /* begin MoveR:R: */
- genoperandoperand(MoveRR, Arg0Reg, ClassReg);
- /* begin AndCq:R: */
- quickConstant = tagMask();
- /* begin gen:quickConstant:operand: */
- anInstruction = genoperandoperand(AndCqR, quickConstant, ClassReg);
- /* begin CmpCq:R: */
- quickConstant1 = smallFloatTag();
- /* begin gen:quickConstant:operand: */
- anInstruction1 = genoperandoperand(CmpCqR, quickConstant1, ClassReg);
- /* begin JumpNonZero: */
- jumpNotSmallFloat = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
+ jumpNotSmallFloat = genJumpNotSmallFloat(Arg0Reg);
genGetSmallFloatValueOfscratchinto(Arg0Reg, TempReg, DPFPReg1);
/* begin Label */
doOp = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
@@ -12105,9 +12092,8 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpNotSmallFloat, gCmpCqR(smallIntegerTag(), ClassReg));
- /* begin JumpNonZero: */
- jumpNotSmallInteger = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
+ jmpTarget(jumpNotSmallFloat, gLabel());
+ jumpNotSmallInteger = genJumpNotSmallInteger(Arg0Reg);
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
genConvertSmallIntegerToIntegerInReg(Arg1Reg);
@@ -12115,9 +12101,8 @@
genoperandoperand(ConvertRRd, Arg1Reg, DPFPReg1);
/* begin Jump: */
genoperand(Jump, ((sqInt)doOp));
- jmpTarget(jumpNotSmallInteger, gCmpCqR(0, ClassReg));
- /* begin JumpNonZero: */
- jumpImmediate = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
+ jmpTarget(jumpNotSmallInteger, gLabel());
+ jumpImmediate = genJumpImmediate(Arg0Reg);
genGetCompactClassIndexNonImmOfinto(Arg0Reg, SendNumArgsReg);
genCmpClassFloatCompactIndexR(SendNumArgsReg);
/* begin JumpNonZero: */
@@ -12137,8 +12122,6 @@
genFloatComparisoninvertboxed(AbstractInstruction *(*jumpOpcodeGenerator)(void *), sqInt invertComparison, sqInt rcvrBoxed)
{
AbstractInstruction *anInstruction;
- AbstractInstruction *anInstruction1;
- AbstractInstruction *anInstruction2;
AbstractInstruction * compare;
sqInt constant;
AbstractInstruction *jumpCond;
@@ -12146,8 +12129,6 @@
AbstractInstruction *jumpNotBoxedFloat;
AbstractInstruction *jumpNotSmallFloat;
AbstractInstruction *jumpNotSmallInteger;
- sqInt quickConstant;
- sqInt quickConstant1;
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
@@ -12157,18 +12138,7 @@
else {
genGetSmallFloatValueOfscratchinto(ReceiverResultReg, TempReg, DPFPReg0);
}
- /* begin MoveR:R: */
- genoperandoperand(MoveRR, Arg0Reg, ClassReg);
- /* begin AndCq:R: */
- quickConstant = tagMask();
- /* begin gen:quickConstant:operand: */
- anInstruction = genoperandoperand(AndCqR, quickConstant, ClassReg);
- /* begin CmpCq:R: */
- quickConstant1 = smallFloatTag();
- /* begin gen:quickConstant:operand: */
- anInstruction1 = genoperandoperand(CmpCqR, quickConstant1, ClassReg);
- /* begin JumpNonZero: */
- jumpNotSmallFloat = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
+ jumpNotSmallFloat = genJumpNotSmallFloat(Arg0Reg);
genGetSmallFloatValueOfscratchinto(Arg0Reg, TempReg, DPFPReg1);
if (invertComparison) {
@@ -12190,7 +12160,7 @@
}
else {
/* begin MoveCq:R: */
- anInstruction2 = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
+ anInstruction = genoperandoperand(MoveCqR, constant, ReceiverResultReg);
}
/* begin genPrimReturn */
assert(methodOrBlockNumArgs <= (numRegArgs()));
@@ -12201,17 +12171,15 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpNotSmallFloat, gCmpCqR(smallIntegerTag(), ClassReg));
- /* begin JumpNonZero: */
- jumpNotSmallInteger = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
+ jmpTarget(jumpNotSmallFloat, gLabel());
+ jumpNotSmallInteger = genJumpNotSmallInteger(Arg0Reg);
genConvertSmallIntegerToIntegerInReg(Arg0Reg);
/* begin ConvertR:Rd: */
genoperandoperand(ConvertRRd, Arg0Reg, DPFPReg1);
/* begin Jump: */
genoperand(Jump, ((sqInt)compare));
- jmpTarget(jumpNotSmallInteger, gCmpCqR(0, ClassReg));
- /* begin JumpNonZero: */
- jumpImmediate = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
+ jmpTarget(jumpNotSmallInteger, gLabel());
+ jumpImmediate = genJumpImmediate(Arg0Reg);
genGetCompactClassIndexNonImmOfinto(Arg0Reg, SendNumArgsReg);
genCmpClassFloatCompactIndexR(SendNumArgsReg);
/* begin JumpNonZero: */
@@ -12399,22 +12367,22 @@
/* Generate a compare and branch to test if aRegister contains other than a
- Character. Answer the jump. Override since scratch is needed. */
+ Character.
+ */
- /* CogObjectRepresentationFor64BitSpur>>#genJumpNotCharacter:scratchReg: */
+ /* CogObjectRepresentationFor64BitSpur>>#genJumpNotCharacter: */
static AbstractInstruction * NoDbgRegParms
-genJumpNotCharacterscratchReg(sqInt reg, sqInt scratch)
+genJumpNotCharacter(sqInt reg)
{
AbstractInstruction *anInstruction;
sqInt quickConstant;
- return (gAndCqRR(tagMask(), reg, scratch),
- /* begin CmpCq:R: */
+ return (/* begin TstCq:R: */
(quickConstant = characterTag()),
/* begin gen:quickConstant:operand: */
- (anInstruction = genoperandoperand(CmpCqR, quickConstant, scratch)),
- /* begin JumpNonZero: */
- genConditionalBranchoperand(JumpNonZero, ((sqInt)0)));
+ (anInstruction = genoperandoperand(TstCqR, quickConstant, reg)),
+ /* begin JumpZero: */
+ genConditionalBranchoperand(JumpZero, ((sqInt)0)));
}
@@ -12478,49 +12446,22 @@
}
-/* Generate a compare and branch to test if aRegister and scratchA contains
- other than SmallIntegers,
- i.e. don't branch if both aRegister and scratchA contain SmallIntegers.
- Answer the jump. Destroy scratchA and scratchB if required. */
-/* Straight-forward approach. Map SmallIntegers to 0 in scratchA & scratchB,
- add and jump non-zero. */
+/* Generate a compare and branch to test if aRegister contains other than a
+ SmallFloat. Answer the jump. */
- /* CogObjectRepresentationFor64BitSpur>>#genJumpNotSmallIntegersIn:andScratch:scratch: */
+ /* CogObjectRepresentationFor64BitSpur>>#genJumpNotSmallFloat: */
static AbstractInstruction * NoDbgRegParms
-genJumpNotSmallIntegersInandScratchscratch(sqInt aRegister, sqInt scratchA, sqInt scratchB)
+genJumpNotSmallFloat(sqInt reg)
{
- AbstractInstruction *anInstruction1;
- AbstractInstruction *anInstruction2;
- AbstractInstruction *anInstruction3;
- AbstractInstruction *anInstruction4;
- sqInt quickConstant1;
- sqInt quickConstant2;
- sqInt quickConstant3;
- sqInt quickConstant4;
+ AbstractInstruction *anInstruction;
+ sqInt quickConstant;
- return (/* begin MoveR:R: */
- genoperandoperand(MoveRR, aRegister, scratchB),
- /* begin SubCq:R: */
- (quickConstant3 = smallIntegerTag()),
+ return (/* begin TstCq:R: */
+ (quickConstant = smallFloatTag()),
/* begin gen:quickConstant:operand: */
- (anInstruction1 = genoperandoperand(SubCqR, quickConstant3, scratchA)),
- /* begin SubCq:R: */
- (quickConstant4 = smallIntegerTag()),
- /* begin gen:quickConstant:operand: */
- (anInstruction2 = genoperandoperand(SubCqR, quickConstant4, scratchB)),
- /* begin AndCq:R: */
- (quickConstant1 = tagMask()),
- /* begin gen:quickConstant:operand: */
- (anInstruction3 = genoperandoperand(AndCqR, quickConstant1, scratchA)),
- /* begin AndCq:R: */
- (quickConstant2 = tagMask()),
- /* begin gen:quickConstant:operand: */
- (anInstruction4 = genoperandoperand(AndCqR, quickConstant2, scratchB)),
- /* begin AddR:R: */
- genoperandoperand(AddRR, scratchA, scratchB),
- /* begin JumpNonZero: */
- genConditionalBranchoperand(JumpNonZero, ((sqInt)0)));
-
+ (anInstruction = genoperandoperand(TstCqR, quickConstant, reg)),
+ /* begin JumpZero: */
+ genConditionalBranchoperand(JumpZero, ((sqInt)0)));
}
@@ -12557,42 +12498,43 @@
/* Generate a compare and branch to test if aRegister contains other than a
- SmallInteger. Answer the jump. Override since scratch is needed. */
+ SmallInteger.
+ */
- /* CogObjectRepresentationFor64BitSpur>>#genJumpNotSmallInteger:scratchReg: */
+ /* CogObjectRepresentationFor64BitSpur>>#genJumpNotSmallInteger: */
static AbstractInstruction * NoDbgRegParms
-genJumpNotSmallIntegerscratchReg(sqInt reg, sqInt scratch)
+genJumpNotSmallInteger(sqInt reg)
{
AbstractInstruction *anInstruction;
sqInt quickConstant;
- return (gAndCqRR(tagMask(), reg, scratch),
- /* begin CmpCq:R: */
+ return (/* begin TstCq:R: */
(quickConstant = smallIntegerTag()),
/* begin gen:quickConstant:operand: */
- (anInstruction = genoperandoperand(CmpCqR, quickConstant, scratch)),
- /* begin JumpNonZero: */
- genConditionalBranchoperand(JumpNonZero, ((sqInt)0)));
+ (anInstruction = genoperandoperand(TstCqR, quickConstant, reg)),
+ /* begin JumpZero: */
+ genConditionalBranchoperand(JumpZero, ((sqInt)0)));
}
/* Generate a compare and branch to test if aRegister contains a
- SmallInteger. Answer the jump. Override since scratch is needed. */
+ SmallInteger. Answer the jump, or UnimplementedOperation if this cannot be
+ done with
+ a single register. */
- /* CogObjectRepresentationFor64BitSpur>>#genJumpSmallInteger:scratchReg: */
+ /* CogObjectRepresentationFor64BitSpur>>#genJumpSmallInteger: */
static AbstractInstruction * NoDbgRegParms
-genJumpSmallIntegerscratchReg(sqInt reg, sqInt scratch)
+genJumpSmallInteger(sqInt aRegister)
{
AbstractInstruction *anInstruction;
sqInt quickConstant;
- return (gAndCqRR(tagMask(), reg, scratch),
- /* begin CmpCq:R: */
+ return (/* begin TstCq:R: */
(quickConstant = smallIntegerTag()),
/* begin gen:quickConstant:operand: */
- (anInstruction = genoperandoperand(CmpCqR, quickConstant, scratch)),
- /* begin JumpZero: */
- genConditionalBranchoperand(JumpZero, ((sqInt)0)));
+ (anInstruction = genoperandoperand(TstCqR, quickConstant, aRegister)),
+ /* begin JumpNonZero: */
+ genConditionalBranchoperand(JumpNonZero, ((sqInt)0)));
}
@@ -12654,7 +12596,8 @@
jumpImmediate = genJumpImmediate(ReceiverResultReg);
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
- jumpBadIndex = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
genConvertSmallIntegerToIntegerInReg(Arg1Reg);
/* begin SubCq:R: */
anInstruction = genoperandoperand(SubCqR, 1, Arg1Reg);
@@ -12872,7 +12815,8 @@
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
jumpImmediate = genJumpImmediate(ReceiverResultReg);
- jumpBadIndex = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
genConvertSmallIntegerToIntegerInReg(Arg0Reg);
/* begin SubCq:R: */
anInstruction16 = genoperandoperand(SubCqR, 1, Arg0Reg);
@@ -12948,7 +12892,8 @@
/* begin RetN: */
genoperand(RetN, 0);
jmpTarget(jumpNotPointers, gLabel());
- jumpNonSmallIntegerValue = genJumpNotSmallIntegerscratchReg(Arg1Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNonSmallIntegerValue = genJumpNotSmallInteger(Arg1Reg);
/* begin CmpCq:R: */
quickConstant3 = firstByteFormat();
/* begin gen:quickConstant:operand: */
@@ -13247,7 +13192,8 @@
/* begin JumpZero: */
jumpUnhashed = genConditionalBranchoperand(JumpZero, ((sqInt)0));
genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, Arg0Reg, instSpecReg);
- jumpBadFormat = genJumpNotSmallIntegerscratchReg(instSpecReg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpBadFormat = genJumpNotSmallInteger(instSpecReg);
genConvertSmallIntegerToIntegerInReg(instSpecReg);
/* begin MoveR:R: */
genoperandoperand(MoveRR, instSpecReg, TempReg);
@@ -13425,9 +13371,8 @@
/* check size and fail if not a +ve integer */
maxSlots = (numSlotsMask()) - 1;
-
- /* Is the class arg pointers with at least 3 fields? */
- jumpNElementsNonInt = genJumpNotSmallIntegerscratchReg(Arg1Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNElementsNonInt = genJumpNotSmallInteger(Arg1Reg);
jumpImmediate = genJumpImmediate(Arg0Reg);
genGetRawSlotSizeOfNonImminto(Arg0Reg, TempReg);
/* begin CmpCq:R: */
@@ -13864,9 +13809,8 @@
genGetHashFieldNonImmOfinto(ReceiverResultReg, headerReg);
/* begin JumpZero: */
jumpUnhashed = genConditionalBranchoperand(JumpZero, ((sqInt)0));
-
- /* get class's format inst var for inst spec (format field) */
- jumpNElementsNonInt = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNElementsNonInt = genJumpNotSmallInteger(Arg0Reg);
genLoadSlotsourceRegdestReg(InstanceSpecificationIndex, ReceiverResultReg, instSpecReg);
/* begin LogicalShiftRightCq:R: */
quickConstant = (fixedFieldsFieldWidth()) + (numSmallIntegerTagBits());
@@ -14065,7 +14009,8 @@
assert(0 < (numRegArgs()));
/* begin MoveR:R: */
genoperandoperand(MoveRR, Arg0Reg, Arg1Reg);
- jumpBadIndex = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
genConvertSmallIntegerToIntegerInReg(Arg1Reg);
/* begin SubCq:R: */
anInstruction1 = genoperandoperand(SubCqR, 1, Arg1Reg);
@@ -14203,8 +14148,8 @@
assert(1 < (numRegArgs()));
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
- jumpBadIndex = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
- jumpBadArg = genJumpNotCharacterscratchReg(Arg1Reg, TempReg);
+ jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
+ jumpBadArg = genJumpNotCharacter(Arg1Reg);
genConvertSmallIntegerToIntegerInReg(Arg0Reg);
/* begin SubCq:R: */
anInstruction11 = genoperandoperand(SubCqR, 1, Arg0Reg);
@@ -15631,7 +15576,8 @@
reg = Arg0Reg;
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
- jumpNotInt = genJumpNotSmallIntegerscratchReg(reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNotInt = genJumpNotSmallInteger(reg);
}
/* begin MoveR:R: */
genoperandoperand(MoveRR, reg, TempReg);
@@ -15711,7 +15657,8 @@
/* begin genLoadArgAtDepth:into: */
assert(0 < (numRegArgs()));
- jumpBadIndex = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
genGetMethodHeaderOfintoscratch(ReceiverResultReg, (headerReg = Arg1Reg), TempReg);
/* begin CmpCq:R: */
anInstruction = genoperandoperand(CmpCqR, (((sqInt)1 << 3) | 1), Arg0Reg);
@@ -25032,19 +24979,19 @@
}
if (sendTable == selfSendTrampolines) {
annotation = IsNSSelfSend;
- goto l1;
+ goto l2;
}
if (sendTable == dynamicSuperSendTrampolines) {
annotation = IsNSDynamicSuperSend;
- goto l1;
+ goto l2;
}
if (sendTable == superSendTrampolines) {
annotation = IsSuperSend;
- goto l1;
+ goto l2;
}
assert(sendTable == ordinarySendTrampolines);
annotation = IsSendCall;
-l1: /* end annotationForSendTable: */;
+l2: /* end annotationForSendTable: */;
if ((annotation == IsSuperSend)
|| (0)) {
genEnsureOopInRegNotForwardedscratchReg(ReceiverResultReg, TempReg);
@@ -25402,7 +25349,7 @@
}
genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg);
/* begin genJumpNotSmallIntegerInScratchReg: */
- jmpSingle = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
+ jmpSingle = genJumpNotSmallInteger(TempReg);
/* begin MoveCq:R: */
anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
/* begin CallRT: */
@@ -25704,10 +25651,13 @@
if (argIsInt
|| (rcvrIsInt)) {
/* begin genJumpNotSmallIntegerInScratchReg: */
- jumpNotSmallInts = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
+ jumpNotSmallInts = genJumpNotSmallInteger(TempReg);
}
else {
- jumpNotSmallInts = genJumpNotSmallIntegersInandScratchscratch(ReceiverResultReg, TempReg, ClassReg);
+ /* begin genJumpNotSmallIntegersIn:andScratch:scratch: */
+ genoperandoperand(AndRR, ReceiverResultReg, TempReg);
+ /* begin genJumpNotSmallIntegerInScratchReg: */
+ jumpNotSmallInts = genJumpNotSmallInteger(TempReg);
}
switch ((primDescriptor->opcode)) {
@@ -25922,10 +25872,13 @@
if (argIsInt
|| (rcvrIsInt)) {
/* begin genJumpNotSmallIntegerInScratchReg: */
- jumpNotSmallInts = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
+ jumpNotSmallInts = genJumpNotSmallInteger(TempReg);
}
else {
- jumpNotSmallInts = genJumpNotSmallIntegersInandScratchscratch(ReceiverResultReg, TempReg, ClassReg);
+ /* begin genJumpNotSmallIntegersIn:andScratch:scratch: */
+ genoperandoperand(AndRR, ReceiverResultReg, TempReg);
+ /* begin genJumpNotSmallIntegerInScratchReg: */
+ jumpNotSmallInts = genJumpNotSmallInteger(TempReg);
}
if (argIsInt) {
if (annotateInst) {
@@ -26436,7 +26389,7 @@
# endif /* IMMUTABILITY */
/* begin genJumpNotSmallIntegerInScratchReg: */
- jmpSingle = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
+ jmpSingle = genJumpNotSmallInteger(TempReg);
/* begin MoveCq:R: */
anInstruction = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
/* begin CallRT: */
Modified: branches/Cog/nsspur64src/vm/cointerp.c
===================================================================
--- branches/Cog/nsspur64src/vm/cointerp.c 2016-03-09 09:00:31 UTC (rev 3642)
+++ branches/Cog/nsspur64src/vm/cointerp.c 2016-03-11 01:42:54 UTC (rev 3643)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1716 uuid: 9115c93b-f425-4118-96e7-7130adeff1f2
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe
from
- CoInterpreter VMMaker.oscog-eem.1716 uuid: 9115c93b-f425-4118-96e7-7130adeff1f2
+ CoInterpreter VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1716 uuid: 9115c93b-f425-4118-96e7-7130adeff1f2 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1722 uuid: e5c44d63-ba75-4cd1-bf4e-c92c4232bbfe " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -958,7 +958,6 @@
static sqInt allocationUnit(void);
static sqInt NoDbgRegParms allStrongSlotsOfWeaklingAreMarked(sqInt aWeakling);
static sqInt allUnscannedEphemeronsAreActive(void);
-static sqInt arrayClassIndexPun(void);
extern sqInt arrayFormat(void);
static sqInt NoDbgRegParms becomeEffectFlagsFor(sqInt objOop);
extern sqInt becomewith(sqInt array1, sqInt array2);
@@ -1143,7 +1142,6 @@
static sqInt NoDbgRegParms isonObjStack(sqInt oop, sqInt objStack);
static sqInt NoDbgRegParms keyOfEphemeron(sqInt objOop);
static sqInt NoDbgRegParms knownClassAtIndex(sqInt classIndex);
-static sqInt lastClassIndexPun(void);
extern sqInt lastPointerOfWhileSwizzling(sqInt objOop);
extern sqInt lastPointerOf(sqInt objOop);
extern sqInt leakCheckBecome(void);
@@ -1176,6 +1174,7 @@
static sqInt NoDbgRegParms noCheckPushonObjStack(sqInt objOop, sqInt objStack);
static sqInt NoDbgRegParms noFixupFollowFieldofObject(sqInt fieldIndex, sqInt anObject);
static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop);
+static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit);
extern sqInt nonIndexablePointerFormat(void);
static sqInt noUnscannedEphemerons(void);
static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop);
@@ -1384,7 +1383,6 @@
extern sqInt highBit(usqInt anUnsignedValue);
static sqInt NoDbgRegParms ifCurrentStackPageHasValidHeadPointers(StackPage *thePage);
static usqInt NoDbgRegParms iframeMethod(char *theFP);
-static sqInt imageFormatVersion(void);
extern sqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperclass);
static sqInt NoDbgRegParms inlineLookupInNSMethodCacheSelclassTagmethodlookupRule(sqInt selector, sqInt classTag, sqInt callingMethod, sqInt lookupRule);
extern sqInt integerArg(sqInt index);
@@ -2441,7 +2439,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.1716";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1722";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -2485,7 +2483,7 @@
#define smallFloatExponentBits() 8
#define smallFloatExponentOffset() 896
#define smallFloatMantissaBits() 52
-#define smallFloatTag() 3
+#define smallFloatTag() 4
#define tagMask() 0x7
#define wordSize() 8
#define eden() GIV(eden)
@@ -2494,11 +2492,14 @@
#define pastSpace() GIV(pastSpace)
#define rememberedSetLimit() GIV(rememberedSetLimit)
#define rememberedSetSize() GIV(rememberedSetSize)
+#define arrayClassIndexPun() 16
#define characterTag() 2
#define classIndexMask() 0x3FFFFF
+#define classIsItselfClassIndexPun() 31
#define classTableMajorIndexShift() 10
#define endOfMemory() GIV(endOfMemory)
#define firstByteFormat() 16
+#define firstClassIndexPun() 16
#define firstCompiledMethodFormat() 24
#define firstLongFormat() 10
#define firstShortFormat() 12
@@ -2510,6 +2511,8 @@
#define identityHashHalfWordMask() 0x3FFFFF
#define indexablePointersFormat() 3
#define isForwardedObjectClassIndexPun() 8
+#define isFreeObjectClassIndexPun() 0
+#define lastClassIndexPun() 31
#define maxOldSpaceSize() maxOldSpaceSize
#define memory() GIV(memory)
#define newSpaceLimit() GIV(newSpaceLimit)
@@ -2521,7 +2524,11 @@
#define rememberedBitShift() 29
#define rootTableCapacity() GIV(rememberedSetLimit)
#define rootTableCount() GIV(rememberedSetSize)
+#define segmentBridgePun() 3
#define sixtyFourBitIndexableFormat() 9
+#define sixtyFourBitLongsClassIndexPun() 19
+#define thirtyTwoBitLongsClassIndexPun() 18
+#define weakArrayClassIndexPun() 17
#define weakArrayFormat() 4
#define numSegments() GIV(numSegments)
#define alternateHeaderNumLiteralsMask() 0x7FFF
@@ -4727,7 +4734,7 @@
GIV(argumentCount) = 2;
goto normalSend;
/* return self */
- goto l1;
+ goto l8;
}
# endif /* IMMUTABILITY */
@@ -4746,7 +4753,7 @@
}
}
longAtput((rcvr + BaseHeaderSize) + (((long)instVarIndex) << (shiftForWord())), top);
- l1: /* end storePointerImmutabilityCheck:ofObject:withValue: */;
+ l8: /* end storePointerImmutabilityCheck:ofObject:withValue: */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
@@ -5053,7 +5060,7 @@
frameToReturnTo = 0;
if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) {
goto commonCallerReturn;
- goto l154;
+ goto l413;
}
closure = longAt(localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
? ((mframeCogMethod(localFP))->cmNumArgs)
@@ -5103,10 +5110,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext = longAt(localFP + FoxThisContext);
- goto l158;
+ goto l419;
}
ourContext = marryFrameSP(localFP, localSP);
- l158: /* end ensureFrameIsMarried:SP: */;
+ l419: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
/* begin internalPush: */
@@ -5114,7 +5121,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorCannotReturn) << (shiftForWord())));
GIV(argumentCount) = 1;
goto normalSend;
- goto l154;
+ goto l413;
}
if (unwindContextOrNilOrZero != 0) {
/* begin internalAboutToReturn:through: */
@@ -5123,10 +5130,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext1 = longAt(localFP + FoxThisContext);
- goto l155;
+ goto l416;
}
ourContext1 = marryFrameSP(localFP, localSP);
- l155: /* end ensureFrameIsMarried:SP: */;
+ l416: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext1);
/* begin internalPush: */
@@ -5136,7 +5143,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorAboutToReturn) << (shiftForWord())));
GIV(argumentCount) = 2;
goto normalSend;
- goto l154;
+ goto l413;
}
contextToReturnTo = null;
if (((((longAt((home + BaseHeaderSize) + (((long)SenderIndex) << (shiftForWord()))))) & 7) == 1)) {
@@ -5188,10 +5195,10 @@
: (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(localFP)));
ourContext2 = longAt(localFP + FoxThisContext);
- goto l157;
+ goto l435;
}
ourContext2 = marryFrameSP(localFP, localSP);
- l157: /* end ensureFrameIsMarried:SP: */;
+ l435: /* end ensureFrameIsMarried:SP: */;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext2);
/* begin internalPush: */
@@ -5199,7 +5206,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorCannotReturn) << (shiftForWord())));
GIV(argumentCount) = 1;
goto normalSend;
- goto l154;
+ goto l413;
}
}
assert(pageListIsWellFormed());
@@ -5304,11 +5311,11 @@
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l156;
+ goto l415;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
- l156: /* end maybeReturnToMachineCodeFrame */;
+ l415: /* end maybeReturnToMachineCodeFrame */;
/* begin setMethod: */
aMethodObj = longAt(localFP + FoxMethod);
assert((((usqInt)aMethodObj)) >= (startOfMemory()));
@@ -5323,7 +5330,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l154: /* end case */;
+ l413: /* end case */;
break;
case 121:
/* returnTrue */
@@ -5436,27 +5443,27 @@
fp = (thePage->headFP);
if (fp == theFP) {
frameAbove = 0;
- goto l160;
+ goto l441;
}
while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) {
if (callerFP == theFP) {
frameAbove = fp;
- goto l160;
+ goto l441;
}
fp = callerFP;
}
error("did not find theFP in stack page");
frameAbove = 0;
- l160: /* end findFrameAbove:inPage: */;
+ l441: /* end findFrameAbove:inPage: */;
/* begin newStackPage */
lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage);
if (((lruOrFree->baseFP)) == 0) {
newPage = lruOrFree;
- goto l161;
+ goto l445;
}
divorceFramesIn(lruOrFree);
newPage = lruOrFree;
- l161: /* end newStackPage */;
+ l445: /* end newStackPage */;
assert(newPage == GIV(stackPage));
moveFramesInthroughtoPage(thePage, frameAbove, newPage);
markStackPageMostRecentlyUsed(newPage);
@@ -5479,7 +5486,7 @@
longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer));
GIV(stackPointer) = sp2;
ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorCannotReturn) << (shiftForWord()))), contextToReturnFrom, 1);
- goto l159;
+ goto l437;
}
GIV(instructionPointer) = 0;
thePage = makeBaseFrameFor(contextToReturnTo);
@@ -5515,7 +5522,7 @@
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l159;
+ goto l437;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -5533,7 +5540,7 @@
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l159;
+ goto l437;
}
localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP));
localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory())
@@ -5558,7 +5565,7 @@
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
ceEnterCogCodePopReceiverReg();
- goto l159;
+ goto l437;
}
localIP = pointerForOop(longAt(localFP + FoxIFSavedIP));
}
@@ -5576,7 +5583,7 @@
longAtPointerput(localSP, localReturnValue);
}
- l159: /* end case */;
+ l437: /* end case */;
break;
case 126:
case 127:
@@ -5609,10 +5616,10 @@
: (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) {
assert(isContext(frameContext(theFP)));
ourContext = longAt(theFP + FoxThisContext);
- goto l162;
+ goto l446;
}
ourContext = marryFrameSP(theFP, theSP);
- l162: /* end ensureFrameIsMarried:SP: */;
+ l446: /* end ensureFrameIsMarried:SP: */;
localIP -= 1;
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), ourContext);
@@ -5642,7 +5649,7 @@
if (variableType == 0) {
/* begin pushReceiverVariable: */
longAtPointerput((localSP -= BytesPerOop), longAt(((longAt(localFP + FoxIFReceiver)) + BaseHeaderSize) + (((long)variableIndex) << (shiftForWord()))));
- goto l2;
+ goto l10;
}
if (variableType == 1) {
/* begin pushTemporaryVariable: */
@@ -5650,14 +5657,14 @@
? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - variableIndex) * BytesPerWord))
: longAt(((localFP + FoxIFReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord)));
longAtPointerput((localSP -= BytesPerOop), object);
- goto l2;
+ goto l10;
}
if (variableType == 2) {
/* begin pushLiteralConstant: */
assert(GIV(method) == (iframeMethod(localFP)));
object1 = longAt((GIV(method) + BaseHeaderSize) + (((long)(variableIndex + LiteralStart)) << (shiftForWord())));
longAtPointerput((localSP -= BytesPerOop), object1);
- goto l2;
+ goto l10;
}
if (variableType == 3) {
/* begin pushLiteralVariable: */
@@ -5682,10 +5689,10 @@
/* begin internalPush: */
longAtPointerput((localSP -= BytesPerOop), longAt((litVar + BaseHeaderSize) + (((long)ValueIndex) << (shiftForWord()))));
- goto l2;
+ goto l10;
}
}
- l2: /* end case */;
+ l10: /* end case */;
break;
case 129:
/* extendedStoreBytecode */
@@ -5722,7 +5729,7 @@
GIV(argumentCount) = 2;
goto normalSend;
/* return self */
- goto l4;
+ goto l19;
}
# endif /* IMMUTABILITY */
@@ -5741,11 +5748,11 @@
}
}
longAtput((objOop + BaseHeaderSize) + (((long)variableIndex) << (shiftForWord())), value);
- l4: /* end storePointerImmutabilityCheck:ofObject:withValue: */;
+ l19: /* end storePointerImmutabilityCheck:ofObject:withValue: */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l3;
+ goto l16;
}
if (variableType == 1) {
/* begin fetchNextBytecode */
@@ -5757,7 +5764,7 @@
else {
longAtput(((localFP + FoxIFReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord), value);
}
- goto l3;
+ goto l16;
}
if (variableType == 3) {
/* begin storeLiteralVariable:withValue: */
@@ -5787,7 +5794,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorAttemptToAssign) << (shiftForWord())));
GIV(argumentCount) = 2;
goto normalSend;
- goto l5;
+ goto l20;
}
# endif /* IMMUTABILITY */
@@ -5806,14 +5813,14 @@
}
}
longAtput((litVar + BaseHeaderSize) + (((long)ValueIndex) << (shiftForWord())), value);
- l5: /* end storeLiteralVariable:withValue: */;
+ l20: /* end storeLiteralVariable:withValue: */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l3;
+ goto l16;
}
error("illegal store");
- l3: /* end extendedStoreBytecodePop: */;
+ l16: /* end extendedStoreBytecodePop: */;
}
break;
case 130:
@@ -5854,7 +5861,7 @@
GIV(argumentCount) = 2;
goto normalSend;
/* return self */
- goto l7;
+ goto l26;
}
# endif /* IMMUTABILITY */
@@ -5873,11 +5880,11 @@
}
}
longAtput((objOop + BaseHeaderSize) + (((long)variableIndex) << (shiftForWord())), value);
- l7: /* end storePointerImmutabilityCheck:ofObject:withValue: */;
+ l26: /* end storePointerImmutabilityCheck:ofObject:withValue: */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l6;
+ goto l23;
}
if (variableType == 1) {
/* begin fetchNextBytecode */
@@ -5889,7 +5896,7 @@
else {
longAtput(((localFP + FoxIFReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord), value);
}
- goto l6;
+ goto l23;
}
if (variableType == 3) {
/* begin storeLiteralVariable:withValue: */
@@ -5919,7 +5926,7 @@
GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)SelectorAttemptToAssign) << (shiftForWord())));
GIV(argumentCount) = 2;
goto normalSend;
- goto l8;
+ goto l27;
}
# endif /* IMMUTABILITY */
@@ -5938,14 +5945,14 @@
}
}
longAtput((litVar + BaseHeaderSize) + (((long)ValueIndex) << (shiftForWord())), value);
- l8: /* end storeLiteralVariable:withValue: */;
+ l27: /* end storeLiteralVariable:withValue: */;
/* begin fetchNextBytecode */
currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector);
- goto l6;
+ goto l23;
}
error("illegal store");
- l6: /* end extendedStoreBytecodePop: */;
+ l23: /* end extendedStoreBytecodePop: */;
}
break;
case 131:
@@ -6021,12 +6028,12 @@
classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((long)fieldIndex) << (shiftForWord())));
if (classTablePage == GIV(nilObj)) {
classOrInteger = null;
- goto l166;
+ goto l456;
}
/* begin fetchPointer:ofObject: */
fieldIndex1 = GIV(lkupClassTag) & ((1LL << (classTableMajorIndexShift())) - 1);
classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((long)fieldIndex1) << (shiftForWord())));
- l166: /* end classAtIndex: */;
+ l456: /* end classAtIndex: */;
GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger;
GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector);
GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter;
@@ -6049,7 +6056,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l164;
+ goto l450;
}
/* second probe */
@@ -6059,7 +6066,7 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l164;
+ goto l450;
}
probe = (((usqInt) hash) >> 2) & MethodCacheMask;
if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector))
@@ -6067,10 +6074,10 @@
GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod];
primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction]));
ok = 1;
- goto l164;
+ goto l450;
}
ok = 0;
- l164: /* end inlineLookupInMethodCacheSel:classTag: */;
+ l450: /* end inlineLookupInMethodCacheSel:classTag: */;
if (ok) {
/* begin ifAppropriateCompileToNativeCode:selector: */
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (((long)HeaderIndex) << (shiftForWord())));
@@ -6126,7 +6133,7 @@
maybeFlagMethodAsInterpreted(GIV(newMethod));
}
}
- goto l163;
+ goto l453;
}
}
/* begin classAtIndex: */
@@ -6137,12 +6144,12 @@
classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((long)fieldIndex2) << (shiftForWord())));
if (classTablePage1 == GIV(nilObj)) {
GIV(lkupClass) = null;
- goto l167;
+ goto l454;
}
/* begin fetchPointer:ofObject: */
fieldIndex11 = GIV(lkupClassTag) & ((1LL << (classTableMajorIndexShift())) - 1);
GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((long)fieldIndex11) << (shiftForWord())));
- l167: /* end classAtIndex: */;
+ l454: /* end classAtIndex: */;
lookupOrdinarySend();
/* begin internalizeIPandSP */
@@ -6152,7 +6159,7 @@
localFP = pointerForOop(GIV(framePointer));
addNewMethodToCache(GIV(lkupClass));
}
- l163: /* end internalFindNewMethodOrdinary */;
+ l453: /* end internalFindNewMethodOrdinary */;
/* begin internalExecuteNewMethod */
if (primitiveFunctionPointer != 0) {
if ((((unsigned long) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) {
@@ -6164,26 +6171,26 @@
if (localPrimIndex >= 264) {
/* begin internalStackTopPut: */
longAtPointerput(localSP, longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((long)(localPrimIndex - 264)) << (shiftForWord()))));
- goto l165;
+ goto l455;
}
if (localPrimIndex == 256) {
- goto l165;
+ goto l455;
}
if (localPrimIndex == 257) {
longAtPointerput(localSP, GIV(trueObj));
- goto l165;
+ goto l455;
}
if (localPrimIndex == 258) {
longAtPointerput(localSP, GIV(falseObj));
- goto l165;
+ goto l455;
}
if (localPrimIndex == 259) {
longAtPointerput(localSP, GIV(nilObj));
- goto l165;
+ goto l455;
}
longAtPointerput(localSP, (((localPrimIndex - 261) << 3) | 1));
- l165: /* end internalQuickPrimitiveResponse */;
- goto l169;
+ l455: /* end internalQuickPrimitiveResponse */;
+ goto l452;
}
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
@@ -6245,7 +6252,7 @@
if (succeeded) {
returntoExecutive(popStack(), 1);
browserPluginReturnIfNeeded();
- goto l169;
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list