[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-vm-dev
Subject:    Re: [Vm-dev] [commit] r2514 - CogVM source as per
From:       Eliot Miranda <eliot.miranda () gmail ! com>
Date:       2011-11-18 18:38:51
Message-ID: CAC20JE2KfQxGBqbagUep51q1XpmfY8qYUBZ2DBMCOh_HNtAtnw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #3 (multipart/alternative)]


This "fix", 138, is badly broken.  Please use 139 instead.

On Thu, Nov 17, 2011 at 5:18 PM, <commits@squeakvm.org> wrote:

>
> Author: eliot
> Date: 2011-11-17 17:18:02 -0800 (Thu, 17 Nov 2011)
> New Revision: 2514
>
> 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/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
> Log:
> CogVM source as per VMMaker.oscog-eem.138.
> Fix frameless foo: arg instVar := instVar code gen bug (failure to pop
> spills on frameless return).  Use more hex printing in frame/oop printing.
>
>
> Modified: branches/Cog/nscogsrc/vm/cogit.c
> ===================================================================
> --- branches/Cog/nscogsrc/vm/cogit.c    2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/nscogsrc/vm/cogit.c    2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,9 @@
>  /* Automatically generated by
> -       CCodeGenerator VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       CCodeGenerator VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       StackToRegisterMappingCogit VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       StackToRegisterMappingCogit VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "StackToRegisterMappingCogit
> VMMaker.oscog-eem.135 uuid: 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba " __DATE__
> ;
> +static char __buildInfo[] = "StackToRegisterMappingCogit
> VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__
> ;
>  char *__cogitBuildInfo = __buildInfo;
>
>
> @@ -805,6 +805,7 @@
>  sqInt isSendReturnPC(sqInt retpc);
>  static sqInt isSmallIntegerTagNonZero(void);
>  static sqInt isUnconditionalBranch(BytecodeDescriptor *
> self_in_isUnconditionalBranch);
> +static sqInt isValidFramelessRegister(sqInt reg);
>  static AbstractInstruction * gJumpFPEqual(void *jumpTarget);
>  static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget);
>  static AbstractInstruction * gJumpFPGreater(void *jumpTarget);
> @@ -963,6 +964,7 @@
>  static void ssFlushTo(sqInt index);
>  static void ssFlushUpThroughReceiverVariable(sqInt slotIndex);
>  static void ssFlushUpThroughTemporaryVariable(sqInt tempIndex);
> +static void ssPopSpillsFrom(sqInt index);
>  static void ssPop(sqInt n);
>  static sqInt ssPushAnnotatedConstant(sqInt literal);
>  static sqInt ssPushBaseoffset(sqInt reg, sqInt offset);
> @@ -12493,6 +12495,7 @@
>                genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
>        }
>        else {
> +               ssPopSpillsFrom(methodOrBlockNumArgs - 1);
>                /* begin RetN: */
>                offset = ((methodOrBlockNumArgs > (numRegArgs()))
>                 || (regArgsHaveBeenPushed)
> @@ -13254,6 +13257,16 @@
>  }
>
>
> +/*     Answer if the receiver is valid in a frameless method. */
> +
> +static sqInt
> +isValidFramelessRegister(sqInt reg)
> +{
> +       return (reg == ReceiverResultReg)
> +        || (reg == Arg0Reg);
> +}
> +
> +
>  /*     Floating-point jumps are a little weird on some processors. Defer
> to
>        the backEnd to allow it to generate any special code it may need
> to. */
>
> @@ -16539,7 +16552,10 @@
>        }
>        if (simSpillBase <= index) {
>                for (i = (((simSpillBase < 0) ? 0 : simSpillBase)); i <=
> index; i += 1) {
> -                       assert(needsFrame);
> +                       assert(needsFrame
> +                        || (((((simStackAt(i)->type)) == SSBaseOffset)
> + || (((simStackAt(i)->type)) == SSRegister))
> +                        &&
> (isValidFramelessRegister((simStackAt(i)->registerr)))));
>                        ensureSpilledAtfrom(simStackAt(i),
> frameOffsetOfTemporary(i), FPReg);
>                }
>                simSpillBase = index + 1;
> @@ -16588,7 +16604,24 @@
>        }
>  }
>
> +
> +/*     Pop any spilled items on the sim stack from index, used to balance
> the
> +       stack on return.
> + */
> +
>  static void
> +ssPopSpillsFrom(sqInt index)
> +{
> +    sqInt i;
> +
> +       for (i = index; i <= simStackPtr; i += 1) {
> +               if ((simStackAt(i)->spilled)) {
> +                       popToReg(ssTop(), TempReg);
> +               }
> +       }
> +}
> +
> +static void
>  ssPop(sqInt n)
>  {
>        assert(((simStackPtr - n) >= (methodOrBlockNumTemps - 1))
>
> Modified: branches/Cog/nscogsrc/vm/cogit.h
> ===================================================================
> --- branches/Cog/nscogsrc/vm/cogit.h    2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/nscogsrc/vm/cogit.h    2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGenerator VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       CCodeGenerator VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>
>
> Modified: branches/Cog/nscogsrc/vm/cogmethod.h
> ===================================================================
> --- branches/Cog/nscogsrc/vm/cogmethod.h        2011-11-15 00:39:49 UTC
> (rev 2513)
> +++ branches/Cog/nscogsrc/vm/cogmethod.h        2011-11-18 01:18:02 UTC
> (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGenerator VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       CCodeGenerator VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>  typedef struct {
>
> Modified: branches/Cog/nscogsrc/vm/cointerp.c
> ===================================================================
> --- branches/Cog/nscogsrc/vm/cointerp.c 2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/nscogsrc/vm/cointerp.c 2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,9 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc " __DATE__ ;
> +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__ ;
>  char *__interpBuildInfo = __buildInfo;
>
>
> @@ -330,6 +330,7 @@
>  sqInt interpret(void);
>  static void activateCoggedNewMethod(sqInt inInterpreter);
>  static void activateNewMethod(void);
> +sqInt activeProcess(void);
>  EXPORT(sqInt) addGCRoot(sqInt *varLoc);
>  static void addLastLinktoList(sqInt proc, sqInt aList);
>  static void addNewMethodToCache(sqInt class);
> @@ -586,6 +587,7 @@
>  sqInt integerArg(sqInt index);
>  sqInt integerObjectOf(sqInt value);
>  sqInt integerValueOf(sqInt objectPointer);
> +EXPORT(sqInt) internalIsImmutable(sqInt oop);
>  usqInt interpretAddress(void);
>  static sqInt interpreterAllocationReserveBytes(void);
>  static sqInt interpretMethodFromMachineCode(void);
> @@ -1898,7 +1900,7 @@
>        /* 575 */ (void (*)(void))0,
>  0 };
>  static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /*
> 4097 */])(void);
> -const char *interpreterVersion = "Newspeak Virtual Machine
> CoInterpreter_VMMaker.oscog-eem.137";
> +const char *interpreterVersion = "Newspeak Virtual Machine
> CoInterpreter_VMMaker.oscog-eem.138";
>  sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /*
> 10 */;
>  volatile int sendTrace;
>
> @@ -8924,6 +8926,16 @@
>  }
>
>
> +/*     Answer the current activeProcess. */
> +/*     useful for VM debugging */
> +
> +sqInt
> +activeProcess(void)
> +{
> +       return longAt(((longAt(((longAt((GIV(specialObjectsOop) +
> BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) +
> BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) +
> (ActiveProcessIndex << ShiftForWord));
> +}
> +
> +
>  /*     Add the given variable location to the extra roots table */
>
>  EXPORT(sqInt)
> @@ -19120,7 +19132,13 @@
>        }
>  }
>
> +EXPORT(sqInt)
> +internalIsImmutable(sqInt oop)
> +{
> +       return ((longAt(oop)) & ImmutabilityBit) != 0;
> +}
>
> +
>  /*     This is used for asserts that check that inline cache editing
> results in
>        valid addresses.
>        In the C VM interpret is presumed to come before any primitives and
> so it
> @@ -20424,13 +20442,17 @@
>                        goto l1;
>                }
>        l1:     /* end lengthOf: */;
> -               if ((lastIndex - startIP) > 100) {
> -                       lastIndex = startIP + 100;
> +               if ((lastIndex - startIP) > 104) {
> +                       lastIndex = startIP + 103;
>                }
>                bytecodesPerLine = 8;
>                for (index = startIP; index <= lastIndex; index += 1) {
>                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));
>                        printf(" %02x/%-3d", byte,byte);
> +                       if ((index == lastIndex)
> +                        && ((lengthOf(oop)) > index)) {
> +                               print("...");
> +                       }
>                        if ((((index - startIP) + 1) % bytecodesPerLine) ==
> 0) {
>                                /* begin cr */
>                                printf("\n");
> @@ -38290,7 +38312,7 @@
>
>  void
>  printContext(sqInt aContext)
> -{
> +{   DECL_MAYBE_SQ_GLOBAL_STRUCT
>     sqInt i;
>     sqInt ip;
>     void *p;
> @@ -38341,17 +38363,22 @@
>                print("sender   ");
>                shortPrintOop(sender);
>                print("ip       ");
> -               printNum(ip);
> -               print(" (");
> -               printNum((ip >> 1));
> -               /* begin space */
> -               /* begin printChar: */
> -               putchar(' ');
> -               printHex((ip >> 1));
> -               /* begin printChar: */
> -               putchar(')');
> -               /* begin cr */
> -               printf("\n");
> +               if (ip == GIV(nilObj)) {
> +                       shortPrintOop(ip);
> +               }
> +               else {
> +                       printNum(ip);
> +                       print(" (");
> +                       printNum((ip >> 1));
> +                       /* begin space */
> +                       /* begin printChar: */
> +                       putchar(' ');
> +                       printHex((ip >> 1));
> +                       /* begin printChar: */
> +                       putchar(')');
> +                       /* begin cr */
> +                       printf("\n");
> +               }
>        }
>        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex <<
> ShiftForWord));
>        sp = ((sp < ((lengthOf(aContext)) - ReceiverIndex)) ? sp :
> ((lengthOf(aContext)) - ReceiverIndex));
> @@ -41906,6 +41933,7 @@
>  shortPrintContext(sqInt aContext)
>  {
>     sqInt home;
> +    char *theFP;
>
>        if (!(((aContext & 1) == 0)
>                 && (((((usqInt) (longAt(aContext))) >> 12) & 31) ==
> ClassMethodContextCompactIndex))) {
> @@ -41916,14 +41944,20 @@
>                return;
>        }
>        home = findHomeForContext(aContext);
> -       printNum(aContext);
> +       printHex(aContext);
>        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex <<
> ShiftForWord))) & 1)) {
> -               if ((checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer)))
> -                && (isMachineCodeFrame(frameOfMarriedContext(aContext))))
> {
> -                       print(" m ");
> +               if (checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer))) {
> +                       if (isMachineCodeFrame((theFP =
> frameOfMarriedContext(aContext)))) {
> +                               print(" M (");
> +                       }
> +                       else {
> +                               print(" I (");
> +                       }
> +                       printHex(theFP);
> +                       print(") ");
>                }
>                else {
> -                       print(" i ");
> +                       print(" w ");
>                }
>        }
>        else {
> @@ -41998,7 +42032,7 @@
>  void
>  shortPrintFrameAndNCallers(char *theFP, sqInt n)
>  {   DECL_MAYBE_SQ_GLOBAL_STRUCT
> -       if ((n > 0)
> +       if ((n != 0)
>         && ((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0)
>         && ((((((usqInt)theFP)) >= (((usqInt)(GIV(stackBasePlus1) - 1))))
> && ((((usqInt)theFP)) <= (((usqInt)GIV(pages)))))))) {
>                shortPrintFrame(theFP);
> @@ -45643,6 +45677,7 @@
>        {"", "callbackEnter", (void*)callbackEnter},
>        {"", "callbackLeave", (void*)callbackLeave},
>        {"", "dumpImage", (void*)dumpImage},
> +       {"", "internalIsImmutable", (void*)internalIsImmutable},
>        {"", "moduleUnloaded", (void*)moduleUnloaded},
>        {"", "primitiveAddLargeIntegers", (void*)primitiveAddLargeIntegers},
>        {"", "primitiveBitAndLargeIntegers",
> (void*)primitiveBitAndLargeIntegers},
>
> Modified: branches/Cog/nscogsrc/vm/cointerp.h
> ===================================================================
> --- branches/Cog/nscogsrc/vm/cointerp.h 2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/nscogsrc/vm/cointerp.h 2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,10 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>
>  /*** Function Prototypes ***/
> +sqInt activeProcess(void);
>  sqInt addressCouldBeObj(sqInt address);
>  sqInt addressCouldBeOop(sqInt address);
>  usqInt argumentCountAddress(void);
>
> Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
> ===================================================================
> --- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c   2011-11-15 00:39:49 UTC
> (rev 2513)
> +++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c   2011-11-18 01:18:02 UTC
> (rev 2514)
> @@ -2,11 +2,11 @@
>
>
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc " __DATE__ ;
> +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__ ;
>  char *__interpBuildInfo = __buildInfo;
>
>
> @@ -333,6 +333,7 @@
>  sqInt interpret(void);
>  static void activateCoggedNewMethod(sqInt inInterpreter);
>  static void activateNewMethod(void);
> +sqInt activeProcess(void);
>  EXPORT(sqInt) addGCRoot(sqInt *varLoc);
>  static void addLastLinktoList(sqInt proc, sqInt aList);
>  static void addNewMethodToCache(sqInt class);
> @@ -589,6 +590,7 @@
>  sqInt integerArg(sqInt index);
>  sqInt integerObjectOf(sqInt value);
>  sqInt integerValueOf(sqInt objectPointer);
> +EXPORT(sqInt) internalIsImmutable(sqInt oop);
>  usqInt interpretAddress(void);
>  static sqInt interpreterAllocationReserveBytes(void);
>  static sqInt interpretMethodFromMachineCode(void);
> @@ -1901,7 +1903,7 @@
>        /* 575 */ (void (*)(void))0,
>  0 };
>  static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /*
> 4097 */])(void);
> -const char *interpreterVersion = "Newspeak Virtual Machine
> CoInterpreter_VMMaker.oscog-eem.137";
> +const char *interpreterVersion = "Newspeak Virtual Machine
> CoInterpreter_VMMaker.oscog-eem.138";
>  sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /*
> 10 */;
>  volatile int sendTrace;
>
> @@ -8928,6 +8930,16 @@
>  }
>
>
> +/*     Answer the current activeProcess. */
> +/*     useful for VM debugging */
> +
> +sqInt
> +activeProcess(void)
> +{
> +       return longAt(((longAt(((longAt((GIV(specialObjectsOop) +
> BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) +
> BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) +
> (ActiveProcessIndex << ShiftForWord));
> +}
> +
> +
>  /*     Add the given variable location to the extra roots table */
>
>  EXPORT(sqInt)
> @@ -19124,7 +19136,13 @@
>        }
>  }
>
> +EXPORT(sqInt)
> +internalIsImmutable(sqInt oop)
> +{
> +       return ((longAt(oop)) & ImmutabilityBit) != 0;
> +}
>
> +
>  /*     This is used for asserts that check that inline cache editing
> results in
>        valid addresses.
>        In the C VM interpret is presumed to come before any primitives and
> so it
> @@ -20428,13 +20446,17 @@
>                        goto l1;
>                }
>        l1:     /* end lengthOf: */;
> -               if ((lastIndex - startIP) > 100) {
> -                       lastIndex = startIP + 100;
> +               if ((lastIndex - startIP) > 104) {
> +                       lastIndex = startIP + 103;
>                }
>                bytecodesPerLine = 8;
>                for (index = startIP; index <= lastIndex; index += 1) {
>                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));
>                        printf(" %02x/%-3d", byte,byte);
> +                       if ((index == lastIndex)
> +                        && ((lengthOf(oop)) > index)) {
> +                               print("...");
> +                       }
>                        if ((((index - startIP) + 1) % bytecodesPerLine) ==
> 0) {
>                                /* begin cr */
>                                printf("\n");
> @@ -38294,7 +38316,7 @@
>
>  void
>  printContext(sqInt aContext)
> -{
> +{   DECL_MAYBE_SQ_GLOBAL_STRUCT
>     sqInt i;
>     sqInt ip;
>     void *p;
> @@ -38345,17 +38367,22 @@
>                print("sender   ");
>                shortPrintOop(sender);
>                print("ip       ");
> -               printNum(ip);
> -               print(" (");
> -               printNum((ip >> 1));
> -               /* begin space */
> -               /* begin printChar: */
> -               putchar(' ');
> -               printHex((ip >> 1));
> -               /* begin printChar: */
> -               putchar(')');
> -               /* begin cr */
> -               printf("\n");
> +               if (ip == GIV(nilObj)) {
> +                       shortPrintOop(ip);
> +               }
> +               else {
> +                       printNum(ip);
> +                       print(" (");
> +                       printNum((ip >> 1));
> +                       /* begin space */
> +                       /* begin printChar: */
> +                       putchar(' ');
> +                       printHex((ip >> 1));
> +                       /* begin printChar: */
> +                       putchar(')');
> +                       /* begin cr */
> +                       printf("\n");
> +               }
>        }
>        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex <<
> ShiftForWord));
>        sp = ((sp < ((lengthOf(aContext)) - ReceiverIndex)) ? sp :
> ((lengthOf(aContext)) - ReceiverIndex));
> @@ -41910,6 +41937,7 @@
>  shortPrintContext(sqInt aContext)
>  {
>     sqInt home;
> +    char *theFP;
>
>        if (!(((aContext & 1) == 0)
>                 && (((((usqInt) (longAt(aContext))) >> 12) & 31) ==
> ClassMethodContextCompactIndex))) {
> @@ -41920,14 +41948,20 @@
>                return;
>        }
>        home = findHomeForContext(aContext);
> -       printNum(aContext);
> +       printHex(aContext);
>        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex <<
> ShiftForWord))) & 1)) {
> -               if ((checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer)))
> -                && (isMachineCodeFrame(frameOfMarriedContext(aContext))))
> {
> -                       print(" m ");
> +               if (checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer))) {
> +                       if (isMachineCodeFrame((theFP =
> frameOfMarriedContext(aContext)))) {
> +                               print(" M (");
> +                       }
> +                       else {
> +                               print(" I (");
> +                       }
> +                       printHex(theFP);
> +                       print(") ");
>                }
>                else {
> -                       print(" i ");
> +                       print(" w ");
>                }
>        }
>        else {
> @@ -42002,7 +42036,7 @@
>  void
>  shortPrintFrameAndNCallers(char *theFP, sqInt n)
>  {   DECL_MAYBE_SQ_GLOBAL_STRUCT
> -       if ((n > 0)
> +       if ((n != 0)
>         && ((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0)
>         && ((((((usqInt)theFP)) >= (((usqInt)(GIV(stackBasePlus1) - 1))))
> && ((((usqInt)theFP)) <= (((usqInt)GIV(pages)))))))) {
>                shortPrintFrame(theFP);
> @@ -45647,6 +45681,7 @@
>        {"", "callbackEnter", (void*)callbackEnter},
>        {"", "callbackLeave", (void*)callbackLeave},
>        {"", "dumpImage", (void*)dumpImage},
> +       {"", "internalIsImmutable", (void*)internalIsImmutable},
>        {"", "moduleUnloaded", (void*)moduleUnloaded},
>        {"", "primitiveAddLargeIntegers", (void*)primitiveAddLargeIntegers},
>        {"", "primitiveBitAndLargeIntegers",
> (void*)primitiveBitAndLargeIntegers},
>
> Modified: branches/Cog/nscogsrc/vm/interp.h
> ===================================================================
> --- branches/Cog/nscogsrc/vm/interp.h   2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/nscogsrc/vm/interp.h   2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>  #define VM_PROXY_MAJOR 1
>
> Modified: branches/Cog/nscogsrc/vm/vmCallback.h
> ===================================================================
> --- branches/Cog/nscogsrc/vm/vmCallback.h       2011-11-15 00:39:49 UTC
> (rev 2513)
> +++ branches/Cog/nscogsrc/vm/vmCallback.h       2011-11-18 01:18:02 UTC
> (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>  #define VM_CALLBACK_INC 1
>
>
> Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
> ___________________________________________________________________
> Modified: checkindate
>   - Wed Nov  9 11:39:06 PST 2011
>   + Thu Nov 17 17:17:12 PST 2011
>
> Modified: branches/Cog/src/vm/cogit.c
> ===================================================================
> --- branches/Cog/src/vm/cogit.c 2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cogit.c 2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,9 @@
>  /* Automatically generated by
> -       CCodeGenerator VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       CCodeGenerator VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       StackToRegisterMappingCogit VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       StackToRegisterMappingCogit VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "StackToRegisterMappingCogit
> VMMaker.oscog-eem.135 uuid: 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba " __DATE__
> ;
> +static char __buildInfo[] = "StackToRegisterMappingCogit
> VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__
> ;
>  char *__cogitBuildInfo = __buildInfo;
>
>
> @@ -798,6 +798,7 @@
>  sqInt isSendReturnPC(sqInt retpc);
>  static sqInt isSmallIntegerTagNonZero(void);
>  static sqInt isUnconditionalBranch(BytecodeDescriptor *
> self_in_isUnconditionalBranch);
> +static sqInt isValidFramelessRegister(sqInt reg);
>  static AbstractInstruction * gJumpFPEqual(void *jumpTarget);
>  static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget);
>  static AbstractInstruction * gJumpFPGreater(void *jumpTarget);
> @@ -951,6 +952,7 @@
>  static void ssFlushTo(sqInt index);
>  static void ssFlushUpThroughReceiverVariable(sqInt slotIndex);
>  static void ssFlushUpThroughTemporaryVariable(sqInt tempIndex);
> +static void ssPopSpillsFrom(sqInt index);
>  static void ssPop(sqInt n);
>  static sqInt ssPushAnnotatedConstant(sqInt literal);
>  static sqInt ssPushBaseoffset(sqInt reg, sqInt offset);
> @@ -12281,6 +12283,7 @@
>                genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);
>        }
>        else {
> +               ssPopSpillsFrom(methodOrBlockNumArgs - 1);
>                /* begin RetN: */
>                offset = ((methodOrBlockNumArgs > (numRegArgs()))
>                 || (regArgsHaveBeenPushed)
> @@ -13042,6 +13045,16 @@
>  }
>
>
> +/*     Answer if the receiver is valid in a frameless method. */
> +
> +static sqInt
> +isValidFramelessRegister(sqInt reg)
> +{
> +       return (reg == ReceiverResultReg)
> +        || (reg == Arg0Reg);
> +}
> +
> +
>  /*     Floating-point jumps are a little weird on some processors. Defer
> to
>        the backEnd to allow it to generate any special code it may need
> to. */
>
> @@ -16054,7 +16067,10 @@
>        }
>        if (simSpillBase <= index) {
>                for (i = (((simSpillBase < 0) ? 0 : simSpillBase)); i <=
> index; i += 1) {
> -                       assert(needsFrame);
> +                       assert(needsFrame
> +                        || (((((simStackAt(i)->type)) == SSBaseOffset)
> + || (((simStackAt(i)->type)) == SSRegister))
> +                        &&
> (isValidFramelessRegister((simStackAt(i)->registerr)))));
>                        ensureSpilledAtfrom(simStackAt(i),
> frameOffsetOfTemporary(i), FPReg);
>                }
>                simSpillBase = index + 1;
> @@ -16103,7 +16119,24 @@
>        }
>  }
>
> +
> +/*     Pop any spilled items on the sim stack from index, used to balance
> the
> +       stack on return.
> + */
> +
>  static void
> +ssPopSpillsFrom(sqInt index)
> +{
> +    sqInt i;
> +
> +       for (i = index; i <= simStackPtr; i += 1) {
> +               if ((simStackAt(i)->spilled)) {
> +                       popToReg(ssTop(), TempReg);
> +               }
> +       }
> +}
> +
> +static void
>  ssPop(sqInt n)
>  {
>        assert(((simStackPtr - n) >= (methodOrBlockNumTemps - 1))
>
> Modified: branches/Cog/src/vm/cogit.h
> ===================================================================
> --- branches/Cog/src/vm/cogit.h 2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cogit.h 2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGenerator VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       CCodeGenerator VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>
>
> Modified: branches/Cog/src/vm/cogmethod.h
> ===================================================================
> --- branches/Cog/src/vm/cogmethod.h     2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cogmethod.h     2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGenerator VMMaker.oscog-eem.135 uuid:
> 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba
> +       CCodeGenerator VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>  typedef struct {
>
> Modified: branches/Cog/src/vm/cointerp.c
> ===================================================================
> --- branches/Cog/src/vm/cointerp.c      2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cointerp.c      2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,9 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc " __DATE__ ;
> +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__ ;
>  char *__interpBuildInfo = __buildInfo;
>
>
> @@ -327,6 +327,7 @@
>  sqInt interpret(void);
>  static void activateCoggedNewMethod(sqInt inInterpreter);
>  static void activateNewMethod(void);
> +sqInt activeProcess(void);
>  EXPORT(sqInt) addGCRoot(sqInt *varLoc);
>  static void addLastLinktoList(sqInt proc, sqInt aList);
>  static void addNewMethodToCache(sqInt class);
> @@ -1889,7 +1890,7 @@
>        /* 575 */ (void (*)(void))0,
>  0 };
>  static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /*
> 4097 */])(void);
> -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter
> VMMaker.oscog-eem.137]";
> +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter
> VMMaker.oscog-eem.138]";
>  sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /*
> 10 */;
>  volatile int sendTrace;
>
> @@ -8684,6 +8685,16 @@
>  }
>
>
> +/*     Answer the current activeProcess. */
> +/*     useful for VM debugging */
> +
> +sqInt
> +activeProcess(void)
> +{
> +       return longAt(((longAt(((longAt((GIV(specialObjectsOop) +
> BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) +
> BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) +
> (ActiveProcessIndex << ShiftForWord));
> +}
> +
> +
>  /*     Add the given variable location to the extra roots table */
>
>  EXPORT(sqInt)
> @@ -19755,13 +19766,17 @@
>                        goto l1;
>                }
>        l1:     /* end lengthOf: */;
> -               if ((lastIndex - startIP) > 100) {
> -                       lastIndex = startIP + 100;
> +               if ((lastIndex - startIP) > 104) {
> +                       lastIndex = startIP + 103;
>                }
>                bytecodesPerLine = 8;
>                for (index = startIP; index <= lastIndex; index += 1) {
>                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));
>                        printf(" %02x/%-3d", byte,byte);
> +                       if ((index == lastIndex)
> +                        && ((lengthOf(oop)) > index)) {
> +                               print("...");
> +                       }
>                        if ((((index - startIP) + 1) % bytecodesPerLine) ==
> 0) {
>                                /* begin cr */
>                                printf("\n");
> @@ -37608,7 +37623,7 @@
>
>  void
>  printContext(sqInt aContext)
> -{
> +{   DECL_MAYBE_SQ_GLOBAL_STRUCT
>     sqInt i;
>     sqInt ip;
>     void *p;
> @@ -37659,17 +37674,22 @@
>                print("sender   ");
>                shortPrintOop(sender);
>                print("ip       ");
> -               printNum(ip);
> -               print(" (");
> -               printNum((ip >> 1));
> -               /* begin space */
> -               /* begin printChar: */
> -               putchar(' ');
> -               printHex((ip >> 1));
> -               /* begin printChar: */
> -               putchar(')');
> -               /* begin cr */
> -               printf("\n");
> +               if (ip == GIV(nilObj)) {
> +                       shortPrintOop(ip);
> +               }
> +               else {
> +                       printNum(ip);
> +                       print(" (");
> +                       printNum((ip >> 1));
> +                       /* begin space */
> +                       /* begin printChar: */
> +                       putchar(' ');
> +                       printHex((ip >> 1));
> +                       /* begin printChar: */
> +                       putchar(')');
> +                       /* begin cr */
> +                       printf("\n");
> +               }
>        }
>        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex <<
> ShiftForWord));
>        sp = ((sp < ((lengthOf(aContext)) - ReceiverIndex)) ? sp :
> ((lengthOf(aContext)) - ReceiverIndex));
> @@ -41224,6 +41244,7 @@
>  shortPrintContext(sqInt aContext)
>  {
>     sqInt home;
> +    char *theFP;
>
>        if (!(((aContext & 1) == 0)
>                 && (((((usqInt) (longAt(aContext))) >> 12) & 31) ==
> ClassMethodContextCompactIndex))) {
> @@ -41234,14 +41255,20 @@
>                return;
>        }
>        home = findHomeForContext(aContext);
> -       printNum(aContext);
> +       printHex(aContext);
>        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex <<
> ShiftForWord))) & 1)) {
> -               if ((checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer)))
> -                && (isMachineCodeFrame(frameOfMarriedContext(aContext))))
> {
> -                       print(" m ");
> +               if (checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer))) {
> +                       if (isMachineCodeFrame((theFP =
> frameOfMarriedContext(aContext)))) {
> +                               print(" M (");
> +                       }
> +                       else {
> +                               print(" I (");
> +                       }
> +                       printHex(theFP);
> +                       print(") ");
>                }
>                else {
> -                       print(" i ");
> +                       print(" w ");
>                }
>        }
>        else {
> @@ -41316,7 +41343,7 @@
>  void
>  shortPrintFrameAndNCallers(char *theFP, sqInt n)
>  {   DECL_MAYBE_SQ_GLOBAL_STRUCT
> -       if ((n > 0)
> +       if ((n != 0)
>         && ((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0)
>         && ((((((usqInt)theFP)) >= (((usqInt)(GIV(stackBasePlus1) - 1))))
> && ((((usqInt)theFP)) <= (((usqInt)GIV(pages)))))))) {
>                shortPrintFrame(theFP);
>
> Modified: branches/Cog/src/vm/cointerp.h
> ===================================================================
> --- branches/Cog/src/vm/cointerp.h      2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cointerp.h      2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,10 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>
>  /*** Function Prototypes ***/
> +sqInt activeProcess(void);
>  sqInt addressCouldBeObj(sqInt address);
>  sqInt addressCouldBeOop(sqInt address);
>  usqInt argumentCountAddress(void);
>
> Modified: branches/Cog/src/vm/cointerpmt.c
> ===================================================================
> --- branches/Cog/src/vm/cointerpmt.c    2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cointerpmt.c    2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,9 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       CoInterpreterMT VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CoInterpreterMT VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc " __DATE__ ;
> +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__ ;
>  char *__interpBuildInfo = __buildInfo;
>
>
> @@ -370,7 +370,7 @@
>  sqInt interpret(void);
>  static void activateCoggedNewMethod(sqInt inInterpreter);
>  static void activateNewMethod(void);
> -static sqInt activeProcess(void);
> +sqInt activeProcess(void);
>  EXPORT(sqInt) addGCRoot(sqInt *varLoc);
>  static void addLastLinktoList(sqInt proc, sqInt aList);
>  static void addNewMethodToCache(sqInt class);
> @@ -1989,7 +1989,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.137]";
> +const char *interpreterVersion = "Croquet Closure Cog MT VM
> [CoInterpreterMT VMMaker.oscog-eem.138]";
>  sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /*
> 10 */;
>  volatile int sendTrace;
>  sqInt willNotThreadWarnCount;
> @@ -8787,8 +8787,9 @@
>
>
>  /*     Answer the current activeProcess. */
> +/*     useful for VM debugging */
>
> -static sqInt
> +sqInt
>  activeProcess(void)
>  {
>        return longAt(((longAt(((longAt((GIV(specialObjectsOop) +
> BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) +
> BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) +
> (ActiveProcessIndex << ShiftForWord));
> @@ -20488,13 +20489,17 @@
>                        goto l1;
>                }
>        l1:     /* end lengthOf: */;
> -               if ((lastIndex - startIP) > 100) {
> -                       lastIndex = startIP + 100;
> +               if ((lastIndex - startIP) > 104) {
> +                       lastIndex = startIP + 103;
>                }
>                bytecodesPerLine = 8;
>                for (index = startIP; index <= lastIndex; index += 1) {
>                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));
>                        printf(" %02x/%-3d", byte,byte);
> +                       if ((index == lastIndex)
> +                        && ((lengthOf(oop)) > index)) {
> +                               print("...");
> +                       }
>                        if ((((index - startIP) + 1) % bytecodesPerLine) ==
> 0) {
>                                /* begin cr */
>                                printf("\n");
> @@ -38935,7 +38940,7 @@
>
>  void
>  printContext(sqInt aContext)
> -{
> +{   DECL_MAYBE_SQ_GLOBAL_STRUCT
>     sqInt i;
>     sqInt ip;
>     void *p;
> @@ -38986,17 +38991,22 @@
>                print("sender   ");
>                shortPrintOop(sender);
>                print("ip       ");
> -               printNum(ip);
> -               print(" (");
> -               printNum((ip >> 1));
> -               /* begin space */
> -               /* begin printChar: */
> -               putchar(' ');
> -               printHex((ip >> 1));
> -               /* begin printChar: */
> -               putchar(')');
> -               /* begin cr */
> -               printf("\n");
> +               if (ip == GIV(nilObj)) {
> +                       shortPrintOop(ip);
> +               }
> +               else {
> +                       printNum(ip);
> +                       print(" (");
> +                       printNum((ip >> 1));
> +                       /* begin space */
> +                       /* begin printChar: */
> +                       putchar(' ');
> +                       printHex((ip >> 1));
> +                       /* begin printChar: */
> +                       putchar(')');
> +                       /* begin cr */
> +                       printf("\n");
> +               }
>        }
>        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex <<
> ShiftForWord));
>        sp = ((sp < ((lengthOf(aContext)) - ReceiverIndex)) ? sp :
> ((lengthOf(aContext)) - ReceiverIndex));
> @@ -42652,6 +42662,7 @@
>  shortPrintContext(sqInt aContext)
>  {
>     sqInt home;
> +    char *theFP;
>
>        if (!(((aContext & 1) == 0)
>                 && (((((usqInt) (longAt(aContext))) >> 12) & 31) ==
> ClassMethodContextCompactIndex))) {
> @@ -42662,14 +42673,20 @@
>                return;
>        }
>        home = findHomeForContext(aContext);
> -       printNum(aContext);
> +       printHex(aContext);
>        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex <<
> ShiftForWord))) & 1)) {
> -               if ((checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer)))
> -                && (isMachineCodeFrame(frameOfMarriedContext(aContext))))
> {
> -                       print(" m ");
> +               if (checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer))) {
> +                       if (isMachineCodeFrame((theFP =
> frameOfMarriedContext(aContext)))) {
> +                               print(" M (");
> +                       }
> +                       else {
> +                               print(" I (");
> +                       }
> +                       printHex(theFP);
> +                       print(") ");
>                }
>                else {
> -                       print(" i ");
> +                       print(" w ");
>                }
>        }
>        else {
> @@ -42744,7 +42761,7 @@
>  void
>  shortPrintFrameAndNCallers(char *theFP, sqInt n)
>  {   DECL_MAYBE_SQ_GLOBAL_STRUCT
> -       if ((n > 0)
> +       if ((n != 0)
>         && ((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0)
>         && ((((((usqInt)theFP)) >= (((usqInt)(GIV(stackBasePlus1) - 1))))
> && ((((usqInt)theFP)) <= (((usqInt)GIV(pages)))))))) {
>                shortPrintFrame(theFP);
>
> Modified: branches/Cog/src/vm/cointerpmt.h
> ===================================================================
> --- branches/Cog/src/vm/cointerpmt.h    2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/cointerpmt.h    2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,9 +1,10 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>
>  /*** Function Prototypes ***/
> +sqInt activeProcess(void);
>  sqInt addressCouldBeObj(sqInt address);
>  sqInt addressCouldBeOop(sqInt address);
>  usqInt argumentCountAddress(void);
>
> Modified: branches/Cog/src/vm/gcc3x-cointerp.c
> ===================================================================
> --- branches/Cog/src/vm/gcc3x-cointerp.c        2011-11-15 00:39:49 UTC
> (rev 2513)
> +++ branches/Cog/src/vm/gcc3x-cointerp.c        2011-11-18 01:18:02 UTC
> (rev 2514)
> @@ -2,11 +2,11 @@
>
>
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc " __DATE__ ;
> +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__ ;
>  char *__interpBuildInfo = __buildInfo;
>
>
> @@ -330,6 +330,7 @@
>  sqInt interpret(void);
>  static void activateCoggedNewMethod(sqInt inInterpreter);
>  static void activateNewMethod(void);
> +sqInt activeProcess(void);
>  EXPORT(sqInt) addGCRoot(sqInt *varLoc);
>  static void addLastLinktoList(sqInt proc, sqInt aList);
>  static void addNewMethodToCache(sqInt class);
> @@ -1892,7 +1893,7 @@
>        /* 575 */ (void (*)(void))0,
>  0 };
>  static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /*
> 4097 */])(void);
> -const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter
> VMMaker.oscog-eem.137]";
> +const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter
> VMMaker.oscog-eem.138]";
>  sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /*
> 10 */;
>  volatile int sendTrace;
>
> @@ -8688,6 +8689,16 @@
>  }
>
>
> +/*     Answer the current activeProcess. */
> +/*     useful for VM debugging */
> +
> +sqInt
> +activeProcess(void)
> +{
> +       return longAt(((longAt(((longAt((GIV(specialObjectsOop) +
> BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) +
> BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) +
> (ActiveProcessIndex << ShiftForWord));
> +}
> +
> +
>  /*     Add the given variable location to the extra roots table */
>
>  EXPORT(sqInt)
> @@ -19759,13 +19770,17 @@
>                        goto l1;
>                }
>        l1:     /* end lengthOf: */;
> -               if ((lastIndex - startIP) > 100) {
> -                       lastIndex = startIP + 100;
> +               if ((lastIndex - startIP) > 104) {
> +                       lastIndex = startIP + 103;
>                }
>                bytecodesPerLine = 8;
>                for (index = startIP; index <= lastIndex; index += 1) {
>                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));
>                        printf(" %02x/%-3d", byte,byte);
> +                       if ((index == lastIndex)
> +                        && ((lengthOf(oop)) > index)) {
> +                               print("...");
> +                       }
>                        if ((((index - startIP) + 1) % bytecodesPerLine) ==
> 0) {
>                                /* begin cr */
>                                printf("\n");
> @@ -37612,7 +37627,7 @@
>
>  void
>  printContext(sqInt aContext)
> -{
> +{   DECL_MAYBE_SQ_GLOBAL_STRUCT
>     sqInt i;
>     sqInt ip;
>     void *p;
> @@ -37663,17 +37678,22 @@
>                print("sender   ");
>                shortPrintOop(sender);
>                print("ip       ");
> -               printNum(ip);
> -               print(" (");
> -               printNum((ip >> 1));
> -               /* begin space */
> -               /* begin printChar: */
> -               putchar(' ');
> -               printHex((ip >> 1));
> -               /* begin printChar: */
> -               putchar(')');
> -               /* begin cr */
> -               printf("\n");
> +               if (ip == GIV(nilObj)) {
> +                       shortPrintOop(ip);
> +               }
> +               else {
> +                       printNum(ip);
> +                       print(" (");
> +                       printNum((ip >> 1));
> +                       /* begin space */
> +                       /* begin printChar: */
> +                       putchar(' ');
> +                       printHex((ip >> 1));
> +                       /* begin printChar: */
> +                       putchar(')');
> +                       /* begin cr */
> +                       printf("\n");
> +               }
>        }
>        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex <<
> ShiftForWord));
>        sp = ((sp < ((lengthOf(aContext)) - ReceiverIndex)) ? sp :
> ((lengthOf(aContext)) - ReceiverIndex));
> @@ -41228,6 +41248,7 @@
>  shortPrintContext(sqInt aContext)
>  {
>     sqInt home;
> +    char *theFP;
>
>        if (!(((aContext & 1) == 0)
>                 && (((((usqInt) (longAt(aContext))) >> 12) & 31) ==
> ClassMethodContextCompactIndex))) {
> @@ -41238,14 +41259,20 @@
>                return;
>        }
>        home = findHomeForContext(aContext);
> -       printNum(aContext);
> +       printHex(aContext);
>        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex <<
> ShiftForWord))) & 1)) {
> -               if ((checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer)))
> -                && (isMachineCodeFrame(frameOfMarriedContext(aContext))))
> {
> -                       print(" m ");
> +               if (checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer))) {
> +                       if (isMachineCodeFrame((theFP =
> frameOfMarriedContext(aContext)))) {
> +                               print(" M (");
> +                       }
> +                       else {
> +                               print(" I (");
> +                       }
> +                       printHex(theFP);
> +                       print(") ");
>                }
>                else {
> -                       print(" i ");
> +                       print(" w ");
>                }
>        }
>        else {
> @@ -41320,7 +41347,7 @@
>  void
>  shortPrintFrameAndNCallers(char *theFP, sqInt n)
>  {   DECL_MAYBE_SQ_GLOBAL_STRUCT
> -       if ((n > 0)
> +       if ((n != 0)
>         && ((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0)
>         && ((((((usqInt)theFP)) >= (((usqInt)(GIV(stackBasePlus1) - 1))))
> && ((((usqInt)theFP)) <= (((usqInt)GIV(pages)))))))) {
>                shortPrintFrame(theFP);
>
> Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c
> ===================================================================
> --- branches/Cog/src/vm/gcc3x-cointerpmt.c      2011-11-15 00:39:49 UTC
> (rev 2513)
> +++ branches/Cog/src/vm/gcc3x-cointerpmt.c      2011-11-18 01:18:02 UTC
> (rev 2514)
> @@ -2,11 +2,11 @@
>
>
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>    from
> -       CoInterpreterMT VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CoInterpreterMT VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
> -static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc " __DATE__ ;
> +static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d " __DATE__ ;
>  char *__interpBuildInfo = __buildInfo;
>
>
> @@ -373,7 +373,7 @@
>  sqInt interpret(void);
>  static void activateCoggedNewMethod(sqInt inInterpreter);
>  static void activateNewMethod(void);
> -static sqInt activeProcess(void);
> +sqInt activeProcess(void);
>  EXPORT(sqInt) addGCRoot(sqInt *varLoc);
>  static void addLastLinktoList(sqInt proc, sqInt aList);
>  static void addNewMethodToCache(sqInt class);
> @@ -1992,7 +1992,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.137]";
> +const char *interpreterVersion = "Croquet Closure Cog MT VM
> [CoInterpreterMT VMMaker.oscog-eem.138]";
>  sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /*
> 10 */;
>  volatile int sendTrace;
>  sqInt willNotThreadWarnCount;
> @@ -8791,8 +8791,9 @@
>
>
>  /*     Answer the current activeProcess. */
> +/*     useful for VM debugging */
>
> -static sqInt
> +sqInt
>  activeProcess(void)
>  {
>        return longAt(((longAt(((longAt((GIV(specialObjectsOop) +
> BaseHeaderSize) + (SchedulerAssociation << ShiftForWord))) +
> BaseHeaderSize) + (ValueIndex << ShiftForWord))) + BaseHeaderSize) +
> (ActiveProcessIndex << ShiftForWord));
> @@ -20492,13 +20493,17 @@
>                        goto l1;
>                }
>        l1:     /* end lengthOf: */;
> -               if ((lastIndex - startIP) > 100) {
> -                       lastIndex = startIP + 100;
> +               if ((lastIndex - startIP) > 104) {
> +                       lastIndex = startIP + 103;
>                }
>                bytecodesPerLine = 8;
>                for (index = startIP; index <= lastIndex; index += 1) {
>                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));
>                        printf(" %02x/%-3d", byte,byte);
> +                       if ((index == lastIndex)
> +                        && ((lengthOf(oop)) > index)) {
> +                               print("...");
> +                       }
>                        if ((((index - startIP) + 1) % bytecodesPerLine) ==
> 0) {
>                                /* begin cr */
>                                printf("\n");
> @@ -38939,7 +38944,7 @@
>
>  void
>  printContext(sqInt aContext)
> -{
> +{   DECL_MAYBE_SQ_GLOBAL_STRUCT
>     sqInt i;
>     sqInt ip;
>     void *p;
> @@ -38990,17 +38995,22 @@
>                print("sender   ");
>                shortPrintOop(sender);
>                print("ip       ");
> -               printNum(ip);
> -               print(" (");
> -               printNum((ip >> 1));
> -               /* begin space */
> -               /* begin printChar: */
> -               putchar(' ');
> -               printHex((ip >> 1));
> -               /* begin printChar: */
> -               putchar(')');
> -               /* begin cr */
> -               printf("\n");
> +               if (ip == GIV(nilObj)) {
> +                       shortPrintOop(ip);
> +               }
> +               else {
> +                       printNum(ip);
> +                       print(" (");
> +                       printNum((ip >> 1));
> +                       /* begin space */
> +                       /* begin printChar: */
> +                       putchar(' ');
> +                       printHex((ip >> 1));
> +                       /* begin printChar: */
> +                       putchar(')');
> +                       /* begin cr */
> +                       printf("\n");
> +               }
>        }
>        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex <<
> ShiftForWord));
>        sp = ((sp < ((lengthOf(aContext)) - ReceiverIndex)) ? sp :
> ((lengthOf(aContext)) - ReceiverIndex));
> @@ -42656,6 +42666,7 @@
>  shortPrintContext(sqInt aContext)
>  {
>     sqInt home;
> +    char *theFP;
>
>        if (!(((aContext & 1) == 0)
>                 && (((((usqInt) (longAt(aContext))) >> 12) & 31) ==
> ClassMethodContextCompactIndex))) {
> @@ -42666,14 +42677,20 @@
>                return;
>        }
>        home = findHomeForContext(aContext);
> -       printNum(aContext);
> +       printHex(aContext);
>        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex <<
> ShiftForWord))) & 1)) {
> -               if ((checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer)))
> -                && (isMachineCodeFrame(frameOfMarriedContext(aContext))))
> {
> -                       print(" m ");
> +               if (checkIsStillMarriedContextcurrentFP(aContext,
> GIV(framePointer))) {
> +                       if (isMachineCodeFrame((theFP =
> frameOfMarriedContext(aContext)))) {
> +                               print(" M (");
> +                       }
> +                       else {
> +                               print(" I (");
> +                       }
> +                       printHex(theFP);
> +                       print(") ");
>                }
>                else {
> -                       print(" i ");
> +                       print(" w ");
>                }
>        }
>        else {
> @@ -42748,7 +42765,7 @@
>  void
>  shortPrintFrameAndNCallers(char *theFP, sqInt n)
>  {   DECL_MAYBE_SQ_GLOBAL_STRUCT
> -       if ((n > 0)
> +       if ((n != 0)
>         && ((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0)
>         && ((((((usqInt)theFP)) >= (((usqInt)(GIV(stackBasePlus1) - 1))))
> && ((((usqInt)theFP)) <= (((usqInt)GIV(pages)))))))) {
>                shortPrintFrame(theFP);
>
> Modified: branches/Cog/src/vm/interp.h
> ===================================================================
> --- branches/Cog/src/vm/interp.h        2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/interp.h        2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>  #define VM_PROXY_MAJOR 1
>
> Modified: branches/Cog/src/vm/vmCallback.h
> ===================================================================
> --- branches/Cog/src/vm/vmCallback.h    2011-11-15 00:39:49 UTC (rev 2513)
> +++ branches/Cog/src/vm/vmCallback.h    2011-11-18 01:18:02 UTC (rev 2514)
> @@ -1,5 +1,5 @@
>  /* Automatically generated by
> -       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid:
> fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc
> +       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.138 uuid:
> f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d
>  */
>
>  #define VM_CALLBACK_INC 1
>
>


-- 
best,
Eliot

[Attachment #6 (text/html)]

This &quot;fix&quot;, 138, is badly broken.  Please use 139 instead.<br><br><div \
class="gmail_quote">On Thu, Nov 17, 2011 at 5:18 PM,  <span dir="ltr">&lt;<a \
href="mailto:commits@squeakvm.org">commits@squeakvm.org</a>&gt;</span> wrote:<br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
                solid;padding-left:1ex;"><br>
Author: eliot<br>
Date: 2011-11-17 17:18:02 -0800 (Thu, 17 Nov 2011)<br>
New Revision: 2514<br>
<br>
Modified:<br>
   branches/Cog/nscogsrc/vm/cogit.c<br>
   branches/Cog/nscogsrc/vm/cogit.h<br>
   branches/Cog/nscogsrc/vm/cogmethod.h<br>
   branches/Cog/nscogsrc/vm/cointerp.c<br>
   branches/Cog/nscogsrc/vm/cointerp.h<br>
   branches/Cog/nscogsrc/vm/gcc3x-cointerp.c<br>
   branches/Cog/nscogsrc/vm/interp.h<br>
   branches/Cog/nscogsrc/vm/vmCallback.h<br>
   branches/Cog/platforms/Cross/vm/sqSCCSVersion.h<br>
   branches/Cog/src/vm/cogit.c<br>
   branches/Cog/src/vm/cogit.h<br>
   branches/Cog/src/vm/cogmethod.h<br>
   branches/Cog/src/vm/cointerp.c<br>
   branches/Cog/src/vm/cointerp.h<br>
   branches/Cog/src/vm/cointerpmt.c<br>
   branches/Cog/src/vm/cointerpmt.h<br>
   branches/Cog/src/vm/gcc3x-cointerp.c<br>
   branches/Cog/src/vm/gcc3x-cointerpmt.c<br>
   branches/Cog/src/vm/interp.h<br>
   branches/Cog/src/vm/vmCallback.h<br>
Log:<br>
CogVM source as per VMMaker.oscog-eem.138.<br>
Fix frameless foo: arg instVar := instVar code gen bug (failure to pop<br>
spills on frameless return).  Use more hex printing in frame/oop printing.<br>
<br>
<br>
Modified: branches/Cog/nscogsrc/vm/cogit.c<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/cogit.c    2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/nscogsrc/vm/cogit.c    2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,9 @@<br>
 /* Automatically generated by<br>
-       CCodeGenerator VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       CCodeGenerator VMMaker.oscog-eem.138 \
uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       StackToRegisterMappingCogit VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       StackToRegisterMappingCogit \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;StackToRegisterMappingCogit VMMaker.oscog-eem.135 \
uuid: 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba &quot; __DATE__ ;<br> +static char \
__buildInfo[] = &quot;StackToRegisterMappingCogit VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__cogitBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -805,6 +805,7 @@<br>
 sqInt isSendReturnPC(sqInt retpc);<br>
 static sqInt isSmallIntegerTagNonZero(void);<br>
 static sqInt isUnconditionalBranch(BytecodeDescriptor * \
self_in_isUnconditionalBranch);<br> +static sqInt isValidFramelessRegister(sqInt \
reg);<br>  static AbstractInstruction * gJumpFPEqual(void *jumpTarget);<br>
 static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget);<br>
 static AbstractInstruction * gJumpFPGreater(void *jumpTarget);<br>
@@ -963,6 +964,7 @@<br>
 static void ssFlushTo(sqInt index);<br>
 static void ssFlushUpThroughReceiverVariable(sqInt slotIndex);<br>
 static void ssFlushUpThroughTemporaryVariable(sqInt tempIndex);<br>
+static void ssPopSpillsFrom(sqInt index);<br>
 static void ssPop(sqInt n);<br>
 static sqInt ssPushAnnotatedConstant(sqInt literal);<br>
 static sqInt ssPushBaseoffset(sqInt reg, sqInt offset);<br>
@@ -12493,6 +12495,7 @@<br>
                genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);<br>
        }<br>
        else {<br>
+               ssPopSpillsFrom(methodOrBlockNumArgs - 1);<br>
                /* begin RetN: */<br>
                offset = ((methodOrBlockNumArgs &gt; (numRegArgs()))<br>
                 || (regArgsHaveBeenPushed)<br>
@@ -13254,6 +13257,16 @@<br>
 }<br>
<br>
<br>
+/*     Answer if the receiver is valid in a frameless method. */<br>
+<br>
+static sqInt<br>
+isValidFramelessRegister(sqInt reg)<br>
+{<br>
+       return (reg == ReceiverResultReg)<br>
+        || (reg == Arg0Reg);<br>
+}<br>
+<br>
+<br>
 /*     Floating-point jumps are a little weird on some processors. Defer to<br>
        the backEnd to allow it to generate any special code it may need to. */<br>
<br>
@@ -16539,7 +16552,10 @@<br>
        }<br>
        if (simSpillBase &lt;= index) {<br>
                for (i = (((simSpillBase &lt; 0) ? 0 : simSpillBase)); i &lt;= index; \
                i += 1) {<br>
-                       assert(needsFrame);<br>
+                       assert(needsFrame<br>
+                        || (((((simStackAt(i)-&gt;type)) == SSBaseOffset)<br>
+ || (((simStackAt(i)-&gt;type)) == SSRegister))<br>
+                        &amp;&amp; \
                (isValidFramelessRegister((simStackAt(i)-&gt;registerr)))));<br>
                        ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i), \
FPReg);<br>  }<br>
                simSpillBase = index + 1;<br>
@@ -16588,7 +16604,24 @@<br>
        }<br>
 }<br>
<br>
+<br>
+/*     Pop any spilled items on the sim stack from index, used to balance the<br>
+       stack on return.<br>
+ */<br>
+<br>
 static void<br>
+ssPopSpillsFrom(sqInt index)<br>
+{<br>
+    sqInt i;<br>
+<br>
+       for (i = index; i &lt;= simStackPtr; i += 1) {<br>
+               if ((simStackAt(i)-&gt;spilled)) {<br>
+                       popToReg(ssTop(), TempReg);<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+static void<br>
 ssPop(sqInt n)<br>
 {<br>
        assert(((simStackPtr - n) &gt;= (methodOrBlockNumTemps - 1))<br>
<br>
Modified: branches/Cog/nscogsrc/vm/cogit.h<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/cogit.h    2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/nscogsrc/vm/cogit.h    2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGenerator VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       CCodeGenerator VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
<br>
<br>
Modified: branches/Cog/nscogsrc/vm/cogmethod.h<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/cogmethod.h        2011-11-15 00:39:49 UTC (rev \
                2513)<br>
+++ branches/Cog/nscogsrc/vm/cogmethod.h        2011-11-18 01:18:02 UTC (rev \
2514)<br> @@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGenerator VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       CCodeGenerator VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
 typedef struct {<br>
<br>
Modified: branches/Cog/nscogsrc/vm/cointerp.c<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/cointerp.c 2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/nscogsrc/vm/cointerp.c 2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,9 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CoInterpreter VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc &quot; __DATE__ ;<br> +static char __buildInfo[] \
= &quot;CoInterpreter VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__interpBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -330,6 +330,7 @@<br>
 sqInt interpret(void);<br>
 static void activateCoggedNewMethod(sqInt inInterpreter);<br>
 static void activateNewMethod(void);<br>
+sqInt activeProcess(void);<br>
 EXPORT(sqInt) addGCRoot(sqInt *varLoc);<br>
 static void addLastLinktoList(sqInt proc, sqInt aList);<br>
 static void addNewMethodToCache(sqInt class);<br>
@@ -586,6 +587,7 @@<br>
 sqInt integerArg(sqInt index);<br>
 sqInt integerObjectOf(sqInt value);<br>
 sqInt integerValueOf(sqInt objectPointer);<br>
+EXPORT(sqInt) internalIsImmutable(sqInt oop);<br>
 usqInt interpretAddress(void);<br>
 static sqInt interpreterAllocationReserveBytes(void);<br>
 static sqInt interpretMethodFromMachineCode(void);<br>
@@ -1898,7 +1900,7 @@<br>
        /* 575 */ (void (*)(void))0,<br>
  0 };<br>
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 \
                */])(void);<br>
-const char *interpreterVersion = &quot;Newspeak Virtual Machine \
CoInterpreter_VMMaker.oscog-eem.137&quot;;<br> +const char *interpreterVersion = \
&quot;Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.138&quot;;<br>  sqInt \
minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;<br>  \
volatile int sendTrace;<br> <br>
@@ -8924,6 +8926,16 @@<br>
 }<br>
<br>
<br>
+/*     Answer the current activeProcess. */<br>
+/*     useful for VM debugging */<br>
+<br>
+sqInt<br>
+activeProcess(void)<br>
+{<br>
+       return longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + \
(SchedulerAssociation &lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ValueIndex \
&lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex &lt;&lt; \
ShiftForWord));<br>

+}<br>
+<br>
+<br>
 /*     Add the given variable location to the extra roots table */<br>
<br>
 EXPORT(sqInt)<br>
@@ -19120,7 +19132,13 @@<br>
        }<br>
 }<br>
