[commit] r2506 - Fix error codes for at: and at:put: primitive so that for non-indexable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2506 - Fix error codes for at: and at:put: primitive so that for non-indexable

commits-3
 
Author: eliot
Date: 2011-11-07 10:28:00 -0800 (Mon, 07 Nov 2011)
New Revision: 2506

Modified:
   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/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:
Fix error codes for at: and at:put: primitive so that for non-indexable
objects they fail with #'bad receiver', not #'bad index'.


Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
    from
- CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1897,7 +1897,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.134";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.136";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -7881,6 +7881,7 @@
  sqInt fmt;
  sqInt result1;
  sqInt stSize;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAt);
  index = longAtPointer(localSP);
@@ -7952,7 +7953,11 @@
  goto l98;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l98: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -7979,11 +7984,12 @@
  sqInt index;
  sqInt rcvr;
  sqInt value;
+ sqInt ccIndex;
  sqInt fixedFields;
  sqInt fmt;
  sqInt stSize;
  sqInt valToPut;
- sqInt ccIndex;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAtPut);
  value = longAtPointer(localSP);
@@ -7999,13 +8005,13 @@
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l101;
+ goto l100;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l101;
+ goto l100;
  }
- l101: /* end fetchClassOfNonInt: */;
+ l100: /* end fetchClassOfNonInt: */;
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((17 * 2) << ShiftForWord));
  if (!(lookupInMethodCacheSelclass(GIV(messageSelector), GIV(lkupClass)))) {
  GIV(argumentCount) = 2;
@@ -8041,7 +8047,7 @@
  possibleRootStoreIntovalue(rcvr, value);
  }
  longAtput((rcvr + BaseHeaderSize) + (((((index >> 1)) + fixedFields) - 1) << ShiftForWord), value);
- goto l100;
+ goto l101;
  }
  if (fmt < 8) {
 
@@ -8051,7 +8057,7 @@
  if (!GIV(primFailCode)) {
  long32Atput((rcvr + BaseHeaderSize) + ((((index >> 1)) - 1) << 2), valToPut);
  }
- goto l100;
+ goto l101;
  }
  if (fmt >= 16) {
 
@@ -8059,7 +8065,7 @@
 
  valToPut = asciiOfCharacter(value);
  if (!(!GIV(primFailCode))) {
- goto l100;
+ goto l101;
  }
  }
  else {
@@ -8073,14 +8079,18 @@
  if (!GIV(primFailCode)) {
  GIV(primFailCode) = 1;
  }
- goto l100;
+ goto l101;
  }
  byteAtput((rcvr + BaseHeaderSize) + (((index >> 1)) - 1), valToPut);
- goto l100;
+ goto l101;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
- l100: /* end commonVariable:at:put:cacheIndex: */;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ l101: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
  /* begin fetchNextBytecode */
@@ -12610,6 +12620,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     char *sp;
     char *sp1;
     sqInt stSize;
@@ -12704,7 +12715,11 @@
  goto l1;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  l1: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -12744,6 +12759,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     sqInt result;
     sqInt result1;
     char *sp;
@@ -12814,7 +12830,11 @@
  goto l1;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l1: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -43278,6 +43298,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -43373,10 +43394,12 @@
  return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1);
  }
  }
- else {
- GIV(primFailCode) = PrimErrBadIndex;
- return 0;
- }
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ return 0;
 }
 
 
@@ -43391,6 +43414,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -43528,7 +43552,11 @@
  }
  }
  else {
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  }
 }
 

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-11-07 18:28:00 UTC (rev 2506)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
    from
- CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1900,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.134";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.136";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -7885,6 +7885,7 @@
  sqInt fmt;
  sqInt result1;
  sqInt stSize;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAt);
  index = longAtPointer(localSP);
@@ -7956,7 +7957,11 @@
  goto l98;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l98: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -7983,11 +7988,12 @@
  sqInt index;
  sqInt rcvr;
  sqInt value;
+ sqInt ccIndex;
  sqInt fixedFields;
  sqInt fmt;
  sqInt stSize;
  sqInt valToPut;
- sqInt ccIndex;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAtPut);
  value = longAtPointer(localSP);
@@ -8003,13 +8009,13 @@
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l101;
+ goto l100;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l101;
+ goto l100;
  }
