From 5551b4de0b3795c6d23ec5aa3b228aa2504fe9fd Mon Sep 17 00:00:00 2001 From: Eliot Miranda Date: Wed, 2 Nov 2016 15:47:48 -0700 Subject: [PATCH] CogVM source as per VMMaker.oscog-eem.1975 Fix the root cause of the bugs wrngly fixed in VMMaker.oscog-eem.1971 & 1972. Eliminate the extBFirstZero variable and its effects on assembling a signed extB. This restores the Newspeak and no-access-control Cadence Newspeak VMs. Eliminate C compiler warning about taking absolute value of positive integer: correctly store the value in a signed integer, then take the absolute value, in #rewriteCPICJumpAt:target: and #findEmptySegNearestInSizeTo: Fix a typo in #flushICacheFrom:to:. Use #sqLong type in is32BitSignedImmediate: because it's guaranteed to be 64bits long. #long can be 32bits for LLP64 compilers. Another 64bits fix for MacMenuBarPlugin. Fix bug https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/23 ioGetClockLogSizeUsecsIdxMsecsIdx prototype is not 64bits compatible The problem is in primitiveClockLogAddresses for which type inference for a pointer on a sqInt, not a pointer on an int as first parameter. Workaround by explicitly declaring #runInNOut as sqInt. --- nsspur64src/vm/cogit.h | 2 +- nsspur64src/vm/cogitX64.c | 31 ++++------ nsspur64src/vm/cointerp.c | 41 ++++++------- nsspur64src/vm/cointerp.h | 2 +- nsspur64src/vm/gcc3x-cointerp.c | 41 ++++++------- nsspursrc/vm/cogit.h | 2 +- nsspursrc/vm/cogitARMv5.c | 35 +++++------- nsspursrc/vm/cogitIA32.c | 36 +++++------- nsspursrc/vm/cogitMIPSEL.c | 41 ++++++------- nsspursrc/vm/cointerp.c | 39 ++++++------- nsspursrc/vm/cointerp.h | 2 +- nsspursrc/vm/gcc3x-cointerp.c | 39 ++++++------- nsspurstack64src/vm/gcc3x-interp.c | 29 ++++------ nsspurstack64src/vm/interp.c | 29 ++++------ nsspurstacksrc/vm/gcc3x-interp.c | 29 ++++------ nsspurstacksrc/vm/interp.c | 29 ++++------ spur64src/vm/cogit.h | 2 +- spur64src/vm/cogitX64.c | 31 ++++------ spur64src/vm/cointerp.c | 49 +++++++--------- spur64src/vm/cointerp.h | 2 +- spur64src/vm/gcc3x-cointerp.c | 49 +++++++--------- spursista64src/vm/cogit.h | 2 +- spursista64src/vm/cogitX64.c | 39 +++++-------- spursista64src/vm/cointerp.c | 57 ++++++++----------- spursista64src/vm/cointerp.h | 2 +- spursista64src/vm/gcc3x-cointerp.c | 57 ++++++++----------- spursistasrc/vm/cogit.h | 2 +- spursistasrc/vm/cogitARMv5.c | 33 ++++------- spursistasrc/vm/cogitIA32.c | 36 +++++------- spursistasrc/vm/cogitMIPSEL.c | 31 ++++------ spursistasrc/vm/cointerp.c | 51 +++++++---------- spursistasrc/vm/cointerp.h | 2 +- spursistasrc/vm/gcc3x-cointerp.c | 51 +++++++---------- spursrc/vm/cogit.h | 2 +- spursrc/vm/cogitARMv5.c | 39 +++++-------- spursrc/vm/cogitIA32.c | 36 +++++------- spursrc/vm/cogitMIPSEL.c | 37 +++++------- spursrc/vm/cointerp.c | 57 ++++++++----------- spursrc/vm/cointerp.h | 2 +- spursrc/vm/gcc3x-cointerp.c | 57 ++++++++----------- spurstack64src/vm/gcc3x-interp.c | 29 ++++------ spurstack64src/vm/interp.c | 29 ++++------ spurstacksrc/vm/gcc3x-interp.c | 29 ++++------ spurstacksrc/vm/interp.c | 29 ++++------ .../MacMenubarPlugin/MacMenubarPlugin.c | 12 ++-- src/vm/cogit.h | 2 +- src/vm/cogitARMv5.c | 15 ++--- src/vm/cogitIA32.c | 22 ++++--- src/vm/cogitMIPSEL.c | 19 +++---- src/vm/cointerp.c | 20 ++++--- src/vm/cointerp.h | 2 +- src/vm/cointerpmt.c | 40 ++++++------- src/vm/cointerpmt.h | 2 +- src/vm/gcc3x-cointerp.c | 20 ++++--- src/vm/gcc3x-cointerpmt.c | 40 ++++++------- stacksrc/vm/gcc3x-interp.c | 14 +++-- stacksrc/vm/interp.c | 14 +++-- 57 files changed, 625 insertions(+), 866 deletions(-) diff --git a/nsspur64src/vm/cogit.h b/nsspur64src/vm/cogit.h index a976ac69c5..ce65535add 100644 --- a/nsspur64src/vm/cogit.h +++ b/nsspur64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/nsspur64src/vm/cogitX64.c b/nsspur64src/vm/cogitX64.c index d4467ccbff..72c497d169 100644 --- a/nsspur64src/vm/cogitX64.c +++ b/nsspur64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -1317,7 +1317,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2872,7 +2871,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -5333,11 +5332,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -8420,7 +8417,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -21282,7 +21279,7 @@ instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc) static sqInt NoDbgRegParms is32BitSignedImmediate(AbstractInstruction * self_in_is32BitSignedImmediate, sqInt a64BitUnsignedOperand) { - return (((int) a64BitUnsignedOperand)) == (((long) a64BitUnsignedOperand)); + return (((int) a64BitUnsignedOperand)) == (((sqLong) a64BitUnsignedOperand)); } @@ -22689,9 +22686,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 3) | 1)); } @@ -23018,9 +23013,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -23775,7 +23768,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -24897,7 +24890,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -28625,7 +28618,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -28723,7 +28715,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/nsspur64src/vm/cointerp.c b/nsspur64src/vm/cointerp.c index 09d20ab64a..eb9bc9b88d 100644 --- a/nsspur64src/vm/cointerp.c +++ b/nsspur64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2474,7 +2474,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1975"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2603,7 +2603,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; char * localFP; char * localIP; sqInt localReturnValue; @@ -2639,8 +2638,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11933,11 +11930,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -12118,9 +12113,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13596,9 +13589,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17754,7 +17745,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -28785,13 +28776,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -40597,7 +40590,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40766,7 +40759,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -47792,7 +47785,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - usqInt bytes; + sqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -53989,7 +53982,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt chunkBytes; + sqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -59907,7 +59900,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -60374,7 +60367,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/nsspur64src/vm/cointerp.h b/nsspur64src/vm/cointerp.h index 19b7351a11..10c387ac4e 100644 --- a/nsspur64src/vm/cointerp.h +++ b/nsspur64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/nsspur64src/vm/gcc3x-cointerp.c b/nsspur64src/vm/gcc3x-cointerp.c index 094ed93916..ed841dfafa 100644 --- a/nsspur64src/vm/gcc3x-cointerp.c +++ b/nsspur64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2477,7 +2477,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1975"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2606,7 +2606,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; register char* localFP FP_REG; register char* localIP IP_REG; sqInt localReturnValue; @@ -2648,8 +2647,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11942,11 +11939,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -12127,9 +12122,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13605,9 +13598,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17763,7 +17754,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -28794,13 +28785,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -40606,7 +40599,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40775,7 +40768,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -47801,7 +47794,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - usqInt bytes; + sqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -53998,7 +53991,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt chunkBytes; + sqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -59916,7 +59909,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -60383,7 +60376,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/nsspursrc/vm/cogit.h b/nsspursrc/vm/cogit.h index a976ac69c5..ce65535add 100644 --- a/nsspursrc/vm/cogit.h +++ b/nsspursrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/nsspursrc/vm/cogitARMv5.c b/nsspursrc/vm/cogitARMv5.c index 34f071be5f..9f194a01b2 100644 --- a/nsspursrc/vm/cogitARMv5.c +++ b/nsspursrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -726,7 +726,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1366,7 +1366,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2869,7 +2868,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - sqInt instr; + usqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -7639,7 +7638,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -10132,11 +10131,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -12239,7 +12236,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -13299,7 +13296,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -24390,9 +24387,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -24719,9 +24714,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -25494,7 +25487,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -26285,7 +26278,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -30191,7 +30184,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -30289,7 +30281,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/nsspursrc/vm/cogitIA32.c b/nsspursrc/vm/cogitIA32.c index 708fddacc7..5fa9bba585 100644 --- a/nsspursrc/vm/cogitIA32.c +++ b/nsspursrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -716,7 +716,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1330,7 +1330,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -6865,12 +6864,13 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -7488,7 +7488,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -9893,11 +9893,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -11927,7 +11925,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -12987,7 +12985,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -22263,9 +22261,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -22592,9 +22588,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -23336,7 +23330,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -24123,7 +24117,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -27839,7 +27833,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -27937,7 +27930,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/nsspursrc/vm/cogitMIPSEL.c b/nsspursrc/vm/cogitMIPSEL.c index 5591be55eb..05287c6661 100644 --- a/nsspursrc/vm/cogitMIPSEL.c +++ b/nsspursrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -1474,7 +1474,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2758,7 +2757,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -4829,7 +4828,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt followingAddress; sqInt i; sqInt methods[MaxCPICCases]; @@ -4929,7 +4928,7 @@ cPICHasForwardedClass(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt i; sqInt pc; CogMethod *targetMethod; @@ -5190,11 +5189,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -5977,12 +5974,12 @@ static sqInt NoDbgRegParms 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; @@ -8268,7 +8265,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8944,7 +8941,7 @@ static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC) { sqLong callDelta; - sqInt entryPoint; + usqInt entryPoint; sqInt i; sqInt pc; sqLong refDelta; @@ -21674,9 +21671,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -22003,9 +21998,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -22756,7 +22749,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23543,7 +23536,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -27276,7 +27269,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -27374,7 +27366,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/nsspursrc/vm/cointerp.c b/nsspursrc/vm/cointerp.c index 708e45a55a..f4b961378e 100644 --- a/nsspursrc/vm/cointerp.c +++ b/nsspursrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2450,7 +2450,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1975"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2575,7 +2575,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; char * localFP; char * localIP; sqInt localReturnValue; @@ -2611,8 +2610,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11147,11 +11144,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -11332,9 +11327,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12818,9 +12811,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16996,7 +16987,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -21032,7 +21023,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - usqInt theMethodEnd; + sqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -28303,13 +28294,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -58318,7 +58311,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -58499,7 +58492,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -58785,7 +58778,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -69689,7 +69682,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; diff --git a/nsspursrc/vm/cointerp.h b/nsspursrc/vm/cointerp.h index e659659b0a..fc9d8bdd9b 100644 --- a/nsspursrc/vm/cointerp.h +++ b/nsspursrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/nsspursrc/vm/gcc3x-cointerp.c b/nsspursrc/vm/gcc3x-cointerp.c index da53693100..716e33418f 100644 --- a/nsspursrc/vm/gcc3x-cointerp.c +++ b/nsspursrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2453,7 +2453,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1975"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2578,7 +2578,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; register char* localFP FP_REG; register char* localIP IP_REG; sqInt localReturnValue; @@ -2620,8 +2619,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11156,11 +11153,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -11341,9 +11336,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12827,9 +12820,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17005,7 +16996,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -21041,7 +21032,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - usqInt theMethodEnd; + sqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -28312,13 +28303,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -58327,7 +58320,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -58508,7 +58501,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -58794,7 +58787,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -69698,7 +69691,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; diff --git a/nsspurstack64src/vm/gcc3x-interp.c b/nsspurstack64src/vm/gcc3x-interp.c index 35642ff313..9cca45136d 100644 --- a/nsspurstack64src/vm/gcc3x-interp.c +++ b/nsspurstack64src/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2212,7 +2212,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1975"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2313,7 +2313,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; register char* localFP FP_REG; register char* localIP IP_REG; sqInt localReturnValue; @@ -2351,8 +2350,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -12511,11 +12508,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -12659,9 +12654,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13996,9 +13989,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17528,13 +17519,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -49596,7 +49589,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/nsspurstack64src/vm/interp.c b/nsspurstack64src/vm/interp.c index 805bb1bdf3..a895f92cb4 100644 --- a/nsspurstack64src/vm/interp.c +++ b/nsspurstack64src/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2209,7 +2209,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1975"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2310,7 +2310,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; char * localFP; char * localIP; sqInt localReturnValue; @@ -2342,8 +2341,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -12502,11 +12499,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -12650,9 +12645,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13987,9 +13980,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17519,13 +17510,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -49587,7 +49580,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/nsspurstacksrc/vm/gcc3x-interp.c b/nsspurstacksrc/vm/gcc3x-interp.c index b96bdb7c11..11a222859f 100644 --- a/nsspurstacksrc/vm/gcc3x-interp.c +++ b/nsspurstacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2189,7 +2189,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1975"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2286,7 +2286,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; register char* localFP FP_REG; register char* localIP IP_REG; sqInt localReturnValue; @@ -2324,8 +2323,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11814,11 +11811,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -11962,9 +11957,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13307,9 +13300,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17006,13 +16997,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -47963,7 +47956,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/nsspurstacksrc/vm/interp.c b/nsspurstacksrc/vm/interp.c index c59eecf35d..8c26209250 100644 --- a/nsspurstacksrc/vm/interp.c +++ b/nsspurstacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2186,7 +2186,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1972"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1975"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2283,7 +2283,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; char * localFP; char * localIP; sqInt localReturnValue; @@ -2315,8 +2314,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11805,11 +11802,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -11953,9 +11948,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13298,9 +13291,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16997,13 +16988,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -47954,7 +47947,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/spur64src/vm/cogit.h b/spur64src/vm/cogit.h index 4141d3e517..d19fa7e9e5 100644 --- a/spur64src/vm/cogit.h +++ b/spur64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spur64src/vm/cogitX64.c b/spur64src/vm/cogitX64.c index 94d4083e57..a75c51621c 100644 --- a/spur64src/vm/cogitX64.c +++ b/spur64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -1310,7 +1310,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2862,7 +2861,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -5322,11 +5321,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -8194,7 +8191,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -20302,7 +20299,7 @@ instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc) static sqInt NoDbgRegParms is32BitSignedImmediate(AbstractInstruction * self_in_is32BitSignedImmediate, sqInt a64BitUnsignedOperand) { - return (((int) a64BitUnsignedOperand)) == (((long) a64BitUnsignedOperand)); + return (((int) a64BitUnsignedOperand)) == (((sqLong) a64BitUnsignedOperand)); } @@ -21728,9 +21725,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 3) | 1)); } @@ -21879,9 +21874,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -22722,7 +22715,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23889,7 +23882,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -28074,7 +28067,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -28170,7 +28162,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spur64src/vm/cointerp.c b/spur64src/vm/cointerp.c index 1e354f4469..eb12b6be80 100644 --- a/spur64src/vm/cointerp.c +++ b/spur64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2447,7 +2447,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2576,7 +2576,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; char * localFP; char * localIP; @@ -2613,8 +2612,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11890,11 +11887,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -12167,9 +12162,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12314,9 +12307,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16558,7 +16549,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -20059,11 +20050,11 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -27180,13 +27171,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -30528,7 +30521,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30732,7 +30725,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30786,7 +30779,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30990,7 +30983,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31040,7 +31033,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31281,7 +31274,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -59549,7 +59542,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -69470,7 +69463,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; diff --git a/spur64src/vm/cointerp.h b/spur64src/vm/cointerp.h index 1678dae259..d91ea25b5a 100644 --- a/spur64src/vm/cointerp.h +++ b/spur64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spur64src/vm/gcc3x-cointerp.c b/spur64src/vm/gcc3x-cointerp.c index 9af1e34ae1..a84b20e852 100644 --- a/spur64src/vm/gcc3x-cointerp.c +++ b/spur64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2450,7 +2450,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2579,7 +2579,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; register char* localFP FP_REG; register char* localIP IP_REG; @@ -2622,8 +2621,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11899,11 +11896,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -12176,9 +12171,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12323,9 +12316,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16567,7 +16558,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -20068,11 +20059,11 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -27189,13 +27180,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -30537,7 +30530,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30741,7 +30734,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30795,7 +30788,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30999,7 +30992,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31049,7 +31042,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31290,7 +31283,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -59558,7 +59551,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -69479,7 +69472,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; diff --git a/spursista64src/vm/cogit.h b/spursista64src/vm/cogit.h index a704c4c5a3..00cf0c920a 100644 --- a/spursista64src/vm/cogit.h +++ b/spursista64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spursista64src/vm/cogitX64.c b/spursista64src/vm/cogitX64.c index fc444e9aec..ee476b56bf 100644 --- a/spursista64src/vm/cogitX64.c +++ b/spursista64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -618,7 +618,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1352,7 +1352,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2906,7 +2905,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -5399,11 +5398,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -7221,7 +7218,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -8175,7 +8172,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -20779,7 +20776,7 @@ instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc) static sqInt NoDbgRegParms is32BitSignedImmediate(AbstractInstruction * self_in_is32BitSignedImmediate, sqInt a64BitUnsignedOperand) { - return (((int) a64BitUnsignedOperand)) == (((long) a64BitUnsignedOperand)); + return (((int) a64BitUnsignedOperand)) == (((sqLong) a64BitUnsignedOperand)); } @@ -22191,9 +22188,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 3) | 1)); } @@ -22342,9 +22337,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -23162,7 +23155,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -24329,7 +24322,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -27187,7 +27180,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -27510,7 +27503,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -31014,7 +31007,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -31112,7 +31104,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursista64src/vm/cointerp.c b/spursista64src/vm/cointerp.c index 6e052499cc..b8c022f14a 100644 --- a/spursista64src/vm/cointerp.c +++ b/spursista64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2456,7 +2456,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2585,7 +2585,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; char * localFP; char * localIP; @@ -2622,8 +2621,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -12315,11 +12312,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -12592,9 +12587,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12739,9 +12732,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17558,7 +17549,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -28278,13 +28269,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -31626,7 +31619,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31830,7 +31823,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31884,7 +31877,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -32088,7 +32081,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32138,7 +32131,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -32379,7 +32372,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -33094,7 +33087,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -40864,7 +40857,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -41033,7 +41026,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -42883,7 +42876,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -48059,7 +48052,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - sqInt bytes; + usqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -54264,7 +54257,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt chunkBytes; + sqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -60655,7 +60648,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -70597,7 +70590,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - signed char accessorDepth; + sqInt accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; diff --git a/spursista64src/vm/cointerp.h b/spursista64src/vm/cointerp.h index e62b7c6a12..82136f4bc5 100644 --- a/spursista64src/vm/cointerp.h +++ b/spursista64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spursista64src/vm/gcc3x-cointerp.c b/spursista64src/vm/gcc3x-cointerp.c index 67cd83db55..11e82b5e6a 100644 --- a/spursista64src/vm/gcc3x-cointerp.c +++ b/spursista64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2459,7 +2459,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2588,7 +2588,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; register char* localFP FP_REG; register char* localIP IP_REG; @@ -2631,8 +2630,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -12324,11 +12321,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -12601,9 +12596,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12748,9 +12741,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -17567,7 +17558,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -28287,13 +28278,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -31635,7 +31628,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31839,7 +31832,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31893,7 +31886,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -32097,7 +32090,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32147,7 +32140,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -32388,7 +32381,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -33103,7 +33096,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -40873,7 +40866,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -41042,7 +41035,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -42892,7 +42885,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -48068,7 +48061,7 @@ eliminateAndFreeForwardersForPigCompact(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; sqInt address1; - sqInt bytes; + usqInt bytes; sqInt endOfFreeRun; sqInt f; sqInt firstOfFreeRun; @@ -54273,7 +54266,7 @@ maybeSplObj(sqInt index) static sqInt NoDbgRegParms moveARunOfObjectsStartingAtupTo(usqInt startAddress, usqInt limit) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt chunkBytes; + sqInt chunkBytes; sqInt classIndex; sqInt classIndex1; sqInt dest; @@ -60664,7 +60657,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -70606,7 +70599,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - signed char accessorDepth; + sqInt accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; diff --git a/spursistasrc/vm/cogit.h b/spursistasrc/vm/cogit.h index a704c4c5a3..00cf0c920a 100644 --- a/spursistasrc/vm/cogit.h +++ b/spursistasrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spursistasrc/vm/cogitARMv5.c b/spursistasrc/vm/cogitARMv5.c index fc9d7f199b..9e89d41eb7 100644 --- a/spursistasrc/vm/cogitARMv5.c +++ b/spursistasrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -1401,7 +1401,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2901,7 +2900,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - sqInt instr; + usqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -7629,7 +7628,7 @@ static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) { sqInt blockEntry; - sqInt end; + usqInt end; sqInt pc; sqInt result; usqInt targetpc; @@ -10207,11 +10206,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -11001,12 +10998,12 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + sqInt location; + sqInt mapEntry; sqInt maxDelta; usqInt mcpc; @@ -23740,9 +23737,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -23891,9 +23886,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -25565,7 +25558,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -32592,7 +32585,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -32690,7 +32682,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursistasrc/vm/cogitIA32.c b/spursistasrc/vm/cogitIA32.c index 75a0cab439..0d999c8cb3 100644 --- a/spursistasrc/vm/cogitIA32.c +++ b/spursistasrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -714,7 +714,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1366,7 +1366,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -6889,12 +6888,13 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -9949,11 +9949,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -10707,12 +10705,12 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + sqInt location; + sqInt mapEntry; sqInt maxDelta; usqInt mcpc; @@ -11760,7 +11758,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -21659,9 +21657,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -21810,9 +21806,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -23449,7 +23443,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -30129,7 +30123,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -30227,7 +30220,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursistasrc/vm/cogitMIPSEL.c b/spursistasrc/vm/cogitMIPSEL.c index 693054d6da..e79eccb88b 100644 --- a/spursistasrc/vm/cogitMIPSEL.c +++ b/spursistasrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -1509,7 +1509,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -4998,7 +4997,7 @@ cPICHasForwardedClass(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt i; sqInt pc; CogMethod *targetMethod; @@ -5259,11 +5258,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -8687,7 +8684,7 @@ static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC) { sqLong callDelta; - sqInt entryPoint; + usqInt entryPoint; sqInt i; sqInt pc; sqLong refDelta; @@ -14408,7 +14405,7 @@ relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeRet static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta) { - sqInt newTarget; + usqInt newTarget; usqInt oldTarget; assert((delta % 4) == 0); @@ -14461,7 +14458,7 @@ relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_i static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta) { - sqInt newValue; + usqInt newValue; usqInt oldValue; if (((opcodeAtAddress(self_in_relocateMethodReferenceBeforeAddressby, pc - 8)) == ADDIU) @@ -21083,9 +21080,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -21234,9 +21229,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -22882,7 +22875,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -29568,7 +29561,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -29666,7 +29658,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursistasrc/vm/cointerp.c b/spursistasrc/vm/cointerp.c index b124c1b985..786a8e1146 100644 --- a/spursistasrc/vm/cointerp.c +++ b/spursistasrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2432,7 +2432,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2557,7 +2557,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; char * localFP; char * localIP; @@ -2594,8 +2593,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11529,11 +11526,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -11806,9 +11801,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11955,9 +11948,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -20421,7 +20412,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -27774,13 +27765,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -30970,7 +30963,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31174,7 +31167,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31228,7 +31221,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31432,7 +31425,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31482,7 +31475,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31723,7 +31716,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32526,7 +32519,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -58577,7 +58570,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -59044,7 +59037,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -59164,8 +59157,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - sqInt pier1; - sqInt pier2; + usqInt pier1; + usqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); diff --git a/spursistasrc/vm/cointerp.h b/spursistasrc/vm/cointerp.h index bca57bf542..db5b446f09 100644 --- a/spursistasrc/vm/cointerp.h +++ b/spursistasrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spursistasrc/vm/gcc3x-cointerp.c b/spursistasrc/vm/gcc3x-cointerp.c index ed689ee796..6af384309f 100644 --- a/spursistasrc/vm/gcc3x-cointerp.c +++ b/spursistasrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2435,7 +2435,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2560,7 +2560,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; register char* localFP FP_REG; register char* localIP IP_REG; @@ -2603,8 +2602,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11538,11 +11535,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -11815,9 +11810,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11964,9 +11957,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -20430,7 +20421,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -27783,13 +27774,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -30979,7 +30972,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31183,7 +31176,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31237,7 +31230,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -31441,7 +31434,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31491,7 +31484,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -31732,7 +31725,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -32535,7 +32528,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -58586,7 +58579,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - sqInt clifton; + usqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -59053,7 +59046,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -59173,8 +59166,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - sqInt pier1; - sqInt pier2; + usqInt pier1; + usqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); diff --git a/spursrc/vm/cogit.h b/spursrc/vm/cogit.h index 4141d3e517..d19fa7e9e5 100644 --- a/spursrc/vm/cogit.h +++ b/spursrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spursrc/vm/cogitARMv5.c b/spursrc/vm/cogitARMv5.c index 21c8e60517..376daecc35 100644 --- a/spursrc/vm/cogitARMv5.c +++ b/spursrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -1360,7 +1360,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2858,7 +2857,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - sqInt instr; + usqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -7586,7 +7585,7 @@ static sqInt NoDbgRegParms blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) { sqInt blockEntry; - usqInt end; + sqInt end; sqInt pc; sqInt result; usqInt targetpc; @@ -7630,7 +7629,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -10131,11 +10130,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -10975,12 +10972,12 @@ static sqInt NoDbgRegParms 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; @@ -13069,7 +13066,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -23331,9 +23328,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -23482,9 +23477,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -24346,7 +24339,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - sqInt endbcpc; + usqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -25182,7 +25175,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -29558,7 +29551,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -29654,7 +29646,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursrc/vm/cogitIA32.c b/spursrc/vm/cogitIA32.c index 999c54dd47..24a3c4ba2b 100644 --- a/spursrc/vm/cogitIA32.c +++ b/spursrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -709,7 +709,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1323,7 +1323,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -6844,12 +6843,13 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -7467,7 +7467,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -9871,11 +9871,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -11800,7 +11798,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -12750,7 +12748,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -21278,9 +21276,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -21429,9 +21425,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -22259,7 +22253,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23091,7 +23085,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -27263,7 +27257,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -27359,7 +27352,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursrc/vm/cogitMIPSEL.c b/spursrc/vm/cogitMIPSEL.c index 450b8d8e94..6ea9bd6478 100644 --- a/spursrc/vm/cogitMIPSEL.c +++ b/spursrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -651,7 +651,7 @@ static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt re static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); static AbstractInstruction * NoDbgRegParms gMoveRR(sqInt reg1, sqInt reg2); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1466,7 +1466,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -4820,7 +4819,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt followingAddress; sqInt i; sqInt methods[MaxCPICCases]; @@ -5181,11 +5180,9 @@ static sqInt extBBytecode(void) { extB = ((extB == 0) - && ((!extBFirstZero) - && (byte1 > 0x7F)) + && (byte1 > 0x7F) ? byte1 - 256 : (((usqInt) extB << 8)) + byte1); - extBFirstZero = extB == 0; return 0; } @@ -6013,12 +6010,12 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + sqInt location; + sqInt mapEntry; sqInt maxDelta; usqInt mcpc; @@ -7099,7 +7096,7 @@ gMoveRR(sqInt reg1, sqInt reg2) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -14338,7 +14335,7 @@ relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeRet static AbstractInstruction * NoDbgRegParms relocateJumpLongBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpLongBeforeFollowingAddressby, sqInt pc, sqInt delta) { - usqInt newTarget; + sqInt newTarget; usqInt oldTarget; assert((delta % 4) == 0); @@ -20682,9 +20679,7 @@ genExtPushIntegerBytecode(void) { sqInt value; - value = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = byte1 + (((sqInt)((usqInt)(extB) << 8))); extB = 0; return genPushLiteral(((value << 1) | 1)); } @@ -20833,9 +20828,7 @@ genExtUnconditionalJump(void) sqInt distance; sqInt target; - distance = byte1 + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + distance = byte1 + (((sqInt)((usqInt)(extB) << 8))); assert(distance == (v4LongBranchDistance(generatorAt(byte0), bytecodePC, ((extA != 0 ? 1 : 0)) + ((extB != 0 @@ -22504,7 +22497,7 @@ v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqIn } extBValue = extBValue1; - return (fetchByteofObject(pc + 1, aMethodObj)) + (((usqInt) extBValue << 8)); + return (fetchByteofObject(pc + 1, aMethodObj)) + (((sqInt)((usqInt)(extBValue) << 8))); } /* SimpleStackBasedCogit>>#voidCogCompiledCode */ @@ -26696,7 +26689,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -26792,7 +26784,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/spursrc/vm/cointerp.c b/spursrc/vm/cointerp.c index 74d52f0f85..be9c9e9545 100644 --- a/spursrc/vm/cointerp.c +++ b/spursrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2423,7 +2423,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2548,7 +2548,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; char * localFP; char * localIP; @@ -2585,8 +2584,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11104,11 +11101,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -11381,9 +11376,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11530,9 +11523,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -19425,7 +19416,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -26676,13 +26667,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -29872,7 +29865,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30076,7 +30069,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30130,7 +30123,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30334,7 +30327,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30384,7 +30377,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -30625,7 +30618,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31428,7 +31421,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - sqInt value; + usqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -38309,7 +38302,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -38476,7 +38469,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -57471,7 +57464,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -57652,7 +57645,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -57938,7 +57931,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -58058,8 +58051,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); diff --git a/spursrc/vm/cointerp.h b/spursrc/vm/cointerp.h index 3199dbee1e..e8787f5020 100644 --- a/spursrc/vm/cointerp.h +++ b/spursrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/spursrc/vm/gcc3x-cointerp.c b/spursrc/vm/gcc3x-cointerp.c index 414247b0bf..2a925fe195 100644 --- a/spursrc/vm/gcc3x-cointerp.c +++ b/spursrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2426,7 +2426,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2551,7 +2551,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; register char* localFP FP_REG; register char* localIP IP_REG; @@ -2594,8 +2593,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11113,11 +11110,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -11390,9 +11385,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -11539,9 +11532,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -19434,7 +19425,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -26685,13 +26676,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -29881,7 +29874,7 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30085,7 +30078,7 @@ primitiveFullClosureValue(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30139,7 +30132,7 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; @@ -30343,7 +30336,7 @@ primitiveFullClosureValueNoContextSwitch(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -30393,7 +30386,7 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - sqInt i; + usqInt i; sqInt index; int inInterpreter; sqInt methodHeader; @@ -30634,7 +30627,7 @@ primitiveFullClosureValueWithArgs(void) GIV(stackPointer) = sp8; for (i = 0; i < numCopied; i += 1) { /* begin push: */ - longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + longAtput((sp13 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + ((i + FullClosureFirstCopiedValueIndex) << (shiftForWord())))); GIV(stackPointer) = sp13; } assert(frameIsBlockActivation(GIV(framePointer))); @@ -31437,7 +31430,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - sqInt value; + usqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -38318,7 +38311,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fmt; usqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -38485,7 +38478,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -57480,7 +57473,7 @@ static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { usqInt bridgeSpan; - usqInt clifton; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -57661,7 +57654,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -57947,7 +57940,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } @@ -58067,8 +58060,8 @@ writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSeg { usqLong firstSavedBridgeWord; sqInt nWritten; - usqInt pier1; - usqInt pier2; + sqInt pier1; + sqInt pier2; usqLong secondSavedBridgeWord; pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize); diff --git a/spurstack64src/vm/gcc3x-interp.c b/spurstack64src/vm/gcc3x-interp.c index 089f07c92b..32caa7ce55 100644 --- a/spurstack64src/vm/gcc3x-interp.c +++ b/spurstack64src/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2184,7 +2184,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1975]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2285,7 +2285,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; register char* localFP FP_REG; register char* localIP IP_REG; @@ -2324,8 +2323,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -12467,11 +12464,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -12706,9 +12701,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12851,9 +12844,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16955,13 +16946,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -49352,7 +49345,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/spurstack64src/vm/interp.c b/spurstack64src/vm/interp.c index 193fd80fd3..3306965d1a 100644 --- a/spurstack64src/vm/interp.c +++ b/spurstack64src/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2181,7 +2181,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1975]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2282,7 +2282,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; char * localFP; char * localIP; @@ -2315,8 +2314,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -12458,11 +12455,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -12697,9 +12692,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12842,9 +12835,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16946,13 +16937,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -49343,7 +49336,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/spurstacksrc/vm/gcc3x-interp.c b/spurstacksrc/vm/gcc3x-interp.c index 2d7dca62d9..6dbc1ff97e 100644 --- a/spurstacksrc/vm/gcc3x-interp.c +++ b/spurstacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2161,7 +2161,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1975]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2258,7 +2258,6 @@ interpret(void) register sqInt currentBytecode CB_REG; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; register char* localFP FP_REG; register char* localIP IP_REG; @@ -2297,8 +2296,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11770,11 +11767,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } BREAK; CASE(482) /*226*/ @@ -12009,9 +12004,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12156,9 +12149,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16425,13 +16416,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -47711,7 +47704,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/spurstacksrc/vm/interp.c b/spurstacksrc/vm/interp.c index 397cbec7c3..b3269305a1 100644 --- a/spurstacksrc/vm/interp.c +++ b/spurstacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -2158,7 +2158,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1975]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2255,7 +2255,6 @@ interpret(void) sqInt currentBytecode; sqInt extA; sqInt extB; - sqInt extBFirstZero; sqInt lkupClassTag; char * localFP; char * localIP; @@ -2288,8 +2287,6 @@ interpret(void) /* begin initExtensions */ extA = (extB = 0); - extBFirstZero = 0; - while (1) { bytecodeDispatchDebugHook(); @@ -11761,11 +11758,9 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); extB = ((extB == 0) - && ((!extBFirstZero) - && (byte > 0x7F)) + && (byte > 0x7F) ? byte - 256 : (((usqInt) extB << 8)) + byte); - extBFirstZero = extB == 0; } break; case 482: /*226*/ @@ -12000,9 +11995,7 @@ interpret(void) sqInt value; VM_LABEL(extPushIntegerBytecode); - value = (byteAtPointer(++localIP)) + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -12147,9 +12140,7 @@ interpret(void) VM_LABEL(extUnconditionalJump); byte = byteAtPointer(++localIP); - offset = byte + (((usqInt) ((extB > 0x7F - ? extB - 256 - : extB)) << 8)); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); extB = 0; localIP += offset; /* begin ifBackwardsCheckForEvents: */ @@ -16416,13 +16407,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -47702,7 +47695,7 @@ shrinkObjectMemory(usqInt delta) } else { if ((shrinkage >= (((seg->segSize)) * 0.75)) - && ((SQABS((((seg->segSize)) - shrinkage))) < delta1)) { + && ((SQABS((((sqInt) (((seg->segSize)) - shrinkage))))) < delta1)) { best = seg; delta1 = SQABS((((seg->segSize)) - shrinkage)); } diff --git a/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c b/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c index bbc59f2775..69e6db5af0 100644 --- a/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c +++ b/src/plugins/MacMenubarPlugin/MacMenubarPlugin.c @@ -1,9 +1,9 @@ /* Automatically generated by - SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1809 uuid: ea36b0b1-2bb5-4763-87fc-d5fecda34867 + SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - MacMenubarPlugin VMMaker.oscog-eem.1809 uuid: ea36b0b1-2bb5-4763-87fc-d5fecda34867 + MacMenubarPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "MacMenubarPlugin VMMaker.oscog-eem.1809 uuid: ea36b0b1-2bb5-4763-87fc-d5fecda34867 " __DATE__ ; +static char __buildInfo[] = "MacMenubarPlugin VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; @@ -142,9 +142,9 @@ extern struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "MacMenubarPlugin VMMaker.oscog-eem.1809 (i)" + "MacMenubarPlugin VMMaker.oscog-eem.1975 (i)" #else - "MacMenubarPlugin VMMaker.oscog-eem.1809 (e)" + "MacMenubarPlugin VMMaker.oscog-eem.1975 (e)" #endif ; @@ -526,7 +526,7 @@ primitiveDisposeMenuBar(void) if (failed()) { return null; } - menuBarHandle = ((Handle) (positive32BitValueOf(menuHandleOop))); + menuBarHandle = ((Handle) (positiveMachineIntegerValueOf(menuHandleOop))); # if TARGET_API_MAC_CARBON DisposeMenuBar(menuBarHandle); diff --git a/src/vm/cogit.h b/src/vm/cogit.h index 3db328e618..9e43370f18 100644 --- a/src/vm/cogit.h +++ b/src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/src/vm/cogitARMv5.c b/src/vm/cogitARMv5.c index 7931aa1606..740435f6e4 100644 --- a/src/vm/cogitARMv5.c +++ b/src/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -700,7 +700,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); -static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1237,7 +1237,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -2478,7 +2477,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - sqInt instr; + usqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -11255,7 +11254,7 @@ gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -23940,7 +23939,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -24032,7 +24030,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/src/vm/cogitIA32.c b/src/vm/cogitIA32.c index a5dcc4d970..b4a71bf638 100644 --- a/src/vm/cogitIA32.c +++ b/src/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -688,7 +688,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1199,7 +1199,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -6461,12 +6460,13 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* Rewrite the short jump instruction to jump to a new cpic case target. */ +/* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) { - usqInt callDistance; + sqInt callDistance; callDistance = jumpTargetAddress - addressFollowingJump; assert((SQABS(callDistance)) < 128); @@ -9832,12 +9832,12 @@ static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress) { unsigned char annotation; - usqInt delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqInt location; - usqInt mapEntry; + sqInt location; + sqInt mapEntry; sqInt maxDelta; usqInt mcpc; @@ -10956,7 +10956,7 @@ gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -22305,7 +22305,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -22397,7 +22396,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/src/vm/cogitMIPSEL.c b/src/vm/cogitMIPSEL.c index 1b0e21e203..ab2c4ad424 100644 --- a/src/vm/cogitMIPSEL.c +++ b/src/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGenerator VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -630,7 +630,7 @@ static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg); static AbstractInstruction * NoDbgRegParms gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg); -static sqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod); static sqInt NoDbgRegParms mapForperformUntilarg(CogMethod *cogMethod, sqInt (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg); static sqInt NoDbgRegParms mapObjectReferencesInClosedPIC(CogMethod *cPIC); static void mapObjectReferencesInGeneratedRuntime(void); @@ -1342,7 +1342,6 @@ static sqInt expectedFPAlignment; static sqInt expectedSPAlignment; static sqInt extA; static sqInt extB; -static sqInt extBFirstZero; static sqInt externalPrimCallOffsets[MaxNumArgs + 1]; static sqInt externalPrimJumpOffsets[MaxNumArgs + 1]; static sqInt externalSetPrimOffsets[MaxNumArgs + 1]; @@ -4244,7 +4243,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC) { - usqInt entryPoint; + sqInt entryPoint; sqInt followingAddress; sqInt i; sqInt methods[MaxCPICCases]; @@ -6247,7 +6246,7 @@ gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) /* Answer the address of the null byte at the end of the method map. */ /* Cogit>>#mapEndFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms mapEndFor(CogMethod *cogMethod) { usqInt end; @@ -7855,7 +7854,7 @@ static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC) { sqInt callDelta; - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; sqInt refDelta; @@ -13365,7 +13364,7 @@ relocateJumpLongConditionalBeforeFollowingAddressby(AbstractInstruction * self_i static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta) { - usqInt newValue; + sqInt newValue; usqInt oldValue; if (((opcodeAtAddress(self_in_relocateMethodReferenceBeforeAddressby, pc - 8)) == ADDIU) @@ -21721,7 +21720,6 @@ scanBlock(BlockStart *blockStart) pc = (blockStart->startpc); end = ((blockStart->startpc)) + ((blockStart->span)); framelessStackDelta = (nExts = (extA = (extB = 0))); - extBFirstZero = 0; pushingNils = 1; while (pc < end) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; @@ -21813,7 +21811,6 @@ scanMethod(void) } pc = (latestContinuation = initialPC); numBlocks = (framelessStackDelta = (nExts = (extA = (extB = 0)))); - extBFirstZero = 0; while (pc <= endPC) { byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); diff --git a/src/vm/cointerp.c b/src/vm/cointerp.c index 09878b8a98..155786fb03 100644 --- a/src/vm/cointerp.c +++ b/src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1508,7 +1508,6 @@ _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; _iss unsigned long byteCount; -_iss sqInt extBFirstZero; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; @@ -2145,7 +2144,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2269,6 +2268,7 @@ interpret(void) currentBytecode = byteAtPointer(++localIP); /* begin initExtensions */ + extA = (extB = 0); while (1) { bytecodeDispatchDebugHook(); @@ -13912,7 +13912,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -20516,13 +20516,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -31002,7 +31004,7 @@ clone(sqInt obj) sqInt extraHdrBytes; usqInt fromIndex; usqInt hash; - sqInt header; + usqInt header; sqInt header1; usqInt lastFrom; sqInt newChunk; @@ -31709,7 +31711,7 @@ eeInstantiateSmallClassnumSlots(sqInt classPointer, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; int hdrSize; - sqInt header1; + usqInt header1; sqInt header2; usqInt newChunk; usqInt newFreeStart; diff --git a/src/vm/cointerp.h b/src/vm/cointerp.h index 97c892d672..45568411b7 100644 --- a/src/vm/cointerp.h +++ b/src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/src/vm/cointerpmt.c b/src/vm/cointerpmt.c index 305dcb57fa..c78575ef31 100644 --- a/src/vm/cointerpmt.c +++ b/src/vm/cointerpmt.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreterMT VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreterMT VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -940,9 +940,9 @@ extern void fullGC(void); static usqInt NoDbgRegParms fwdTableInit(sqInt blkSize); static usqInt NoDbgRegParms fwdTableSize(sqInt blkSize); static usqInt imageSegmentVersion(void); -static usqInt incCompBody(void); +static sqInt incCompBody(void); static sqInt incCompMakeFwd(void); -static usqInt NoDbgRegParms incCompMove(sqInt bytesFreed); +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed); extern void incrementalGC(void); static void NoDbgRegParms initializeMemoryFirstFree(sqInt firstFree); static void NoDbgRegParms initializeObjectMemory(sqInt bytesToShift); @@ -1605,7 +1605,6 @@ _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; _iss unsigned long byteCount; -_iss sqInt extBFirstZero; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; @@ -2243,7 +2242,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; sqInt willNotThreadWarnCount; @@ -2369,6 +2368,7 @@ interpret(void) currentBytecode = byteAtPointer(++localIP); /* begin initExtensions */ + extA = (extB = 0); while (1) { bytecodeDispatchDebugHook(); @@ -11195,7 +11195,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -22947,13 +22947,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -33559,14 +33561,14 @@ eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; usqInt end; sqInt fillWord; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; @@ -33723,7 +33725,7 @@ eeInstantiateClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt byteSize; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -33826,12 +33828,12 @@ eeInstantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -34041,7 +34043,7 @@ static sqInt NoDbgRegParms eeInstantiateSmallClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; - usqInt header1; + sqInt header1; usqInt newChunk; usqInt newFreeStart; sqInt newObj; @@ -34515,7 +34517,7 @@ imageSegmentVersion(void) */ /* NewObjectMemory>>#incCompBody */ -static usqInt +static sqInt incCompBody(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToBeFreed; @@ -34640,7 +34642,7 @@ incCompMakeFwd(void) free space bubble up to the end of memory. */ /* NewObjectMemory>>#incCompMove: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToMove; @@ -39252,7 +39254,7 @@ instantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt bm1; sqInt byteSize; sqInt byteSize1; - usqInt cClass; + sqInt cClass; sqInt classFormat; sqInt classOop; usqInt end; @@ -39261,7 +39263,7 @@ instantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt format; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; diff --git a/src/vm/cointerpmt.h b/src/vm/cointerpmt.h index 887afcdabc..f32c36772f 100644 --- a/src/vm/cointerpmt.h +++ b/src/vm/cointerpmt.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ diff --git a/src/vm/gcc3x-cointerp.c b/src/vm/gcc3x-cointerp.c index b7303ebcf6..850dcb4b66 100644 --- a/src/vm/gcc3x-cointerp.c +++ b/src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1511,7 +1511,6 @@ _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; _iss unsigned long byteCount; -_iss sqInt extBFirstZero; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; @@ -2148,7 +2147,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -2278,6 +2277,7 @@ interpret(void) currentBytecode = byteAtPointer(++localIP); /* begin initExtensions */ + extA = (extB = 0); while (1) { bytecodeDispatchDebugHook(); @@ -13921,7 +13921,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -20525,13 +20525,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -31011,7 +31013,7 @@ clone(sqInt obj) sqInt extraHdrBytes; usqInt fromIndex; usqInt hash; - sqInt header; + usqInt header; sqInt header1; usqInt lastFrom; sqInt newChunk; @@ -31718,7 +31720,7 @@ eeInstantiateSmallClassnumSlots(sqInt classPointer, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; int hdrSize; - sqInt header1; + usqInt header1; sqInt header2; usqInt newChunk; usqInt newFreeStart; diff --git a/src/vm/gcc3x-cointerpmt.c b/src/vm/gcc3x-cointerpmt.c index f5abf671ac..e278bb6fa4 100644 --- a/src/vm/gcc3x-cointerpmt.c +++ b/src/vm/gcc3x-cointerpmt.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - CoInterpreterMT VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CoInterpreterMT VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -943,9 +943,9 @@ extern void fullGC(void); static usqInt NoDbgRegParms fwdTableInit(sqInt blkSize); static usqInt NoDbgRegParms fwdTableSize(sqInt blkSize); static usqInt imageSegmentVersion(void); -static usqInt incCompBody(void); +static sqInt incCompBody(void); static sqInt incCompMakeFwd(void); -static usqInt NoDbgRegParms incCompMove(sqInt bytesFreed); +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed); extern void incrementalGC(void); static void NoDbgRegParms initializeMemoryFirstFree(sqInt firstFree); static void NoDbgRegParms initializeObjectMemory(sqInt bytesToShift); @@ -1608,7 +1608,6 @@ _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; _iss unsigned long byteCount; -_iss sqInt extBFirstZero; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; @@ -2246,7 +2245,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.1975]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; sqInt willNotThreadWarnCount; @@ -2378,6 +2377,7 @@ interpret(void) currentBytecode = byteAtPointer(++localIP); /* begin initExtensions */ + extA = (extB = 0); while (1) { bytecodeDispatchDebugHook(); @@ -11204,7 +11204,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -22956,13 +22956,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; @@ -33568,14 +33570,14 @@ eeInstantiateAndInitializeClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; usqInt end; sqInt fillWord; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; @@ -33732,7 +33734,7 @@ eeInstantiateClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt byteSize; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -33835,12 +33837,12 @@ eeInstantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt binc; sqInt bm1; sqInt byteSize; - usqInt cClass; + sqInt cClass; sqInt classFormat; sqInt format; usqInt hash; int hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt newChunk; @@ -34050,7 +34052,7 @@ static sqInt NoDbgRegParms eeInstantiateSmallClassIndexformatnumSlots(sqInt compactClassIndex, sqInt objFormat, sqInt numSlots) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt hash; - usqInt header1; + sqInt header1; usqInt newChunk; usqInt newFreeStart; sqInt newObj; @@ -34524,7 +34526,7 @@ imageSegmentVersion(void) */ /* NewObjectMemory>>#incCompBody */ -static usqInt +static sqInt incCompBody(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToBeFreed; @@ -34649,7 +34651,7 @@ incCompMakeFwd(void) free space bubble up to the end of memory. */ /* NewObjectMemory>>#incCompMove: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms incCompMove(sqInt bytesFreed) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bytesToMove; @@ -39261,7 +39263,7 @@ instantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt bm1; sqInt byteSize; sqInt byteSize1; - usqInt cClass; + sqInt cClass; sqInt classFormat; sqInt classOop; usqInt end; @@ -39270,7 +39272,7 @@ instantiateClassindexableSize(sqInt classPointer, sqInt size) sqInt format; usqInt hash; sqInt hdrSize; - usqInt header1; + sqInt header1; sqInt header2; sqInt header3; usqInt i; diff --git a/stacksrc/vm/gcc3x-interp.c b/stacksrc/vm/gcc3x-interp.c index 8d77934cbc..8e293bad67 100644 --- a/stacksrc/vm/gcc3x-interp.c +++ b/stacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1282,7 +1282,6 @@ _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; _iss unsigned long byteCount; -_iss sqInt extBFirstZero; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; @@ -1913,7 +1912,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1975]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2011,6 +2010,7 @@ interpret(void) currentBytecode = byteAtPointer(++localIP); /* begin initExtensions */ + extA = (extB = 0); while (1) { bytecodeDispatchDebugHook(); @@ -11026,13 +11026,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0; diff --git a/stacksrc/vm/interp.c b/stacksrc/vm/interp.c index c906bbcdd4..22d195aa4e 100644 --- a/stacksrc/vm/interp.c +++ b/stacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 from - StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 + StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1972 uuid: 0e6a54ad-d62f-4b69-9f0d-7b66f8350984 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1975 uuid: 76250913-236f-47e0-832c-27b05d488807 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -1279,7 +1279,6 @@ _iss usqInt suspendedMethods[MaxJumpBuf + 1 /* 33 */]; _iss sqInt weakRoots[WeakRootTableSize + 1 /* 2626 */]; _iss jmp_buf jmpBuf[MaxJumpBuf + 1 /* 33 */]; _iss unsigned long byteCount; -_iss sqInt extBFirstZero; _iss sqInt interruptCheckCounter; _iss sqInt lowcodeCalloutState; _iss char * nativeFramePointer; @@ -1910,7 +1909,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1972]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1975]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -2002,6 +2001,7 @@ interpret(void) currentBytecode = byteAtPointer(++localIP); /* begin initExtensions */ + extA = (extB = 0); while (1) { bytecodeDispatchDebugHook(); @@ -11017,13 +11017,15 @@ primitiveClockLogAddresses(void) sqInt oop1; sqInt oop2; sqInt result; - int runInNOut; + sqInt runInNOut; char *sp; sqInt uidx; void *usecs; sqInt v1; sqInt v2; + + /* bypass type inference which would deduce int */ midx = 0; msecs = 0; uidx = 0;