<br>
+EXPORT(sqInt)<br>
+internalIsImmutable(sqInt oop)<br>
+{<br>
+       return ((longAt(oop)) &amp; ImmutabilityBit) != 0;<br>
+}<br>
<br>
+<br>
 /*     This is used for asserts that check that inline cache editing results in<br>
        valid addresses.<br>
        In the C VM interpret is presumed to come before any primitives and so it<br>
@@ -20424,13 +20442,17 @@<br>
                        goto l1;<br>
                }<br>
        l1:     /* end lengthOf: */;<br>
-               if ((lastIndex - startIP) &gt; 100) {<br>
-                       lastIndex = startIP + 100;<br>
+               if ((lastIndex - startIP) &gt; 104) {<br>
+                       lastIndex = startIP + 103;<br>
                }<br>
                bytecodesPerLine = 8;<br>
                for (index = startIP; index &lt;= lastIndex; index += 1) {<br>
                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));<br>
                        printf(&quot; %02x/%-3d&quot;, byte,byte);<br>
+                       if ((index == lastIndex)<br>
+                        &amp;&amp; ((lengthOf(oop)) &gt; index)) {<br>
+                               print(&quot;...&quot;);<br>
+                       }<br>
                        if ((((index - startIP) + 1) % bytecodesPerLine) == 0) {<br>
                                /* begin cr */<br>
                                printf(&quot;\n&quot;);<br>
@@ -38290,7 +38312,7 @@<br>
<br>
 void<br>
 printContext(sqInt aContext)<br>
-{<br>
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
     sqInt i;<br>
     sqInt ip;<br>
     void *p;<br>
@@ -38341,17 +38363,22 @@<br>
                print(&quot;sender   &quot;);<br>
                shortPrintOop(sender);<br>
                print(&quot;ip       &quot;);<br>
-               printNum(ip);<br>
-               print(&quot; (&quot;);<br>
-               printNum((ip &gt;&gt; 1));<br>
-               /* begin space */<br>
-               /* begin printChar: */<br>
-               putchar(&#39; &#39;);<br>
-               printHex((ip &gt;&gt; 1));<br>
-               /* begin printChar: */<br>
-               putchar(&#39;)&#39;);<br>
-               /* begin cr */<br>
-               printf(&quot;\n&quot;);<br>
+               if (ip == GIV(nilObj)) {<br>
+                       shortPrintOop(ip);<br>
+               }<br>
+               else {<br>
+                       printNum(ip);<br>
+                       print(&quot; (&quot;);<br>
+                       printNum((ip &gt;&gt; 1));<br>
+                       /* begin space */<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39; &#39;);<br>
+                       printHex((ip &gt;&gt; 1));<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39;)&#39;);<br>
+                       /* begin cr */<br>
+                       printf(&quot;\n&quot;);<br>
+               }<br>
        }<br>
        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex &lt;&lt; \
                ShiftForWord));<br>
        sp = ((sp &lt; ((lengthOf(aContext)) - ReceiverIndex)) ? sp : \
((lengthOf(aContext)) - ReceiverIndex));<br> @@ -41906,6 +41933,7 @@<br>
 shortPrintContext(sqInt aContext)<br>
 {<br>
     sqInt home;<br>
+    char *theFP;<br>
<br>
        if (!(((aContext &amp; 1) == 0)<br>
                 &amp;&amp; (((((usqInt) (longAt(aContext))) &gt;&gt; 12) &amp; 31) \
== ClassMethodContextCompactIndex))) {<br> @@ -41916,14 +41944,20 @@<br>
                return;<br>
        }<br>
        home = findHomeForContext(aContext);<br>
-       printNum(aContext);<br>
+       printHex(aContext);<br>
        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex &lt;&lt; \
                ShiftForWord))) &amp; 1)) {<br>
-               if ((checkIsStillMarriedContextcurrentFP(aContext, \
                GIV(framePointer)))<br>
-                &amp;&amp; (isMachineCodeFrame(frameOfMarriedContext(aContext)))) \
                {<br>
-                       print(&quot; m &quot;);<br>
+               if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) \
{<br> +                       if (isMachineCodeFrame((theFP = \
frameOfMarriedContext(aContext)))) {<br> +                               print(&quot; \
M (&quot;);<br> +                       }<br>
+                       else {<br>
+                               print(&quot; I (&quot;);<br>
+                       }<br>
+                       printHex(theFP);<br>
+                       print(&quot;) &quot;);<br>
                }<br>
                else {<br>
-                       print(&quot; i &quot;);<br>
+                       print(&quot; w &quot;);<br>
                }<br>
        }<br>
        else {<br>
@@ -41998,7 +42032,7 @@<br>
 void<br>
 shortPrintFrameAndNCallers(char *theFP, sqInt n)<br>
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
-       if ((n &gt; 0)<br>
+       if ((n != 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &amp; (BytesPerWord - 1)) == 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &gt;= (((usqInt)(GIV(stackBasePlus1) - 1)))) \
&amp;&amp; ((((usqInt)theFP)) &lt;= (((usqInt)GIV(pages)))))))) {<br>  \
shortPrintFrame(theFP);<br> @@ -45643,6 +45677,7 @@<br>
        {&quot;&quot;, &quot;callbackEnter&quot;, (void*)callbackEnter},<br>
        {&quot;&quot;, &quot;callbackLeave&quot;, (void*)callbackLeave},<br>
        {&quot;&quot;, &quot;dumpImage&quot;, (void*)dumpImage},<br>
+       {&quot;&quot;, &quot;internalIsImmutable&quot;, \
                (void*)internalIsImmutable},<br>
        {&quot;&quot;, &quot;moduleUnloaded&quot;, (void*)moduleUnloaded},<br>
        {&quot;&quot;, &quot;primitiveAddLargeIntegers&quot;, \
                (void*)primitiveAddLargeIntegers},<br>
        {&quot;&quot;, &quot;primitiveBitAndLargeIntegers&quot;, \
(void*)primitiveBitAndLargeIntegers},<br> <br>
Modified: branches/Cog/nscogsrc/vm/cointerp.h<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/cointerp.h 2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/nscogsrc/vm/cointerp.h 2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,10 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
<br>
 /*** Function Prototypes ***/<br>
+sqInt activeProcess(void);<br>
 sqInt addressCouldBeObj(sqInt address);<br>
 sqInt addressCouldBeOop(sqInt address);<br>
 usqInt argumentCountAddress(void);<br>
<br>
Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c   2011-11-15 00:39:49 UTC (rev \
                2513)<br>
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c   2011-11-18 01:18:02 UTC (rev \
2514)<br> @@ -2,11 +2,11 @@<br>
<br>
<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CoInterpreter VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc &quot; __DATE__ ;<br> +static char __buildInfo[] \
= &quot;CoInterpreter VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__interpBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -333,6 +333,7 @@<br>
 sqInt interpret(void);<br>
 static void activateCoggedNewMethod(sqInt inInterpreter);<br>
 static void activateNewMethod(void);<br>
+sqInt activeProcess(void);<br>
 EXPORT(sqInt) addGCRoot(sqInt *varLoc);<br>
 static void addLastLinktoList(sqInt proc, sqInt aList);<br>
 static void addNewMethodToCache(sqInt class);<br>
@@ -589,6 +590,7 @@<br>
 sqInt integerArg(sqInt index);<br>
 sqInt integerObjectOf(sqInt value);<br>
 sqInt integerValueOf(sqInt objectPointer);<br>
+EXPORT(sqInt) internalIsImmutable(sqInt oop);<br>
 usqInt interpretAddress(void);<br>
 static sqInt interpreterAllocationReserveBytes(void);<br>
 static sqInt interpretMethodFromMachineCode(void);<br>
@@ -1901,7 +1903,7 @@<br>
        /* 575 */ (void (*)(void))0,<br>
  0 };<br>
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 \
                */])(void);<br>
