Revision: 3211 Author: eliot Date: 2015-01-06 14:58:47 -0800 (Tue, 06 Jan 2015) Log Message: ----------- CogVM source as per VMMaker.oscog-eem.1010
Fix slip in primitivePin. Also be lenient w.r.t. unpinning married contexts. Move the check down into StackInterpreter's version. This allows e.g. self allObjectsDo: [:o| o unpin]
Modified Paths: -------------- branches/Cog/nsspursrc/vm/cointerp.c branches/Cog/nsspursrc/vm/cointerp.h branches/Cog/nsspursrc/vm/gcc3x-cointerp.c branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c branches/Cog/nsspurstacksrc/vm/interp.c branches/Cog/spursistasrc/vm/cointerp.c branches/Cog/spursistasrc/vm/cointerp.h branches/Cog/spursistasrc/vm/gcc3x-cointerp.c branches/Cog/spursrc/vm/cointerp.c branches/Cog/spursrc/vm/cointerp.h branches/Cog/spursrc/vm/gcc3x-cointerp.c branches/Cog/spurstack64src/vm/gcc3x-interp.c branches/Cog/spurstack64src/vm/interp.c branches/Cog/spurstacksrc/vm/gcc3x-interp.c branches/Cog/spurstacksrc/vm/interp.c
Property Changed: ---------------- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspursrc/vm/cointerp.c =================================================================== --- branches/Cog/nsspursrc/vm/cointerp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/nsspursrc/vm/cointerp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -740,7 +740,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileStart(void); @@ -1502,6 +1501,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2353,7 +2353,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1008"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1010"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace;
@@ -36159,58 +36159,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -76960,6 +76908,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/nsspursrc/vm/cointerp.h =================================================================== --- branches/Cog/nsspursrc/vm/cointerp.h 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/nsspursrc/vm/cointerp.h 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */
Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -743,7 +743,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileStart(void); @@ -1505,6 +1504,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2356,7 +2356,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1008"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1010"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace;
@@ -36168,58 +36168,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -76969,6 +76917,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c =================================================================== --- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - StackInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + StackInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -489,7 +489,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileSemaphore(void); @@ -1299,6 +1298,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2101,7 +2101,7 @@ /* 574 */ (void (*)(void))0, /* 575 */ (void (*)(void))0, 0 }; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1008"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1010"; volatile int sendTrace; sqInt suppressHeartbeatFlag;
@@ -21999,58 +21999,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -67499,6 +67447,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/nsspurstacksrc/vm/interp.c =================================================================== --- branches/Cog/nsspurstacksrc/vm/interp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/nsspurstacksrc/vm/interp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - StackInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + StackInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -486,7 +486,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileSemaphore(void); @@ -1296,6 +1295,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2098,7 +2098,7 @@ /* 574 */ (void (*)(void))0, /* 575 */ (void (*)(void))0, 0 }; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1008"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.1010"; volatile int sendTrace; sqInt suppressHeartbeatFlag;
@@ -21990,58 +21990,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -67490,6 +67438,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Thu Jan 1 14:08:19 PST 2015 + Tue Jan 6 14:58:34 PST 2015
Modified: branches/Cog/spursistasrc/vm/cointerp.c =================================================================== --- branches/Cog/spursistasrc/vm/cointerp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spursistasrc/vm/cointerp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -739,7 +739,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileStart(void); @@ -1498,6 +1497,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2349,7 +2349,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1008]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1010]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace;
@@ -9166,7 +9166,7 @@ /* bytecodePrimBitShift */ { sqInt integerArgument; - sqLong integerReceiver; + usqInt integerReceiver; sqInt shifted; char *sp;
@@ -9226,7 +9226,7 @@ null; goto l77; } - shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument); + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); } shifted = positive32BitIntegerFor(shifted); /* begin pop:thenPush: */ @@ -11963,7 +11963,7 @@ /* bytecodePrimBitShift */ { sqInt integerArgument; - sqLong integerReceiver; + usqInt integerReceiver; sqInt shifted; char *sp;
@@ -12023,7 +12023,7 @@ null; goto l183; } - shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument); + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); } shifted = positive32BitIntegerFor(shifted); /* begin pop:thenPush: */ @@ -29588,7 +29588,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; - sqLong integerReceiver; + usqInt integerReceiver; sqInt shifted; char *sp;
@@ -29635,7 +29635,7 @@ } return; } - shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument); + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); } shifted = positive32BitIntegerFor(shifted); /* begin pop:thenPush: */ @@ -36406,58 +36406,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -77072,6 +77020,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/spursistasrc/vm/cointerp.h =================================================================== --- branches/Cog/spursistasrc/vm/cointerp.h 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spursistasrc/vm/cointerp.h 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */
Modified: branches/Cog/spursistasrc/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/spursistasrc/vm/gcc3x-cointerp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spursistasrc/vm/gcc3x-cointerp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -742,7 +742,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileStart(void); @@ -1501,6 +1500,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2352,7 +2352,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1008]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1010]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace;
@@ -9175,7 +9175,7 @@ /* bytecodePrimBitShift */ { sqInt integerArgument; - sqLong integerReceiver; + usqInt integerReceiver; sqInt shifted; char *sp;
@@ -9235,7 +9235,7 @@ null; goto l77; } - shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument); + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); } shifted = positive32BitIntegerFor(shifted); /* begin pop:thenPush: */ @@ -11972,7 +11972,7 @@ /* bytecodePrimBitShift */ { sqInt integerArgument; - sqLong integerReceiver; + usqInt integerReceiver; sqInt shifted; char *sp;
@@ -12032,7 +12032,7 @@ null; goto l183; } - shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument); + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); } shifted = positive32BitIntegerFor(shifted); /* begin pop:thenPush: */ @@ -29597,7 +29597,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; - sqLong integerReceiver; + usqInt integerReceiver; sqInt shifted; char *sp;
@@ -29644,7 +29644,7 @@ } return; } - shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument); + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); } shifted = positive32BitIntegerFor(shifted); /* begin pop:thenPush: */ @@ -36415,58 +36415,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -77081,6 +77029,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/spursrc/vm/cointerp.c =================================================================== --- branches/Cog/spursrc/vm/cointerp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spursrc/vm/cointerp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -733,7 +733,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileStart(void); @@ -1490,6 +1489,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2340,7 +2340,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1008]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1010]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace;
@@ -31311,58 +31311,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -71948,6 +71896,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/spursrc/vm/cointerp.h =================================================================== --- branches/Cog/spursrc/vm/cointerp.h 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spursrc/vm/cointerp.h 2015-01-06 22:58:47 UTC (rev 3211) @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */
Modified: branches/Cog/spursrc/vm/gcc3x-cointerp.c =================================================================== --- branches/Cog/spursrc/vm/gcc3x-cointerp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spursrc/vm/gcc3x-cointerp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -736,7 +736,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileStart(void); @@ -1493,6 +1492,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2343,7 +2343,7 @@ /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1 }; -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1008]"; +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1010]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace;
@@ -31320,58 +31320,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 3) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 3) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return; - } - if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { - wasPinned = GIV(trueObj); - /* begin setIsPinnedOf:to: */ - flag("endianness"); - longAtput(obj, (boolean == GIV(trueObj) - ? (longAt(obj)) | (1 << 30) - : (longAt(obj)) & ((unsigned int)~(1 << 30)))); - } - else { - wasPinned = GIV(falseObj); - if (((boolean == GIV(trueObj)) - && (pinObject(obj))) == 0) { - (GIV(primFailCode) = PrimErrNoMemory); - return; - } - } - /* begin pop:thenPush: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); - GIV(stackPointer) = sp; -} - - /* Primitive. Answer the last primitive method sampled by the profiler. */
EXPORT(sqInt) @@ -71957,6 +71905,62 @@ }
+/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the + argument. Answer whether the object was already pinned. N.B. pinning does + *not* prevent + an object from being garbage collected. */ + +static void +primitivePin(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt boolean; + sqInt obj; + char *sp; + sqInt wasPinned; + + + obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((obj & 3) != 0) + || (((longAt(obj)) & (0x3FFFFF - 8)) == 0)) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + boolean = longAt(GIV(stackPointer)); + if (!((boolean == GIV(falseObj)) + || (boolean == GIV(trueObj)))) { + (GIV(primFailCode) = PrimErrBadArgument); + return; + } + if (((((usqInt) (longAt(obj))) >> 30) & 1) != 0) { + wasPinned = GIV(trueObj); + if (boolean != wasPinned) { + /* begin setIsPinnedOf:to: */ + flag("endianness"); + longAtput(obj, (longAt(obj)) & ((unsigned int)~(1 << 30))); + } + } + else { + wasPinned = GIV(falseObj); + if (boolean == GIV(trueObj)) { + if ((((obj & 3) == 0) + && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) + && ((((longAt((obj + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1)) + && (!(isWidowedContext(obj))))) { + (GIV(primFailCode) = PrimErrBadReceiver); + return; + } + if ((pinObject(obj)) == 0) { + (GIV(primFailCode) = PrimErrNoMemory); + return; + } + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), wasPinned); + GIV(stackPointer) = sp; +} + + /* Primitive. Indicate the semaphore to be signalled for upon garbage collection */
Modified: branches/Cog/spurstack64src/vm/gcc3x-interp.c =================================================================== --- branches/Cog/spurstack64src/vm/gcc3x-interp.c 2015-01-06 22:15:43 UTC (rev 3210) +++ branches/Cog/spurstack64src/vm/gcc3x-interp.c 2015-01-06 22:58:47 UTC (rev 3211) @@ -2,11 +2,11 @@
/* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 from - StackInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a + StackInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1008 uuid: e5b26122-f27e-498b-bc8a-70f5f0fc3e1a " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.1010 uuid: 9065e685-b193-428f-9c7a-27ce1afe8c71 " __DATE__ ; char *__interpBuildInfo = __buildInfo;
@@ -494,7 +494,6 @@ EXPORT(sqInt) primitivePathToUsing(void); static void primitivePerformInSuperclass(void); static void primitivePerformWithArgs(void); -static void primitivePin(void); EXPORT(sqInt) primitiveProfilePrimitive(void); EXPORT(sqInt) primitiveProfileSample(void); EXPORT(sqInt) primitiveProfileSemaphore(void); @@ -1320,6 +1319,7 @@ EXPORT(sqInt) primitiveMakeEphemeron(void); static void primitiveObjectPointsTo(void); static void primitivePerform(void); +static void primitivePin(void); EXPORT(void) primitiveSetGCSemaphore(void); static void primitiveSignalAtMilliseconds(void); static void primitiveSignalAtUTCMicroseconds(void); @@ -2121,7 +2121,7 @@ /* 574 */ (void (*)(void))0, /* 575 */ (void (*)(void))0, 0 }; -const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1008]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.1010]"; volatile int sendTrace; sqInt suppressHeartbeatFlag;
@@ -18724,57 +18724,6 @@ }
-/* Pin or unpin the receiver, i.e. make it immobile or mobile, based on the - argument. Answer whether the object was already pinned. N.B. pinning does - *not* prevent - an object from being garbage collected. */ - -static void -primitivePin(void) -{ DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt boolean; - sqInt obj; - char *sp; - sqInt wasPinned; - - - obj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); - if (((obj & 7) != 0) - || ((((longAt(obj)) & (0x3FFFFF - 8)) == 0) - || ((((obj & 7) == 0) - && (((longAt(obj)) & 0x3FFFFF) == ClassMethodContextCompactIndex)) - && ((((((longAt((obj + BaseHeaderSize) + (((long)SenderIndex) << (shiftForWord()))))) & 7) == 1)) - && (!(isWidowedContext(obj))))))) { - (GIV(primFailCode) = PrimErrBadReceiver); - return; - } - boolean = longAt(GIV(stackPointer)); - if (!((boolean == GIV(falseObj)) - || (boolean == GIV(trueObj)))) { - (GIV(primFailCode) = PrimErrBadArgument); - return;
@@ Diff output truncated at 50000 characters. @@
vm-dev@lists.squeakfoundation.org