[commit][3154] CogVM source as per VMMaker.oscog-eem.957

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

[commit][3154] CogVM source as per VMMaker.oscog-eem.957

commits-3
 
Revision: 3154
Author:   eliot
Date:     2014-11-27 16:08:50 -0800 (Thu, 27 Nov 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.957

Fix regression in magnitude64BitIntegerFor:neg:

Move dispdbg.h above cointerp.h & cogit.h in cogit.c
otherwise NoDbgRegParms gets screwed up.

Use asInteger instead of asUnsignedInteger
in followForwardingPointersInStackZone: so
simulation of Stack VM doesn't trigger the assert in asUnsignedInteger.

Spur:
Make instantiateClass:indexableSize: check for Float instantiation, failing for
other than 2 words.  Rewrite 32-bit coalesce:and: to use the raw slot accessors.
Implement 64-bit coalesce:and:.

Make printStackCallStackOf: accept contexts.

Fix compilation warnings in SqueakFFIPrims.

Nuke obsolete AddSmallFloat.st

Modified Paths:
--------------
    branches/Cog/image/buildspurtrunkimage.sh
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/cogit.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/sistasrc/vm/cogit.c
    branches/Cog/sistasrc/vm/cogit.h
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cogit.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cogit.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
    branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.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/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

Removed Paths:
-------------
    branches/Cog/image/AddSmallFloat.st

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Deleted: branches/Cog/image/AddSmallFloat.st
===================================================================
--- branches/Cog/image/AddSmallFloat.st 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/image/AddSmallFloat.st 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,55 +0,0 @@
-Number subclass: #LimitedPrecisionReal
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Kernel-Numbers'.
-
-LimitedPrecisionReal immediateSubclass: #SmallFloat
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Kernel-Numbers'.
-
-Float superclass: LimitedPrecisionReal.
-Float class superclass: LimitedPrecisionReal class.
-Number removeSubclass: Float.
-Number class removeSubclass: Float class.
-LimitedPrecisionReal addSubclass: Float.
-LimitedPrecisionReal class addSubclass: Float class.
-
-LimitedPrecisionReal ensureClassPool.
-Float classPool keys do:
- [:key|
- LimitedPrecisionReal classPool declare: key from: Float classPool].
-
-Float selectors do:
- [:s| | m |
- m := Float >> s.
- (((#(0 38 39) includes: m primitive) or: [m isQuick])
- and: [m protocol ~~ #copying]) ifTrue:
- [LimitedPrecisionReal methodDict at: s put: m.
- Float methodDict removeKey: s.
- m methodClassAssociation: LimitedPrecisionReal binding]].
-
-SystemChangeNotifier uniqueInstance doSilently:
- [LimitedPrecisionReal organization changeFromString: Float organization printString.
- LimitedPrecisionReal selectors do:
- [:s|
- LimitedPrecisionReal organization classify: s under: (Float organization categoryOfElement: s).
- Float organization removeElement: s].
- LimitedPrecisionReal organization removeEmptyCategories.
- Float organization removeEmptyCategories].
-
-Float selectors do:
- [:s| | m src |
- m := Float >> s.
- m primitive > 0 ifTrue:
- [src := (Float sourceCodeAt: s) asString.
- src := src copyReplaceAll: '<primitive: ' with: '<primitive: 5'.
- SmallFloat compile: src classified: m protocol]].
-
-(SmallInteger organization listAtCategoryNamed: #copying) do:
- [:s|
- SmallFloat compile: (SmallInteger sourceCodeAt: s) asString classified: #copying].
-
-Smalltalk snapshot: true andQuit: true
Modified: branches/Cog/image/buildspurtrunkimage.sh
===================================================================
--- branches/Cog/image/buildspurtrunkimage.sh 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/image/buildspurtrunkimage.sh 2014-11-28 00:08:50 UTC (rev 3154)
@@ -21,7 +21,7 @@
 IMAGE=""
 GOTIMAGE=""
 while true; do
- for f in *VMMaker*spur.image; do
+ for f in *VMMaker*spur.image SpurVMMaker.image; do
  if test -f "$f"; then
  IMAGE="$f"
 . ./getGoodSpurVM.sh

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nscogsrc/vm/cogit.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.933 uuid: 5a37067c-b76b-4ada-9399-1de11632acd8
+ CCodeGenerator VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- StackToRegisterMappingCogit VMMaker.oscog-eem.933 uuid: 5a37067c-b76b-4ada-9399-1de11632acd8
+ StackToRegisterMappingCogit VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.933 uuid: 5a37067c-b76b-4ada-9399-1de11632acd8 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -11,6 +11,7 @@
 #include <stddef.h>
 #include "sq.h"
 #include "sqCogStackAlignment.h"
+#include "dispdbg.h"
 #include "cogmethod.h"
 #if COGMTVM
 #include "cointerpmt.h"
@@ -18,7 +19,6 @@
 #include "cointerp.h"
 #endif
 #include "cogit.h"
-#include "dispdbg.h"
 
 typedef struct _AbstractInstruction {
  char opcode;

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nscogsrc/vm/cogit.h 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.933 uuid: 5a37067c-b76b-4ada-9399-1de11632acd8
+ CCodeGenerator VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1205,7 +1205,7 @@
 void printOop(sqInt oop);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void printStackPageList(void);
 void printStackPageListInUse(void);
 void printStackPages(void);
@@ -2093,7 +2093,7 @@
  /* 574 */ (void (*)(void))0,
  /* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.956";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.957";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -19149,13 +19149,13 @@
     sqInt classArrayClass;
     sqInt classArrayObj;
     size_t dataSize;
-    long firstSegSize;
+    sqInt firstSegSize;
     sqInt hdrCogCodeSize;
     sqInt hdrEdenBytes;
     sqInt hdrMaxExtSemTabSize;
     sqInt hdrNumStackPages;
     sqInt header;
-    long headerFlags;
+    sqInt headerFlags;
     sqInt headerSize;
     squeakFileOffsetType headerStart;
     usqInt heapSize;
@@ -19172,7 +19172,7 @@
     sqInt memEnd;
     sqInt memLimit;
     usqInt minimumMemory;
-    long oldBaseAddr;
+    sqInt oldBaseAddr;
     sqInt oop;
     sqInt swapBytes;
     sqInt sz;
@@ -19212,9 +19212,9 @@
  /* begin getLongFromFile:swap: */
  w1 = 0;
  sqImageFileRead((&w1), sizeof(long), 1, f);
- dataSize = ((long) ((swapBytes
- ? byteSwapped(w1)
- : w1)));
+ dataSize = (swapBytes
+ ? byteSwapped(w1)
+ : w1);
  /* begin getLongFromFile:swap: */
  w2 = 0;
  sqImageFileRead((&w2), sizeof(long), 1, f);
@@ -19225,24 +19225,24 @@
  /* begin getLongFromFile:swap: */
  w11 = 0;
  sqImageFileRead((&w11), sizeof(long), 1, f);
- anObject = ((long) ((swapBytes
- ? byteSwapped(w11)
- : w11)));
+ anObject = (swapBytes
+ ? byteSwapped(w11)
+ : w11);
  GIV(specialObjectsOop) = anObject;
  /* begin lastHash: */
  /* begin getLongFromFile:swap: */
  w12 = 0;
  sqImageFileRead((&w12), sizeof(long), 1, f);
- aValue = ((long) ((swapBytes
- ? byteSwapped(w12)
- : w12)));
+ aValue = (swapBytes
+ ? byteSwapped(w12)
+ : w12);
  lastHash = aValue;
  /* begin getLongFromFile:swap: */
  w3 = 0;
  sqImageFileRead((&w3), sizeof(long), 1, f);
- GIV(savedWindowSize) = ((long) ((swapBytes
- ? byteSwapped(w3)
- : w3)));
+ GIV(savedWindowSize) = (swapBytes
+ ? byteSwapped(w3)
+ : w3);
  /* begin getLongFromFile:swap: */
  w4 = 0;
  sqImageFileRead((&w4), sizeof(long), 1, f);
@@ -23012,8 +23012,8 @@
     sqInt sz;
 
  isSmall = (isNegative
- ? magnitude < (MaxSmallInteger)
- : magnitude < ((MaxSmallInteger) + 1));
+ ? magnitude <= ((MaxSmallInteger) + 1)
+ : magnitude <= (MaxSmallInteger));
  if (isSmall) {
  smallVal = ((sqInt) magnitude);
  if (isNegative) {
@@ -50249,12 +50249,23 @@
 }
 
 sqInt
-printStackCallStackOf(char *aFramePointer)
-{
+printStackCallStackOf(sqInt frameOrContext)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt context;
     char *theFP;
 
- theFP = aFramePointer;
+ if (((frameOrContext & 3) == 0)
+ && (((((usqInt)frameOrContext)) >= (startOfMemory()))
+ && (((((usqInt)frameOrContext)) < GIV(freeStart))
+ && (((longAt(frameOrContext)) & TypeMask) != HeaderTypeGC)))) {
+ if ((((frameOrContext & 1) == 0)
+ && (((((usqInt) (longAt(frameOrContext))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex))
+ && (checkIsStillMarriedContextcurrentFP(frameOrContext, null))) {
+ return printStackCallStackOf(frameOfMarriedContext(frameOrContext));
+ }
+ return null;
+ }
+ theFP = ((void *)frameOrContext);
  while(1) {
  context = shortReversePrintFrameAndCallers(theFP);
  if (!((((longAt((context + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1))

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
 
 
@@ -251,7 +251,7 @@
 void printMethodDictionary(sqInt dictionary);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void print(char *s);
 void setBreakSelector(char *aString);
 void setNextWakeupUsecs(usqLong value);

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1208,7 +1208,7 @@
 void printOop(sqInt oop);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void printStackPageList(void);
 void printStackPageListInUse(void);
 void printStackPages(void);
@@ -2096,7 +2096,7 @@
  /* 574 */ (void (*)(void))0,
  /* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.956";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.957";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -19158,13 +19158,13 @@
     sqInt classArrayClass;
     sqInt classArrayObj;
     size_t dataSize;
-    long firstSegSize;
+    sqInt firstSegSize;
     sqInt hdrCogCodeSize;
     sqInt hdrEdenBytes;
     sqInt hdrMaxExtSemTabSize;
     sqInt hdrNumStackPages;
     sqInt header;
-    long headerFlags;
+    sqInt headerFlags;
     sqInt headerSize;
     squeakFileOffsetType headerStart;
     usqInt heapSize;
@@ -19181,7 +19181,7 @@
     sqInt memEnd;
     sqInt memLimit;
     usqInt minimumMemory;
-    long oldBaseAddr;
+    sqInt oldBaseAddr;
     sqInt oop;
     sqInt swapBytes;
     sqInt sz;
@@ -19221,9 +19221,9 @@
  /* begin getLongFromFile:swap: */
  w1 = 0;
  sqImageFileRead((&w1), sizeof(long), 1, f);
- dataSize = ((long) ((swapBytes
- ? byteSwapped(w1)
- : w1)));
+ dataSize = (swapBytes
+ ? byteSwapped(w1)
+ : w1);
  /* begin getLongFromFile:swap: */
  w2 = 0;
  sqImageFileRead((&w2), sizeof(long), 1, f);
@@ -19234,24 +19234,24 @@
  /* begin getLongFromFile:swap: */
  w11 = 0;
  sqImageFileRead((&w11), sizeof(long), 1, f);
- anObject = ((long) ((swapBytes
- ? byteSwapped(w11)
- : w11)));
+ anObject = (swapBytes
+ ? byteSwapped(w11)
+ : w11);
  GIV(specialObjectsOop) = anObject;
  /* begin lastHash: */
  /* begin getLongFromFile:swap: */
  w12 = 0;
  sqImageFileRead((&w12), sizeof(long), 1, f);
- aValue = ((long) ((swapBytes
- ? byteSwapped(w12)
- : w12)));
+ aValue = (swapBytes
+ ? byteSwapped(w12)
+ : w12);
  lastHash = aValue;
  /* begin getLongFromFile:swap: */
  w3 = 0;
  sqImageFileRead((&w3), sizeof(long), 1, f);
- GIV(savedWindowSize) = ((long) ((swapBytes
- ? byteSwapped(w3)
- : w3)));
+ GIV(savedWindowSize) = (swapBytes
+ ? byteSwapped(w3)
+ : w3);
  /* begin getLongFromFile:swap: */
  w4 = 0;
  sqImageFileRead((&w4), sizeof(long), 1, f);
@@ -23021,8 +23021,8 @@
     sqInt sz;
 
  isSmall = (isNegative
- ? magnitude < (MaxSmallInteger)
- : magnitude < ((MaxSmallInteger) + 1));
+ ? magnitude <= ((MaxSmallInteger) + 1)
+ : magnitude <= (MaxSmallInteger));
  if (isSmall) {
  smallVal = ((sqInt) magnitude);
  if (isNegative) {
@@ -50258,12 +50258,23 @@
 }
 
 sqInt
-printStackCallStackOf(char *aFramePointer)
-{
+printStackCallStackOf(sqInt frameOrContext)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt context;
     char *theFP;
 
- theFP = aFramePointer;
+ if (((frameOrContext & 3) == 0)
+ && (((((usqInt)frameOrContext)) >= (startOfMemory()))
+ && (((((usqInt)frameOrContext)) < GIV(freeStart))
+ && (((longAt(frameOrContext)) & TypeMask) != HeaderTypeGC)))) {
+ if ((((frameOrContext & 1) == 0)
+ && (((((usqInt) (longAt(frameOrContext))) >> (compactClassFieldLSB())) & 0x1F) == ClassMethodContextCompactIndex))
+ && (checkIsStillMarriedContextcurrentFP(frameOrContext, null))) {
+ return printStackCallStackOf(frameOfMarriedContext(frameOrContext));
+ }
+ return null;
+ }
+ theFP = ((void *)frameOrContext);
  while(1) {
  context = shortReversePrintFrameAndCallers(theFP);
  if (!((((longAt((context + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1))

Modified: branches/Cog/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspursrc/vm/cogit.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.935 uuid: e1096b9f-e01b-4709-b369-18563b884832
+ CCodeGenerator VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- StackToRegisterMappingCogit VMMaker.oscog-eem.935 uuid: e1096b9f-e01b-4709-b369-18563b884832
+ StackToRegisterMappingCogit VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.935 uuid: e1096b9f-e01b-4709-b369-18563b884832 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -11,6 +11,7 @@
 #include <stddef.h>
 #include "sq.h"
 #include "sqCogStackAlignment.h"
+#include "dispdbg.h"
 #include "cogmethod.h"
 #if COGMTVM
 #include "cointerpmt.h"
@@ -18,7 +19,6 @@
 #include "cointerp.h"
 #endif
 #include "cogit.h"
-#include "dispdbg.h"
 
 typedef struct _AbstractInstruction {
  char opcode;

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspursrc/vm/cogit.h 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.935 uuid: e1096b9f-e01b-4709-b369-18563b884832
+ CCodeGenerator VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspursrc/vm/cointerp.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -139,7 +139,6 @@
 #define BecameActiveClassFlag 8
 #define BecameCompiledMethodFlag 2
 #define BecamePointerObjectFlag 1
-#define BitsPerByte 8
 #define Byte0Mask 0xFF
 #define Byte1Mask 0xFF00
 #define Byte1Shift 8
@@ -1393,7 +1392,7 @@
 void printOop(sqInt oop);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void printStackPageList(void);
 void printStackPageListInUse(void);
 void printStackPages(void);
@@ -2343,7 +2342,7 @@
 /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
 /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
  };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.956";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.957";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -23476,12 +23475,12 @@
     sqInt classTablePage;
     size_t dataSize;
     sqInt edenBytes;
-    long firstSegSize;
+    sqInt firstSegSize;
     sqInt hdrCogCodeSize;
     sqInt hdrEdenBytes;
     sqInt hdrMaxExtSemTabSize;
     sqInt hdrNumStackPages;
-    long headerFlags;
+    sqInt headerFlags;
     sqInt headerSize;
     squeakFileOffsetType headerStart;
     usqInt heapSize;
@@ -23500,7 +23499,7 @@
     usqInt minimumMemory;
     usqInt numSlots;
     sqInt objOop;
-    long oldBaseAddr;
+    sqInt oldBaseAddr;
     sqInt oldStart;
     sqInt oop;
     sqInt p;
@@ -23543,9 +23542,9 @@
  /* begin getLongFromFile:swap: */
  w1 = 0;
  sqImageFileRead((&w1), sizeof(long), 1, f);
- dataSize = ((long) ((swapBytes
- ? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
- : w1)));
+ dataSize = (swapBytes
+ ? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
+ : w1);
  /* begin getLongFromFile:swap: */
  w2 = 0;
  sqImageFileRead((&w2), sizeof(long), 1, f);
@@ -23556,24 +23555,24 @@
  /* begin getLongFromFile:swap: */
  w3 = 0;
  sqImageFileRead((&w3), sizeof(long), 1, f);
- anObject = ((long) ((swapBytes
- ? ((((((usqInt) w3 >> 24)) & Byte0Mask) + ((((usqInt) w3 >> 8)) & Byte1Mask)) + ((((usqInt) w3 << 8)) & Byte2Mask)) + ((((usqInt) w3 << 24)) & Byte3Mask)
- : w3)));
+ anObject = (swapBytes
+ ? ((((((usqInt) w3 >> 24)) & Byte0Mask) + ((((usqInt) w3 >> 8)) & Byte1Mask)) + ((((usqInt) w3 << 8)) & Byte2Mask)) + ((((usqInt) w3 << 24)) & Byte3Mask)
+ : w3);
  GIV(specialObjectsOop) = anObject;
  /* begin lastHash: */
  /* begin getLongFromFile:swap: */
  w4 = 0;
  sqImageFileRead((&w4), sizeof(long), 1, f);
- seed = ((long) ((swapBytes
- ? ((((((usqInt) w4 >> 24)) & Byte0Mask) + ((((usqInt) w4 >> 8)) & Byte1Mask)) + ((((usqInt) w4 << 8)) & Byte2Mask)) + ((((usqInt) w4 << 24)) & Byte3Mask)
- : w4)));
+ seed = (swapBytes
+ ? ((((((usqInt) w4 >> 24)) & Byte0Mask) + ((((usqInt) w4 >> 8)) & Byte1Mask)) + ((((usqInt) w4 << 8)) & Byte2Mask)) + ((((usqInt) w4 << 24)) & Byte3Mask)
+ : w4);
  GIV(lastHash) = seed;
  /* begin getLongFromFile:swap: */
  w5 = 0;
  sqImageFileRead((&w5), sizeof(long), 1, f);
- GIV(savedWindowSize) = ((long) ((swapBytes
- ? ((((((usqInt) w5 >> 24)) & Byte0Mask) + ((((usqInt) w5 >> 8)) & Byte1Mask)) + ((((usqInt) w5 << 8)) & Byte2Mask)) + ((((usqInt) w5 << 24)) & Byte3Mask)
- : w5)));
+ GIV(savedWindowSize) = (swapBytes
+ ? ((((((usqInt) w5 >> 24)) & Byte0Mask) + ((((usqInt) w5 >> 8)) & Byte1Mask)) + ((((usqInt) w5 << 8)) & Byte2Mask)) + ((((usqInt) w5 << 24)) & Byte3Mask)
+ : w5);
  /* begin getLongFromFile:swap: */
  w6 = 0;
  sqImageFileRead((&w6), sizeof(long), 1, f);
@@ -27804,8 +27803,8 @@
     sqInt sz;
 
  isSmall = (isNegative
- ? magnitude < (MaxSmallInteger)
- : magnitude < ((MaxSmallInteger) + 1));
+ ? magnitude <= ((MaxSmallInteger) + 1)
+ : magnitude <= (MaxSmallInteger));
  if (isSmall) {
  smallVal = ((sqInt) magnitude);
  if (isNegative) {
@@ -40817,48 +40816,40 @@
 
  classFormat = ((longAt((classObj + BaseHeaderSize) + (InstanceSpecificationIndex << (shiftForWord())))) >> 1);
  instSpec = (((usqInt) classFormat) >> 16) & 0x1F;
+ classIndex = (long32At(classObj + 4)) & 0x3FFFFF;
  fillValue = 0;
 
  switch (instSpec) {
  case 2:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  numSlots = nElements;
  fillValue = GIV(nilObj);
  break;
  case 3:
  case 4:
- if (nElements > ((((512 * 1024) * 1024) - 1) - (classFormat & ((1 << 16) - 1)))) {
- return null;
- }
  numSlots = (classFormat & ((1 << 16) - 1)) + nElements;
  fillValue = GIV(nilObj);
  break;
  case 9:
  if (nElements > ((((512 * 1024) * 1024) - 1) / 2)) {
+ GIV(primFailCode) = PrimErrUnsupported;
  return null;
  }
  numSlots = nElements * 2;
  break;
  case 10:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
+ if ((classIndex == ClassFloatCompactIndex)
+ && (nElements != 2)) {
+ GIV(primFailCode) = PrimErrBadReceiver;
  return null;
  }
  numSlots = nElements;
  break;
  case 12:
  numSlots = (nElements + 1) / 2;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += nElements & 1;
  break;
  case 16:
  numSlots = (nElements + 3) / 4;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += (4 - nElements) & 3;
  break;
  default:
@@ -40874,23 +40865,29 @@
  numSlots = classFormat & ((1 << 16) - 1);
 
  }
- /* begin ensureBehaviorHash: */
- assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classIndex = -err;
- goto l2;
+ if (classIndex == 0) {
+ /* begin ensureBehaviorHash: */
+ assert(addressCouldBeClassObj(classObj));
+ if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
+ if (((err = enterIntoClassTable(classObj))) != 0) {
+ classIndex = -err;
+ goto l1;
+ }
+ newHash = (long32At(classObj + 4)) & 0x3FFFFF;
+ assert((classAtIndex(newHash)) == classObj);
  }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
+ classIndex = newHash;
+ l1: /* end ensureBehaviorHash: */;
+ if (classIndex < 0) {
+ GIV(primFailCode) = -classIndex;
+ return null;
+ }
  }
- classIndex = newHash;
-l2: /* end ensureBehaviorHash: */;
- if (classIndex < 0) {
- GIV(primFailCode) = -classIndex;
- return null;
- }
  if (numSlots > ((1 << 16) - 1)) {
+ if (numSlots > (((512 * 1024) * 1024) - 1)) {
+ GIV(primFailCode) = PrimErrUnsupported;
+ return null;
+ }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, ((numSlots == 0
  ? 8
  : (numSlots + (numSlots & 1)) << (shiftForWord()))) + ((numSlots >= 0xFF
@@ -40916,7 +40913,7 @@
  forceInterruptCheck();
  }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, instSpec, classIndex);
- goto l1;
+ goto l2;
  }
  if (numSlots >= 0xFF) {
 
@@ -40934,7 +40931,7 @@
  assert((newObj1 % (allocationUnit())) == 0);
  GIV(freeStart) += numBytes;
  newObj = newObj1;
- l1: /* end allocateSlots:format:classIndex: */;
+ l2: /* end allocateSlots:format:classIndex: */;
  }
  if (!(newObj == null)) {
  /* begin fillObj:numSlots:with: */
@@ -48486,7 +48483,7 @@
 
  newNumSlots = obj2slots + header1NumSlots;
  if (newNumSlots < 0xFF) {
- byteAtput(here1 + (56 / BitsPerByte), newNumSlots);
+ byteAtput(here1 + 7, newNumSlots);
  here1 = here1;
  goto l2;
  }
@@ -70596,12 +70593,20 @@
 }
 
 sqInt
-printStackCallStackOf(char *aFramePointer)
+printStackCallStackOf(sqInt frameOrContext)
 {
     sqInt context;
     char *theFP;
 
- theFP = aFramePointer;
+ if (addressCouldBeObj(frameOrContext)) {
+ if ((((frameOrContext & 3) == 0)
+ && (((longAt(frameOrContext)) & 0x3FFFFF) == ClassMethodContextCompactIndex))
+ && (checkIsStillMarriedContextcurrentFP(frameOrContext, null))) {
+ return printStackCallStackOf(frameOfMarriedContext(frameOrContext));
+ }
+ return null;
+ }
+ theFP = ((void *)frameOrContext);
  while(1) {
  context = shortReversePrintFrameAndCallers(theFP);
  if (!((((longAt((context + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1))

Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspursrc/vm/cointerp.h 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
 
 
@@ -299,7 +299,7 @@
 void printMethodDictionary(sqInt dictionary);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void print(char *s);
 void setBreakSelector(char *aString);
 void setNextWakeupUsecs(usqLong value);

Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -142,7 +142,6 @@
 #define BecameActiveClassFlag 8
 #define BecameCompiledMethodFlag 2
 #define BecamePointerObjectFlag 1
-#define BitsPerByte 8
 #define Byte0Mask 0xFF
 #define Byte1Mask 0xFF00
 #define Byte1Shift 8
@@ -1396,7 +1395,7 @@
 void printOop(sqInt oop);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void printStackPageList(void);
 void printStackPageListInUse(void);
 void printStackPages(void);
@@ -2346,7 +2345,7 @@
 /*540*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
 /*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
  };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.956";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.957";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -23485,12 +23484,12 @@
     sqInt classTablePage;
     size_t dataSize;
     sqInt edenBytes;
-    long firstSegSize;
+    sqInt firstSegSize;
     sqInt hdrCogCodeSize;
     sqInt hdrEdenBytes;
     sqInt hdrMaxExtSemTabSize;
     sqInt hdrNumStackPages;
-    long headerFlags;
+    sqInt headerFlags;
     sqInt headerSize;
     squeakFileOffsetType headerStart;
     usqInt heapSize;
@@ -23509,7 +23508,7 @@
     usqInt minimumMemory;
     usqInt numSlots;
     sqInt objOop;
-    long oldBaseAddr;
+    sqInt oldBaseAddr;
     sqInt oldStart;
     sqInt oop;
     sqInt p;
@@ -23552,9 +23551,9 @@
  /* begin getLongFromFile:swap: */
  w1 = 0;
  sqImageFileRead((&w1), sizeof(long), 1, f);
- dataSize = ((long) ((swapBytes
- ? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
- : w1)));
+ dataSize = (swapBytes
+ ? ((((((usqInt) w1 >> 24)) & Byte0Mask) + ((((usqInt) w1 >> 8)) & Byte1Mask)) + ((((usqInt) w1 << 8)) & Byte2Mask)) + ((((usqInt) w1 << 24)) & Byte3Mask)
+ : w1);
  /* begin getLongFromFile:swap: */
  w2 = 0;
  sqImageFileRead((&w2), sizeof(long), 1, f);
@@ -23565,24 +23564,24 @@
  /* begin getLongFromFile:swap: */
  w3 = 0;
  sqImageFileRead((&w3), sizeof(long), 1, f);
- anObject = ((long) ((swapBytes
- ? ((((((usqInt) w3 >> 24)) & Byte0Mask) + ((((usqInt) w3 >> 8)) & Byte1Mask)) + ((((usqInt) w3 << 8)) & Byte2Mask)) + ((((usqInt) w3 << 24)) & Byte3Mask)
- : w3)));
+ anObject = (swapBytes
+ ? ((((((usqInt) w3 >> 24)) & Byte0Mask) + ((((usqInt) w3 >> 8)) & Byte1Mask)) + ((((usqInt) w3 << 8)) & Byte2Mask)) + ((((usqInt) w3 << 24)) & Byte3Mask)
+ : w3);
  GIV(specialObjectsOop) = anObject;
  /* begin lastHash: */
  /* begin getLongFromFile:swap: */
  w4 = 0;
  sqImageFileRead((&w4), sizeof(long), 1, f);
- seed = ((long) ((swapBytes
- ? ((((((usqInt) w4 >> 24)) & Byte0Mask) + ((((usqInt) w4 >> 8)) & Byte1Mask)) + ((((usqInt) w4 << 8)) & Byte2Mask)) + ((((usqInt) w4 << 24)) & Byte3Mask)
- : w4)));
+ seed = (swapBytes
+ ? ((((((usqInt) w4 >> 24)) & Byte0Mask) + ((((usqInt) w4 >> 8)) & Byte1Mask)) + ((((usqInt) w4 << 8)) & Byte2Mask)) + ((((usqInt) w4 << 24)) & Byte3Mask)
+ : w4);
  GIV(lastHash) = seed;
  /* begin getLongFromFile:swap: */
  w5 = 0;
  sqImageFileRead((&w5), sizeof(long), 1, f);
- GIV(savedWindowSize) = ((long) ((swapBytes
- ? ((((((usqInt) w5 >> 24)) & Byte0Mask) + ((((usqInt) w5 >> 8)) & Byte1Mask)) + ((((usqInt) w5 << 8)) & Byte2Mask)) + ((((usqInt) w5 << 24)) & Byte3Mask)
- : w5)));
+ GIV(savedWindowSize) = (swapBytes
+ ? ((((((usqInt) w5 >> 24)) & Byte0Mask) + ((((usqInt) w5 >> 8)) & Byte1Mask)) + ((((usqInt) w5 << 8)) & Byte2Mask)) + ((((usqInt) w5 << 24)) & Byte3Mask)
+ : w5);
  /* begin getLongFromFile:swap: */
  w6 = 0;
  sqImageFileRead((&w6), sizeof(long), 1, f);
@@ -27813,8 +27812,8 @@
     sqInt sz;
 
  isSmall = (isNegative
- ? magnitude < (MaxSmallInteger)
- : magnitude < ((MaxSmallInteger) + 1));
+ ? magnitude <= ((MaxSmallInteger) + 1)
+ : magnitude <= (MaxSmallInteger));
  if (isSmall) {
  smallVal = ((sqInt) magnitude);
  if (isNegative) {
@@ -40826,48 +40825,40 @@
 
  classFormat = ((longAt((classObj + BaseHeaderSize) + (InstanceSpecificationIndex << (shiftForWord())))) >> 1);
  instSpec = (((usqInt) classFormat) >> 16) & 0x1F;
+ classIndex = (long32At(classObj + 4)) & 0x3FFFFF;
  fillValue = 0;
 
  switch (instSpec) {
  case 2:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  numSlots = nElements;
  fillValue = GIV(nilObj);
  break;
  case 3:
  case 4:
- if (nElements > ((((512 * 1024) * 1024) - 1) - (classFormat & ((1 << 16) - 1)))) {
- return null;
- }
  numSlots = (classFormat & ((1 << 16) - 1)) + nElements;
  fillValue = GIV(nilObj);
  break;
  case 9:
  if (nElements > ((((512 * 1024) * 1024) - 1) / 2)) {
+ GIV(primFailCode) = PrimErrUnsupported;
  return null;
  }
  numSlots = nElements * 2;
  break;
  case 10:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
+ if ((classIndex == ClassFloatCompactIndex)
+ && (nElements != 2)) {
+ GIV(primFailCode) = PrimErrBadReceiver;
  return null;
  }
  numSlots = nElements;
  break;
  case 12:
  numSlots = (nElements + 1) / 2;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += nElements & 1;
  break;
  case 16:
  numSlots = (nElements + 3) / 4;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += (4 - nElements) & 3;
  break;
  default:
@@ -40883,23 +40874,29 @@
  numSlots = classFormat & ((1 << 16) - 1);
 
  }
- /* begin ensureBehaviorHash: */
- assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classIndex = -err;
- goto l2;
+ if (classIndex == 0) {
+ /* begin ensureBehaviorHash: */
+ assert(addressCouldBeClassObj(classObj));
+ if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
+ if (((err = enterIntoClassTable(classObj))) != 0) {
+ classIndex = -err;
+ goto l1;
+ }
+ newHash = (long32At(classObj + 4)) & 0x3FFFFF;
+ assert((classAtIndex(newHash)) == classObj);
  }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
+ classIndex = newHash;
+ l1: /* end ensureBehaviorHash: */;
+ if (classIndex < 0) {
+ GIV(primFailCode) = -classIndex;
+ return null;
+ }
  }
- classIndex = newHash;
-l2: /* end ensureBehaviorHash: */;
- if (classIndex < 0) {
- GIV(primFailCode) = -classIndex;
- return null;
- }
  if (numSlots > ((1 << 16) - 1)) {
+ if (numSlots > (((512 * 1024) * 1024) - 1)) {
+ GIV(primFailCode) = PrimErrUnsupported;
+ return null;
+ }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, ((numSlots == 0
  ? 8
  : (numSlots + (numSlots & 1)) << (shiftForWord()))) + ((numSlots >= 0xFF
@@ -40925,7 +40922,7 @@
  forceInterruptCheck();
  }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, instSpec, classIndex);
- goto l1;
+ goto l2;
  }
  if (numSlots >= 0xFF) {
 
@@ -40943,7 +40940,7 @@
  assert((newObj1 % (allocationUnit())) == 0);
  GIV(freeStart) += numBytes;
  newObj = newObj1;
- l1: /* end allocateSlots:format:classIndex: */;
+ l2: /* end allocateSlots:format:classIndex: */;
  }
  if (!(newObj == null)) {
  /* begin fillObj:numSlots:with: */
@@ -48495,7 +48492,7 @@
 
  newNumSlots = obj2slots + header1NumSlots;
  if (newNumSlots < 0xFF) {
- byteAtput(here1 + (56 / BitsPerByte), newNumSlots);
+ byteAtput(here1 + 7, newNumSlots);
  here1 = here1;
  goto l2;
  }
@@ -70605,12 +70602,20 @@
 }
 
 sqInt
-printStackCallStackOf(char *aFramePointer)
+printStackCallStackOf(sqInt frameOrContext)
 {
     sqInt context;
     char *theFP;
 
- theFP = aFramePointer;
+ if (addressCouldBeObj(frameOrContext)) {
+ if ((((frameOrContext & 3) == 0)
+ && (((longAt(frameOrContext)) & 0x3FFFFF) == ClassMethodContextCompactIndex))
+ && (checkIsStillMarriedContextcurrentFP(frameOrContext, null))) {
+ return printStackCallStackOf(frameOfMarriedContext(frameOrContext));
+ }
+ return null;
+ }
+ theFP = ((void *)frameOrContext);
  while(1) {
  context = shortReversePrintFrameAndCallers(theFP);
  if (!((((longAt((context + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1))

Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- StackInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ StackInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -138,7 +138,6 @@
 #define BecameActiveClassFlag 8
 #define BecameCompiledMethodFlag 2
 #define BecamePointerObjectFlag 1
-#define BitsPerByte 8
 #define Byte0Mask 0xFF
 #define Byte1Mask 0xFF00
 #define Byte1Shift 8
@@ -1170,7 +1169,7 @@
 void printOop(sqInt oop);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void printStackPageList(void);
 void printStackPageListInUse(void);
 void printStackPages(void);
@@ -2093,7 +2092,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.956";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.957";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -13625,8 +13624,8 @@
     sqInt sz;
 
  isSmall = (isNegative
- ? magnitude < (MaxSmallInteger)
- : magnitude < ((MaxSmallInteger) + 1));
+ ? magnitude <= ((MaxSmallInteger) + 1)
+ : magnitude <= (MaxSmallInteger));
  if (isSmall) {
  smallVal = ((sqInt) magnitude);
  if (isNegative) {
@@ -26868,48 +26867,40 @@
 
  classFormat = ((longAt((classObj + BaseHeaderSize) + (InstanceSpecificationIndex << (shiftForWord())))) >> 1);
  instSpec = (((usqInt) classFormat) >> 16) & 0x1F;
+ classIndex = (long32At(classObj + 4)) & 0x3FFFFF;
  fillValue = 0;
 
  switch (instSpec) {
  case 2:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  numSlots = nElements;
  fillValue = GIV(nilObj);
  break;
  case 3:
  case 4:
- if (nElements > ((((512 * 1024) * 1024) - 1) - (classFormat & ((1 << 16) - 1)))) {
- return null;
- }
  numSlots = (classFormat & ((1 << 16) - 1)) + nElements;
  fillValue = GIV(nilObj);
  break;
  case 9:
  if (nElements > ((((512 * 1024) * 1024) - 1) / 2)) {
+ GIV(primFailCode) = PrimErrUnsupported;
  return null;
  }
  numSlots = nElements * 2;
  break;
  case 10:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
+ if ((classIndex == ClassFloatCompactIndex)
+ && (nElements != 2)) {
+ GIV(primFailCode) = PrimErrBadReceiver;
  return null;
  }
  numSlots = nElements;
  break;
  case 12:
  numSlots = (nElements + 1) / 2;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += nElements & 1;
  break;
  case 16:
  numSlots = (nElements + 3) / 4;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += (4 - nElements) & 3;
  break;
  default:
@@ -26925,23 +26916,29 @@
  numSlots = classFormat & ((1 << 16) - 1);
 
  }
- /* begin ensureBehaviorHash: */
- assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classIndex = -err;
- goto l2;
+ if (classIndex == 0) {
+ /* begin ensureBehaviorHash: */
+ assert(addressCouldBeClassObj(classObj));
+ if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
+ if (((err = enterIntoClassTable(classObj))) != 0) {
+ classIndex = -err;
+ goto l1;
+ }
+ newHash = (long32At(classObj + 4)) & 0x3FFFFF;
+ assert((classAtIndex(newHash)) == classObj);
  }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
+ classIndex = newHash;
+ l1: /* end ensureBehaviorHash: */;
+ if (classIndex < 0) {
+ GIV(primFailCode) = -classIndex;
+ return null;
+ }
  }
- classIndex = newHash;
-l2: /* end ensureBehaviorHash: */;
- if (classIndex < 0) {
- GIV(primFailCode) = -classIndex;
- return null;
- }
  if (numSlots > ((1 << 16) - 1)) {
+ if (numSlots > (((512 * 1024) * 1024) - 1)) {
+ GIV(primFailCode) = PrimErrUnsupported;
+ return null;
+ }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, ((numSlots == 0
  ? 8
  : (numSlots + (numSlots & 1)) << (shiftForWord()))) + ((numSlots >= 0xFF
@@ -26967,7 +26964,7 @@
  forceInterruptCheck();
  }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, instSpec, classIndex);
- goto l1;
+ goto l2;
  }
  if (numSlots >= 0xFF) {
 
@@ -26985,7 +26982,7 @@
  assert((newObj1 % (allocationUnit())) == 0);
  GIV(freeStart) += numBytes;
  newObj = newObj1;
- l1: /* end allocateSlots:format:classIndex: */;
+ l2: /* end allocateSlots:format:classIndex: */;
  }
  if (!(newObj == null)) {
  /* begin fillObj:numSlots:with: */
@@ -34554,7 +34551,7 @@
 
  newNumSlots = obj2slots + header1NumSlots;
  if (newNumSlots < 0xFF) {
- byteAtput(here1 + (56 / BitsPerByte), newNumSlots);
+ byteAtput(here1 + 7, newNumSlots);
  here1 = here1;
  goto l2;
  }
@@ -51716,7 +51713,7 @@
     sqInt referent1;
     sqInt referent2;
     char *theFP;
-    usqInt theIP;
+    sqInt theIP;
     usqInt theIPPtr;
     StackPage *thePage;
     char *theSP;
@@ -51774,7 +51771,7 @@
 
  /* reuse theIP; its just an offset here */
 
- theIP = ((usqInt)(theFP + ((FoxCallerSavedIP + BytesPerWord) + ((byteAt((theFP + FoxFrameFlags) + 1)) << (shiftForWord())))));
+ theIP = ((sqInt)(theFP + ((FoxCallerSavedIP + BytesPerWord) + ((byteAt((theFP + FoxFrameFlags) + 1)) << (shiftForWord())))));
  oop = longAt(theIP);
  if (((oop & 3) == 0)
  && (((longAt(oop)) & 0x3FFFFF) == 8)) {
@@ -51802,7 +51799,7 @@
  longAtput(theFP + FoxMethod, (oop = newOop));
  }
  if (!(((callerFP = frameCallerFP(theFP))) != 0)) break;
- theIPPtr = ((usqInt)(theFP + FoxCallerSavedIP));
+ theIPPtr = ((sqInt)(theFP + FoxCallerSavedIP));
  theFP = callerFP;
  }
  }
@@ -59199,12 +59196,20 @@
 }
 
 sqInt
-printStackCallStackOf(char *aFramePointer)
+printStackCallStackOf(sqInt frameOrContext)
 {
     sqInt context;
     char *theFP;
 
- theFP = aFramePointer;
+ if (addressCouldBeObj(frameOrContext)) {
+ if ((((frameOrContext & 3) == 0)
+ && (((longAt(frameOrContext)) & 0x3FFFFF) == ClassMethodContextCompactIndex))
+ && (checkIsStillMarriedContextcurrentFP(frameOrContext, null))) {
+ return printStackCallStackOf(frameOfMarriedContext(frameOrContext));
+ }
+ return null;
+ }
+ theFP = ((void *)frameOrContext);
  while(1) {
  context = shortReversePrintFrameAndCallers(theFP);
  if (!((((longAt((context + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1))

Modified: branches/Cog/nsspurstacksrc/vm/interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/interp.c 2014-11-26 22:45:03 UTC (rev 3153)
+++ branches/Cog/nsspurstacksrc/vm/interp.c 2014-11-28 00:08:50 UTC (rev 3154)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
    from
- StackInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e
+ StackInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.956 uuid: c2eb8c1e-ed43-4316-80b4-781c57cf3f1e " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.957 uuid: ac5f8308-02e5-4277-b28c-595b7a4cf34a " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -135,7 +135,6 @@
 #define BecameActiveClassFlag 8
 #define BecameCompiledMethodFlag 2
 #define BecamePointerObjectFlag 1
-#define BitsPerByte 8
 #define Byte0Mask 0xFF
 #define Byte1Mask 0xFF00
 #define Byte1Shift 8
@@ -1167,7 +1166,7 @@
 void printOop(sqInt oop);
 void printProcessStack(sqInt aProcess);
 sqInt printProcsOnList(sqInt procList);
-sqInt printStackCallStackOf(char *aFramePointer);
+sqInt printStackCallStackOf(sqInt frameOrContext);
 void printStackPageList(void);
 void printStackPageListInUse(void);
 void printStackPages(void);
@@ -2090,7 +2089,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.956";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.957";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -13616,8 +13615,8 @@
     sqInt sz;
 
  isSmall = (isNegative
- ? magnitude < (MaxSmallInteger)
- : magnitude < ((MaxSmallInteger) + 1));
+ ? magnitude <= ((MaxSmallInteger) + 1)
+ : magnitude <= (MaxSmallInteger));
  if (isSmall) {
  smallVal = ((sqInt) magnitude);
  if (isNegative) {
@@ -26859,48 +26858,40 @@
 
  classFormat = ((longAt((classObj + BaseHeaderSize) + (InstanceSpecificationIndex << (shiftForWord())))) >> 1);
  instSpec = (((usqInt) classFormat) >> 16) & 0x1F;
+ classIndex = (long32At(classObj + 4)) & 0x3FFFFF;
  fillValue = 0;
 
  switch (instSpec) {
  case 2:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  numSlots = nElements;
  fillValue = GIV(nilObj);
  break;
  case 3:
  case 4:
- if (nElements > ((((512 * 1024) * 1024) - 1) - (classFormat & ((1 << 16) - 1)))) {
- return null;
- }
  numSlots = (classFormat & ((1 << 16) - 1)) + nElements;
  fillValue = GIV(nilObj);
  break;
  case 9:
  if (nElements > ((((512 * 1024) * 1024) - 1) / 2)) {
+ GIV(primFailCode) = PrimErrUnsupported;
  return null;
  }
  numSlots = nElements * 2;
  break;
  case 10:
- if (nElements > (((512 * 1024) * 1024) - 1)) {
+ if ((classIndex == ClassFloatCompactIndex)
+ && (nElements != 2)) {
+ GIV(primFailCode) = PrimErrBadReceiver;
  return null;
  }
  numSlots = nElements;
  break;
  case 12:
  numSlots = (nElements + 1) / 2;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += nElements & 1;
  break;
  case 16:
  numSlots = (nElements + 3) / 4;
- if (numSlots > (((512 * 1024) * 1024) - 1)) {
- return null;
- }
  instSpec += (4 - nElements) & 3;
  break;
  default:
@@ -26916,23 +26907,29 @@
  numSlots = classFormat & ((1 << 16) - 1);
 
  }
- /* begin ensureBehaviorHash: */
- assert(addressCouldBeClassObj(classObj));
- if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
- if (((err = enterIntoClassTable(classObj))) != 0) {
- classIndex = -err;
- goto l2;
+ if (classIndex == 0) {
+ /* begin ensureBehaviorHash: */
+ assert(addressCouldBeClassObj(classObj));
+ if (((newHash = (long32At(classObj + 4)) & 0x3FFFFF)) == 0) {
+ if (((err = enterIntoClassTable(classObj))) != 0) {
+ classIndex = -err;
+ goto l1;
+ }
+ newHash = (long32At(classObj + 4)) & 0x3FFFFF;
+ assert((classAtIndex(newHash)) == classObj);
  }
- newHash = (long32At(classObj + 4)) & 0x3FFFFF;
- assert((classAtIndex(newHash)) == classObj);
+ classIndex = newHash;
+ l1: /* end ensureBehaviorHash: */;
+ if (classIndex < 0) {
+ GIV(primFailCode) = -classIndex;
+ return null;
+ }
  }
- classIndex = newHash;
-l2: /* end ensureBehaviorHash: */;
- if (classIndex < 0) {
- GIV(primFailCode) = -classIndex;
- return null;
- }
  if (numSlots > ((1 << 16) - 1)) {
+ if (numSlots > (((512 * 1024) * 1024) - 1)) {
+ GIV(primFailCode) = PrimErrUnsupported;
+ return null;
+ }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, ((numSlots == 0
  ? 8
  : (numSlots + (numSlots & 1)) << (shiftForWord()))) + ((numSlots >= 0xFF
@@ -26958,7 +26955,7 @@
  forceInterruptCheck();
  }
  newObj = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, instSpec, classIndex);
- goto l1;
+ goto l2;
  }
  if (numSlots >= 0xFF) {
 
@@ -26976,7 +26973,7 @@
  assert((newObj1 % (allocationUnit())) == 0);
  GIV(freeStart) += numBytes;
  newObj = newObj1;
- l1: /* end allocateSlots:format:classIndex: */;
+ l2: /* end allocateSlots:format:classIndex: */;
  }
  if (!(newObj == null)) {
  /* begin fillObj:numSlots:with: */
@@ -34545,7 +34542,7 @@
 
  newNumSlots = obj2slots + header1NumSlots;
  if (newNumSlots < 0xFF) {
- byteAtput(here1 + (56 / BitsPerByte), newNumSlots);
+ byteAtput(here1 + 7, newNumSlots);
  here1 = here1;
  goto l2;
  }
@@ -51707,7 +51704,7 @@
     sqInt referent1;
     sqInt referent2;
     char *theFP;
-    usqInt theIP;
+    sqInt theIP;
     usqInt theIPPtr;
     StackPage *thePage;
     char *theSP;
@@ -51765,7 +51762,7 @@
 
  /* reuse theIP; its just an offset here */
 
- theIP = ((usqInt)(theFP + ((FoxCallerSavedIP + BytesPerWord) + ((byteAt((theFP + FoxFrameFlags) + 1)) << (shiftForWord())))));
+ theIP = ((sqInt)(theFP + ((FoxCallerSavedIP + BytesPerWord) + ((byteAt((theFP + FoxFrameFlags) + 1)) << (shiftForWord())))));
  oop = longAt(theIP);
  if (((oop & 3) == 0)
  && (((longAt(oop)) & 0x3FFFFF) == 8)) {
@@ -51793,7 +51790,7 @@
  longAtput(theFP + FoxMethod, (oop = newOop));
  }
  if (!(((callerFP = frameCallerFP(theFP))) != 0)) break;
- theIPPtr = ((usqInt)(theFP + FoxCallerSavedIP));
+ theIPPtr = ((sqInt)(theFP + FoxCallerSavedIP));
  theFP = callerFP;
  }
  }
@@ -59190,12 +59187,20 @@
 }
 
 sqInt
-printStackCallStackOf(char *aFramePointer)
+printStackCallStackOf(sqInt frameOrContext)
 {
     sqInt context;
     char *theFP;
 
- theFP = aFramePointer;
+ if (addressCouldBeObj(frameOrContext)) {
+ if ((((frameOrContext & 3) == 0)
+ && (((longAt(frameOrContext)) & 0x3FFFFF) == ClassMethodContextCompactIndex))
+ && (checkIsStillMarriedContextcurrentFP(frameOrContext, null))) {
+ return printStackCallStackOf(frameOfMarriedContext(frameOrContext));
+ }
+ return null;
+ }
+ theFP = ((void *)frameOrContext);
  while(1) {
  context = shortReversePrintFrameAndCallers(theFP);
  if (!((((longAt((context + BaseHeaderSize) + (SenderIndex << (shiftForWord())))) & 1))


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Mon Nov 24 12:21:21 PST 2014
   + Thu Nov 27 16:06:45 PST 2014

Modified: branches/Cog/sistasrc/vm/cogit.c

@@ Diff output truncated at 50000 characters. @@