-const char *interpreterVersion = &quot;Newspeak Virtual Machine \
CoInterpreter_VMMaker.oscog-eem.137&quot;;<br> +const char *interpreterVersion = \
&quot;Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.138&quot;;<br>  sqInt \
minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;<br>  \
volatile int sendTrace;<br> <br>
@@ -8928,6 +8930,16 @@<br>
 }<br>
<br>
<br>
+/*     Answer the current activeProcess. */<br>
+/*     useful for VM debugging */<br>
+<br>
+sqInt<br>
+activeProcess(void)<br>
+{<br>
+       return longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + \
(SchedulerAssociation &lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ValueIndex \
&lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex &lt;&lt; \
ShiftForWord));<br>

+}<br>
+<br>
+<br>
 /*     Add the given variable location to the extra roots table */<br>
<br>
 EXPORT(sqInt)<br>
@@ -19124,7 +19136,13 @@<br>
        }<br>
 }<br>
<br>
+EXPORT(sqInt)<br>
+internalIsImmutable(sqInt oop)<br>
+{<br>
+       return ((longAt(oop)) &amp; ImmutabilityBit) != 0;<br>
+}<br>
<br>
+<br>
 /*     This is used for asserts that check that inline cache editing results in<br>
        valid addresses.<br>
        In the C VM interpret is presumed to come before any primitives and so it<br>
@@ -20428,13 +20446,17 @@<br>
                        goto l1;<br>
                }<br>
        l1:     /* end lengthOf: */;<br>
