Author: eliot Date: 2012-02-20 19:08:12 -0800 (Mon, 20 Feb 2012) New Revision: 2534
Modified: branches/Cog/nscogsrc/vm/cogit.c branches/Cog/nscogsrc/vm/cogit.h branches/Cog/nscogsrc/vm/cogmethod.h branches/Cog/nscogsrc/vm/cointerp.c branches/Cog/nscogsrc/vm/cointerp.h branches/Cog/nscogsrc/vm/gcc3x-cointerp.c branches/Cog/nscogsrc/vm/interp.h branches/Cog/nscogsrc/vm/vmCallback.h branches/Cog/platforms/Cross/vm/sqSCCSVersion.h branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c branches/Cog/src/vm/cogit.c branches/Cog/src/vm/cogit.h branches/Cog/src/vm/cogmethod.h branches/Cog/src/vm/cointerp.c branches/Cog/src/vm/cointerp.h branches/Cog/src/vm/cointerpmt.c branches/Cog/src/vm/cointerpmt.h branches/Cog/src/vm/gcc3x-cointerp.c branches/Cog/src/vm/gcc3x-cointerpmt.c branches/Cog/src/vm/interp.h branches/Cog/src/vm/vmCallback.h branches/Cog/stackbuild/macbuild/CoreVM.xcodeproj/project.pbxproj branches/Cog/stackbuild/macbuild/CroquetPlugin/CroquetPlugin.xcodeproj/project.pbxproj branches/Cog/stackbuild/macbuild/FloatArrayPlugin/FloatArrayPlugin.xcodeproj/project.pbxproj branches/Cog/stackbuild/macbuild/FloatMathPlugin/FloatMathPlugin.xcodeproj/project.pbxproj branches/Cog/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj branches/Cog/stackbuild/macbuild/SqueakFFIPrims/SqueakFFI.xcodeproj/project.pbxproj branches/Cog/stackbuild/macbuild/makevm branches/Cog/stacksrc/vm/gcc3x-interp.c branches/Cog/stacksrc/vm/interp.c branches/Cog/stacksrc/vm/interp.h branches/Cog/stacksrc/vm/vmCallback.h Log: Support for multiple bytecode sets. The sign bit of a method's header can select an alternative bytecode set. This is implemented by adding 256 to currentBytecode when dispatching. The overhead is avoioded for slow machines using macrology. But in tests on a fast MacBook Pro adding the offset can actually be faster because other effects dominate dispatch performance on modern machines (e.g. code placement).
Enough of a working stack build for performance measurment.
Fix the SoundGenerationPlugin.
Modified: branches/Cog/nscogsrc/vm/cogit.c =================================================================== --- branches/Cog/nscogsrc/vm/cogit.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/cogit.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGenerator VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - StackToRegisterMappingCogit VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + StackToRegisterMappingCogit VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__cogitBuildInfo = __buildInfo;
@@ -295,6 +295,7 @@ #define MoveRXwrR 47 #define MoveXbrRR 54 #define MoveXwrRR 46 +#define MULTIPLEBYTECODESETS 0 #define MulRdRd 99 #define NegateR 68 #define Nop 8 @@ -3274,6 +3275,9 @@
# endif /* NewspeakVM */
+ if (methodUsesAlternateBytecodeSet(aMethodObj)) { + return null; + } methodObj = aMethodObj; cogMethod = compileCogMethod(aSelectorOop); if ((((((sqInt)cogMethod)) >= MaxNegativeErrorCode) && ((((sqInt)cogMethod)) <= -1))) {
Modified: branches/Cog/nscogsrc/vm/cogit.h =================================================================== --- branches/Cog/nscogsrc/vm/cogit.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/cogit.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGenerator VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
Modified: branches/Cog/nscogsrc/vm/cogmethod.h =================================================================== --- branches/Cog/nscogsrc/vm/cogmethod.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/cogmethod.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGenerator VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
typedef struct {
Modified: branches/Cog/nscogsrc/vm/cointerp.c =================================================================== --- branches/Cog/nscogsrc/vm/cointerp.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/cointerp.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -246,6 +246,7 @@ #define MillisecondClockMask 0x1FFFFFFF #define MinBackwardJumpCountForCompile 10 #define MixinIndex 3 +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -682,6 +683,7 @@ sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); static sqInt methodWithHeaderShouldBeCogged(sqInt methodHeader); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); static CogBlockMethod * mframeCogMethod(char *theFP); @@ -1155,8 +1157,8 @@ _iss sqInt specialObjectsOop; _iss StackPage * stackPage; _iss sqInt nilObj; +_iss usqInt method; _iss usqInt instructionPointer; -_iss usqInt method; _iss sqInt argumentCount; _iss usqInt freeStart; _iss usqInt newMethod; @@ -1305,6 +1307,7 @@ #endif static usqInt heapBase; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 jmp_buf reenterInterpreter; /* private export */; sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt inIOProcessEvents; @@ -1902,7 +1905,7 @@ /* 575 */ (void (*)(void))0, 0 }; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.144"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.148"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */; volatile int sendTrace;
@@ -1977,10 +1980,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { case 0: /* pushReceiverVariableBytecode */ { @@ -4291,6 +4291,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4503,6 +4512,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(localSP, localReturnValue); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -4540,6 +4558,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -5200,6 +5227,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ longAtPointerput((localSP -= BytesPerWord), GIV(nilObj)); /* begin internalPush: */ @@ -8870,6 +8906,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp4; @@ -10205,6 +10250,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(GIV(stackPointer), returnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, GIV(framePointer))); siglongjmp(reenterInterpreter, ReturnToInterpreter); @@ -10906,6 +10960,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(longAt(GIV(framePointer) + FoxIFSavedIP), GIV(framePointer), GIV(stackPointer), 1); GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); /* begin push: */ @@ -11255,7 +11318,6 @@ void ceStackOverflow(sqInt contextSwitchIfNotNil) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt aMethodObj; sqInt cesoRetAddr; CogBlockMethod *cogMethod; sqInt switched; @@ -11270,10 +11332,7 @@ assert((cesoRetAddr - (abortOffset())) == (((sqInt)(asCogHomeMethod(cogMethod))))); GIV(instructionPointer) = (((sqInt)cogMethod)) + ((cogMethod->stackCheckOffset)); assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 0); - /* begin setMethod: */ - aMethodObj = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); - assert((((usqInt)aMethodObj)) >= (startOfMemory())); - GIV(method) = aMethodObj; + GIV(method) = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); switched = handleStackOverflowOrEventAllowContextSwitch(contextSwitchIfNotNil != 0); returnToExecutivepostContextSwitch(0, switched); error("should not be reached"); @@ -14805,6 +14864,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); } @@ -18407,9 +18475,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ - assert((((usqInt)GIV(nilObj))) >= (startOfMemory())); GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -18746,6 +18818,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20368,6 +20449,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20997,6 +21087,15 @@ aMethodObj = remap(GIV(method)); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (mapInstructionPointer) { GIV(instructionPointer) += GIV(method); } @@ -22421,6 +22520,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((headerOf(aMethodObj)) >> 1)) < 0; +} + + /* At the moment jit any method with less than N literals, where N defaults to 60. See e.g. SimpleStackBasedCogit class>>initialize. @@ -25696,6 +25804,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -25937,6 +26054,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(0); @@ -26212,6 +26338,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -32070,6 +32205,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -33626,6 +33770,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -37729,6 +37882,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -41070,6 +41232,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + fullyInInterpreter = inInterpreter; if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = ((usqInt)(longAt(GIV(framePointer) + FoxIFSavedIP))); @@ -41113,6 +41284,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 1); if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); @@ -41537,6 +41717,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -41761,6 +41950,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -42870,6 +43068,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -44700,6 +44907,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ assertValidExecutionPointersimbar(((usqInt)(longAt(GIV(stackPointer)))), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < heapBase));
Modified: branches/Cog/nscogsrc/vm/cointerp.h =================================================================== --- branches/Cog/nscogsrc/vm/cointerp.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/cointerp.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
@@ -113,6 +113,7 @@ sqInt methodHasCogMethod(sqInt aMethodOop); sqInt methodPrimitiveIndex(void); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); CogMethod * mframeHomeMethodExport(void); CogMethod * mframeHomeMethod(char *theFP); @@ -198,6 +199,7 @@ /*** Global Variables ***/ char * breakSelector; sqInt breakSelectorLength ; +#define bytecodeSetSelector 0; sqInt checkForLeaks; sqInt deferDisplayUpdates; sqInt desiredCogCodeSize;
Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -249,6 +249,7 @@ #define MillisecondClockMask 0x1FFFFFFF #define MinBackwardJumpCountForCompile 10 #define MixinIndex 3 +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -685,6 +686,7 @@ sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); static sqInt methodWithHeaderShouldBeCogged(sqInt methodHeader); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); static CogBlockMethod * mframeCogMethod(char *theFP); @@ -1158,8 +1160,8 @@ _iss sqInt specialObjectsOop; _iss StackPage * stackPage; _iss sqInt nilObj; +_iss usqInt method; _iss usqInt instructionPointer; -_iss usqInt method; _iss sqInt argumentCount; _iss usqInt freeStart; _iss usqInt newMethod; @@ -1308,6 +1310,7 @@ #endif static usqInt heapBase; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 jmp_buf reenterInterpreter; /* private export */; sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt inIOProcessEvents; @@ -1905,7 +1908,7 @@ /* 575 */ (void (*)(void))0, 0 }; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.144"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.148"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */; volatile int sendTrace;
@@ -1981,10 +1984,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { CASE(0) /* pushReceiverVariableBytecode */ { @@ -4295,6 +4295,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4507,6 +4516,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(localSP, localReturnValue); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -4544,6 +4562,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -5204,6 +5231,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ longAtPointerput((localSP -= BytesPerWord), GIV(nilObj)); /* begin internalPush: */ @@ -8874,6 +8910,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp4; @@ -10209,6 +10254,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(GIV(stackPointer), returnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, GIV(framePointer))); siglongjmp(reenterInterpreter, ReturnToInterpreter); @@ -10910,6 +10964,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(longAt(GIV(framePointer) + FoxIFSavedIP), GIV(framePointer), GIV(stackPointer), 1); GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); /* begin push: */ @@ -11259,7 +11322,6 @@ void ceStackOverflow(sqInt contextSwitchIfNotNil) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt aMethodObj; sqInt cesoRetAddr; CogBlockMethod *cogMethod; sqInt switched; @@ -11274,10 +11336,7 @@ assert((cesoRetAddr - (abortOffset())) == (((sqInt)(asCogHomeMethod(cogMethod))))); GIV(instructionPointer) = (((sqInt)cogMethod)) + ((cogMethod->stackCheckOffset)); assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 0); - /* begin setMethod: */ - aMethodObj = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); - assert((((usqInt)aMethodObj)) >= (startOfMemory())); - GIV(method) = aMethodObj; + GIV(method) = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); switched = handleStackOverflowOrEventAllowContextSwitch(contextSwitchIfNotNil != 0); returnToExecutivepostContextSwitch(0, switched); error("should not be reached"); @@ -14809,6 +14868,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); } @@ -18411,9 +18479,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ - assert((((usqInt)GIV(nilObj))) >= (startOfMemory())); GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -18750,6 +18822,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20372,6 +20453,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -21001,6 +21091,15 @@ aMethodObj = remap(GIV(method)); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (mapInstructionPointer) { GIV(instructionPointer) += GIV(method); } @@ -22425,6 +22524,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((headerOf(aMethodObj)) >> 1)) < 0; +} + + /* At the moment jit any method with less than N literals, where N defaults to 60. See e.g. SimpleStackBasedCogit class>>initialize. @@ -25700,6 +25808,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -25941,6 +26058,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(0); @@ -26216,6 +26342,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -32074,6 +32209,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -33630,6 +33774,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -37733,6 +37886,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -41074,6 +41236,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + fullyInInterpreter = inInterpreter; if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = ((usqInt)(longAt(GIV(framePointer) + FoxIFSavedIP))); @@ -41117,6 +41288,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 1); if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); @@ -41541,6 +41721,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -41765,6 +41954,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -42874,6 +43072,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -44704,6 +44911,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ assertValidExecutionPointersimbar(((usqInt)(longAt(GIV(stackPointer)))), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < heapBase));
Modified: branches/Cog/nscogsrc/vm/interp.h =================================================================== --- branches/Cog/nscogsrc/vm/interp.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/interp.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
#define VM_PROXY_MAJOR 1
Modified: branches/Cog/nscogsrc/vm/vmCallback.h =================================================================== --- branches/Cog/nscogsrc/vm/vmCallback.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/nscogsrc/vm/vmCallback.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
#define VM_CALLBACK_INC 1
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Sat Feb 18 14:43:17 PST 2012 + Mon Feb 20 19:06:20 PST 2012
Modified: branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c =================================================================== --- branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - VMPluginCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + VMPluginCodeGenerator VMMaker.oscog-eem.145 uuid: 7f3d6fd8-ce44-45ac-82f8-d0ed70d6f188 from - SoundGenerationPlugin VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + SoundGenerationPlugin VMMaker.oscog-eem.145 uuid: 7f3d6fd8-ce44-45ac-82f8-d0ed70d6f188 */ -static char __buildInfo[] = "SoundGenerationPlugin VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "SoundGenerationPlugin VMMaker.oscog-eem.145 uuid: 7f3d6fd8-ce44-45ac-82f8-d0ed70d6f188 " __DATE__ ;
@@ -75,9 +75,9 @@ struct VirtualMachine* interpreterProxy; static const char *moduleName = #ifdef SQUEAK_BUILTIN_PLUGIN - "SoundGenerationPlugin VMMaker.oscog-eem.144 (i)" + "SoundGenerationPlugin VMMaker.oscog-eem.145 (i)" #else - "SoundGenerationPlugin VMMaker.oscog-eem.144 (e)" + "SoundGenerationPlugin VMMaker.oscog-eem.145 (e)" #endif ;
@@ -88,15 +88,10 @@ static sqInt halt(void); static sqInt msg(char *s); EXPORT(sqInt) primitiveApplyReverb(void); -EXPORT(sqInt) primitiveFMSoundMix(void); EXPORT(sqInt) primitiveMixFMSound(void); EXPORT(sqInt) primitiveMixLoopedSampledSound(void); EXPORT(sqInt) primitiveMixPluckedSound(void); EXPORT(sqInt) primitiveMixSampledSound(void); -EXPORT(sqInt) primitiveOldSampledSoundMix(void); -EXPORT(sqInt) primitivePluckedSoundMix(void); -EXPORT(sqInt) primitiveSampledSoundMix(void); -EXPORT(sqInt) primitiveWaveTableSoundMix(void); EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);
@@ -217,13 +212,7 @@ pop(3); }
-EXPORT(sqInt) -primitiveFMSoundMix(void) -{ - return primFMSoundmixSampleCountintostartingAtpan(); -}
- /* Play samples from a wave table by stepping a fixed amount through the table on every sample. The table index and increment are scaled to allow fractional increments for greater pitch accuracy. @@ -741,31 +730,7 @@ pop(5); }
-EXPORT(sqInt) -primitiveOldSampledSoundMix(void) -{ - return oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol(); -}
-EXPORT(sqInt) -primitivePluckedSoundMix(void) -{ - return primPluckedSoundmixSampleCountintostartingAtpan(); -} - -EXPORT(sqInt) -primitiveSampledSoundMix(void) -{ - return primSampledSoundmixSampleCountintostartingAtpan(); -} - -EXPORT(sqInt) -primitiveWaveTableSoundMix(void) -{ - return primWaveTableSoundmixSampleCountintostartingAtpan(); -} - - /* Note: This is coded so that is can be run from Squeak. */
EXPORT(sqInt) @@ -788,15 +753,10 @@ void* SoundGenerationPlugin_exports[][3] = { {"SoundGenerationPlugin", "getModuleName", (void*)getModuleName}, {"SoundGenerationPlugin", "primitiveApplyReverb", (void*)primitiveApplyReverb}, - {"SoundGenerationPlugin", "primitiveFMSoundMix", (void*)primitiveFMSoundMix}, {"SoundGenerationPlugin", "primitiveMixFMSound", (void*)primitiveMixFMSound}, {"SoundGenerationPlugin", "primitiveMixLoopedSampledSound", (void*)primitiveMixLoopedSampledSound}, {"SoundGenerationPlugin", "primitiveMixPluckedSound", (void*)primitiveMixPluckedSound}, {"SoundGenerationPlugin", "primitiveMixSampledSound", (void*)primitiveMixSampledSound}, - {"SoundGenerationPlugin", "primitiveOldSampledSoundMix", (void*)primitiveOldSampledSoundMix}, - {"SoundGenerationPlugin", "primitivePluckedSoundMix", (void*)primitivePluckedSoundMix}, - {"SoundGenerationPlugin", "primitiveSampledSoundMix", (void*)primitiveSampledSoundMix}, - {"SoundGenerationPlugin", "primitiveWaveTableSoundMix", (void*)primitiveWaveTableSoundMix}, {"SoundGenerationPlugin", "setInterpreter", (void*)setInterpreter}, {NULL, NULL, NULL} };
Modified: branches/Cog/src/vm/cogit.c =================================================================== --- branches/Cog/src/vm/cogit.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cogit.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGenerator VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - StackToRegisterMappingCogit VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + StackToRegisterMappingCogit VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__cogitBuildInfo = __buildInfo;
@@ -295,6 +295,7 @@ #define MoveRXwrR 47 #define MoveXbrRR 54 #define MoveXwrRR 46 +#define MULTIPLEBYTECODESETS 0 #define MulRdRd 99 #define NegateR 68 #define Nop 8 @@ -3197,6 +3198,9 @@
# endif /* NewspeakVM */
+ if (methodUsesAlternateBytecodeSet(aMethodObj)) { + return null; + } methodObj = aMethodObj; cogMethod = compileCogMethod(aSelectorOop); if ((((((sqInt)cogMethod)) >= MaxNegativeErrorCode) && ((((sqInt)cogMethod)) <= -1))) {
Modified: branches/Cog/src/vm/cogit.h =================================================================== --- branches/Cog/src/vm/cogit.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cogit.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGenerator VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
Modified: branches/Cog/src/vm/cogmethod.h =================================================================== --- branches/Cog/src/vm/cogmethod.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cogmethod.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGenerator VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
typedef struct {
Modified: branches/Cog/src/vm/cointerp.c =================================================================== --- branches/Cog/src/vm/cointerp.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cointerp.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -243,6 +243,7 @@ #define MFrameSlots 5 #define MillisecondClockMask 0x1FFFFFFF #define MinBackwardJumpCountForCompile 10 +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -673,6 +674,7 @@ sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); static sqInt methodWithHeaderShouldBeCogged(sqInt methodHeader); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); static CogBlockMethod * mframeCogMethod(char *theFP); @@ -1144,11 +1146,11 @@ _iss char * framePointer; _iss sqInt specialObjectsOop; _iss StackPage * stackPage; +_iss usqInt method; _iss sqInt nilObj; _iss usqInt instructionPointer; _iss sqInt argumentCount; _iss usqInt freeStart; -_iss usqInt method; _iss usqInt newMethod; _iss sqInt messageSelector; _iss StackPage * pages; @@ -1295,6 +1297,7 @@ #endif static usqInt heapBase; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 jmp_buf reenterInterpreter; /* private export */; sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt inIOProcessEvents; @@ -1892,7 +1895,7 @@ /* 575 */ (void (*)(void))0, 0 }; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.144]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.148]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */; volatile int sendTrace;
@@ -1967,10 +1970,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { case 0: /* pushReceiverVariableBytecode */ { @@ -4281,6 +4281,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4493,6 +4502,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(localSP, localReturnValue); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -4530,6 +4548,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4974,6 +5001,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ longAtPointerput((localSP -= BytesPerWord), GIV(nilObj)); /* begin internalPush: */ @@ -8629,6 +8665,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp4; @@ -9964,6 +10009,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(GIV(stackPointer), returnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, GIV(framePointer))); siglongjmp(reenterInterpreter, ReturnToInterpreter); @@ -10526,6 +10580,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(longAt(GIV(framePointer) + FoxIFSavedIP), GIV(framePointer), GIV(stackPointer), 1); GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); /* begin push: */ @@ -10875,7 +10938,6 @@ void ceStackOverflow(sqInt contextSwitchIfNotNil) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt aMethodObj; sqInt cesoRetAddr; CogBlockMethod *cogMethod; sqInt switched; @@ -10890,10 +10952,7 @@ assert((cesoRetAddr - (abortOffset())) == (((sqInt)(asCogHomeMethod(cogMethod))))); GIV(instructionPointer) = (((sqInt)cogMethod)) + ((cogMethod->stackCheckOffset)); assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 0); - /* begin setMethod: */ - aMethodObj = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); - assert((((usqInt)aMethodObj)) >= (startOfMemory())); - GIV(method) = aMethodObj; + GIV(method) = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); switched = handleStackOverflowOrEventAllowContextSwitch(contextSwitchIfNotNil != 0); returnToExecutivepostContextSwitch(0, switched); error("should not be reached"); @@ -14425,6 +14484,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); } @@ -17737,9 +17805,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ - assert((((usqInt)GIV(nilObj))) >= (startOfMemory())); GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -18076,6 +18148,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -19692,6 +19773,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20321,6 +20411,15 @@ aMethodObj = remap(GIV(method)); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (mapInstructionPointer) { GIV(instructionPointer) += GIV(method); } @@ -21745,6 +21844,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((headerOf(aMethodObj)) >> 1)) < 0; +} + + /* At the moment jit any method with less than N literals, where N defaults to 60. See e.g. SimpleStackBasedCogit class>>initialize. @@ -25007,6 +25115,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -25248,6 +25365,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(0); @@ -25523,6 +25649,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -31381,6 +31516,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -32937,6 +33081,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -37040,6 +37193,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -40381,6 +40543,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + fullyInInterpreter = inInterpreter; if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = ((usqInt)(longAt(GIV(framePointer) + FoxIFSavedIP))); @@ -40424,6 +40595,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 1); if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); @@ -40848,6 +41028,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -41072,6 +41261,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -42181,6 +42379,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -44011,6 +44218,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ assertValidExecutionPointersimbar(((usqInt)(longAt(GIV(stackPointer)))), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < heapBase));
Modified: branches/Cog/src/vm/cointerp.h =================================================================== --- branches/Cog/src/vm/cointerp.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cointerp.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
@@ -113,6 +113,7 @@ sqInt methodHasCogMethod(sqInt aMethodOop); sqInt methodPrimitiveIndex(void); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); CogMethod * mframeHomeMethodExport(void); CogMethod * mframeHomeMethod(char *theFP); @@ -198,6 +199,7 @@ /*** Global Variables ***/ char * breakSelector; sqInt breakSelectorLength ; +#define bytecodeSetSelector 0; sqInt checkForLeaks; sqInt deferDisplayUpdates; sqInt desiredCogCodeSize;
Modified: branches/Cog/src/vm/cointerpmt.c =================================================================== --- branches/Cog/src/vm/cointerpmt.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cointerpmt.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - CoInterpreterMT VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CoInterpreterMT VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -274,6 +274,7 @@ #define MFrameSlots 5 #define MillisecondClockMask 0x1FFFFFFF #define MinBackwardJumpCountForCompile 10 +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -729,6 +730,7 @@ sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); static sqInt methodWithHeaderShouldBeCogged(sqInt methodHeader); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); static CogBlockMethod * mframeCogMethod(char *theFP); @@ -1227,10 +1229,10 @@ _iss sqInt specialObjectsOop; _iss StackPage * stackPage; _iss sqInt nilObj; +_iss usqInt method; _iss usqInt instructionPointer; _iss sqInt argumentCount; _iss usqInt freeStart; -_iss usqInt method; _iss usqInt newMethod; _iss usqInt youngStart; _iss sqInt messageSelector; @@ -1393,6 +1395,7 @@ #endif static usqInt heapBase; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 jmp_buf reenterInterpreter; /* private export */; sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt inIOProcessEvents; @@ -1991,7 +1994,7 @@ /* 575 */ (void (*)(void))0, 0 }; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); -const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.144]"; +const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.148]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */; volatile int sendTrace; sqInt willNotThreadWarnCount; @@ -2068,10 +2071,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { case 0: /* pushReceiverVariableBytecode */ { @@ -4382,6 +4382,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4594,6 +4603,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(localSP, localReturnValue); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -4631,6 +4649,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -5075,6 +5102,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ longAtPointerput((localSP -= BytesPerWord), GIV(nilObj)); /* begin internalPush: */ @@ -8730,6 +8766,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp4; @@ -10124,6 +10169,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(GIV(stackPointer), returnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, GIV(framePointer))); siglongjmp(reenterInterpreter, ReturnToInterpreter); @@ -10863,6 +10917,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(longAt(GIV(framePointer) + FoxIFSavedIP), GIV(framePointer), GIV(stackPointer), 1); GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); /* begin push: */ @@ -11212,7 +11275,6 @@ void ceStackOverflow(sqInt contextSwitchIfNotNil) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt aMethodObj; sqInt cesoRetAddr; CogBlockMethod *cogMethod; sqInt switched; @@ -11227,10 +11289,7 @@ assert((cesoRetAddr - (abortOffset())) == (((sqInt)(asCogHomeMethod(cogMethod))))); GIV(instructionPointer) = (((sqInt)cogMethod)) + ((cogMethod->stackCheckOffset)); assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 0); - /* begin setMethod: */ - aMethodObj = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); - assert((((usqInt)aMethodObj)) >= (startOfMemory())); - GIV(method) = aMethodObj; + GIV(method) = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); switched = handleStackOverflowOrEventAllowContextSwitch(contextSwitchIfNotNil != 0); returnToExecutivepostContextSwitch(0, switched); error("should not be reached"); @@ -14974,6 +15033,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); } @@ -15683,6 +15751,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ assertValidExecutionPointersimbar(((usqInt)(longAt(GIV(stackPointer)))), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < heapBase)); @@ -18420,9 +18497,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ - assert((((usqInt)GIV(nilObj))) >= (startOfMemory())); GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -18763,6 +18844,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20410,6 +20500,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -21046,6 +21145,15 @@ aMethodObj = remap(GIV(method)); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (mapInstructionPointer) { GIV(instructionPointer) += GIV(method); } @@ -22496,6 +22604,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((headerOf(aMethodObj)) >> 1)) < 0; +} + + /* At the moment jit any method with less than N literals, where N defaults to 60. See e.g. SimpleStackBasedCogit class>>initialize. @@ -26206,6 +26323,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -26447,6 +26573,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(0); @@ -26722,6 +26857,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -32580,6 +32724,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -34218,6 +34371,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -38357,6 +38519,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -41744,6 +41915,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + fullyInInterpreter = inInterpreter; if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = ((usqInt)(longAt(GIV(framePointer) + FoxIFSavedIP))); @@ -41829,6 +42009,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 1); if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); @@ -42258,6 +42447,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -42482,6 +42680,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -43599,6 +43806,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord;
Modified: branches/Cog/src/vm/cointerpmt.h =================================================================== --- branches/Cog/src/vm/cointerpmt.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/cointerpmt.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
@@ -115,6 +115,7 @@ sqInt methodHasCogMethod(sqInt aMethodOop); sqInt methodPrimitiveIndex(void); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); CogMethod * mframeHomeMethodExport(void); CogMethod * mframeHomeMethod(char *theFP); @@ -202,6 +203,7 @@ /*** Global Variables ***/ char * breakSelector; sqInt breakSelectorLength ; +#define bytecodeSetSelector 0; sqInt checkForLeaks; sqInt deferDisplayUpdates; sqInt desiredCogCodeSize;
Modified: branches/Cog/src/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/src/vm/gcc3x-cointerp.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/gcc3x-cointerp.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -246,6 +246,7 @@ #define MFrameSlots 5 #define MillisecondClockMask 0x1FFFFFFF #define MinBackwardJumpCountForCompile 10 +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -676,6 +677,7 @@ sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); static sqInt methodWithHeaderShouldBeCogged(sqInt methodHeader); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); static CogBlockMethod * mframeCogMethod(char *theFP); @@ -1147,11 +1149,11 @@ _iss char * framePointer; _iss sqInt specialObjectsOop; _iss StackPage * stackPage; +_iss usqInt method; _iss sqInt nilObj; _iss usqInt instructionPointer; _iss sqInt argumentCount; _iss usqInt freeStart; -_iss usqInt method; _iss usqInt newMethod; _iss sqInt messageSelector; _iss StackPage * pages; @@ -1298,6 +1300,7 @@ #endif static usqInt heapBase; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 jmp_buf reenterInterpreter; /* private export */; sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt inIOProcessEvents; @@ -1895,7 +1898,7 @@ /* 575 */ (void (*)(void))0, 0 }; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.144]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.148]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */; volatile int sendTrace;
@@ -1971,10 +1974,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { CASE(0) /* pushReceiverVariableBytecode */ { @@ -4285,6 +4285,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4497,6 +4506,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(localSP, localReturnValue); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -4534,6 +4552,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4978,6 +5005,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ longAtPointerput((localSP -= BytesPerWord), GIV(nilObj)); /* begin internalPush: */ @@ -8633,6 +8669,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp4; @@ -9968,6 +10013,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(GIV(stackPointer), returnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, GIV(framePointer))); siglongjmp(reenterInterpreter, ReturnToInterpreter); @@ -10530,6 +10584,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(longAt(GIV(framePointer) + FoxIFSavedIP), GIV(framePointer), GIV(stackPointer), 1); GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); /* begin push: */ @@ -10879,7 +10942,6 @@ void ceStackOverflow(sqInt contextSwitchIfNotNil) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt aMethodObj; sqInt cesoRetAddr; CogBlockMethod *cogMethod; sqInt switched; @@ -10894,10 +10956,7 @@ assert((cesoRetAddr - (abortOffset())) == (((sqInt)(asCogHomeMethod(cogMethod))))); GIV(instructionPointer) = (((sqInt)cogMethod)) + ((cogMethod->stackCheckOffset)); assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 0); - /* begin setMethod: */ - aMethodObj = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); - assert((((usqInt)aMethodObj)) >= (startOfMemory())); - GIV(method) = aMethodObj; + GIV(method) = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); switched = handleStackOverflowOrEventAllowContextSwitch(contextSwitchIfNotNil != 0); returnToExecutivepostContextSwitch(0, switched); error("should not be reached"); @@ -14429,6 +14488,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); } @@ -17741,9 +17809,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ - assert((((usqInt)GIV(nilObj))) >= (startOfMemory())); GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -18080,6 +18152,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -19696,6 +19777,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20325,6 +20415,15 @@ aMethodObj = remap(GIV(method)); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (mapInstructionPointer) { GIV(instructionPointer) += GIV(method); } @@ -21749,6 +21848,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((headerOf(aMethodObj)) >> 1)) < 0; +} + + /* At the moment jit any method with less than N literals, where N defaults to 60. See e.g. SimpleStackBasedCogit class>>initialize. @@ -25011,6 +25119,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -25252,6 +25369,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(0); @@ -25527,6 +25653,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -31385,6 +31520,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -32941,6 +33085,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -37044,6 +37197,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -40385,6 +40547,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + fullyInInterpreter = inInterpreter; if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = ((usqInt)(longAt(GIV(framePointer) + FoxIFSavedIP))); @@ -40428,6 +40599,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 1); if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); @@ -40852,6 +41032,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -41076,6 +41265,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -42185,6 +42383,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -44015,6 +44222,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ assertValidExecutionPointersimbar(((usqInt)(longAt(GIV(stackPointer)))), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < heapBase));
Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c =================================================================== --- branches/Cog/src/vm/gcc3x-cointerpmt.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/gcc3x-cointerpmt.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - CoInterpreterMT VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CoInterpreterMT VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -277,6 +277,7 @@ #define MFrameSlots 5 #define MillisecondClockMask 0x1FFFFFFF #define MinBackwardJumpCountForCompile 10 +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -732,6 +733,7 @@ sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); sqInt methodShouldBeCogged(sqInt aMethodObj); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); static sqInt methodWithHeaderShouldBeCogged(sqInt methodHeader); sqInt methodwithInitialPCHasErrorCode(sqInt methodObj, sqInt initialPC); static CogBlockMethod * mframeCogMethod(char *theFP); @@ -1230,10 +1232,10 @@ _iss sqInt specialObjectsOop; _iss StackPage * stackPage; _iss sqInt nilObj; +_iss usqInt method; _iss usqInt instructionPointer; _iss sqInt argumentCount; _iss usqInt freeStart; -_iss usqInt method; _iss usqInt newMethod; _iss usqInt youngStart; _iss sqInt messageSelector; @@ -1396,6 +1398,7 @@ #endif static usqInt heapBase; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 jmp_buf reenterInterpreter; /* private export */; sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt inIOProcessEvents; @@ -1994,7 +1997,7 @@ /* 575 */ (void (*)(void))0, 0 }; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); -const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.144]"; +const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.148]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */; volatile int sendTrace; sqInt willNotThreadWarnCount; @@ -2072,10 +2075,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { CASE(0) /* pushReceiverVariableBytecode */ { @@ -4386,6 +4386,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4598,6 +4607,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(localSP, localReturnValue); /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); @@ -4635,6 +4653,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(localFP + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -5079,6 +5106,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ longAtPointerput((localSP -= BytesPerWord), GIV(nilObj)); /* begin internalPush: */ @@ -8734,6 +8770,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp4 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp4; @@ -10128,6 +10173,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + longAtPointerput(GIV(stackPointer), returnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, GIV(framePointer))); siglongjmp(reenterInterpreter, ReturnToInterpreter); @@ -10867,6 +10921,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(longAt(GIV(framePointer) + FoxIFSavedIP), GIV(framePointer), GIV(stackPointer), 1); GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); /* begin push: */ @@ -11216,7 +11279,6 @@ void ceStackOverflow(sqInt contextSwitchIfNotNil) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt aMethodObj; sqInt cesoRetAddr; CogBlockMethod *cogMethod; sqInt switched; @@ -11231,10 +11293,7 @@ assert((cesoRetAddr - (abortOffset())) == (((sqInt)(asCogHomeMethod(cogMethod))))); GIV(instructionPointer) = (((sqInt)cogMethod)) + ((cogMethod->stackCheckOffset)); assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 0); - /* begin setMethod: */ - aMethodObj = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); - assert((((usqInt)aMethodObj)) >= (startOfMemory())); - GIV(method) = aMethodObj; + GIV(method) = (GIV(newMethod) = (GIV(messageSelector) = (GIV(lkupClass) = GIV(nilObj)))); switched = handleStackOverflowOrEventAllowContextSwitch(contextSwitchIfNotNil != 0); returnToExecutivepostContextSwitch(0, switched); error("should not be reached"); @@ -14978,6 +15037,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); } @@ -15687,6 +15755,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ assertValidExecutionPointersimbar(((usqInt)(longAt(GIV(stackPointer)))), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < heapBase)); @@ -18424,9 +18501,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ - assert((((usqInt)GIV(nilObj))) >= (startOfMemory())); GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -18767,6 +18848,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -20414,6 +20504,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -21050,6 +21149,15 @@ aMethodObj = remap(GIV(method)); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (mapInstructionPointer) { GIV(instructionPointer) += GIV(method); } @@ -22500,6 +22608,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((headerOf(aMethodObj)) >> 1)) < 0; +} + + /* At the moment jit any method with less than N literals, where N defaults to 60. See e.g. SimpleStackBasedCogit class>>initialize. @@ -26210,6 +26327,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -26451,6 +26577,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(0); @@ -26726,6 +26861,15 @@ /* begin setMethod: */ assert((((usqInt)theMethod)) >= (startOfMemory())); GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + switched = 0; if (GIV(stackPointer) < GIV(stackLimit)) { switched = handleStackOverflowOrEventAllowContextSwitch(1); @@ -32584,6 +32728,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -34222,6 +34375,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -38361,6 +38523,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -41748,6 +41919,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + fullyInInterpreter = inInterpreter; if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = ((usqInt)(longAt(GIV(framePointer) + FoxIFSavedIP))); @@ -41833,6 +42013,15 @@ /* begin setMethod: */ assert((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) >= (startOfMemory())); GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + assertValidExecutionPointersimbar(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), 1); if (GIV(instructionPointer) == (ceReturnToInterpreterPC())) { GIV(instructionPointer) = longAt(GIV(framePointer) + FoxIFSavedIP); @@ -42262,6 +42451,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -42486,6 +42684,15 @@ /* begin setMethod: */ assert((((usqInt)GIV(newMethod))) >= (startOfMemory())); GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); GIV(stackPointer) = sp31; @@ -43603,6 +43810,15 @@ aMethodObj = longAt(theFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((headerOf(GIV(method))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord;
Modified: branches/Cog/src/vm/interp.h =================================================================== --- branches/Cog/src/vm/interp.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/interp.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
#define VM_PROXY_MAJOR 1
Modified: branches/Cog/src/vm/vmCallback.h =================================================================== --- branches/Cog/src/vm/vmCallback.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/src/vm/vmCallback.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
#define VM_CALLBACK_INC 1
Modified: branches/Cog/stackbuild/macbuild/CoreVM.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/stackbuild/macbuild/CoreVM.xcodeproj/project.pbxproj 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/CoreVM.xcodeproj/project.pbxproj 2012-02-21 03:08:12 UTC (rev 2534) @@ -300,14 +300,14 @@ 9426FF1409F489D200ECEDDC /* pcre.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pcre.h; sourceTree = "<group>"; }; 9426FF1509F489D200ECEDDC /* rePlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = rePlugin.h; sourceTree = "<group>"; }; 9426FF1609F489D200ECEDDC /* study.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = study.c; sourceTree = "<group>"; }; - 944659E609BA835900BD3A71 /* sqUnixSerial.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixSerial.c; path = ../../../../unix/plugins/SerialPlugin/sqUnixSerial.c; sourceTree = "<group>"; }; + 944659E609BA835900BD3A71 /* sqUnixSerial.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixSerial.c; path = ../../../unix/plugins/SerialPlugin/sqUnixSerial.c; sourceTree = "<group>"; }; 94465A2909BA85EA00BD3A71 /* sqMacSerialPort.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = sqMacSerialPort.c; sourceTree = "<group>"; }; 944B5B5008F5C7A900611DF8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; 9454DFE603E1C93E00DA393B /* sqMacNSPlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = sqMacNSPlugin.c; sourceTree = "<group>"; }; 946DD776098FF9E3006BBA1E /* sqMacUnixFileInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacUnixFileInterface.h; sourceTree = "<group>"; }; 946DD777098FF9E3006BBA1E /* sqMacUnixFileInterface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacUnixFileInterface.c; sourceTree = "<group>"; }; - 946DD81E098FFFB6006BBA1E /* sqUnixAsynchFile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixAsynchFile.c; path = ../../../../unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c; sourceTree = "<group>"; }; - 946DD81F098FFFB6006BBA1E /* sqUnixAsynchFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqUnixAsynchFile.h; path = ../../../../unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.h; sourceTree = "<group>"; }; + 946DD81E098FFFB6006BBA1E /* sqUnixAsynchFile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixAsynchFile.c; path = ../../../unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c; sourceTree = "<group>"; }; + 946DD81F098FFFB6006BBA1E /* sqUnixAsynchFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqUnixAsynchFile.h; path = ../../../unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.h; sourceTree = "<group>"; }; 946DD91C099015C5006BBA1E /* sqMacImageIO.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = sqMacImageIO.c; sourceTree = "<group>"; }; 946DD91D099015C5006BBA1E /* sqMacImageIO.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqMacImageIO.h; sourceTree = "<group>"; }; 946DDA6D09902C5B006BBA1E /* sqMacOpenGL.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = sqMacOpenGL.c; sourceTree = "<group>"; };
Modified: branches/Cog/stackbuild/macbuild/CroquetPlugin/CroquetPlugin.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/stackbuild/macbuild/CroquetPlugin/CroquetPlugin.xcodeproj/project.pbxproj 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/CroquetPlugin/CroquetPlugin.xcodeproj/project.pbxproj 2012-02-21 03:08:12 UTC (rev 2534) @@ -28,13 +28,13 @@ 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; 8D01CCD20486CAD60068D4B7 /* CroquetPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CroquetPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - A271C7DD0CEB874D0014AC5E /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../src/vm/interp.h; sourceTree = SOURCE_ROOT; }; - A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; - A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; - A271C7E00CEB87BE0014AC5E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; - A271C7E10CEB87BE0014AC5E /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; - A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; - A295BF4C11922528003C5973 /* CroquetPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CroquetPlugin.c; path = ../../src/plugins/CroquetPlugin/CroquetPlugin.c; sourceTree = SOURCE_ROOT; }; + A271C7DD0CEB874D0014AC5E /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../stacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; }; + A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; + A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; + A271C7E00CEB87BE0014AC5E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; + A271C7E10CEB87BE0014AC5E /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; + A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; + A295BF4C11922528003C5973 /* CroquetPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CroquetPlugin.c; path = ../../../src/plugins/CroquetPlugin/CroquetPlugin.c; sourceTree = SOURCE_ROOT; }; A295BF4F11922556003C5973 /* CroquetPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CroquetPlugin.h; sourceTree = "<group>"; }; A295BF5311922556003C5973 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md5.h; sourceTree = "<group>"; }; A295BF5411922556003C5973 /* TriBoxStub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TriBoxStub.c; sourceTree = "<group>"; }; @@ -89,7 +89,7 @@ A295BF4C11922528003C5973 /* CroquetPlugin.c */, A271C7E00CEB87BE0014AC5E /* config.h */, A271C7E10CEB87BE0014AC5E /* sqConfig.h */, - A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */, + A271C7E20CEB87BE0014AC5E /* sq../PlatformSpecific.h */, A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */, A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */, A271C7DD0CEB874D0014AC5E /* interp.h */, @@ -113,7 +113,7 @@ A295BF5411922556003C5973 /* TriBoxStub.c */, ); name = CroquetPlugin; - path = ../../platforms/Cross/plugins/CroquetPlugin; + path = ../../../platforms/Cross/plugins/CroquetPlugin; sourceTree = SOURCE_ROOT; }; A295BF7011922634003C5973 /* CroquetPlugin */ = { @@ -123,7 +123,7 @@ A295BF7211922634003C5973 /* sqMacCroquet.h */, ); name = CroquetPlugin; - path = "../../platforms/Mac OS/plugins/CroquetPlugin"; + path = "../../../platforms/Mac OS/plugins/CroquetPlugin"; sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */
Modified: branches/Cog/stackbuild/macbuild/FloatArrayPlugin/FloatArrayPlugin.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/stackbuild/macbuild/FloatArrayPlugin/FloatArrayPlugin.xcodeproj/project.pbxproj 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/FloatArrayPlugin/FloatArrayPlugin.xcodeproj/project.pbxproj 2012-02-21 03:08:12 UTC (rev 2534) @@ -26,12 +26,12 @@ 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; 8D01CCD20486CAD60068D4B7 /* FloatArrayPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FloatArrayPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - A271C7DD0CEB874D0014AC5E /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../src/vm/interp.h; sourceTree = SOURCE_ROOT; }; - A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; - A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; - A271C7E00CEB87BE0014AC5E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; - A271C7E10CEB87BE0014AC5E /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; - A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; + A271C7DD0CEB874D0014AC5E /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../stacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; }; + A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; + A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; + A271C7E00CEB87BE0014AC5E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; + A271C7E10CEB87BE0014AC5E /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; + A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; A295BED6119216B8003C5973 /* FloatArrayPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FloatArrayPlugin.c; sourceTree = "<group>"; }; /* End PBXFileReference section */
@@ -102,7 +102,7 @@ A295BED6119216B8003C5973 /* FloatArrayPlugin.c */, ); name = FloatArrayPlugin; - path = ../../src/plugins/FloatArrayPlugin; + path = ../../../src/plugins/FloatArrayPlugin; sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */
Modified: branches/Cog/stackbuild/macbuild/FloatMathPlugin/FloatMathPlugin.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/stackbuild/macbuild/FloatMathPlugin/FloatMathPlugin.xcodeproj/project.pbxproj 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/FloatMathPlugin/FloatMathPlugin.xcodeproj/project.pbxproj 2012-02-21 03:08:12 UTC (rev 2534) @@ -60,12 +60,12 @@ 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; 8D01CCD20486CAD60068D4B7 /* FloatMathPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FloatMathPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - A271C7DD0CEB874D0014AC5E /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../src/vm/interp.h; sourceTree = SOURCE_ROOT; }; - A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; - A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; - A271C7E00CEB87BE0014AC5E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; - A271C7E10CEB87BE0014AC5E /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; - A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; + A271C7DD0CEB874D0014AC5E /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../stacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; }; + A271C7DE0CEB878E0014AC5E /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; + A271C7DF0CEB878E0014AC5E /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; + A271C7E00CEB87BE0014AC5E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; + A271C7E10CEB87BE0014AC5E /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; + A271C7E20CEB87BE0014AC5E /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; A271C7E40CEB87DD0014AC5E /* FloatMathPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FloatMathPlugin.c; sourceTree = "<group>"; }; A271C7E70CEB88460014AC5E /* acos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acos.c; sourceTree = "<group>"; }; A271C7E80CEB88460014AC5E /* acosh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acosh.c; sourceTree = "<group>"; }; @@ -181,7 +181,7 @@ A271C7E40CEB87DD0014AC5E /* FloatMathPlugin.c */, ); name = FloatMathPlugin; - path = ../../src/plugins/FloatMathPlugin; + path = ../../../src/plugins/FloatMathPlugin; sourceTree = SOURCE_ROOT; }; A271C7E60CEB88460014AC5E /* FloatMathPlugin */ = { @@ -227,7 +227,7 @@ A271C8680CEB88460014AC5E /* tanh.c */, ); name = FloatMathPlugin; - path = ../../platforms/Cross/plugins/FloatMathPlugin; + path = ../../../platforms/Cross/plugins/FloatMathPlugin; sourceTree = SOURCE_ROOT; }; A271C7F30CEB88460014AC5E /* fdlibm */ = {
Modified: branches/Cog/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj 2012-02-21 03:08:12 UTC (rev 2534) @@ -44,12 +44,12 @@ /* Begin PBXFileReference section */ 66DF6C8201D7DF7E00A80119 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 949199E209818612000FC37A /* Mpeg3Plugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Mpeg3Plugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - A2181BBF10814E0B00B8FC7A /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; - A2181BC010814E0B00B8FC7A /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; - A2181BC210814E4E00B8FC7A /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; - A2181BC310814E4E00B8FC7A /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; - A2181BC410814E7000B8FC7A /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../src/vm/interp.h; sourceTree = SOURCE_ROOT; }; - A2181BC510814EA000B8FC7A /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; + A2181BBF10814E0B00B8FC7A /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; + A2181BC010814E0B00B8FC7A /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; + A2181BC210814E4E00B8FC7A /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; + A2181BC310814E4E00B8FC7A /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; + A2181BC410814E7000B8FC7A /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../stacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; }; + A2181BC510814EA000B8FC7A /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; A2181BC810814EC700B8FC7A /* ac3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ac3.h; sourceTree = "<group>"; }; A2181BC910814EC700B8FC7A /* dct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dct.c; sourceTree = "<group>"; }; A2181BCA10814EC700B8FC7A /* header.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = header.c; sourceTree = "<group>"; }; @@ -102,10 +102,10 @@ A2181C0A10814EC700B8FC7A /* slice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slice.h; sourceTree = "<group>"; }; A2181C0B10814EC700B8FC7A /* vlc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vlc.c; sourceTree = "<group>"; }; A2181C0C10814EC700B8FC7A /* vlc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vlc.h; sourceTree = "<group>"; }; - A2181C401081506400B8FC7A /* sqMacFileBits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqMacFileBits.c; path = "../../platforms/Mac OS/plugins/Mpeg3Plugin/sqMacFileBits.c"; sourceTree = SOURCE_ROOT; }; - A2181C411081506400B8FC7A /* sqMacFileBits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMacFileBits.h; path = "../../platforms/Mac OS/plugins/Mpeg3Plugin/sqMacFileBits.h"; sourceTree = SOURCE_ROOT; }; + A2181C401081506400B8FC7A /* sqMacFileBits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqMacFileBits.c; path = "../../../platforms/Mac OS/plugins/Mpeg3Plugin/sqMacFileBits.c"; sourceTree = SOURCE_ROOT; }; + A2181C411081506400B8FC7A /* sqMacFileBits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMacFileBits.h; path = "../../../platforms/Mac OS/plugins/Mpeg3Plugin/sqMacFileBits.h"; sourceTree = SOURCE_ROOT; }; A2181C45108150C800B8FC7A /* Mpeg3Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Mpeg3Plugin.c; path = ../../src/plugins/Mpeg3Plugin/Mpeg3Plugin.c; sourceTree = SOURCE_ROOT; }; - A2181C491081511C00B8FC7A /* Mpeg3Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mpeg3Plugin.h; path = ../../platforms/Cross/plugins/Mpeg3Plugin/Mpeg3Plugin.h; sourceTree = SOURCE_ROOT; }; + A2181C491081511C00B8FC7A /* Mpeg3Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mpeg3Plugin.h; path = ../../../platforms/Cross/plugins/Mpeg3Plugin/Mpeg3Plugin.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ @@ -191,7 +191,7 @@ A2181BF610814EC700B8FC7A /* video */, ); name = libmpeg; - path = ../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg; + path = ../../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg; sourceTree = SOURCE_ROOT; }; A2181BC710814EC700B8FC7A /* audio */ = { @@ -342,7 +342,7 @@ 946BCE010959347500803517 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { - HEADER_SEARCH_PATHS = "../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg/**"; + HEADER_SEARCH_PATHS = "../../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg/**"; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; USER_HEADER_SEARCH_PATHS = ""; }; @@ -386,7 +386,7 @@ PKGINFO_FILE_CONTENTS = BNDLFAST; PREBINDING = NO; PRODUCT_NAME = Mpeg3Plugin; - USER_HEADER_SEARCH_PATHS = "../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg/**"; + USER_HEADER_SEARCH_PATHS = "../../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg/**"; WRAPPER_EXTENSION = bundle; ZERO_LINK = YES; }; @@ -413,7 +413,7 @@ ); PREBINDING = NO; PRODUCT_NAME = Mpeg3Plugin; - USER_HEADER_SEARCH_PATHS = "../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg/**"; + USER_HEADER_SEARCH_PATHS = "../../../platforms/Cross/plugins/Mpeg3Plugin/libmpeg/**"; WRAPPER_EXTENSION = bundle; }; name = Deployment;
Modified: branches/Cog/stackbuild/macbuild/SqueakFFIPrims/SqueakFFI.xcodeproj/project.pbxproj =================================================================== --- branches/Cog/stackbuild/macbuild/SqueakFFIPrims/SqueakFFI.xcodeproj/project.pbxproj 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/SqueakFFIPrims/SqueakFFI.xcodeproj/project.pbxproj 2012-02-21 03:08:12 UTC (rev 2534) @@ -17,20 +17,20 @@
/* Begin PBXFileReference section */ 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; - 458E6DD011C6D5850024C822 /* sqManualSurface.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = sqManualSurface.c; path = ../../platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c; sourceTree = SOURCE_ROOT; }; - 730BD72510AA25350023C110 /* SqueakFFIPrims.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = SqueakFFIPrims.c; path = ../../src/plugins/SqueakFFIPrims/SqueakFFIPrims.c; sourceTree = SOURCE_ROOT; }; - 730BD72710AA26D00023C110 /* sqFFIPlugin.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = sqFFIPlugin.c; path = ../../platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c; sourceTree = SOURCE_ROOT; }; - 730BD72910AA26EF0023C110 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; - 730BD72A10AA26FB0023C110 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../src/vm/interp.h; sourceTree = SOURCE_ROOT; }; - 730BD72D10AA27410023C110 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; - 730BD72F10AA27590023C110 /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; + 458E6DD011C6D5850024C822 /* sqManualSurface.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = sqManualSurface.c; path = ../../../platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c; sourceTree = SOURCE_ROOT; }; + 730BD72510AA25350023C110 /* SqueakFFIPrims.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = SqueakFFIPrims.c; path = ../../../src/plugins/SqueakFFIPrims/SqueakFFIPrims.c; sourceTree = SOURCE_ROOT; }; + 730BD72710AA26D00023C110 /* sqFFIPlugin.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.c; fileEncoding = 4; name = sqFFIPlugin.c; path = ../../../platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c; sourceTree = SOURCE_ROOT; }; + 730BD72910AA26EF0023C110 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = "../../../platforms/Mac OS/vm/config.h"; sourceTree = SOURCE_ROOT; }; + 730BD72A10AA26FB0023C110 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../stacksrc/vm/interp.h; sourceTree = SOURCE_ROOT; }; + 730BD72D10AA27410023C110 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../platforms/Cross/vm/sqMemoryAccess.h; sourceTree = SOURCE_ROOT; }; + 730BD72F10AA27590023C110 /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../platforms/Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; }; 730BD73010AA277B0023C110 /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = ../resources/ProjectBuilder/SqueakPlugin.icns; sourceTree = SOURCE_ROOT; }; - 733EFEAC10B4D31C00A2FDA5 /* sqFFI.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = sqFFI.h; path = ../../platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h; sourceTree = SOURCE_ROOT; }; - 7386749011ED15E500E5B738 /* sqFFITestFuncs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqFFITestFuncs.c; path = ../../platforms/Cross/plugins/SqueakFFIPrims/sqFFITestFuncs.c; sourceTree = SOURCE_ROOT; }; - 739A636B10AA442600F87ADB /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; - 739A636C10AA444800F87ADB /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; - 739BEEE011C96C240093BD8A /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sq.h; path = ../../platforms/Cross/vm/sq.h; sourceTree = SOURCE_ROOT; }; - 73E2C0B310AA5C4700E80856 /* sqAssert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqAssert.h; path = ../../platforms/Cross/vm/sqAssert.h; sourceTree = SOURCE_ROOT; }; + 733EFEAC10B4D31C00A2FDA5 /* sqFFI.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = sqFFI.h; path = ../../../platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h; sourceTree = SOURCE_ROOT; }; + 7386749011ED15E500E5B738 /* sqFFITestFuncs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqFFITestFuncs.c; path = ../../../platforms/Cross/plugins/SqueakFFIPrims/sqFFITestFuncs.c; sourceTree = SOURCE_ROOT; }; + 739A636B10AA442600F87ADB /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = "../../../platforms/Mac OS/vm/sqConfig.h"; sourceTree = SOURCE_ROOT; }; + 739A636C10AA444800F87ADB /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = "../../../platforms/Mac OS/vm/sqPlatformSpecific.h"; sourceTree = SOURCE_ROOT; }; + 739BEEE011C96C240093BD8A /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sq.h; path = ../../../platforms/Cross/vm/sq.h; sourceTree = SOURCE_ROOT; }; + 73E2C0B310AA5C4700E80856 /* sqAssert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqAssert.h; path = ../../../platforms/Cross/vm/sqAssert.h; sourceTree = SOURCE_ROOT; }; 8D576316048677EA00EA77CD /* SqueakFFIPrims.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SqueakFFIPrims.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; /* End PBXFileReference section */
Modified: branches/Cog/stackbuild/macbuild/makevm =================================================================== --- branches/Cog/stackbuild/macbuild/makevm 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stackbuild/macbuild/makevm 2012-02-21 03:08:12 UTC (rev 2534) @@ -61,7 +61,7 @@ else mv build/$BUILD_CONFIGURATION/Croquet.app "$DEST" fi -../scripts/versionInfoPlist ../platforms CoreVM.plist "$DEST/Contents/Info.plist" +../../scripts/versionInfoPlist ../../platforms CoreVM.plist "$DEST/Contents/Info.plist"
# Build the Float plugin echo
Modified: branches/Cog/stacksrc/vm/gcc3x-interp.c =================================================================== --- branches/Cog/stacksrc/vm/gcc3x-interp.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stacksrc/vm/gcc3x-interp.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - StackInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + StackInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -215,6 +215,7 @@ #define MethodDictionaryIndex 1 #define MethodIndex 3 #define MillisecondClockMask 0x1FFFFFFF +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -542,6 +543,7 @@ static sqInt methodClassOf(sqInt methodPointer); sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); EXPORT(void) moduleUnloaded(char *aModuleName); static char * moveFramesInthroughtoPage(StackPage *oldPage, char *theFP, StackPage *newPage); static char * nameOfClass(sqInt classOop); @@ -959,8 +961,8 @@ _iss sqInt specialObjectsOop; _iss StackPage * stackPage; _iss char * framePointer; +_iss usqInt method; _iss sqInt nilObj; -_iss usqInt method; _iss sqInt argumentCount; _iss usqInt freeStart; _iss usqInt youngStart; @@ -1092,6 +1094,7 @@ #endif static usqInt memory; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 sqInt inIOProcessEvents; sqInt checkForLeaks; sqInt desiredEdenBytes; @@ -1684,7 +1687,7 @@ 0 }; char * breakSelector; sqInt breakSelectorLength = -1; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.144]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.148]"; volatile int sendTrace; sqInt suppressHeartbeatFlag;
@@ -1739,10 +1742,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { CASE(0) /* pushReceiverVariableBytecode */ { @@ -4000,6 +4000,15 @@ longAtPointerput(localSP, localReturnValue); /* begin setMethod: */ GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4158,6 +4167,15 @@ localFP = theFP; /* begin setMethod: */ GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + localIP = pointerForOop(longAtPointer(localSP)); longAtPointerput(localSP, localReturnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, localFP)); @@ -4174,6 +4192,15 @@ currentBytecode = byteAtPointer(++localIP); /* begin setMethod: */ GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } ; l118: /* end case */; @@ -4550,6 +4577,15 @@ longAtPointerput((localSP -= BytesPerWord), GIV(newMethod)); /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ object = (VMBIGENDIAN ? ((1 + (((((usqInt) methodHeader) >> 25) & 15) << ((BytesPerWord * 8) - 8))) + ((0 @@ -13865,8 +13901,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -14211,6 +14252,7 @@ activeProc = longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex << ShiftForWord)); activeContext = longAt((activeProc + BaseHeaderSize) + (SuspendedContextIndex << ShiftForWord)); /* begin marryContextInNewStackPageAndInitializeInterpreterRegisters: */ + VM_LABEL(0marryContextInNewStackPageAndInitializeInterpreterRegisters); assert(GIV(stackPage) == 0); newPage = makeBaseFrameFor(activeContext); /* begin setStackPageAndLimit: */ @@ -14226,6 +14268,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -15692,6 +15743,7 @@ activeProc = longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex << ShiftForWord)); activeContext = longAt((activeProc + BaseHeaderSize) + (SuspendedContextIndex << ShiftForWord)); /* begin marryContextInNewStackPageAndInitializeInterpreterRegisters: */ + VM_LABEL(1marryContextInNewStackPageAndInitializeInterpreterRegisters); assert(GIV(stackPage) == 0); newPage = makeBaseFrameFor(activeContext); /* begin setStackPageAndLimit: */ @@ -15707,6 +15759,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -16233,7 +16294,16 @@ /* begin setMethod: */ aMethodObj = remap(GIV(method)); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0);
+# endif /* MULTIPLEBYTECODESETS */ + + /* *rel to method */
GIV(instructionPointer) += GIV(method); @@ -17318,6 +17388,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((longAt((aMethodObj + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0; +} + + /* The module with the given name was just unloaded. Make sure we have no dangling references. */
@@ -19986,6 +20065,15 @@ GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; /* begin setMethod: */ GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(stackPointer) < GIV(stackLimit)) { handleStackOverflowOrEventAllowContextSwitch(1); } @@ -20102,6 +20190,15 @@ GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; /* begin setMethod: */ GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(stackPointer) < GIV(stackLimit)) { handleStackOverflowOrEventAllowContextSwitch(0); } @@ -20252,6 +20349,15 @@ GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; /* begin setMethod: */ GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(stackPointer) < GIV(stackLimit)) { handleStackOverflowOrEventAllowContextSwitch(1); } @@ -22086,6 +22192,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -22273,6 +22388,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -25615,6 +25739,15 @@ GIV(stackPointer) = sp31; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -27598,6 +27731,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object1 = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -27810,6 +27952,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -31890,6 +32041,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -34913,6 +35073,15 @@ GIV(stackPointer) = sp31; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object9 = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -35081,6 +35250,15 @@ GIV(stackPointer) = sp31; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object5 = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -36047,6 +36225,7 @@ longAtput((activeContext + BaseHeaderSize) + (StackPointerIndex << ShiftForWord), (((stackIndex - 1) << 1) | 1)); } /* begin marryContextInNewStackPageAndInitializeInterpreterRegisters: */ + VM_LABEL(2marryContextInNewStackPageAndInitializeInterpreterRegisters); assert(GIV(stackPage) == 0); newPage = makeBaseFrameFor(activeContext); /* begin setStackPageAndLimit: */ @@ -36062,6 +36241,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -37676,6 +37864,15 @@ if (!0) { /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ VM_LABEL(0assertValidExecutionPointers);
Modified: branches/Cog/stacksrc/vm/interp.c =================================================================== --- branches/Cog/stacksrc/vm/interp.c 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stacksrc/vm/interp.c 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 from - StackInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + StackInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -212,6 +212,7 @@ #define MethodDictionaryIndex 1 #define MethodIndex 3 #define MillisecondClockMask 0x1FFFFFFF +#define MULTIPLEBYTECODESETS 0 #define MyListIndex 3 #define NextLinkIndex 0 #define NilObject 0 @@ -539,6 +540,7 @@ static sqInt methodClassOf(sqInt methodPointer); sqInt methodPrimitiveIndex(void); sqInt methodReturnValue(sqInt oop); +sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); EXPORT(void) moduleUnloaded(char *aModuleName); static char * moveFramesInthroughtoPage(StackPage *oldPage, char *theFP, StackPage *newPage); static char * nameOfClass(sqInt classOop); @@ -956,8 +958,8 @@ _iss sqInt specialObjectsOop; _iss StackPage * stackPage; _iss char * framePointer; +_iss usqInt method; _iss sqInt nilObj; -_iss usqInt method; _iss sqInt argumentCount; _iss usqInt freeStart; _iss usqInt youngStart; @@ -1089,6 +1091,7 @@ #endif static usqInt memory; static void (*primitiveFunctionPointer)(); +#define bytecodeSetSelector 0 sqInt inIOProcessEvents; sqInt checkForLeaks; sqInt desiredEdenBytes; @@ -1681,7 +1684,7 @@ 0 }; char * breakSelector; sqInt breakSelectorLength = -1; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.144]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.148]"; volatile int sendTrace; sqInt suppressHeartbeatFlag;
@@ -1735,10 +1738,7 @@ /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); while (1) { - bytecodeDispatchDebugHook(); - - VM_LABEL(0bytecodeDispatch); - switch (currentBytecode) { + switch (currentBytecode + bytecodeSetSelector) { case 0: /* pushReceiverVariableBytecode */ { @@ -3996,6 +3996,15 @@ longAtPointerput(localSP, localReturnValue); /* begin setMethod: */ GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin fetchNextBytecode */ currentBytecode = byteAtPointer(++localIP); } @@ -4154,6 +4163,15 @@ localFP = theFP; /* begin setMethod: */ GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + localIP = pointerForOop(longAtPointer(localSP)); longAtPointerput(localSP, localReturnValue); assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, localFP)); @@ -4170,6 +4188,15 @@ currentBytecode = byteAtPointer(++localIP); /* begin setMethod: */ GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } ; l118: /* end case */; @@ -4546,6 +4573,15 @@ longAtPointerput((localSP -= BytesPerWord), GIV(newMethod)); /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin internalPush: */ object = (VMBIGENDIAN ? ((1 + (((((usqInt) methodHeader) >> 25) & 15) << ((BytesPerWord * 8) - 8))) + ((0 @@ -13861,8 +13897,13 @@ GIV(stackLimit) = 0; GIV(stackPage) = (GIV(overflowedPage) = 0); GIV(extraFramesToMoveOnOverflow) = 0; - /* begin setMethod: */ GIV(method) = GIV(nilObj); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = 0; + +# endif /* MULTIPLEBYTECODESETS */ + GIV(messageSelector) = GIV(nilObj); GIV(newMethod) = GIV(nilObj); GIV(lkupClass) = GIV(nilObj); @@ -14207,6 +14248,7 @@ activeProc = longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex << ShiftForWord)); activeContext = longAt((activeProc + BaseHeaderSize) + (SuspendedContextIndex << ShiftForWord)); /* begin marryContextInNewStackPageAndInitializeInterpreterRegisters: */ + VM_LABEL(0marryContextInNewStackPageAndInitializeInterpreterRegisters); assert(GIV(stackPage) == 0); newPage = makeBaseFrameFor(activeContext); /* begin setStackPageAndLimit: */ @@ -14222,6 +14264,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -15688,6 +15739,7 @@ activeProc = longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) + BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex << ShiftForWord)); activeContext = longAt((activeProc + BaseHeaderSize) + (SuspendedContextIndex << ShiftForWord)); /* begin marryContextInNewStackPageAndInitializeInterpreterRegisters: */ + VM_LABEL(1marryContextInNewStackPageAndInitializeInterpreterRegisters); assert(GIV(stackPage) == 0); newPage = makeBaseFrameFor(activeContext); /* begin setStackPageAndLimit: */ @@ -15703,6 +15755,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -16229,7 +16290,16 @@ /* begin setMethod: */ aMethodObj = remap(GIV(method)); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0);
+# endif /* MULTIPLEBYTECODESETS */ + + /* *rel to method */
GIV(instructionPointer) += GIV(method); @@ -17314,6 +17384,15 @@ }
+/* A negative header selects the alternate bytecode set. */ + +sqInt +methodUsesAlternateBytecodeSet(sqInt aMethodObj) +{ + return (((longAt((aMethodObj + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0; +} + + /* The module with the given name was just unloaded. Make sure we have no dangling references. */
@@ -19982,6 +20061,15 @@ GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; /* begin setMethod: */ GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(stackPointer) < GIV(stackLimit)) { handleStackOverflowOrEventAllowContextSwitch(1); } @@ -20098,6 +20186,15 @@ GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; /* begin setMethod: */ GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(stackPointer) < GIV(stackLimit)) { handleStackOverflowOrEventAllowContextSwitch(0); } @@ -20248,6 +20345,15 @@ GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; /* begin setMethod: */ GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + if (GIV(stackPointer) < GIV(stackLimit)) { handleStackOverflowOrEventAllowContextSwitch(1); } @@ -22082,6 +22188,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -22269,6 +22384,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -25611,6 +25735,15 @@ GIV(stackPointer) = sp31; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -27594,6 +27727,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object1 = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -27806,6 +27948,15 @@ GIV(stackPointer) = sp3; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -31886,6 +32037,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -34909,6 +35069,15 @@ GIV(stackPointer) = sp31; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object9 = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -35077,6 +35246,15 @@ GIV(stackPointer) = sp31; /* begin setMethod: */ GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin push: */ object5 = (VMBIGENDIAN ? ((1 + (numArgs << ((BytesPerWord * 8) - 8))) + ((0 @@ -36043,6 +36221,7 @@ longAtput((activeContext + BaseHeaderSize) + (StackPointerIndex << ShiftForWord), (((stackIndex - 1) << 1) | 1)); } /* begin marryContextInNewStackPageAndInitializeInterpreterRegisters: */ + VM_LABEL(2marryContextInNewStackPageAndInitializeInterpreterRegisters); assert(GIV(stackPage) == 0); newPage = makeBaseFrameFor(activeContext); /* begin setStackPageAndLimit: */ @@ -36058,6 +36237,15 @@ theFP = (GIV(stackPage)->headFP); aMethodObj = longAt(theFP + FoxMethod); GIV(method) = aMethodObj; + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + /* begin popStack */ top = longAt(GIV(stackPointer)); GIV(stackPointer) += BytesPerWord; @@ -37672,6 +37860,15 @@ if (!0) { /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + +# if MULTIPLEBYTECODESETS + bytecodeSetSelector = ((((longAt((GIV(method) + BaseHeaderSize) + (HeaderIndex << ShiftForWord))) >> 1)) < 0 + ? 256 + : 0); + +# endif /* MULTIPLEBYTECODESETS */ + } /* begin assertValidExecutionPointe:r:s: */ VM_LABEL(0assertValidExecutionPointers);
Modified: branches/Cog/stacksrc/vm/interp.h =================================================================== --- branches/Cog/stacksrc/vm/interp.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stacksrc/vm/interp.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
#define VM_PROXY_MAJOR 1
Modified: branches/Cog/stacksrc/vm/vmCallback.h =================================================================== --- branches/Cog/stacksrc/vm/vmCallback.h 2012-02-18 23:14:48 UTC (rev 2533) +++ branches/Cog/stacksrc/vm/vmCallback.h 2012-02-21 03:08:12 UTC (rev 2534) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.144 uuid: bafb8042-095a-42f3-9058-ee7bd133da50 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.148 uuid: bb53aa60-4173-48ed-874b-dc0ff5a48992 */
#define VM_CALLBACK_INC 1
vm-dev@lists.squeakfoundation.org