[commit] r2491 - CogVM source as per VMMaker.oscog-eem.122. Fix the 1Gb allocation bug.

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

[commit] r2491 - CogVM source as per VMMaker.oscog-eem.122. Fix the 1Gb allocation bug.

commits-3
 
Author: eliot
Date: 2011-09-06 16:44:23 -0700 (Tue, 06 Sep 2011)
New Revision: 2491

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:
CogVM source as per VMMaker.oscog-eem.122.  Fix the 1Gb allocation bug.


Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
    from
- CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -217,6 +217,7 @@
 #define LastLinkIndex 1
 #define LiteralStart 1
 #define LongSizeMask 0xFFFFFFFCUL
+#define LongSizeNumBits 30
 #define MarkBit 0x80000000UL
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -1891,7 +1892,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.121";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.123";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17203,7 +17204,7 @@
 sqInt *
 getStackPointer(void)
 {
- return GIV(stackPointer);
+ return ((sqInt *) GIV(stackPointer));
 }
 
 
@@ -32510,7 +32511,7 @@
 static void
 primitiveNew(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -32524,32 +32525,31 @@
  class = longAt(GIV(stackPointer));
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(0sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) 0)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (0 != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) 0) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = 0 * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) 0) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = 0;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (0 * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -32640,7 +32640,7 @@
 static void
 primitiveNewWithArg(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -32663,32 +32663,31 @@
  if (!GIV(primFailCode)) {
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(1sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) size)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (size != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) size) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = size * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) size) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = size;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (size * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -39494,7 +39493,7 @@
  : ((longAt(oop + BaseHeaderSize)) == 0
  ? " pointer @ "
  : " direct @ ")));
- printHex(startOfAlienData(oop));
+ printHex(((usqInt)(startOfAlienData(oop))));
  /* begin cr */
  printf("\n");
  return;

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-09-06 23:44:23 UTC (rev 2491)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
    from
- CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -220,6 +220,7 @@
 #define LastLinkIndex 1
 #define LiteralStart 1
 #define LongSizeMask 0xFFFFFFFCUL
+#define LongSizeNumBits 30
 #define MarkBit 0x80000000UL
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -1894,7 +1895,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.121";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.123";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17207,7 +17208,7 @@
 sqInt *
 getStackPointer(void)
 {
- return GIV(stackPointer);
+ return ((sqInt *) GIV(stackPointer));
 }
 
 
@@ -32514,7 +32515,7 @@
 static void
 primitiveNew(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -32528,32 +32529,31 @@
  class = longAt(GIV(stackPointer));
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(0sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) 0)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (0 != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) 0) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = 0 * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) 0) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = 0;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (0 * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -32644,7 +32644,7 @@
 static void
 primitiveNewWithArg(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -32667,32 +32667,31 @@
  if (!GIV(primFailCode)) {
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(1sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) size)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (size != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) size) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = size * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) size) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = size;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (size * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -39498,7 +39497,7 @@
  : ((longAt(oop + BaseHeaderSize)) == 0
  ? " pointer @ "
  : " direct @ ")));
- printHex(startOfAlienData(oop));
+ printHex(((usqInt)(startOfAlienData(oop))));
  /* begin cr */
  printf("\n");
  return;

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/nscogsrc/vm/interp.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/nscogsrc/vm/vmCallback.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 #define VM_CALLBACK_INC 1


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Mon Aug 22 17:21:13 PDT 2011
   + Tue Sep  6 16:43:59 PDT 2011

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/cointerp.c 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
    from
- CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -215,6 +215,7 @@
 #define LastLinkIndex 1
 #define LiteralStart 1
 #define LongSizeMask 0xFFFFFFFCUL
+#define LongSizeNumBits 30
 #define MarkBit 0x80000000UL
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -1882,7 +1883,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.121]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.123]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -16742,7 +16743,7 @@
 sqInt *
 getStackPointer(void)
 {
- return GIV(stackPointer);
+ return ((sqInt *) GIV(stackPointer));
 }
 
 