-               if ((lastIndex - startIP) &gt; 100) {<br>
-                       lastIndex = startIP + 100;<br>
+               if ((lastIndex - startIP) &gt; 104) {<br>
+                       lastIndex = startIP + 103;<br>
                }<br>
                bytecodesPerLine = 8;<br>
                for (index = startIP; index &lt;= lastIndex; index += 1) {<br>
                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));<br>
                        printf(&quot; %02x/%-3d&quot;, byte,byte);<br>
+                       if ((index == lastIndex)<br>
+                        &amp;&amp; ((lengthOf(oop)) &gt; index)) {<br>
+                               print(&quot;...&quot;);<br>
+                       }<br>
                        if ((((index - startIP) + 1) % bytecodesPerLine) == 0) {<br>
                                /* begin cr */<br>
                                printf(&quot;\n&quot;);<br>
@@ -38294,7 +38316,7 @@<br>
<br>
 void<br>
 printContext(sqInt aContext)<br>
-{<br>
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
     sqInt i;<br>
     sqInt ip;<br>
     void *p;<br>
@@ -38345,17 +38367,22 @@<br>
                print(&quot;sender   &quot;);<br>
                shortPrintOop(sender);<br>
                print(&quot;ip       &quot;);<br>
-               printNum(ip);<br>
-               print(&quot; (&quot;);<br>
-               printNum((ip &gt;&gt; 1));<br>
-               /* begin space */<br>
-               /* begin printChar: */<br>
-               putchar(&#39; &#39;);<br>
-               printHex((ip &gt;&gt; 1));<br>
-               /* begin printChar: */<br>
-               putchar(&#39;)&#39;);<br>
-               /* begin cr */<br>
-               printf(&quot;\n&quot;);<br>
+               if (ip == GIV(nilObj)) {<br>
+                       shortPrintOop(ip);<br>
+               }<br>
+               else {<br>
+                       printNum(ip);<br>
+                       print(&quot; (&quot;);<br>
+                       printNum((ip &gt;&gt; 1));<br>
+                       /* begin space */<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39; &#39;);<br>
+                       printHex((ip &gt;&gt; 1));<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39;)&#39;);<br>
+                       /* begin cr */<br>
+                       printf(&quot;\n&quot;);<br>
+               }<br>
        }<br>
        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex &lt;&lt; \
                ShiftForWord));<br>
        sp = ((sp &lt; ((lengthOf(aContext)) - ReceiverIndex)) ? sp : \
((lengthOf(aContext)) - ReceiverIndex));<br> @@ -41910,6 +41937,7 @@<br>
 shortPrintContext(sqInt aContext)<br>
 {<br>
     sqInt home;<br>
+    char *theFP;<br>
<br>
        if (!(((aContext &amp; 1) == 0)<br>
                 &amp;&amp; (((((usqInt) (longAt(aContext))) &gt;&gt; 12) &amp; 31) \
== ClassMethodContextCompactIndex))) {<br> @@ -41920,14 +41948,20 @@<br>
                return;<br>
        }<br>
        home = findHomeForContext(aContext);<br>
-       printNum(aContext);<br>
+       printHex(aContext);<br>
        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex &lt;&lt; \
                ShiftForWord))) &amp; 1)) {<br>
-               if ((checkIsStillMarriedContextcurrentFP(aContext, \
                GIV(framePointer)))<br>
-                &amp;&amp; (isMachineCodeFrame(frameOfMarriedContext(aContext)))) \
                {<br>
-                       print(&quot; m &quot;);<br>
+               if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) \
{<br> +                       if (isMachineCodeFrame((theFP = \
frameOfMarriedContext(aContext)))) {<br> +                               print(&quot; \
M (&quot;);<br> +                       }<br>
+                       else {<br>
+                               print(&quot; I (&quot;);<br>
+                       }<br>
+                       printHex(theFP);<br>
+                       print(&quot;) &quot;);<br>
                }<br>
                else {<br>
-                       print(&quot; i &quot;);<br>
+                       print(&quot; w &quot;);<br>
                }<br>
        }<br>
        else {<br>
@@ -42002,7 +42036,7 @@<br>
 void<br>
 shortPrintFrameAndNCallers(char *theFP, sqInt n)<br>
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
-       if ((n &gt; 0)<br>
+       if ((n != 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &amp; (BytesPerWord - 1)) == 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &gt;= (((usqInt)(GIV(stackBasePlus1) - 1)))) \
&amp;&amp; ((((usqInt)theFP)) &lt;= (((usqInt)GIV(pages)))))))) {<br>  \
shortPrintFrame(theFP);<br> @@ -45647,6 +45681,7 @@<br>
        {&quot;&quot;, &quot;callbackEnter&quot;, (void*)callbackEnter},<br>
        {&quot;&quot;, &quot;callbackLeave&quot;, (void*)callbackLeave},<br>
        {&quot;&quot;, &quot;dumpImage&quot;, (void*)dumpImage},<br>
+       {&quot;&quot;, &quot;internalIsImmutable&quot;, \
                (void*)internalIsImmutable},<br>
        {&quot;&quot;, &quot;moduleUnloaded&quot;, (void*)moduleUnloaded},<br>
        {&quot;&quot;, &quot;primitiveAddLargeIntegers&quot;, \
                (void*)primitiveAddLargeIntegers},<br>
        {&quot;&quot;, &quot;primitiveBitAndLargeIntegers&quot;, \
(void*)primitiveBitAndLargeIntegers},<br> <br>
Modified: branches/Cog/nscogsrc/vm/interp.h<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/interp.h   2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/nscogsrc/vm/interp.h   2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
 #define VM_PROXY_MAJOR 1<br>
<br>
Modified: branches/Cog/nscogsrc/vm/vmCallback.h<br>
===================================================================<br>
--- branches/Cog/nscogsrc/vm/vmCallback.h       2011-11-15 00:39:49 UTC (rev \
                2513)<br>
+++ branches/Cog/nscogsrc/vm/vmCallback.h       2011-11-18 01:18:02 UTC (rev \
2514)<br> @@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
 #define VM_CALLBACK_INC 1<br>
<br>
<br>
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h<br>
___________________________________________________________________<br>
Modified: checkindate<br>
   - Wed Nov  9 11:39:06 PST 2011<br>
   + Thu Nov 17 17:17:12 PST 2011<br>
<br>
Modified: branches/Cog/src/vm/cogit.c<br>
===================================================================<br>
--- branches/Cog/src/vm/cogit.c 2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cogit.c 2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,9 @@<br>
 /* Automatically generated by<br>
-       CCodeGenerator VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       CCodeGenerator VMMaker.oscog-eem.138 \
uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       StackToRegisterMappingCogit VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       StackToRegisterMappingCogit \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;StackToRegisterMappingCogit VMMaker.oscog-eem.135 \
uuid: 1c85e5ef-0fe8-4a1e-9421-ff0d53845fba &quot; __DATE__ ;<br> +static char \
__buildInfo[] = &quot;StackToRegisterMappingCogit VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__cogitBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -798,6 +798,7 @@<br>
 sqInt isSendReturnPC(sqInt retpc);<br>
 static sqInt isSmallIntegerTagNonZero(void);<br>
 static sqInt isUnconditionalBranch(BytecodeDescriptor * \
self_in_isUnconditionalBranch);<br> +static sqInt isValidFramelessRegister(sqInt \
reg);<br>  static AbstractInstruction * gJumpFPEqual(void *jumpTarget);<br>
 static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget);<br>
 static AbstractInstruction * gJumpFPGreater(void *jumpTarget);<br>
@@ -951,6 +952,7 @@<br>
 static void ssFlushTo(sqInt index);<br>
 static void ssFlushUpThroughReceiverVariable(sqInt slotIndex);<br>
 static void ssFlushUpThroughTemporaryVariable(sqInt tempIndex);<br>
+static void ssPopSpillsFrom(sqInt index);<br>
 static void ssPop(sqInt n);<br>
 static sqInt ssPushAnnotatedConstant(sqInt literal);<br>
 static sqInt ssPushBaseoffset(sqInt reg, sqInt offset);<br>
@@ -12281,6 +12283,7 @@<br>
                genoperand(RetN, (methodOrBlockNumArgs + 1) * BytesPerWord);<br>
        }<br>
        else {<br>
+               ssPopSpillsFrom(methodOrBlockNumArgs - 1);<br>
                /* begin RetN: */<br>
                offset = ((methodOrBlockNumArgs &gt; (numRegArgs()))<br>
                 || (regArgsHaveBeenPushed)<br>
@@ -13042,6 +13045,16 @@<br>
 }<br>
<br>
<br>
+/*     Answer if the receiver is valid in a frameless method. */<br>
+<br>
+static sqInt<br>
+isValidFramelessRegister(sqInt reg)<br>
+{<br>
+       return (reg == ReceiverResultReg)<br>
+        || (reg == Arg0Reg);<br>
+}<br>
+<br>
+<br>
 /*     Floating-point jumps are a little weird on some processors. Defer to<br>
        the backEnd to allow it to generate any special code it may need to. */<br>
<br>
@@ -16054,7 +16067,10 @@<br>
        }<br>
        if (simSpillBase &lt;= index) {<br>
                for (i = (((simSpillBase &lt; 0) ? 0 : simSpillBase)); i &lt;= index; \
                i += 1) {<br>
-                       assert(needsFrame);<br>
+                       assert(needsFrame<br>
+                        || (((((simStackAt(i)-&gt;type)) == SSBaseOffset)<br>
+ || (((simStackAt(i)-&gt;type)) == SSRegister))<br>
+                        &amp;&amp; \
                (isValidFramelessRegister((simStackAt(i)-&gt;registerr)))));<br>
                        ensureSpilledAtfrom(simStackAt(i), frameOffsetOfTemporary(i), \
FPReg);<br>  }<br>
                simSpillBase = index + 1;<br>
@@ -16103,7 +16119,24 @@<br>
        }<br>
 }<br>
