[commit] r2465 - CogVM source as per VMMaker.oscog-eem.107.

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

[commit] r2465 - CogVM source as per VMMaker.oscog-eem.107.

commits-3
 
Author: eliot
Date: 2011-07-20 11:28:35 -0700 (Wed, 20 Jul 2011)
New Revision: 2465

Modified:
   branches/Cog/cygwinbuild/Makefile
   branches/Cog/nscogsrc/vm/cogit.c
   branches/Cog/nscogsrc/vm/cogit.h
   branches/Cog/nscogsrc/vm/cogmethod.h
   branches/Cog/nscogsrc/vm/cointerp.c
   branches/Cog/nscogsrc/vm/cointerp.h
   branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
   branches/Cog/nscogsrc/vm/interp.h
   branches/Cog/nscogsrc/vm/vmCallback.h
   branches/Cog/platforms/unix/plugins/UUIDPlugin/Makefile.inc
   branches/Cog/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c
   branches/Cog/src/vm/cogit.c
   branches/Cog/src/vm/cogit.h
   branches/Cog/src/vm/cogmethod.h
   branches/Cog/src/vm/cointerp.c
   branches/Cog/src/vm/cointerp.h
   branches/Cog/src/vm/cointerpmt.c
   branches/Cog/src/vm/cointerpmt.h
   branches/Cog/src/vm/gcc3x-cointerp.c
   branches/Cog/src/vm/gcc3x-cointerpmt.c
   branches/Cog/src/vm/interp.h
   branches/Cog/src/vm/vmCallback.h
   branches/Cog/stacksrc/vm/gcc3x-interp.c
   branches/Cog/stacksrc/vm/interp.c
   branches/Cog/stacksrc/vm/interp.h
   branches/Cog/stacksrc/vm/vmCallback.h
   branches/Cog/unixbuild/HowToBuild
Log:
CogVM source as per VMMaker.oscog-eem.107.
Fix signed32BitValueOf: for max neg int (fixes AlienSunit tests).
Faster primitiveFail code.
Faster bitblt rule 41 code.
Fix COGMTVM compilation (cogit.c was broken) & add MT compilation for cygwin
and how-to instructions for linux..
Fix UUID plugin on linux.


Modified: branches/Cog/cygwinbuild/Makefile
===================================================================
--- branches/Cog/cygwinbuild/Makefile 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/cygwinbuild/Makefile 2011-07-20 18:28:35 UTC (rev 2465)
@@ -7,6 +7,8 @@
 # Base definitions:
 # default configuration from product, assert & debug
 CONFIGURATION=product
+# default VM threading from multi, single
+THREADING=single
 
 # The name of the VM to build
 VM:=Croquet
@@ -22,12 +24,22 @@
 BASEDIR:=.
 endif
 
-ifeq ("$(CONFIGURATION)","product")
-BUILD:=build
-else ifeq ("$(CONFIGURATION)","assert")
-BUILD:=buildast
+ifeq ("$(THREADING)","multi")
+ ifeq ("$(CONFIGURATION)","product")
+ BUILD:=buildmt
+ else ifeq ("$(CONFIGURATION)","assert")
+ BUILD:=buildmtast
+ else
+ BUILD:=buildmtdbg
+ endif
 else
-BUILD:=builddbg
+ ifeq ("$(CONFIGURATION)","product")
+ BUILD:=build
+ else ifeq ("$(CONFIGURATION)","assert")
+ BUILD:=buildast
+ else
+ BUILD:=builddbg
+ endif
 endif
 SRCDIR:= ../src
 BLDDIR:= $(BASEDIR)/$(BUILD)