@@ -31828,7 +31829,7 @@
 static void
 primitiveNew(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -31842,32 +31843,31 @@
  class = longAt(GIV(stackPointer));
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(0sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) 0)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (0 != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) 0) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = 0 * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) 0) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = 0;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (0 * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -31958,7 +31958,7 @@
 static void
 primitiveNewWithArg(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -31981,32 +31981,31 @@
  if (!GIV(primFailCode)) {
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(1sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) size)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (size != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) size) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = size * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) size) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = size;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (size * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -38812,7 +38811,7 @@
  : ((longAt(oop + BaseHeaderSize)) == 0
  ? " pointer @ "
  : " direct @ ")));
- printHex(startOfAlienData(oop));
+ printHex(((usqInt)(startOfAlienData(oop))));
  /* begin cr */
  printf("\n");
  return;

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/cointerp.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 

Modified: branches/Cog/src/vm/cointerpmt.c
===================================================================
--- branches/Cog/src/vm/cointerpmt.c 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/cointerpmt.c 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
    from
- CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CoInterpreterMT VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -246,6 +246,7 @@
 #define LiteralStart 1
 #define LockGUIThreadFlag 0x10000
 #define LongSizeMask 0xFFFFFFFCUL
+#define LongSizeNumBits 30
 #define MarkBit 0x80000000UL
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -1982,7 +1983,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.121]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.123]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -17362,7 +17363,7 @@
 sqInt *
 getStackPointer(void)
 {
- return GIV(stackPointer);
+ return ((sqInt *) GIV(stackPointer));
 }
 
 
@@ -33037,7 +33038,7 @@
 static void
 primitiveNew(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -33051,32 +33052,31 @@
  class = longAt(GIV(stackPointer));
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(0sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) 0)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (0 != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) 0) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = 0 * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) 0) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = 0;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (0 * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -33167,7 +33167,7 @@
 static void
 primitiveNewWithArg(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -33190,32 +33190,31 @@
  if (!GIV(primFailCode)) {
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(1sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) size)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (size != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) size) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = size * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) size) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = size;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (size * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -40163,7 +40162,7 @@
  : ((longAt(oop + BaseHeaderSize)) == 0
  ? " pointer @ "
  : " direct @ ")));
- printHex(startOfAlienData(oop));
+ printHex(((usqInt)(startOfAlienData(oop))));
  /* begin cr */
  printf("\n");
  return;

Modified: branches/Cog/src/vm/cointerpmt.h
===================================================================
--- branches/Cog/src/vm/cointerpmt.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/cointerpmt.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/gcc3x-cointerp.c 2011-09-06 23:44:23 UTC (rev 2491)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
    from
- CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -218,6 +218,7 @@
 #define LastLinkIndex 1
 #define LiteralStart 1
 #define LongSizeMask 0xFFFFFFFCUL
+#define LongSizeNumBits 30
 #define MarkBit 0x80000000UL
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -1885,7 +1886,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.121]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.123]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -16746,7 +16747,7 @@
 sqInt *
 getStackPointer(void)
 {
- return GIV(stackPointer);
+ return ((sqInt *) GIV(stackPointer));
 }
 
 
@@ -31832,7 +31833,7 @@
 static void
 primitiveNew(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -31846,32 +31847,31 @@
  class = longAt(GIV(stackPointer));
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(0sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) 0)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (0 != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) 0) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = 0 * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) 0) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = 0;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (0 * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -31962,7 +31962,7 @@
 static void
 primitiveNewWithArg(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -31985,32 +31985,31 @@
  if (!GIV(primFailCode)) {
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(1sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) size)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (size != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) size) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = size * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) size) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = size;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (size * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -38816,7 +38815,7 @@
  : ((longAt(oop + BaseHeaderSize)) == 0
  ? " pointer @ "
  : " direct @ ")));