<br>
+<br>
+/*     Pop any spilled items on the sim stack from index, used to balance the<br>
+       stack on return.<br>
+ */<br>
+<br>
 static void<br>
+ssPopSpillsFrom(sqInt index)<br>
+{<br>
+    sqInt i;<br>
+<br>
+       for (i = index; i &lt;= simStackPtr; i += 1) {<br>
+               if ((simStackAt(i)-&gt;spilled)) {<br>
+                       popToReg(ssTop(), TempReg);<br>
+               }<br>
+       }<br>
+}<br>
+<br>
+static void<br>
 ssPop(sqInt n)<br>
 {<br>
        assert(((simStackPtr - n) &gt;= (methodOrBlockNumTemps - 1))<br>
<br>
Modified: branches/Cog/src/vm/cogit.h<br>
===================================================================<br>
--- branches/Cog/src/vm/cogit.h 2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cogit.h 2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGenerator VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       CCodeGenerator VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
<br>
<br>
Modified: branches/Cog/src/vm/cogmethod.h<br>
===================================================================<br>
--- branches/Cog/src/vm/cogmethod.h     2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cogmethod.h     2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGenerator VMMaker.oscog-eem.135 uuid: \
1c85e5ef-0fe8-4a1e-9421-ff0d53845fba<br> +       CCodeGenerator VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
 typedef struct {<br>
<br>
Modified: branches/Cog/src/vm/cointerp.c<br>
===================================================================<br>
--- branches/Cog/src/vm/cointerp.c      2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cointerp.c      2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,9 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CoInterpreter VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc &quot; __DATE__ ;<br> +static char __buildInfo[] \
= &quot;CoInterpreter VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__interpBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -327,6 +327,7 @@<br>
 sqInt interpret(void);<br>
 static void activateCoggedNewMethod(sqInt inInterpreter);<br>
 static void activateNewMethod(void);<br>
+sqInt activeProcess(void);<br>
 EXPORT(sqInt) addGCRoot(sqInt *varLoc);<br>
 static void addLastLinktoList(sqInt proc, sqInt aList);<br>
 static void addNewMethodToCache(sqInt class);<br>
@@ -1889,7 +1890,7 @@<br>
        /* 575 */ (void (*)(void))0,<br>
  0 };<br>
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 \
                */])(void);<br>