@@ -43,7 +55,11 @@
 
 CROSSSRC:= $(wildcard $(CROSSDIR)/*.c) $(wildcard $(CROSSDIR)/*.cpp)
 WIN32SRC:= $(wildcard $(WIN32DIR)/*.c) $(wildcard $(WIN32DIR)/*.cpp)
+ifeq ("$(THREADING)","multi")
+MAKERSRC:= $(MAKERDIR)/gcc3x-cointerpmt.c $(MAKERDIR)/cogit.c
+else
 MAKERSRC:= $(MAKERDIR)/gcc3x-cointerp.c $(MAKERDIR)/cogit.c
+endif
 VMSRC:= $(notdir $(MAKERSRC) $(WIN32SRC) $(CROSSSRC))
 
 VPATH:= $(MAKERDIR) $(WIN32DIR) $(CROSSDIR)
@@ -113,11 +129,19 @@
 else ifeq ("$(CONFIGURATION)","assert")
 OFLAGS:= -D_MT -O1 -march=pentium4 -fno-omit-frame-pointer
 DEBUGVM=0
+NDEBUG:=-DAllocationCheckFiller=0xADD4E55
 else
 OFLAGS:= -D_MT -march=pentium4
 DEBUGVM=1
+NDEBUG:=-DAllocationCheckFiller=0xADD4E55
 endif
 
+ifeq ("$(THREADING)","multi")
+COGDEFS:=-DCOGMTVM=1 -DDEBUGVM=$(DEBUGVM)
+else
+COGDEFS:=-DCOGMTVM=0 -DDEBUGVM=$(DEBUGVM)
+endif
+
 # Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h)
 WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501
 
@@ -126,7 +150,7 @@
 NOBUILTIN:= -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf
 CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mthreads -mno-cygwin -mwin32 \
  -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS) $(NOBUILTIN)
-DEFS:= -DDEBUGVM=$(DEBUGVM) $(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \
+DEFS:= $(COGDEFS) $(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \
  -DNO_SERVICE -DNO_STD_FILE_SUPPORT \
  $(NDEBUG) -DLSB_FIRST -D'VM_NAME="$(VM_NAME)"' -DX86 $(XDEFS) $(CROQUET)
 XDEFS:= -DSQUEAK_BUILTIN_PLUGIN
@@ -139,8 +163,8 @@
 #       The switch '-mwindows' gives us a GUI app instead of a console app.
 #
 LD:= gcc
-LDFLAGS:= -mno-cygwin -mwindows -Wl,--export-dynamic -L/usr/lib/mingw
-CONSOLELDFLAGS:= -mno-cygwin -mconsole -Wl,--export-dynamic -L/usr/lib/mingw
+LDFLAGS:= -mno-cygwin -mwindows -mthreads -Wl,--export-dynamic -L/usr/lib/mingw
+CONSOLELDFLAGS:= -mno-cygwin -mconsole -mthreads -Wl,--export-dynamic -L/usr/lib/mingw
 STDLIBS:= -lddraw -ldinput -lopengl32 -lwsock32 -lcomdlg32 -lole32 -lwinmm \
  -lversion -lwininet -luser32 -lgdi32 -lpsapi -lkernel32 -lcrtdll \
  -ldsound -lsecur32
@@ -180,14 +204,23 @@
 #
 default: print-settings init $(VMEXE) $(CONSOLEVMEXE) $(DLLS) $(STRIPEXE) $(STRIPCONSOLEEXE)
 
+productmt:;
+ $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=product THREADING=multi $(@,product=) default
+
 product:;
- $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=product $(@,product=) default
+ $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=product THREADING=single $(@,product=) default
 
+assertmt:
+ $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=assert THREADING=multi $(@,assert=) default
+
 assert:
- $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=assert $(@,assert=) default
+ $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=assert THREADING=single $(@,assert=) default
 
+debugmt:
+ $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=debug THREADING=multi $(@,debug=) default
+
 debug:
- $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=debug $(@,debug=) default
+ $(MAKE) -f $(MAKEFILE_LIST) CONFIGURATION=debug THREADING=single $(@,debug=) default
 
 # Do make init to allow make -n to function.
 init: $(OBJDIR) eitheror.exe mkNamedPrims.exe
@@ -195,15 +228,22 @@
 clean:
  rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe build
 
+cleanmt:
+ rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe buildmt
+
 cleanast:
  rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe buildast
 
-cleandbg:
- rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe builddbg
+cleanmtast:
+ rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe buildmtast
 
+cleanmtdbg:
+ rm -rf sqNamedPrims.h eitheror.exe mkNamedPrims.exe buildmtdbg
+
 print-settings:
  @echo ---------------- Makefile settings ------------------
  @echo CONFIGURATION=$(CONFIGURATION)
+ @echo THREADING=$(THREADING)
  @echo VPATH=$(VPATH)
  @echo INCLUDES=$(INCLUDES)
  @echo CFLAGS=$(CFLAGS)
@@ -284,7 +324,7 @@
  $(MAKE) $(MFLAGS) -C $(BLDDIR)/$(*F) BUILD=$(BUILD) \
  -f../../$(shell ./eitheror.exe $(PLATDIR)/win32/plugins/$(*F)/Makefile Makefile.plugin) \
  PLATDIR=../../$(PLATDIR) SRCDIR=../../$(SRCDIR) BASEDIR=../../$(BASEDIR) \
- LIBNAME=$(*F) XDEFS=-DSQUEAK_BUILTIN_PLUGIN \
+ LIBNAME=$(*F) COGDEFS="$(COGDEFS)" XDEFS=-DSQUEAK_BUILTIN_PLUGIN \
  ../../$(OBJDIR)/$(*F).lib
 
 # External plugin.  Build as dll and copy to vm dir ($(OBJDIR)).
@@ -294,7 +334,7 @@
  $(MAKE) $(MFLAGS) -C $(BLDDIR)/$(*F) BUILD=$(BUILD) \
  -f../../$(shell ./eitheror.exe $(PLATDIR)/win32/plugins/$(*F)/Makefile Makefile.plugin) \
  PLATDIR=../../$(PLATDIR) SRCDIR=../../$(SRCDIR) BASEDIR=../../$(BASEDIR) \
- LIBNAME=$(*F) ../../$(OBJDIR)/$(*F).dll
+ COGDEFS="$(COGDEFS)" LIBNAME=$(*F) ../../$(OBJDIR)/$(*F).dll
 
 FORCE:
 

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/cogit.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ CCodeGenerator VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
    from
- StackToRegisterMappingCogit VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ StackToRegisterMappingCogit VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -162,7 +162,6 @@
 #define CmpCwR 89
 #define CmpRdRd 96
 #define CmpRR 75
-#define COGMTVM 0
 #define ConstZero 1
 #define ConvertRRd 102
 #define CPUID 106

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/cogit.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ CCodeGenerator VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/cogmethod.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ CCodeGenerator VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
  */
 
 typedef struct {

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/cointerp.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1883,7 +1883,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.105";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.106";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -18110,14 +18110,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -18134,18 +18126,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/cointerp.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1886,7 +1886,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.105";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreter_VMMaker.oscog-eem.106";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -18114,14 +18114,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -18138,18 +18130,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/nscogsrc/vm/interp.h
===================================================================
--- branches/Cog/nscogsrc/vm/interp.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/interp.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/nscogsrc/vm/vmCallback.h
===================================================================
--- branches/Cog/nscogsrc/vm/vmCallback.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/nscogsrc/vm/vmCallback.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 #define VM_CALLBACK_INC 1

Modified: branches/Cog/platforms/unix/plugins/UUIDPlugin/Makefile.inc
===================================================================
--- branches/Cog/platforms/unix/plugins/UUIDPlugin/Makefile.inc 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/platforms/unix/plugins/UUIDPlugin/Makefile.inc 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,2 +1,2 @@
-XCFLAGS=-DHAVE_UUID_UUID_H=1
+XCFLAGS=-DHAVE_UUID_UUID_H=1 -DHAVE_UUID_GENERATE
 XLDFLAGS = $(LIB_UUID)

Modified: branches/Cog/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c
===================================================================
--- branches/Cog/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -22,6 +22,8 @@
   uuidgen(&uuid, 1);
 #elif defined(HAVE_UUID_GENERATE)
   uuid_generate(uuid);
+#else
+# error "you must define some way of generating a UUID."
 #endif
 
   memcpy((void *)location, (void *)&uuid, sizeof(uuid));

Modified: branches/Cog/src/vm/cogit.c
===================================================================
--- branches/Cog/src/vm/cogit.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cogit.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ CCodeGenerator VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
    from
- StackToRegisterMappingCogit VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ StackToRegisterMappingCogit VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -162,7 +162,6 @@
 #define CmpCwR 89
 #define CmpRdRd 96
 #define CmpRR 75
-#define COGMTVM 0
 #define ConstZero 1
 #define ConvertRRd 102
 #define CPUID 106

Modified: branches/Cog/src/vm/cogit.h
===================================================================
--- branches/Cog/src/vm/cogit.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cogit.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ CCodeGenerator VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
  */
 
 

Modified: branches/Cog/src/vm/cogmethod.h
===================================================================
--- branches/Cog/src/vm/cogmethod.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cogmethod.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.104 uuid: 3ca0990a-ad74-44f1-bd92-a8be337813a1
+ CCodeGenerator VMMaker.oscog-eem.107 uuid: e97a2dd5-e1e7-4281-bb49-cb97be511631
  */
 
 typedef struct {

Modified: branches/Cog/src/vm/cointerp.c
===================================================================
--- branches/Cog/src/vm/cointerp.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cointerp.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1874,7 +1874,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.105]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.106]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17441,14 +17441,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -17465,18 +17457,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/src/vm/cointerp.h
===================================================================
--- branches/Cog/src/vm/cointerp.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cointerp.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 

Modified: branches/Cog/src/vm/cointerpmt.c
===================================================================
--- branches/Cog/src/vm/cointerpmt.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cointerpmt.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- CoInterpreterMT VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CoInterpreterMT VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1974,7 +1974,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.105]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.106]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -18134,14 +18134,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -18158,18 +18150,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/src/vm/cointerpmt.h
===================================================================
--- branches/Cog/src/vm/cointerpmt.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/cointerpmt.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 