- printHex(startOfAlienData(oop));
+ printHex(((usqInt)(startOfAlienData(oop))));
  /* begin cr */
  printf("\n");
  return;

Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerpmt.c 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/gcc3x-cointerpmt.c 2011-09-06 23:44:23 UTC (rev 2491)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
    from
- CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CoInterpreterMT VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -249,6 +249,7 @@
 #define LiteralStart 1
 #define LockGUIThreadFlag 0x10000
 #define LongSizeMask 0xFFFFFFFCUL
+#define LongSizeNumBits 30
 #define MarkBit 0x80000000UL
 #define MaxExternalPrimitiveTableSize 4096
 #define MaxJumpBuf 32
@@ -1985,7 +1986,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.121]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.123]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -17366,7 +17367,7 @@
 sqInt *
 getStackPointer(void)
 {
- return GIV(stackPointer);
+ return ((sqInt *) GIV(stackPointer));
 }
 
 
@@ -33041,7 +33042,7 @@
 static void
 primitiveNew(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -33055,32 +33056,31 @@
  class = longAt(GIV(stackPointer));
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(0sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) 0)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (0 != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) 0) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = 0 * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) 0) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = 0;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (0 * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -33171,7 +33171,7 @@
 static void
 primitiveNewWithArg(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt atomSize;
+    sqInt allocSize;
     sqInt class;
     sqInt format;
     sqInt minFree;
@@ -33194,32 +33194,31 @@
  if (!GIV(primFailCode)) {
  /* begin sufficientSpaceToInstantiate:indexableSize: */
  VM_LABEL(1sufficientSpaceToInstantiateindexableSize);
-
- /* fail if attempting to call new: on non-indexable class */
-
- format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15;
- if (((((usqInt ) size)) > 0)
- && (format < 2)) {
- spaceOkay = 0;
- goto l1;
+ if (((format = (((usqInt) ((longAt((class + BaseHeaderSize) + (InstanceSpecificationIndex << ShiftForWord))) - 1)) >> 8) & 15)) < 8) {
+ if (size != 0) {
+ if (format < 2) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ if ((((usqInt) size) >> (LongSizeNumBits - BytesPerWord)) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ }
+ allocSize = size * BytesPerWord;
  }
- if (format < 8) {
-
- /* indexable fields are words or pointers */
-
- atomSize = BytesPerWord;
- }
  else {
-
- /* indexable fields are bytes */
-
- atomSize = 1;
+ if ((((usqInt) size) >> LongSizeNumBits) > 0) {
+ spaceOkay = 0;
+ goto l1;
+ }
+ allocSize = size;
  }
  /* begin sufficientSpaceToAllocate: */
 
  /* check for low-space */
 
- minFree = ((((GIV(lowSpaceThreshold) + (2500 + (size * atomSize))) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
+ minFree = ((((GIV(lowSpaceThreshold) + (2500 + allocSize)) + BaseHeaderSize) + BytesPerWord) - 1) & (~(BytesPerWord - 1));
  if ((((usqInt) (GIV(freeStart) + minFree))) <= (((usqInt) GIV(reserveStart)))) {
  spaceOkay = 1;
  goto l1;
@@ -40167,7 +40166,7 @@
  : ((longAt(oop + BaseHeaderSize)) == 0
  ? " pointer @ "
  : " direct @ ")));
- printHex(startOfAlienData(oop));
+ printHex(((usqInt)(startOfAlienData(oop))));
  /* begin cr */
  printf("\n");
  return;

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/interp.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/src/vm/vmCallback.h
===================================================================
--- branches/Cog/src/vm/vmCallback.h 2011-09-05 17:27:38 UTC (rev 2490)
+++ branches/Cog/src/vm/vmCallback.h 2011-09-06 23:44:23 UTC (rev 2491)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.121 uuid: 8561f7f7-973d-4e7a-bf2d-5ae21509b2c5
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.123 uuid: 9c524903-b0c7-46a8-a37a-5dfda6fcd1f3
  */
 
 #define VM_CALLBACK_INC 1