- l101: /* end fetchClassOfNonInt: */;
+ l100: /* end fetchClassOfNonInt: */;
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((17 * 2) << ShiftForWord));
  if (!(lookupInMethodCacheSelclass(GIV(messageSelector), GIV(lkupClass)))) {
  GIV(argumentCount) = 2;
@@ -8045,7 +8051,7 @@
  possibleRootStoreIntovalue(rcvr, value);
  }
  longAtput((rcvr + BaseHeaderSize) + (((((index >> 1)) + fixedFields) - 1) << ShiftForWord), value);
- goto l100;
+ goto l101;
  }
  if (fmt < 8) {
 
@@ -8055,7 +8061,7 @@
  if (!GIV(primFailCode)) {
  long32Atput((rcvr + BaseHeaderSize) + ((((index >> 1)) - 1) << 2), valToPut);
  }
- goto l100;
+ goto l101;
  }
  if (fmt >= 16) {
 
@@ -8063,7 +8069,7 @@
 
  valToPut = asciiOfCharacter(value);
  if (!(!GIV(primFailCode))) {
- goto l100;
+ goto l101;
  }
  }
  else {
@@ -8077,14 +8083,18 @@
  if (!GIV(primFailCode)) {
  GIV(primFailCode) = 1;
  }
- goto l100;
+ goto l101;
  }
  byteAtput((rcvr + BaseHeaderSize) + (((index >> 1)) - 1), valToPut);
- goto l100;
+ goto l101;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
- l100: /* end commonVariable:at:put:cacheIndex: */;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ l101: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
  /* begin fetchNextBytecode */
@@ -12614,6 +12624,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     char *sp;
     char *sp1;
     sqInt stSize;
@@ -12708,7 +12719,11 @@
  goto l1;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  l1: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -12748,6 +12763,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     sqInt result;
     sqInt result1;
     char *sp;
@@ -12818,7 +12834,11 @@
  goto l1;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l1: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -43282,6 +43302,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -43377,10 +43398,12 @@
  return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1);
  }
  }
- else {
- GIV(primFailCode) = PrimErrBadIndex;
- return 0;
- }
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ return 0;
 }
 
 
@@ -43395,6 +43418,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -43532,7 +43556,11 @@
  }
  }
  else {
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  }
 }
 

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/nscogsrc/vm/interp.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/nscogsrc/vm/vmCallback.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 #define VM_CALLBACK_INC 1


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Tue Oct 25 11:25:05 PDT 2011
   + Mon Nov  7 10:27:44 PST 2011

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/cointerp.c 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
    from
- CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1888,7 +1888,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.134]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.136]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -7641,6 +7641,7 @@
  sqInt fmt;
  sqInt result1;
  sqInt stSize;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAt);
  index = longAtPointer(localSP);
@@ -7712,7 +7713,11 @@
  goto l93;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l93: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -7739,11 +7744,12 @@
  sqInt index;
  sqInt rcvr;
  sqInt value;
+ sqInt ccIndex;
  sqInt fixedFields;
  sqInt fmt;
  sqInt stSize;
  sqInt valToPut;
- sqInt ccIndex;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAtPut);
  value = longAtPointer(localSP);
@@ -7759,13 +7765,13 @@
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l96;
+ goto l95;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l96;
+ goto l95;
  }
- l96: /* end fetchClassOfNonInt: */;
+ l95: /* end fetchClassOfNonInt: */;
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((17 * 2) << ShiftForWord));
  if (!(lookupInMethodCacheSelclass(GIV(messageSelector), GIV(lkupClass)))) {
  GIV(argumentCount) = 2;
@@ -7801,7 +7807,7 @@
  possibleRootStoreIntovalue(rcvr, value);
  }
  longAtput((rcvr + BaseHeaderSize) + (((((index >> 1)) + fixedFields) - 1) << ShiftForWord), value);
- goto l95;
+ goto l96;
  }
  if (fmt < 8) {
 
@@ -7811,7 +7817,7 @@
  if (!GIV(primFailCode)) {
  long32Atput((rcvr + BaseHeaderSize) + ((((index >> 1)) - 1) << 2), valToPut);
  }
- goto l95;
+ goto l96;
  }
  if (fmt >= 16) {
 
@@ -7819,7 +7825,7 @@
 
  valToPut = asciiOfCharacter(value);
  if (!(!GIV(primFailCode))) {
- goto l95;
+ goto l96;
  }
  }
  else {
@@ -7833,14 +7839,18 @@
  if (!GIV(primFailCode)) {
  GIV(primFailCode) = 1;
  }
- goto l95;
+ goto l96;
  }
  byteAtput((rcvr + BaseHeaderSize) + (((index >> 1)) - 1), valToPut);