Modified: branches/Cog/src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerp.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/gcc3x-cointerp.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1877,7 +1877,7 @@
  /* 575 */ (void (*)(void))0,
  0 };
 static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void);
-const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.105]";
+const char *interpreterVersion = "Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.106]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 
@@ -17445,14 +17445,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -17469,18 +17461,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/src/vm/gcc3x-cointerpmt.c
===================================================================
--- branches/Cog/src/vm/gcc3x-cointerpmt.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/gcc3x-cointerpmt.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- CoInterpreterMT VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CoInterpreterMT VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1977,7 +1977,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.105]";
+const char *interpreterVersion = "Croquet Closure Cog MT VM [CoInterpreterMT VMMaker.oscog-eem.106]";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 10 */;
 volatile int sendTrace;
 sqInt willNotThreadWarnCount;
@@ -18138,14 +18138,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -18162,18 +18154,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/src/vm/interp.h
===================================================================
--- branches/Cog/src/vm/interp.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/interp.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/src/vm/vmCallback.h
===================================================================
--- branches/Cog/src/vm/vmCallback.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/src/vm/vmCallback.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 #define VM_CALLBACK_INC 1

Modified: branches/Cog/stacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/stacksrc/vm/gcc3x-interp.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/stacksrc/vm/gcc3x-interp.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- StackInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ StackInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1672,7 +1672,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.105]";
+const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.106]";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -13620,14 +13620,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -13644,18 +13636,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/stacksrc/vm/interp.c
===================================================================
--- branches/Cog/stacksrc/vm/interp.c 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/stacksrc/vm/interp.c 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,9 +1,9 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
    from
- StackInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ StackInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -1669,7 +1669,7 @@
  0 };
 char * breakSelector;
 sqInt breakSelectorLength = -1;
-const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.105]";
+const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreter VMMaker.oscog-eem.106]";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -13616,14 +13616,6 @@
  GIV(primFailCode) = 0;
  /* begin initializeExtraClassInstVarIndices */
  VM_LABEL(0initializeExtraClassInstVarIndices);
-
- /* default */
-
- GIV(classNameIndex) = 6;
-
- /* default */
-
- GIV(thisClassIndex) = 5;
  classArrayObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassArray << ShiftForWord));
  /* begin fetchClassOfNonInt: */
  if (((ccIndex = (((usqInt) (longAt(classArrayObj))) >> 12) & 31)) == 0) {
@@ -13640,18 +13632,26 @@
  GIV(metaclassSizeBytes) = ((header & TypeMask) == HeaderTypeSizeAndClass
  ? (longAt(classArrayClass - (BytesPerWord * 2))) & LongSizeMask
  : header & SizeMask);
+
+ /* default */
+
+ GIV(thisClassIndex) = 5;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayClass)); i4 += 1) {
- if ((longAt((classArrayClass + BaseHeaderSize) + (i4 << ShiftForWord))) == classArrayObj) {
- GIV(thisClassIndex) = i4;
+ if ((longAt((classArrayClass + BaseHeaderSize) + ((i4 - 1) << ShiftForWord))) == classArrayObj) {
+ GIV(thisClassIndex) = i4 - 1;
  }
  }
+
+ /* default */
+
+ GIV(classNameIndex) = 6;
  for (i4 = (InstanceSpecificationIndex + 1); i4 <= (lengthOf(classArrayObj)); i4 += 1) {
- oop = longAt((classArrayObj + BaseHeaderSize) + (i4 << ShiftForWord));
+ oop = longAt((classArrayObj + BaseHeaderSize) + ((i4 - 1) << ShiftForWord));
  if ((((oop & 1) == 0)
  && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8))
  && (((lengthOf(oop)) == 5)
  && ((strncmp("Array", firstFixedField(oop), 5)) == 0))) {
- GIV(classNameIndex) = i4;
+ GIV(classNameIndex) = i4 - 1;
  }
  }
 