-const char *interpreterVersion = &quot;Croquet Closure Cog VM [CoInterpreter \
VMMaker.oscog-eem.137]&quot;;<br> +const char *interpreterVersion = &quot;Croquet \
Closure Cog VM [CoInterpreter VMMaker.oscog-eem.138]&quot;;<br>  sqInt \
minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;<br>  \
volatile int sendTrace;<br> <br>
@@ -8684,6 +8685,16 @@<br>
 }<br>
<br>
<br>
+/*     Answer the current activeProcess. */<br>
+/*     useful for VM debugging */<br>
+<br>
+sqInt<br>
+activeProcess(void)<br>
+{<br>
+       return longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + \
(SchedulerAssociation &lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ValueIndex \
&lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex &lt;&lt; \
ShiftForWord));<br>

+}<br>
+<br>
+<br>
 /*     Add the given variable location to the extra roots table */<br>
<br>
 EXPORT(sqInt)<br>
@@ -19755,13 +19766,17 @@<br>
                        goto l1;<br>
                }<br>
        l1:     /* end lengthOf: */;<br>
-               if ((lastIndex - startIP) &gt; 100) {<br>
-                       lastIndex = startIP + 100;<br>
+               if ((lastIndex - startIP) &gt; 104) {<br>
+                       lastIndex = startIP + 103;<br>
                }<br>
                bytecodesPerLine = 8;<br>
                for (index = startIP; index &lt;= lastIndex; index += 1) {<br>
                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));<br>
                        printf(&quot; %02x/%-3d&quot;, byte,byte);<br>