- goto l95;
+ goto l96;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
- l95: /* end commonVariable:at:put:cacheIndex: */;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ l96: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
  /* begin fetchNextBytecode */
@@ -12231,6 +12241,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     char *sp;
     char *sp1;
     sqInt stSize;
@@ -12325,7 +12336,11 @@
  goto l1;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  l1: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -12365,6 +12380,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     sqInt result;
     sqInt result1;
     char *sp;
@@ -12435,7 +12451,11 @@
  goto l1;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l1: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -42596,6 +42616,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -42691,10 +42712,12 @@
  return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1);
  }
  }
- else {
- GIV(primFailCode) = PrimErrBadIndex;
- return 0;
- }
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ return 0;
 }
 
 
@@ -42709,6 +42732,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -42846,7 +42870,11 @@
  }
  }
  else {
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  }
 }
 

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/cointerp.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 

Modified: branches/Cog/src/vm/cointerpmt.c
===================================================================
--- branches/Cog/src/vm/cointerpmt.c 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/cointerpmt.c 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
    from
- CoInterpreterMT VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CoInterpreterMT VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1988,7 +1988,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.134]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.136]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -7743,6 +7743,7 @@
  sqInt fmt;
  sqInt result1;
  sqInt stSize;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAt);
  index = longAtPointer(localSP);
@@ -7814,7 +7815,11 @@
  goto l93;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l93: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -7841,11 +7846,12 @@
  sqInt index;
  sqInt rcvr;
  sqInt value;
+ sqInt ccIndex;
  sqInt fixedFields;
  sqInt fmt;
  sqInt stSize;
  sqInt valToPut;
- sqInt ccIndex;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAtPut);
  value = longAtPointer(localSP);
@@ -7861,13 +7867,13 @@
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l96;
+ goto l95;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l96;
+ goto l95;
  }
- l96: /* end fetchClassOfNonInt: */;
+ l95: /* end fetchClassOfNonInt: */;
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((17 * 2) << ShiftForWord));
  if (!(lookupInMethodCacheSelclass(GIV(messageSelector), GIV(lkupClass)))) {
  GIV(argumentCount) = 2;
@@ -7903,7 +7909,7 @@
  possibleRootStoreIntovalue(rcvr, value);
  }
  longAtput((rcvr + BaseHeaderSize) + (((((index >> 1)) + fixedFields) - 1) << ShiftForWord), value);
- goto l95;
+ goto l96;
  }
  if (fmt < 8) {
 
@@ -7913,7 +7919,7 @@
  if (!GIV(primFailCode)) {
  long32Atput((rcvr + BaseHeaderSize) + ((((index >> 1)) - 1) << 2), valToPut);
  }
- goto l95;
+ goto l96;
  }
  if (fmt >= 16) {
 
@@ -7921,7 +7927,7 @@
 
  valToPut = asciiOfCharacter(value);
  if (!(!GIV(primFailCode))) {
- goto l95;
+ goto l96;
  }
  }
  else {
@@ -7935,14 +7941,18 @@
  if (!GIV(primFailCode)) {
  GIV(primFailCode) = 1;
  }
- goto l95;
+ goto l96;
  }
  byteAtput((rcvr + BaseHeaderSize) + (((index >> 1)) - 1), valToPut);
- goto l95;
+ goto l96;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
- l95: /* end commonVariable:at:put:cacheIndex: */;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ l96: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
  /* begin fetchNextBytecode */
@@ -12647,6 +12657,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     char *sp;
     char *sp1;
     sqInt stSize;
@@ -12741,7 +12752,11 @@
  goto l1;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  l1: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -12781,6 +12796,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     sqInt result;
     sqInt result1;
     char *sp;
@@ -12851,7 +12867,11 @@
  goto l1;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l1: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -44094,6 +44114,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -44189,10 +44210,12 @@
  return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1);
  }
  }
- else {
- GIV(primFailCode) = PrimErrBadIndex;
- return 0;
- }
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ return 0;
 }
 
 