Modified: branches/Cog/stacksrc/vm/interp.h
===================================================================
--- branches/Cog/stacksrc/vm/interp.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/stacksrc/vm/interp.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 #define VM_PROXY_MAJOR 1

Modified: branches/Cog/stacksrc/vm/vmCallback.h
===================================================================
--- branches/Cog/stacksrc/vm/vmCallback.h 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/stacksrc/vm/vmCallback.h 2011-07-20 18:28:35 UTC (rev 2465)
@@ -1,5 +1,5 @@
 /* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.106 uuid: 5e185229-3c2a-4912-a60f-e2a42fa627cb
  */
 
 #define VM_CALLBACK_INC 1

Modified: branches/Cog/unixbuild/HowToBuild
===================================================================
--- branches/Cog/unixbuild/HowToBuild 2011-07-20 18:23:52 UTC (rev 2464)
+++ branches/Cog/unixbuild/HowToBuild 2011-07-20 18:28:35 UTC (rev 2465)
@@ -42,26 +42,32 @@
 3b. For a full debug VM do
      ../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak CFLAGS="-g3 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=1" LIBS=-lpthread
 
+3c. For a multi-threaded VM open a shell and cd to the mtbld directory.  Then
+   execute
+     ../../platforms/unix/config/configure INTERP=cointerpmt --without-vm-display-fbdev --without-npsqueak CFLAGS="-g -O2 -msse2 -DNDEBUG -DCOGMTVM=1 -DDEBUGVM=0 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1" LIBS=-lpthread
+     make squeakmt
+     make installmt prefix=WhereYouWantTheVmToGo
+
 N.B.  As of early 2010 the linux pthreads implementation doesn't appear to
 provide a way of setting priorities for the default thread scheduling policy
 SCHED_OTHER (unlike e.g. Mac OS X) and doesn't appear to allow changing the
 policy to one that does (e.g. SCHED_RR).  So for now we use the itimer
 scheme.  See platforms/unix/vm/sqUnixHeartbeat.c
 
-3c. If you want to get the Cog VM simulator working you'll need to build the
+3d. If you want to get the Cog VM simulator working you'll need to build the
 BochsIA32Plugin/BochsIA32Plugin.xcodeproj project and to build that you'll
 need to first build bochs.  First check-out the processor simulator source tree
 containing Bochs:
      svn co http://www.squeakvm.org/svn/squeak/branches/Cog/processors
-Then build using the following, which works on Mac OS and is hence likely to
-work on linux:
+Then build using the following, which works on Mac OS and is hence unlikely to
+work entirely on linux (no xcodebuild):
   $ cd ROOT/processors/IA32/bochs
   $ ./conf.COG
   $ ./makeem
   $ cd ROOT/macbuild/BochsIA32Plugin
   $ xcodebuild
 
-3d. If you're building the VM on a 64-bit OS, you'll need a compiler which can
+3e. If you're building the VM on a 64-bit OS, you'll need a compiler which can
 compile and link to 32-bit binaries. On most Linuxes the gcc-multilib package
 provides the 32-bit compiler and the ia32-libs provides the 32-bit libraries.
 You'll also have to add the -m32 switch to all gcc & g++ invocations.  The