+                       if ((index == lastIndex)<br>
+                        &amp;&amp; ((lengthOf(oop)) &gt; index)) {<br>
+                               print(&quot;...&quot;);<br>
+                       }<br>
                        if ((((index - startIP) + 1) % bytecodesPerLine) == 0) {<br>
                                /* begin cr */<br>
                                printf(&quot;\n&quot;);<br>
@@ -37608,7 +37623,7 @@<br>
<br>
 void<br>
 printContext(sqInt aContext)<br>
-{<br>
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
     sqInt i;<br>
     sqInt ip;<br>
     void *p;<br>
@@ -37659,17 +37674,22 @@<br>
                print(&quot;sender   &quot;);<br>
                shortPrintOop(sender);<br>
                print(&quot;ip       &quot;);<br>
-               printNum(ip);<br>
-               print(&quot; (&quot;);<br>
-               printNum((ip &gt;&gt; 1));<br>
-               /* begin space */<br>
-               /* begin printChar: */<br>
-               putchar(&#39; &#39;);<br>
-               printHex((ip &gt;&gt; 1));<br>
-               /* begin printChar: */<br>
-               putchar(&#39;)&#39;);<br>
-               /* begin cr */<br>
-               printf(&quot;\n&quot;);<br>
+               if (ip == GIV(nilObj)) {<br>
+                       shortPrintOop(ip);<br>
+               }<br>
+               else {<br>
+                       printNum(ip);<br>
+                       print(&quot; (&quot;);<br>
+                       printNum((ip &gt;&gt; 1));<br>
+                       /* begin space */<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39; &#39;);<br>
+                       printHex((ip &gt;&gt; 1));<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39;)&#39;);<br>
+                       /* begin cr */<br>
+                       printf(&quot;\n&quot;);<br>
+               }<br>
        }<br>
        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex &lt;&lt; \
                ShiftForWord));<br>
        sp = ((sp &lt; ((lengthOf(aContext)) - ReceiverIndex)) ? sp : \
((lengthOf(aContext)) - ReceiverIndex));<br> @@ -41224,6 +41244,7 @@<br>
 shortPrintContext(sqInt aContext)<br>
 {<br>
     sqInt home;<br>
+    char *theFP;<br>
<br>
        if (!(((aContext &amp; 1) == 0)<br>
                 &amp;&amp; (((((usqInt) (longAt(aContext))) &gt;&gt; 12) &amp; 31) \
== ClassMethodContextCompactIndex))) {<br> @@ -41234,14 +41255,20 @@<br>
                return;<br>
        }<br>
        home = findHomeForContext(aContext);<br>
-       printNum(aContext);<br>
+       printHex(aContext);<br>
        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex &lt;&lt; \
                ShiftForWord))) &amp; 1)) {<br>
-               if ((checkIsStillMarriedContextcurrentFP(aContext, \
                GIV(framePointer)))<br>
-                &amp;&amp; (isMachineCodeFrame(frameOfMarriedContext(aContext)))) \
                {<br>
-                       print(&quot; m &quot;);<br>
+               if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) \
{<br> +                       if (isMachineCodeFrame((theFP = \
frameOfMarriedContext(aContext)))) {<br> +                               print(&quot; \
M (&quot;);<br> +                       }<br>
+                       else {<br>
+                               print(&quot; I (&quot;);<br>
+                       }<br>
+                       printHex(theFP);<br>
+                       print(&quot;) &quot;);<br>
                }<br>
                else {<br>
-                       print(&quot; i &quot;);<br>
+                       print(&quot; w &quot;);<br>
                }<br>
        }<br>
        else {<br>
@@ -41316,7 +41343,7 @@<br>
 void<br>
 shortPrintFrameAndNCallers(char *theFP, sqInt n)<br>
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
-       if ((n &gt; 0)<br>
+       if ((n != 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &amp; (BytesPerWord - 1)) == 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &gt;= (((usqInt)(GIV(stackBasePlus1) - 1)))) \
&amp;&amp; ((((usqInt)theFP)) &lt;= (((usqInt)GIV(pages)))))))) {<br>  \
shortPrintFrame(theFP);<br> <br>
Modified: branches/Cog/src/vm/cointerp.h<br>
===================================================================<br>
--- branches/Cog/src/vm/cointerp.h      2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cointerp.h      2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,10 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
<br>
 /*** Function Prototypes ***/<br>
+sqInt activeProcess(void);<br>
 sqInt addressCouldBeObj(sqInt address);<br>
 sqInt addressCouldBeOop(sqInt address);<br>
 usqInt argumentCountAddress(void);<br>
<br>
Modified: branches/Cog/src/vm/cointerpmt.c<br>
===================================================================<br>
--- branches/Cog/src/vm/cointerpmt.c    2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cointerpmt.c    2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,9 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       CoInterpreterMT VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CoInterpreterMT \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;CoInterpreterMT VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc &quot; __DATE__ ;<br> +static char __buildInfo[] \
= &quot;CoInterpreterMT VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__interpBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -370,7 +370,7 @@<br>
 sqInt interpret(void);<br>
 static void activateCoggedNewMethod(sqInt inInterpreter);<br>
 static void activateNewMethod(void);<br>
-static sqInt activeProcess(void);<br>
+sqInt activeProcess(void);<br>
 EXPORT(sqInt) addGCRoot(sqInt *varLoc);<br>
 static void addLastLinktoList(sqInt proc, sqInt aList);<br>
 static void addNewMethodToCache(sqInt class);<br>
@@ -1989,7 +1989,7 @@<br>
        /* 575 */ (void (*)(void))0,<br>
  0 };<br>
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 \
                */])(void);<br>
-const char *interpreterVersion = &quot;Croquet Closure Cog MT VM [CoInterpreterMT \
VMMaker.oscog-eem.137]&quot;;<br> +const char *interpreterVersion = &quot;Croquet \
Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.138]&quot;;<br>  sqInt \
minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;<br>  \
volatile int sendTrace;<br>  sqInt willNotThreadWarnCount;<br>
@@ -8787,8 +8787,9 @@<br>
<br>
<br>
 /*     Answer the current activeProcess. */<br>
+/*     useful for VM debugging */<br>
<br>
-static sqInt<br>
+sqInt<br>
 activeProcess(void)<br>
 {<br>
        return longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + \
(SchedulerAssociation &lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ValueIndex \
&lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex &lt;&lt; \
ShiftForWord));<br>

@@ -20488,13 +20489,17 @@<br>
                        goto l1;<br>
                }<br>
        l1:     /* end lengthOf: */;<br>
-               if ((lastIndex - startIP) &gt; 100) {<br>
-                       lastIndex = startIP + 100;<br>
+               if ((lastIndex - startIP) &gt; 104) {<br>
+                       lastIndex = startIP + 103;<br>
                }<br>
                bytecodesPerLine = 8;<br>
                for (index = startIP; index &lt;= lastIndex; index += 1) {<br>
                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));<br>
                        printf(&quot; %02x/%-3d&quot;, byte,byte);<br>
+                       if ((index == lastIndex)<br>
+                        &amp;&amp; ((lengthOf(oop)) &gt; index)) {<br>
+                               print(&quot;...&quot;);<br>
+                       }<br>
                        if ((((index - startIP) + 1) % bytecodesPerLine) == 0) {<br>
                                /* begin cr */<br>
                                printf(&quot;\n&quot;);<br>
@@ -38935,7 +38940,7 @@<br>
<br>
 void<br>
 printContext(sqInt aContext)<br>
-{<br>
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
     sqInt i;<br>
     sqInt ip;<br>
     void *p;<br>
@@ -38986,17 +38991,22 @@<br>
                print(&quot;sender   &quot;);<br>
                shortPrintOop(sender);<br>
                print(&quot;ip       &quot;);<br>
-               printNum(ip);<br>
-               print(&quot; (&quot;);<br>
-               printNum((ip &gt;&gt; 1));<br>
-               /* begin space */<br>
-               /* begin printChar: */<br>
-               putchar(&#39; &#39;);<br>
-               printHex((ip &gt;&gt; 1));<br>
-               /* begin printChar: */<br>
-               putchar(&#39;)&#39;);<br>
-               /* begin cr */<br>
-               printf(&quot;\n&quot;);<br>
+               if (ip == GIV(nilObj)) {<br>
+                       shortPrintOop(ip);<br>
+               }<br>
+               else {<br>
+                       printNum(ip);<br>
+                       print(&quot; (&quot;);<br>
+                       printNum((ip &gt;&gt; 1));<br>
+                       /* begin space */<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39; &#39;);<br>
+                       printHex((ip &gt;&gt; 1));<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39;)&#39;);<br>
+                       /* begin cr */<br>
+                       printf(&quot;\n&quot;);<br>
+               }<br>
        }<br>
        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex &lt;&lt; \
                ShiftForWord));<br>
        sp = ((sp &lt; ((lengthOf(aContext)) - ReceiverIndex)) ? sp : \
((lengthOf(aContext)) - ReceiverIndex));<br> @@ -42652,6 +42662,7 @@<br>
 shortPrintContext(sqInt aContext)<br>
 {<br>
     sqInt home;<br>
+    char *theFP;<br>
<br>
        if (!(((aContext &amp; 1) == 0)<br>
                 &amp;&amp; (((((usqInt) (longAt(aContext))) &gt;&gt; 12) &amp; 31) \
== ClassMethodContextCompactIndex))) {<br> @@ -42662,14 +42673,20 @@<br>
                return;<br>
        }<br>
        home = findHomeForContext(aContext);<br>
-       printNum(aContext);<br>
+       printHex(aContext);<br>
        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex &lt;&lt; \
                ShiftForWord))) &amp; 1)) {<br>
-               if ((checkIsStillMarriedContextcurrentFP(aContext, \
                GIV(framePointer)))<br>
-                &amp;&amp; (isMachineCodeFrame(frameOfMarriedContext(aContext)))) \
                {<br>
-                       print(&quot; m &quot;);<br>
+               if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) \
{<br> +                       if (isMachineCodeFrame((theFP = \
frameOfMarriedContext(aContext)))) {<br> +                               print(&quot; \
M (&quot;);<br> +                       }<br>
+                       else {<br>
+                               print(&quot; I (&quot;);<br>
+                       }<br>
+                       printHex(theFP);<br>
+                       print(&quot;) &quot;);<br>
                }<br>
                else {<br>
-                       print(&quot; i &quot;);<br>
+                       print(&quot; w &quot;);<br>
                }<br>
        }<br>
        else {<br>
@@ -42744,7 +42761,7 @@<br>
 void<br>
 shortPrintFrameAndNCallers(char *theFP, sqInt n)<br>
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
-       if ((n &gt; 0)<br>
+       if ((n != 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &amp; (BytesPerWord - 1)) == 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &gt;= (((usqInt)(GIV(stackBasePlus1) - 1)))) \
&amp;&amp; ((((usqInt)theFP)) &lt;= (((usqInt)GIV(pages)))))))) {<br>  \
shortPrintFrame(theFP);<br> <br>
Modified: branches/Cog/src/vm/cointerpmt.h<br>
===================================================================<br>
--- branches/Cog/src/vm/cointerpmt.h    2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/cointerpmt.h    2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,9 +1,10 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
<br>
 /*** Function Prototypes ***/<br>
+sqInt activeProcess(void);<br>
 sqInt addressCouldBeObj(sqInt address);<br>
 sqInt addressCouldBeOop(sqInt address);<br>
 usqInt argumentCountAddress(void);<br>
<br>
Modified: branches/Cog/src/vm/gcc3x-cointerp.c<br>
===================================================================<br>
--- branches/Cog/src/vm/gcc3x-cointerp.c        2011-11-15 00:39:49 UTC (rev \
                2513)<br>
+++ branches/Cog/src/vm/gcc3x-cointerp.c        2011-11-18 01:18:02 UTC (rev \
2514)<br> @@ -2,11 +2,11 @@<br>
<br>
<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CoInterpreter VMMaker.oscog-eem.138 \
                uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;CoInterpreter VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc &quot; __DATE__ ;<br> +static char __buildInfo[] \
= &quot;CoInterpreter VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__interpBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -330,6 +330,7 @@<br>
 sqInt interpret(void);<br>
 static void activateCoggedNewMethod(sqInt inInterpreter);<br>
 static void activateNewMethod(void);<br>
+sqInt activeProcess(void);<br>
 EXPORT(sqInt) addGCRoot(sqInt *varLoc);<br>
 static void addLastLinktoList(sqInt proc, sqInt aList);<br>
 static void addNewMethodToCache(sqInt class);<br>
@@ -1892,7 +1893,7 @@<br>
        /* 575 */ (void (*)(void))0,<br>
  0 };<br>
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 \
                */])(void);<br>
-const char *interpreterVersion = &quot;Croquet Closure Cog VM [CoInterpreter \
VMMaker.oscog-eem.137]&quot;;<br> +const char *interpreterVersion = &quot;Croquet \
Closure Cog VM [CoInterpreter VMMaker.oscog-eem.138]&quot;;<br>  sqInt \
minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;<br>  \
volatile int sendTrace;<br> <br>
@@ -8688,6 +8689,16 @@<br>
 }<br>
<br>
<br>
+/*     Answer the current activeProcess. */<br>
+/*     useful for VM debugging */<br>
+<br>
+sqInt<br>
+activeProcess(void)<br>
+{<br>
+       return longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + \
(SchedulerAssociation &lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ValueIndex \
&lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex &lt;&lt; \
ShiftForWord));<br>