@@ -44207,6 +44230,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -44344,7 +44368,11 @@
  }
  }
  else {
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  }
 }
 

Modified: branches/Cog/src/vm/cointerpmt.h
===================================================================
--- branches/Cog/src/vm/cointerpmt.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/cointerpmt.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/gcc3x-cointerp.c 2011-11-07 18:28:00 UTC (rev 2506)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
    from
- CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1891,7 +1891,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.134]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.136]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -7645,6 +7645,7 @@
  sqInt fmt;
  sqInt result1;
  sqInt stSize;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAt);
  index = longAtPointer(localSP);
@@ -7716,7 +7717,11 @@
  goto l93;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l93: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -7743,11 +7748,12 @@
  sqInt index;
  sqInt rcvr;
  sqInt value;
+ sqInt ccIndex;
  sqInt fixedFields;
  sqInt fmt;
  sqInt stSize;
  sqInt valToPut;
- sqInt ccIndex;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAtPut);
  value = longAtPointer(localSP);
@@ -7763,13 +7769,13 @@
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l96;
+ goto l95;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l96;
+ goto l95;
  }
- l96: /* end fetchClassOfNonInt: */;
+ l95: /* end fetchClassOfNonInt: */;
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((17 * 2) << ShiftForWord));
  if (!(lookupInMethodCacheSelclass(GIV(messageSelector), GIV(lkupClass)))) {
  GIV(argumentCount) = 2;
@@ -7805,7 +7811,7 @@
  possibleRootStoreIntovalue(rcvr, value);
  }
  longAtput((rcvr + BaseHeaderSize) + (((((index >> 1)) + fixedFields) - 1) << ShiftForWord), value);
- goto l95;
+ goto l96;
  }
  if (fmt < 8) {
 
@@ -7815,7 +7821,7 @@
  if (!GIV(primFailCode)) {
  long32Atput((rcvr + BaseHeaderSize) + ((((index >> 1)) - 1) << 2), valToPut);
  }
- goto l95;
+ goto l96;
  }
  if (fmt >= 16) {
 
@@ -7823,7 +7829,7 @@
 
  valToPut = asciiOfCharacter(value);
  if (!(!GIV(primFailCode))) {
- goto l95;
+ goto l96;
  }
  }
  else {
@@ -7837,14 +7843,18 @@
  if (!GIV(primFailCode)) {
  GIV(primFailCode) = 1;
  }
- goto l95;
+ goto l96;
  }
  byteAtput((rcvr + BaseHeaderSize) + (((index >> 1)) - 1), valToPut);
- goto l95;
+ goto l96;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
- l95: /* end commonVariable:at:put:cacheIndex: */;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ l96: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
  /* begin fetchNextBytecode */
@@ -12235,6 +12245,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     char *sp;
     char *sp1;
     sqInt stSize;
@@ -12329,7 +12340,11 @@
  goto l1;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  l1: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -12369,6 +12384,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     sqInt result;
     sqInt result1;
     char *sp;
@@ -12439,7 +12455,11 @@
  goto l1;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l1: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -42600,6 +42620,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -42695,10 +42716,12 @@
  return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1);
  }
  }
- else {
- GIV(primFailCode) = PrimErrBadIndex;
- return 0;
- }
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ return 0;
 }
 
 
@@ -42713,6 +42736,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -42850,7 +42874,11 @@
  }
  }
  else {
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  }
 }
 

Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerpmt.c 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/gcc3x-cointerpmt.c 2011-11-07 18:28:00 UTC (rev 2506)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
    from
- CoInterpreterMT VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CoInterpreterMT VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1991,7 +1991,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.134]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.136]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -7747,6 +7747,7 @@
  sqInt fmt;
  sqInt result1;
  sqInt stSize;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAt);
  index = longAtPointer(localSP);
@@ -7818,7 +7819,11 @@
  goto l93;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l93: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -7845,11 +7850,12 @@
  sqInt index;
  sqInt rcvr;
  sqInt value;
+ sqInt ccIndex;
  sqInt fixedFields;
  sqInt fmt;
  sqInt stSize;
  sqInt valToPut;
- sqInt ccIndex;
+ sqInt reasonCode;
 
  VM_LABEL(0bytecodePrimAtPut);
  value = longAtPointer(localSP);
@@ -7865,13 +7871,13 @@
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31)) == 0) {
  GIV(lkupClass) = (longAt(rcvr - BaseHeaderSize)) & AllButTypeMask;
- goto l96;
+ goto l95;
  }
  else {
  GIV(lkupClass) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << ShiftForWord))) + BaseHeaderSize) + ((ccIndex - 1) << ShiftForWord));
- goto l96;
+ goto l95;
  }
- l96: /* end fetchClassOfNonInt: */;
+ l95: /* end fetchClassOfNonInt: */;
  GIV(messageSelector) = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SpecialSelectors << ShiftForWord))) + BaseHeaderSize) + ((17 * 2) << ShiftForWord));
  if (!(lookupInMethodCacheSelclass(GIV(messageSelector), GIV(lkupClass)))) {
  GIV(argumentCount) = 2;
@@ -7907,7 +7913,7 @@
  possibleRootStoreIntovalue(rcvr, value);
  }
  longAtput((rcvr + BaseHeaderSize) + (((((index >> 1)) + fixedFields) - 1) << ShiftForWord), value);
- goto l95;
+ goto l96;
  }
  if (fmt < 8) {
 
@@ -7917,7 +7923,7 @@
  if (!GIV(primFailCode)) {
  long32Atput((rcvr + BaseHeaderSize) + ((((index >> 1)) - 1) << 2), valToPut);
  }
- goto l95;
+ goto l96;
  }
  if (fmt >= 16) {
 
@@ -7925,7 +7931,7 @@
 
  valToPut = asciiOfCharacter(value);
  if (!(!GIV(primFailCode))) {
- goto l95;
+ goto l96;
  }
  }
  else {
@@ -7939,14 +7945,18 @@
  if (!GIV(primFailCode)) {
  GIV(primFailCode) = 1;
  }
- goto l95;
+ goto l96;
  }
  byteAtput((rcvr + BaseHeaderSize) + (((index >> 1)) - 1), valToPut);
- goto l95;
+ goto l96;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
- l95: /* end commonVariable:at:put:cacheIndex: */;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ l96: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
  /* begin fetchNextBytecode */
@@ -12651,6 +12661,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     char *sp;
     char *sp1;
     sqInt stSize;
@@ -12745,7 +12756,11 @@
  goto l1;
  }
  }
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  l1: /* end commonVariable:at:put:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -12785,6 +12800,7 @@
     sqInt fmt;
     sqInt index;
     sqInt rcvr;
+    sqInt reasonCode;
     sqInt result;
     sqInt result1;
     char *sp;
@@ -12855,7 +12871,11 @@
  goto l1;
  }
  }
- result = (GIV(primFailCode) = PrimErrBadIndex);
+ /* begin primitiveFailFor: */
+ reasonCode = (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ result = (GIV(primFailCode) = reasonCode);
  l1: /* end commonVariable:at:cacheIndex: */;
  }
  if (!GIV(primFailCode)) {
@@ -44098,6 +44118,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -44193,10 +44214,12 @@
  return (((byteAt((array + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1);
  }
  }
- else {
- GIV(primFailCode) = PrimErrBadIndex;
- return 0;
- }
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
+ return 0;
 }
 
 
@@ -44211,6 +44234,7 @@
     sqInt fixedFields;
     sqInt fmt;
     sqInt hdr;
+    sqInt reasonCode;
     sqInt sp;
     sqInt sp1;
     sqInt stSize;
@@ -44348,7 +44372,11 @@
  }
  }
  else {
- GIV(primFailCode) = PrimErrBadIndex;
+ /* begin primitiveFailFor: */
+ reasonCode = (fmt <= 1
+ ? PrimErrBadReceiver
+ : PrimErrBadIndex);
+ GIV(primFailCode) = reasonCode;
  }
 }
 

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/interp.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/src/vm/vmCallback.h
===================================================================
--- branches/Cog/src/vm/vmCallback.h 2011-10-31 01:32:54 UTC (rev 2505)
+++ branches/Cog/src/vm/vmCallback.h 2011-11-07 18:28:00 UTC (rev 2506)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.134 uuid: a0d46c48-3d9a-43f9-a769-51f31ce120e9
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.136 uuid: c62e0f35-616c-4547-b4e7-46765111b6a9
  */
 
 #define VM_CALLBACK_INC 1