+}<br>
+<br>
+<br>
 /*     Add the given variable location to the extra roots table */<br>
<br>
 EXPORT(sqInt)<br>
@@ -19759,13 +19770,17 @@<br>
                        goto l1;<br>
                }<br>
        l1:     /* end lengthOf: */;<br>
-               if ((lastIndex - startIP) &gt; 100) {<br>
-                       lastIndex = startIP + 100;<br>
+               if ((lastIndex - startIP) &gt; 104) {<br>
+                       lastIndex = startIP + 103;<br>
                }<br>
                bytecodesPerLine = 8;<br>
                for (index = startIP; index &lt;= lastIndex; index += 1) {<br>
                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));<br>
                        printf(&quot; %02x/%-3d&quot;, byte,byte);<br>
+                       if ((index == lastIndex)<br>
+                        &amp;&amp; ((lengthOf(oop)) &gt; index)) {<br>
+                               print(&quot;...&quot;);<br>
+                       }<br>
                        if ((((index - startIP) + 1) % bytecodesPerLine) == 0) {<br>
                                /* begin cr */<br>
                                printf(&quot;\n&quot;);<br>
@@ -37612,7 +37627,7 @@<br>
<br>
 void<br>
 printContext(sqInt aContext)<br>
-{<br>
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
     sqInt i;<br>
     sqInt ip;<br>
     void *p;<br>
@@ -37663,17 +37678,22 @@<br>
                print(&quot;sender   &quot;);<br>
                shortPrintOop(sender);<br>
                print(&quot;ip       &quot;);<br>
-               printNum(ip);<br>
-               print(&quot; (&quot;);<br>
-               printNum((ip &gt;&gt; 1));<br>
-               /* begin space */<br>
-               /* begin printChar: */<br>
-               putchar(&#39; &#39;);<br>
-               printHex((ip &gt;&gt; 1));<br>
-               /* begin printChar: */<br>
-               putchar(&#39;)&#39;);<br>
-               /* begin cr */<br>
-               printf(&quot;\n&quot;);<br>
+               if (ip == GIV(nilObj)) {<br>
+                       shortPrintOop(ip);<br>
+               }<br>
+               else {<br>
+                       printNum(ip);<br>
+                       print(&quot; (&quot;);<br>
+                       printNum((ip &gt;&gt; 1));<br>
+                       /* begin space */<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39; &#39;);<br>
+                       printHex((ip &gt;&gt; 1));<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39;)&#39;);<br>
+                       /* begin cr */<br>
+                       printf(&quot;\n&quot;);<br>
+               }<br>
        }<br>
        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex &lt;&lt; \
                ShiftForWord));<br>
        sp = ((sp &lt; ((lengthOf(aContext)) - ReceiverIndex)) ? sp : \
((lengthOf(aContext)) - ReceiverIndex));<br> @@ -41228,6 +41248,7 @@<br>
 shortPrintContext(sqInt aContext)<br>
 {<br>
     sqInt home;<br>
+    char *theFP;<br>
<br>
        if (!(((aContext &amp; 1) == 0)<br>
                 &amp;&amp; (((((usqInt) (longAt(aContext))) &gt;&gt; 12) &amp; 31) \
== ClassMethodContextCompactIndex))) {<br> @@ -41238,14 +41259,20 @@<br>
                return;<br>
        }<br>
        home = findHomeForContext(aContext);<br>
-       printNum(aContext);<br>
+       printHex(aContext);<br>
        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex &lt;&lt; \
                ShiftForWord))) &amp; 1)) {<br>
-               if ((checkIsStillMarriedContextcurrentFP(aContext, \
                GIV(framePointer)))<br>
-                &amp;&amp; (isMachineCodeFrame(frameOfMarriedContext(aContext)))) \
                {<br>
-                       print(&quot; m &quot;);<br>
+               if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) \
{<br> +                       if (isMachineCodeFrame((theFP = \
frameOfMarriedContext(aContext)))) {<br> +                               print(&quot; \
M (&quot;);<br> +                       }<br>
+                       else {<br>
+                               print(&quot; I (&quot;);<br>
+                       }<br>
+                       printHex(theFP);<br>
+                       print(&quot;) &quot;);<br>
                }<br>
                else {<br>
-                       print(&quot; i &quot;);<br>
+                       print(&quot; w &quot;);<br>
                }<br>
        }<br>
        else {<br>
@@ -41320,7 +41347,7 @@<br>
 void<br>
 shortPrintFrameAndNCallers(char *theFP, sqInt n)<br>
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
-       if ((n &gt; 0)<br>
+       if ((n != 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &amp; (BytesPerWord - 1)) == 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &gt;= (((usqInt)(GIV(stackBasePlus1) - 1)))) \
&amp;&amp; ((((usqInt)theFP)) &lt;= (((usqInt)GIV(pages)))))))) {<br>  \
shortPrintFrame(theFP);<br> <br>
Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c<br>
===================================================================<br>
--- branches/Cog/src/vm/gcc3x-cointerpmt.c      2011-11-15 00:39:49 UTC (rev \
                2513)<br>
+++ branches/Cog/src/vm/gcc3x-cointerpmt.c      2011-11-18 01:18:02 UTC (rev \
2514)<br> @@ -2,11 +2,11 @@<br>
<br>
<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>  from<br>
-       CoInterpreterMT VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CoInterpreterMT \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
-static char __buildInfo[] = &quot;CoInterpreterMT VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc &quot; __DATE__ ;<br> +static char __buildInfo[] \
= &quot;CoInterpreterMT VMMaker.oscog-eem.138 uuid: \
f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d &quot; __DATE__ ;<br>  char *__interpBuildInfo = \
__buildInfo;<br> <br>
<br>
@@ -373,7 +373,7 @@<br>
 sqInt interpret(void);<br>
 static void activateCoggedNewMethod(sqInt inInterpreter);<br>
 static void activateNewMethod(void);<br>
-static sqInt activeProcess(void);<br>
+sqInt activeProcess(void);<br>
 EXPORT(sqInt) addGCRoot(sqInt *varLoc);<br>
 static void addLastLinktoList(sqInt proc, sqInt aList);<br>
 static void addNewMethodToCache(sqInt class);<br>
@@ -1992,7 +1992,7 @@<br>
        /* 575 */ (void (*)(void))0,<br>
  0 };<br>
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 \
                */])(void);<br>
-const char *interpreterVersion = &quot;Croquet Closure Cog MT VM [CoInterpreterMT \
VMMaker.oscog-eem.137]&quot;;<br> +const char *interpreterVersion = &quot;Croquet \
Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.138]&quot;;<br>  sqInt \
minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;<br>  \
volatile int sendTrace;<br>  sqInt willNotThreadWarnCount;<br>
@@ -8791,8 +8791,9 @@<br>
<br>
<br>
 /*     Answer the current activeProcess. */<br>
+/*     useful for VM debugging */<br>
<br>
-static sqInt<br>
+sqInt<br>
 activeProcess(void)<br>
 {<br>
        return longAt(((longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + \
(SchedulerAssociation &lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ValueIndex \
&lt;&lt; ShiftForWord))) + BaseHeaderSize) + (ActiveProcessIndex &lt;&lt; \
ShiftForWord));<br>

@@ -20492,13 +20493,17 @@<br>
                        goto l1;<br>
                }<br>
        l1:     /* end lengthOf: */;<br>
-               if ((lastIndex - startIP) &gt; 100) {<br>
-                       lastIndex = startIP + 100;<br>
+               if ((lastIndex - startIP) &gt; 104) {<br>
+                       lastIndex = startIP + 103;<br>
                }<br>
                bytecodesPerLine = 8;<br>
                for (index = startIP; index &lt;= lastIndex; index += 1) {<br>
                        byte = byteAt((oop + BaseHeaderSize) + (index - 1));<br>
                        printf(&quot; %02x/%-3d&quot;, byte,byte);<br>
+                       if ((index == lastIndex)<br>
+                        &amp;&amp; ((lengthOf(oop)) &gt; index)) {<br>
+                               print(&quot;...&quot;);<br>
+                       }<br>
                        if ((((index - startIP) + 1) % bytecodesPerLine) == 0) {<br>
                                /* begin cr */<br>
                                printf(&quot;\n&quot;);<br>
@@ -38939,7 +38944,7 @@<br>
<br>
 void<br>
 printContext(sqInt aContext)<br>
-{<br>
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
     sqInt i;<br>
     sqInt ip;<br>
     void *p;<br>
@@ -38990,17 +38995,22 @@<br>
                print(&quot;sender   &quot;);<br>
                shortPrintOop(sender);<br>
                print(&quot;ip       &quot;);<br>
-               printNum(ip);<br>
-               print(&quot; (&quot;);<br>
-               printNum((ip &gt;&gt; 1));<br>
-               /* begin space */<br>
-               /* begin printChar: */<br>
-               putchar(&#39; &#39;);<br>
-               printHex((ip &gt;&gt; 1));<br>
-               /* begin printChar: */<br>
-               putchar(&#39;)&#39;);<br>
-               /* begin cr */<br>
-               printf(&quot;\n&quot;);<br>
+               if (ip == GIV(nilObj)) {<br>
+                       shortPrintOop(ip);<br>
+               }<br>
+               else {<br>
+                       printNum(ip);<br>
+                       print(&quot; (&quot;);<br>
+                       printNum((ip &gt;&gt; 1));<br>
+                       /* begin space */<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39; &#39;);<br>
+                       printHex((ip &gt;&gt; 1));<br>
+                       /* begin printChar: */<br>
+                       putchar(&#39;)&#39;);<br>
+                       /* begin cr */<br>
+                       printf(&quot;\n&quot;);<br>
+               }<br>
        }<br>
        sp = longAt((aContext + BaseHeaderSize) + (StackPointerIndex &lt;&lt; \
                ShiftForWord));<br>
        sp = ((sp &lt; ((lengthOf(aContext)) - ReceiverIndex)) ? sp : \
((lengthOf(aContext)) - ReceiverIndex));<br> @@ -42656,6 +42666,7 @@<br>
 shortPrintContext(sqInt aContext)<br>
 {<br>
     sqInt home;<br>
+    char *theFP;<br>
<br>
        if (!(((aContext &amp; 1) == 0)<br>
                 &amp;&amp; (((((usqInt) (longAt(aContext))) &gt;&gt; 12) &amp; 31) \
== ClassMethodContextCompactIndex))) {<br> @@ -42666,14 +42677,20 @@<br>
                return;<br>
        }<br>
        home = findHomeForContext(aContext);<br>
-       printNum(aContext);<br>
+       printHex(aContext);<br>
        if (((longAt((aContext + BaseHeaderSize) + (SenderIndex &lt;&lt; \
                ShiftForWord))) &amp; 1)) {<br>
-               if ((checkIsStillMarriedContextcurrentFP(aContext, \
                GIV(framePointer)))<br>
-                &amp;&amp; (isMachineCodeFrame(frameOfMarriedContext(aContext)))) \
                {<br>
-                       print(&quot; m &quot;);<br>
+               if (checkIsStillMarriedContextcurrentFP(aContext, GIV(framePointer))) \
{<br> +                       if (isMachineCodeFrame((theFP = \
frameOfMarriedContext(aContext)))) {<br> +                               print(&quot; \
M (&quot;);<br> +                       }<br>
+                       else {<br>
+                               print(&quot; I (&quot;);<br>
+                       }<br>
+                       printHex(theFP);<br>
+                       print(&quot;) &quot;);<br>
                }<br>
                else {<br>
-                       print(&quot; i &quot;);<br>
+                       print(&quot; w &quot;);<br>
                }<br>
        }<br>
        else {<br>
@@ -42748,7 +42765,7 @@<br>
 void<br>
 shortPrintFrameAndNCallers(char *theFP, sqInt n)<br>
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
-       if ((n &gt; 0)<br>
+       if ((n != 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &amp; (BytesPerWord - 1)) == 0)<br>
         &amp;&amp; ((((((usqInt)theFP)) &gt;= (((usqInt)(GIV(stackBasePlus1) - 1)))) \
&amp;&amp; ((((usqInt)theFP)) &lt;= (((usqInt)GIV(pages)))))))) {<br>  \
shortPrintFrame(theFP);<br> <br>
Modified: branches/Cog/src/vm/interp.h<br>
===================================================================<br>
--- branches/Cog/src/vm/interp.h        2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/interp.h        2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
 #define VM_PROXY_MAJOR 1<br>
<br>
Modified: branches/Cog/src/vm/vmCallback.h<br>
===================================================================<br>
--- branches/Cog/src/vm/vmCallback.h    2011-11-15 00:39:49 UTC (rev 2513)<br>
+++ branches/Cog/src/vm/vmCallback.h    2011-11-18 01:18:02 UTC (rev 2514)<br>
@@ -1,5 +1,5 @@<br>
 /* Automatically generated by<br>
-       CCodeGeneratorGlobalStructure VMMaker.oscog-eem.137 uuid: \
fbe64d98-6b1a-4c5b-b3f3-d2b1091406dc<br> +       CCodeGeneratorGlobalStructure \
                VMMaker.oscog-eem.138 uuid: f9a63bdf-7bbc-4ae5-9634-ecd6fd814c9d<br>
  */<br>
<br>
 #define VM_CALLBACK_INC 1<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- \
<br>best,<div>Eliot</div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic