[commit] r2106 - update generated source

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

[commit] r2106 - update generated source

commits-3
 
Author: piumarta
Date: 2009-08-26 23:04:38 -0700 (Wed, 26 Aug 2009)
New Revision: 2106

Modified:
   trunk/platforms/unix/ChangeLog
   trunk/platforms/unix/src/plugins.ext
   trunk/platforms/unix/src/plugins/AioPlugin/AioPlugin.c
   trunk/platforms/unix/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
   trunk/platforms/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
   trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c
   trunk/platforms/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c
   trunk/platforms/unix/src/plugins/GStreamerPlugin/GStreamerPlugin.c
   trunk/platforms/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c
   trunk/platforms/unix/src/plugins/ImmX11Plugin/ImmX11Plugin.c
   trunk/platforms/unix/src/plugins/KedamaPlugin/KedamaPlugin.c
   trunk/platforms/unix/src/plugins/KedamaPlugin2/KedamaPlugin2.c
   trunk/platforms/unix/src/plugins/MIDIPlugin/MIDIPlugin.c
   trunk/platforms/unix/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
   trunk/platforms/unix/src/plugins/OggPlugin/OggPlugin.c
   trunk/platforms/unix/src/plugins/PseudoTTYPlugin/PseudoTTYPlugin.c
   trunk/platforms/unix/src/plugins/RomePlugin/RomePlugin.c
   trunk/platforms/unix/src/plugins/Squeak3D/Squeak3D.c
   trunk/platforms/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
   trunk/platforms/unix/src/plugins/UUIDPlugin/UUIDPlugin.c
   trunk/platforms/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
   trunk/platforms/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c
   trunk/platforms/unix/src/vm/interp.c
   trunk/platforms/unix/src/vm/interp.h
   trunk/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
   trunk/platforms/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c
   trunk/platforms/unix/src/vm/intplugins/B2DPlugin/B2DPlugin.c
   trunk/platforms/unix/src/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
   trunk/platforms/unix/src/vm/intplugins/BitBltPlugin/BitBltPlugin.c
   trunk/platforms/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c
   trunk/platforms/unix/src/vm/intplugins/DSAPrims/DSAPrims.c
   trunk/platforms/unix/src/vm/intplugins/DropPlugin/DropPlugin.c
   trunk/platforms/unix/src/vm/intplugins/FFTPlugin/FFTPlugin.c
   trunk/platforms/unix/src/vm/intplugins/FilePlugin/FilePlugin.c
   trunk/platforms/unix/src/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c
   trunk/platforms/unix/src/vm/intplugins/FloatMathPlugin/FloatMathPlugin.c
   trunk/platforms/unix/src/vm/intplugins/GeniePlugin/GeniePlugin.c
   trunk/platforms/unix/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
   trunk/platforms/unix/src/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c
   trunk/platforms/unix/src/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c
   trunk/platforms/unix/src/vm/intplugins/Klatt/Klatt.c
   trunk/platforms/unix/src/vm/intplugins/LargeIntegers/LargeIntegers.c
   trunk/platforms/unix/src/vm/intplugins/LocalePlugin/LocalePlugin.c
   trunk/platforms/unix/src/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c
   trunk/platforms/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
   trunk/platforms/unix/src/vm/intplugins/RePlugin/RePlugin.c
   trunk/platforms/unix/src/vm/intplugins/SecurityPlugin/SecurityPlugin.c
   trunk/platforms/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c
   trunk/platforms/unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c
   trunk/platforms/unix/src/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c
   trunk/platforms/unix/src/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c
   trunk/platforms/unix/src/vm/intplugins/SoundPlugin/SoundPlugin.c
   trunk/platforms/unix/src/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c
   trunk/platforms/unix/src/vm/intplugins/ZipPlugin/ZipPlugin.c
   trunk/platforms/unix/src/vm/sqNamedPrims.h
Log:
update generated source

Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/ChangeLog 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,3 +1,13 @@
+2009-08-26  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
+
+ * src: Regenerate from Balloon3D-Plugins-ar.4.mcz
+ DBus-Plugin-bf.32.mcz GStreamer-Plugins-JMM.16.mcz
+ Kedama-Plugins-yo.1.mcz Rome-Plugin-yo.39.mcz
+ OSProcessPlugin-dtl.16.mcz
+ VMConstruction-Plugins-AioPlugin-dtl.9.mcz
+ VMConstruction-Plugins-XDisplayControlPlugin-dtl.7.mcz
+ VMMaker-dtl.137.mcz
+
 2009-08-26    <[hidden email]>
 
  * vm-display-X11/sqUnixX11.c (x2sqModifier): Do not map Caps Lock

Modified: trunk/platforms/unix/src/plugins/AioPlugin/AioPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/AioPlugin/AioPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/AioPlugin/AioPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:47 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:27 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -63,6 +63,9 @@
 static sqInt isSQFileObject(sqInt objectPointer);
 static sqInt isSQSocketObject(sqInt objectPointer);
 static sqInt isValidFileSession(sqInt objectPointer);
+#pragma export on
+EXPORT(sqInt) moduleUnloaded(char * aModuleName);
+#pragma export off
 static sqInt msg(char * s);
 #pragma export on
 EXPORT(sqInt) primitiveAioDisable(void);
@@ -92,9 +95,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "AioPlugin 10 November 2008 (i)"
+ "AioPlugin 26 August 2009 (i)"
 #else
- "AioPlugin 10 November 2008 (e)"
+ "AioPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -242,6 +245,13 @@
  return (interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer)));
 }
 
+
+/* The module with the given name was just unloaded.
+ Make sure we have no dangling references. */
+
+EXPORT(sqInt) moduleUnloaded(char * aModuleName) {
+}
+
 static sqInt msg(char * s) {
  fprintf(stderr, "\n%s: %s", moduleName, s);
 }
@@ -525,7 +535,7 @@
 /* 2.0 supports 64bit code base */
 
 static char * versionString(void) {
-    static char version[]= "2.2.1";
+    static char version[]= "2.2.2";
 
  return version;
 }
@@ -539,6 +549,7 @@
  {"AioPlugin", "primitiveAioSuspend", (void*)primitiveAioSuspend},
  {"AioPlugin", "shutdownModule", (void*)shutdownModule},
  {"AioPlugin", "primitiveAioHandle", (void*)primitiveAioHandle},
+ {"AioPlugin", "moduleUnloaded", (void*)moduleUnloaded},
  {"AioPlugin", "initialiseModule", (void*)initialiseModule},
  {"AioPlugin", "setInterpreter", (void*)setInterpreter},
  {"AioPlugin", "getModuleName", (void*)getModuleName},

Modified: trunk/platforms/unix/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:33 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:37 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -33,10 +33,6 @@
 
 
 /*** Constants ***/
-#define MaterialSize 17
-#define PrimLightSize 32
-#define PrimTypeMax 6
-#define PrimVertexSize 16
 
 /*** Function Prototypes ***/
 static void* fetchLightSourceofObject(sqInt index, sqInt anArray);
@@ -100,9 +96,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "B3DAcceleratorPlugin 10 November 2008 (i)"
+ "B3DAcceleratorPlugin 26 August 2009 (i)"
 #else
- "B3DAcceleratorPlugin 10 November 2008 (e)"
+ "B3DAcceleratorPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -543,7 +539,7 @@
  }
  vtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount);
  idxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxCount, 1, vtxCount);
- if ((vtxArray == null) || ((idxArray == null) || ((primType < 1) || ((primType > PrimTypeMax) || (interpreterProxy->failed()))))) {
+ if ((vtxArray == null) || ((idxArray == null) || ((primType < 1) || ((primType > 6) || (interpreterProxy->failed()))))) {
  return interpreterProxy->primitiveFail();
  }
  result = b3dxRenderVertexBuffer(handle, primType, flags, texHandle, vtxArray, vtxCount, idxArray, idxCount);
@@ -956,7 +952,7 @@
  if ((oop & 1)) {
  return interpreterProxy->primitiveFail();
  }
- if (!((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == PrimLightSize))) {
+ if (!((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 32))) {
  return interpreterProxy->primitiveFail();
  }
  }
@@ -976,7 +972,7 @@
  if (oop == (interpreterProxy->nilObject())) {
  return null;
  }
- if ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == MaterialSize)) {
+ if ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 17)) {
  return interpreterProxy->firstIndexableField(oop);
  }
  return null;
@@ -1048,7 +1044,7 @@
  if (oop == null) {
  return null;
  }
- if ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == PrimVertexSize)) {
+ if ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 16)) {
  return interpreterProxy->firstIndexableField(oop);
  }
  return null;
@@ -1068,7 +1064,7 @@
  }
  if (interpreterProxy->isWords(oop)) {
  oopSize = interpreterProxy->slotSizeOf(oop);
- if (((oopSize >= nItems) * PrimVertexSize) && ((oopSize % PrimVertexSize) == 0)) {
+ if (((oopSize >= nItems) * 16) && ((oopSize % 16) == 0)) {
  return interpreterProxy->firstIndexableField(oop);
  }
  }

Modified: trunk/platforms/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:35 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:39 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -59,9 +59,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "ClipboardExtendedPlugin 10 November 2008 (i)"
+ "ClipboardExtendedPlugin 26 August 2009 (i)"
 #else
- "ClipboardExtendedPlugin 10 November 2008 (e)"
+ "ClipboardExtendedPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -223,13 +223,13 @@
 
 
 void* ClipboardExtendedPlugin_exports[][3] = {
+ {"ClipboardExtendedPlugin", "ioReadClipboardData", (void*)ioReadClipboardData},
+ {"ClipboardExtendedPlugin", "ioCreateClipboard", (void*)ioCreateClipboard},
  {"ClipboardExtendedPlugin", "ioAddClipboardData", (void*)ioAddClipboardData},
- {"ClipboardExtendedPlugin", "ioGetClipboardFormat", (void*)ioGetClipboardFormat},
  {"ClipboardExtendedPlugin", "getModuleName", (void*)getModuleName},
- {"ClipboardExtendedPlugin", "ioCreateClipboard", (void*)ioCreateClipboard},
  {"ClipboardExtendedPlugin", "setInterpreter", (void*)setInterpreter},
+ {"ClipboardExtendedPlugin", "ioGetClipboardFormat", (void*)ioGetClipboardFormat},
  {"ClipboardExtendedPlugin", "ioClearClipboard", (void*)ioClearClipboard},
- {"ClipboardExtendedPlugin", "ioReadClipboardData", (void*)ioReadClipboardData},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/DBusPlugin/DBusPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:36 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:41 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -139,9 +139,9 @@
 static DBusMessageIter messageIter[DBUS_MAXIMUM_TYPE_RECURSION_DEPTH];
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "DBusPlugin 10 November 2008 (i)"
+ "DBusPlugin 26 August 2009 (i)"
 #else
- "DBusPlugin 10 November 2008 (e)"
+ "DBusPlugin 26 August 2009 (e)"
 #endif
 ;
 static DBusMessage* writeMessage;
@@ -1885,7 +1885,6 @@
 void* DBusPlugin_exports[][3] = {
  {"DBusPlugin", "shutdownModule", (void*)shutdownModule},
  {"DBusPlugin", "primitiveDBusMessageGetDestination", (void*)primitiveDBusMessageGetDestination},
- {"DBusPlugin", "primitiveDBusSendMessageTimeout", (void*)primitiveDBusSendMessageTimeout},
  {"DBusPlugin", "primitiveDBusMessageGetSignature", (void*)primitiveDBusMessageGetSignature},
  {"DBusPlugin", "setInterpreter", (void*)setInterpreter},
  {"DBusPlugin", "primitiveDBusMessageGetMember", (void*)primitiveDBusMessageGetMember},
@@ -1894,6 +1893,7 @@
  {"DBusPlugin", "primitiveDBusMessageGetNoReply", (void*)primitiveDBusMessageGetNoReply},
  {"DBusPlugin", "primitiveDBusIterCloseContainer", (void*)primitiveDBusIterCloseContainer},
  {"DBusPlugin", "primitiveDBusPopMessageIterator", (void*)primitiveDBusPopMessageIterator},
+ {"DBusPlugin", "primitiveDBusAppendBasicArgument", (void*)primitiveDBusAppendBasicArgument},
  {"DBusPlugin", "primitiveDBusConnectionDispatchStatus", (void*)primitiveDBusConnectionDispatchStatus},
  {"DBusPlugin", "primitiveDBusMessageGetSender", (void*)primitiveDBusMessageGetSender},
  {"DBusPlugin", "primitiveDBusArgumentGetInt32", (void*)primitiveDBusArgumentGetInt32},
@@ -1904,6 +1904,7 @@
  {"DBusPlugin", "primitiveDBusArgumentGetInt64", (void*)primitiveDBusArgumentGetInt64},
  {"DBusPlugin", "initialiseModule", (void*)initialiseModule},
  {"DBusPlugin", "primitiveDBusReleaseName", (void*)primitiveDBusReleaseName},
+ {"DBusPlugin", "primitiveDBusIterOpenContainerContains", (void*)primitiveDBusIterOpenContainerContains},
  {"DBusPlugin", "primitiveDBusNextIterator", (void*)primitiveDBusNextIterator},
  {"DBusPlugin", "primitiveDBusRegisterName", (void*)primitiveDBusRegisterName},
  {"DBusPlugin", "primitiveDBusMessageHasArguments", (void*)primitiveDBusMessageHasArguments},
@@ -1912,18 +1913,17 @@
  {"DBusPlugin", "primitiveDBusMessageGetInterface", (void*)primitiveDBusMessageGetInterface},
  {"DBusPlugin", "primitiveDBusArgumentGetInt16", (void*)primitiveDBusArgumentGetInt16},
  {"DBusPlugin", "primitiveDBusMessageGetErrorName", (void*)primitiveDBusMessageGetErrorName},
+ {"DBusPlugin", "primitiveDBusSendMessageTimeout", (void*)primitiveDBusSendMessageTimeout},
  {"DBusPlugin", "getModuleName", (void*)getModuleName},
  {"DBusPlugin", "primitiveDBusConnectionClose", (void*)primitiveDBusConnectionClose},
  {"DBusPlugin", "primitiveDBusCreateMessageFrom", (void*)primitiveDBusCreateMessageFrom},
  {"DBusPlugin", "primitiveDBusIteratorSignature", (void*)primitiveDBusIteratorSignature},
  {"DBusPlugin", "primitiveDBusArgumentGetDouble", (void*)primitiveDBusArgumentGetDouble},
- {"DBusPlugin", "primitiveDBusIterOpenContainerContains", (void*)primitiveDBusIterOpenContainerContains},
+ {"DBusPlugin", "primitiveDBusRemoveMatch", (void*)primitiveDBusRemoveMatch},
  {"DBusPlugin", "primitiveDBusArgumentGetUInt16", (void*)primitiveDBusArgumentGetUInt16},
  {"DBusPlugin", "primitiveDBusInitializeWriteIterator", (void*)primitiveDBusInitializeWriteIterator},
  {"DBusPlugin", "primitiveDBusArgumentGetUInt64", (void*)primitiveDBusArgumentGetUInt64},
- {"DBusPlugin", "primitiveDBusAppendBasicArgument", (void*)primitiveDBusAppendBasicArgument},
  {"DBusPlugin", "primitiveDBusMessageGetReplySerial", (void*)primitiveDBusMessageGetReplySerial},
- {"DBusPlugin", "primitiveDBusRemoveMatch", (void*)primitiveDBusRemoveMatch},
  {"DBusPlugin", "primitiveDBusMessageGetSerial", (void*)primitiveDBusMessageGetSerial},
  {"DBusPlugin", "primitiveDBusArgumentGetObjectPath", (void*)primitiveDBusArgumentGetObjectPath},
  {"DBusPlugin", "primitiveDBusArgumentGetString", (void*)primitiveDBusArgumentGetString},

Modified: trunk/platforms/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:38 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:47 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -53,9 +53,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "FileCopyPlugin 10 November 2008 (i)"
+ "FileCopyPlugin 26 August 2009 (i)"
 #else
- "FileCopyPlugin 10 November 2008 (e)"
+ "FileCopyPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -136,9 +136,9 @@
 
 
 void* FileCopyPlugin_exports[][3] = {
- {"FileCopyPlugin", "primitiveFileCopyNamedTo", (void*)primitiveFileCopyNamedTo},
  {"FileCopyPlugin", "setInterpreter", (void*)setInterpreter},
  {"FileCopyPlugin", "getModuleName", (void*)getModuleName},
+ {"FileCopyPlugin", "primitiveFileCopyNamedTo", (void*)primitiveFileCopyNamedTo},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/GStreamerPlugin/GStreamerPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/GStreamerPlugin/GStreamerPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/GStreamerPlugin/GStreamerPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:39 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:52 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -56,8 +56,9 @@
 EXPORT(sqInt) primitiveSqueakSinkGetWidth(void);
 EXPORT(sqInt) primitiveSqueakSinkVideo(void);
 EXPORT(sqInt) primitiveSqueakSrc(void);
+EXPORT(sqInt) primitiveSqueakSrcWithTime(void);
 EXPORT(sqInt) primitiveSqueakSrcAllocate(void);
-EXPORT(sqInt) primitiveSqueakSrcWithTime(void);
+EXPORT(sqInt) primitivecallbacksignalseenfor(void);
 EXPORT(sqInt) primitivegetinterpreterproxy(void);
 EXPORT(sqInt) primitivegetoop(void);
 EXPORT(sqInt) primitivegobjectclasslistproperties(void);
@@ -142,6 +143,7 @@
 EXPORT(sqInt) primitivegstobjectunref(void);
 EXPORT(sqInt) primitivegstpadacceptcaps(void);
 EXPORT(sqInt) primitivegstpadgetcaps(void);
+EXPORT(sqInt) primitivegstpadgetparentelement(void);
 EXPORT(sqInt) primitivegstpadlink(void);
 EXPORT(sqInt) primitivegstpadsetactive(void);
 EXPORT(sqInt) primitivegstpadsetcaps(void);
@@ -170,6 +172,7 @@
 static sqInt sqAssert(sqInt aBool);
 static sqInt stringFromCString(const char * aCString);
 /*** Variables ***/
+static gboolean callbackForPadHookupElement[128];
 
 #ifdef SQUEAK_BUILTIN_PLUGIN
 extern
@@ -177,9 +180,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "GStreamerPlugin 10 November 2008 (i)"
+ "GStreamerPlugin 26 August 2009 (i)"
 #else
- "GStreamerPlugin 10 November 2008 (e)"
+ "GStreamerPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -207,6 +210,9 @@
  gstCapsValue = gst_pad_get_caps (newPad);
  result =  gst_pad_accept_caps (gstPadValue, gstCapsValue);
  if (result) {
+ if (i < 128) {
+ callbackForPadHookupElement[i] = 1;
+ }
  gst_pad_link (newPad, gstPadValue);
  return null;
  }
@@ -553,45 +559,11 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSqueakSrcAllocate(void) {
- SqueakAudioVideoSinkPtr squeaker;
- GstElement*  gstElement;
- sqInt numberOfBytes;
- sqInt semaphoreIndex;
- sqInt gstElementOoop;
- sqInt _return_value;
-
- numberOfBytes = interpreterProxy->stackIntegerValue(2);
- semaphoreIndex = interpreterProxy->stackIntegerValue(1);
- gstElementOoop = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- gstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));
- squeaker = 0;
-
- squeaker = g_malloc0(sizeof(SqueakAudioVideoSink));
- squeaker->handler = squeakSrcHandOff;
- squeaker->owner = gstElement;
- squeaker->semaphoreIndexForSink = semaphoreIndex;
- squeaker->copyToSendToSqueakVideo = g_malloc(numberOfBytes);
- squeaker->allocbytes = numberOfBytes;
- squeaker->interpreterProxy = interpreterProxy;
- ;
- ;
- _return_value = interpreterProxy->positive32BitIntegerFor(squeaker);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(4, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSqueakSrcWithTime(void) {
+ GstClockTime  startTimeValue;
  GstClockTime  durationValue;
  SqueakAudioVideoSinkPtr  sink;
  sqInt doesFrameExist;
- GstClockTime  startTimeValue;
  sqInt aSqueakSinkObject;
  sqInt data;
  sqInt startTime;
@@ -640,6 +612,63 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveSqueakSrcAllocate(void) {
+ SqueakAudioVideoSinkPtr squeaker;
+ GstElement*  gstElement;
+ sqInt numberOfBytes;
+ sqInt semaphoreIndex;
+ sqInt gstElementOoop;
+ sqInt _return_value;
+
+ numberOfBytes = interpreterProxy->stackIntegerValue(2);
+ semaphoreIndex = interpreterProxy->stackIntegerValue(1);
+ gstElementOoop = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ gstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));
+ squeaker = 0;
+
+ squeaker = g_malloc0(sizeof(SqueakAudioVideoSink));
+ squeaker->handler = squeakSrcHandOff;
+ squeaker->owner = gstElement;
+ squeaker->semaphoreIndexForSink = semaphoreIndex;
+ squeaker->copyToSendToSqueakVideo = g_malloc(numberOfBytes);
+ squeaker->allocbytes = numberOfBytes;
+ squeaker->interpreterProxy = interpreterProxy;
+ ;
+ ;
+ _return_value = interpreterProxy->positive32BitIntegerFor(squeaker);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(4, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitivecallbacksignalseenfor(void) {
+ gboolean  value;
+ sqInt aIndex;
+ sqInt _return_value;
+
+ aIndex = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ value = 0;
+ if ((aIndex < 1) || (aIndex > 127)) {
+ interpreterProxy->primitiveFail();
+ return null;
+ }
+ value = callbackForPadHookupElement[aIndex];
+ _return_value = (value) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
 EXPORT(sqInt) primitivegetinterpreterproxy(void) {
  sqInt _return_value;
 
@@ -1485,9 +1514,9 @@
  GParamSpec **  propertyspecs;
  unsigned long long defaultValue;
  GParamSpecUInt64 * pstring;
- unsigned long long minimumValue;
  unsigned long long ulonglongValue;
  sqInt defaultValueOop;
+ unsigned long long minimumValue;
  sqInt ulonglongValueOop;
  sqInt arrayOop;
  sqInt minimumValueOop;
@@ -2677,6 +2706,9 @@
  for (i = 0; i <= (listLength - 1); i += 1) {
  dataPad = ((sqInt) (data[i]));
  callBackData[i + 1] = dataPad;
+ if (i < 128) {
+ callbackForPadHookupElement[i + 1] = 0;
+ }
  }
  ;
  ;
@@ -3489,6 +3521,28 @@
  return null;
 }
 
+EXPORT(sqInt) primitivegstpadgetparentelement(void) {
+ GstPad*  gstPadValue;
+ GstElement*  gstEvementValue;
+ sqInt gstPadOop;
+ sqInt _return_value;
+
+ gstPadOop = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ gstEvementValue = 0;
+ gstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstPadOop)));
+ ;
+ gstEvementValue = gst_pad_get_parent_element (gstPadValue);
+ _return_value = interpreterProxy->positive32BitIntegerFor(gstEvementValue);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
 EXPORT(sqInt) primitivegstpadlink(void) {
  GstPad*  dest;
  GstPad*  src;
@@ -3987,11 +4041,11 @@
  The object may be either a positive ST integer or a four-byte LargeInteger. */
 
 static sqInt signed32BitValueOfOverride(sqInt oop) {
- sqInt negative;
  sqInt value;
- sqInt sz;
  sqInt largeClass;
  unsigned char * where;
+ sqInt negative;
+ sqInt sz;
 
  if ((oop & 1)) {
  return (oop >> 1);
@@ -4018,6 +4072,9 @@
  high bit of the magnitude is not set which is a simple test here. */
 
  value = (((where[0]) + ((where[1]) << 8)) + ((where[2]) << 16)) + ((where[3]) << 24);
+ if (negative && (value == (1 << 31))) {
+ return value;
+ }
  if (value < 0) {
  return interpreterProxy->primitiveFail();
  }
@@ -4033,6 +4090,7 @@
 
 static sqInt signed64BitIntegerForOverride(sqLong integerValue) {
  usqInt highWord;
+ sqLong lowestIntegerValue;
  sqInt largeClass;
  unsigned char* where;
  sqInt i;
@@ -4041,6 +4099,18 @@
  sqInt sz;
  sqInt intValue;
 
+ lowestIntegerValue = 1;
+ lowestIntegerValue = lowestIntegerValue << 63;
+ if (integerValue == lowestIntegerValue) {
+
+ /* newLargeInteger := self instantiateClass: largeClass indexableSize:  8. */
+
+ largeClass = interpreterProxy->classLargeNegativeInteger();
+ newLargeInteger = interpreterProxy->instantiateClassindexableSize(largeClass, 8);
+ where = interpreterProxy->firstIndexableField(newLargeInteger);
+ where[7] = 128;
+ return newLargeInteger;
+ }
  if (integerValue < 0) {
  largeClass = interpreterProxy->classLargeNegativeInteger();
  magnitude = 0 - integerValue;
@@ -4086,6 +4156,7 @@
  The object may be either a positive ST integer or a eight-byte LargeInteger. */
 
 static sqLong signed64BitValueOfOverride(sqInt oop) {
+ sqLong lowestIntegerValue;
  sqLong value;
  sqInt largeClass;
  unsigned char * where;
@@ -4117,6 +4188,11 @@
  for (i = 0; i <= (sz - 1); i += 1) {
  value += (((sqLong) (where[i]))) << (i * 8);
  }
+ lowestIntegerValue = 1;
+ lowestIntegerValue = lowestIntegerValue << 63;
+ if (negative && (value == lowestIntegerValue)) {
+ return value;
+ }
  if (value < 0) {
  return interpreterProxy->primitiveFail();
  }
@@ -4153,122 +4229,124 @@
 
 
 void* GStreamerPlugin_exports[][3] = {
- {"GStreamerPlugin", "primitiveSqueakSinkGetFrameRateDenominator", (void*)primitiveSqueakSinkGetFrameRateDenominator},
- {"GStreamerPlugin", "primitivegsignalconnect", (void*)primitivegsignalconnect},
- {"GStreamerPlugin", "primitivegstelementgetcompatiblepad", (void*)primitivegstelementgetcompatiblepad},
- {"GStreamerPlugin", "primitivegstpipelinesetnewstreamtime", (void*)primitivegstpipelinesetnewstreamtime},
- {"GStreamerPlugin", "primitivegstpipelinegetbus", (void*)primitivegstpipelinegetbus},
- {"GStreamerPlugin", "setInterpreter", (void*)setInterpreter},
- {"GStreamerPlugin", "primitiveSqueakSinkGetWidth", (void*)primitiveSqueakSinkGetWidth},
- {"GStreamerPlugin", "primitivegobjectclasslistproperties", (void*)primitivegobjectclasslistproperties},
- {"GStreamerPlugin", "primitivegstmessagetypestring", (void*)primitivegstmessagetypestring},
- {"GStreamerPlugin", "primitiveSqueakSinkFree", (void*)primitiveSqueakSinkFree},
- {"GStreamerPlugin", "primitivegobjectsetstringon", (void*)primitivegobjectsetstringon},
- {"GStreamerPlugin", "primitiveSqueakSinkAudioGetData", (void*)primitiveSqueakSinkAudioGetData},
- {"GStreamerPlugin", "primitivegstpadsetactive", (void*)primitivegstpadsetactive},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertyulonglongatIndex", (void*)primitivegobjectclasslistpropertyulonglongatIndex},
+ {"GStreamerPlugin", "primitivegstelementfactorygetdescription", (void*)primitivegstelementfactorygetdescription},
+ {"GStreamerPlugin", "primitivegstelementreleaserequestpad", (void*)primitivegstelementreleaserequestpad},
+ {"GStreamerPlugin", "primitivegstbuspopfilter", (void*)primitivegstbuspopfilter},
  {"GStreamerPlugin", "primitivegstpadlink", (void*)primitivegstpadlink},
- {"GStreamerPlugin", "primitiveSqueakSrcWithTime", (void*)primitiveSqueakSrcWithTime},
- {"GStreamerPlugin", "primitivegstpipelineautoclock", (void*)primitivegstpipelineautoclock},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertylongatIndex", (void*)primitivegobjectclasslistpropertylongatIndex},
- {"GStreamerPlugin", "primitivegstbuspeek", (void*)primitivegstbuspeek},
- {"GStreamerPlugin", "primitivegstmessagesrc", (void*)primitivegstmessagesrc},
- {"GStreamerPlugin", "primitivegobjectgetulongfrom", (void*)primitivegobjectgetulongfrom},
- {"GStreamerPlugin", "primitivegstmessageparsesegmentstart", (void*)primitivegstmessageparsesegmentstart},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertyfloatatIndex", (void*)primitivegobjectclasslistpropertyfloatatIndex},
  {"GStreamerPlugin", "primitivegstelementfactorygetlongname", (void*)primitivegstelementfactorygetlongname},
- {"GStreamerPlugin", "primitivegstpipelinegetautoflushbus", (void*)primitivegstpipelinegetautoflushbus},
- {"GStreamerPlugin", "primitivegstpadacceptcaps", (void*)primitivegstpadacceptcaps},
- {"GStreamerPlugin", "primitiveSqueakSrcAllocate", (void*)primitiveSqueakSrcAllocate},
+ {"GStreamerPlugin", "primitiveSqueakSinkGetFrameRateNumerator", (void*)primitiveSqueakSinkGetFrameRateNumerator},
+ {"GStreamerPlugin", "setInterpreter", (void*)setInterpreter},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertymetaDataatIndex", (void*)primitivegobjectclasslistpropertymetaDataatIndex},
+ {"GStreamerPlugin", "primitivegstpipelinesetdelay", (void*)primitivegstpipelinesetdelay},
+ {"GStreamerPlugin", "primitivegstelementsetstate", (void*)primitivegstelementsetstate},
+ {"GStreamerPlugin", "primitivegobjectsetulongon", (void*)primitivegobjectsetulongon},
+ {"GStreamerPlugin", "primitivegstelementqueryposition", (void*)primitivegstelementqueryposition},
  {"GStreamerPlugin", "primitivegstbushavepending", (void*)primitivegstbushavepending},
- {"GStreamerPlugin", "primitivegstelementqueryconvert", (void*)primitivegstelementqueryconvert},
- {"GStreamerPlugin", "primitivegobjectgetulonglongfrom", (void*)primitivegobjectgetulonglongfrom},
+ {"GStreamerPlugin", "primitivegstmessageparseinfo", (void*)primitivegstmessageparseinfo},
+ {"GStreamerPlugin", "primitivegstpadgetparentelement", (void*)primitivegstpadgetparentelement},
+ {"GStreamerPlugin", "primitivegobjectsetstringon", (void*)primitivegobjectsetstringon},
+ {"GStreamerPlugin", "primitivegstelementgetcompatiblepad", (void*)primitivegstelementgetcompatiblepad},
+ {"GStreamerPlugin", "primitivegstpipelinesetclock", (void*)primitivegstpipelinesetclock},
+ {"GStreamerPlugin", "primitiveSqueakSrc", (void*)primitiveSqueakSrc},
  {"GStreamerPlugin", "primitivegobjectgetdoublefrom", (void*)primitivegobjectgetdoublefrom},
+ {"GStreamerPlugin", "primitivecallbacksignalseenfor", (void*)primitivecallbacksignalseenfor},
+ {"GStreamerPlugin", "primitivegstmessageparsewarning", (void*)primitivegstmessageparsewarning},
+ {"GStreamerPlugin", "primitivegstmessagesrc", (void*)primitivegstmessagesrc},
+ {"GStreamerPlugin", "primitivegstmessageparseerror", (void*)primitivegstmessageparseerror},
+ {"GStreamerPlugin", "primitiveSqueakSinkFree", (void*)primitiveSqueakSinkFree},
+ {"GStreamerPlugin", "primitivegobjectsetulonglongon", (void*)primitivegobjectsetulonglongon},
+ {"GStreamerPlugin", "primitivegstpipelinegetdelay", (void*)primitivegstpipelinegetdelay},
  {"GStreamerPlugin", "primitivegstmessageparsebuffering", (void*)primitivegstmessageparsebuffering},
- {"GStreamerPlugin", "primitivegstpipelinegetdelay", (void*)primitivegstpipelinegetdelay},
+ {"GStreamerPlugin", "primitivegstmessagetypestring", (void*)primitivegstmessagetypestring},
+ {"GStreamerPlugin", "primitiveSqueakSinkAudioGetData", (void*)primitiveSqueakSinkAudioGetData},
+ {"GStreamerPlugin", "primitivegstelementseeksimple", (void*)primitivegstelementseeksimple},
+ {"GStreamerPlugin", "primitivegobjectclasslistproperties", (void*)primitivegobjectclasslistproperties},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertyintatIndex", (void*)primitivegobjectclasslistpropertyintatIndex},
+ {"GStreamerPlugin", "primitivegstpipelinegetlaststreamtime", (void*)primitivegstpipelinegetlaststreamtime},
+ {"GStreamerPlugin", "primitivegstregistryforksetenabled", (void*)primitivegstregistryforksetenabled},
+ {"GStreamerPlugin", "primitivegobjectgetulonglongfrom", (void*)primitivegobjectgetulonglongfrom},
  {"GStreamerPlugin", "primitivegobjectgetpointerfrom", (void*)primitivegobjectgetpointerfrom},
- {"GStreamerPlugin", "primitiveSqueakSrc", (void*)primitiveSqueakSrc},
- {"GStreamerPlugin", "primitivegstelementfactorymake", (void*)primitivegstelementfactorymake},
- {"GStreamerPlugin", "primitivegobjectsetlongon", (void*)primitivegobjectsetlongon},
- {"GStreamerPlugin", "primitivegobjectfree", (void*)primitivegobjectfree},
- {"GStreamerPlugin", "primitivegobjectsetboolon", (void*)primitivegobjectsetboolon},
- {"GStreamerPlugin", "primitivegstelementlink", (void*)primitivegstelementlink},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertyboolatIndex", (void*)primitivegobjectclasslistpropertyboolatIndex},
- {"GStreamerPlugin", "primitivegstsegtrapsetenabled", (void*)primitivegstsegtrapsetenabled},
- {"GStreamerPlugin", "primitivegstelementgetstate", (void*)primitivegstelementgetstate},
- {"GStreamerPlugin", "primitivegstpipelinesetdelay", (void*)primitivegstpipelinesetdelay},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertystringatIndex", (void*)primitivegobjectclasslistpropertystringatIndex},
+ {"GStreamerPlugin", "primitivegstelementfactorygetklass", (void*)primitivegstelementfactorygetklass},
+ {"GStreamerPlugin", "primitivegstpipelineautoclock", (void*)primitivegstpipelineautoclock},
+ {"GStreamerPlugin", "primitivegstpadsetactive", (void*)primitivegstpadsetactive},
+ {"GStreamerPlugin", "primitivegstcapstostring", (void*)primitivegstcapstostring},
+ {"GStreamerPlugin", "primitivegstpipelinegetautoflushbus", (void*)primitivegstpipelinegetautoflushbus},
+ {"GStreamerPlugin", "primitivegstelementgetrequestpad", (void*)primitivegstelementgetrequestpad},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertyfloatatIndex", (void*)primitivegobjectclasslistpropertyfloatatIndex},
+ {"GStreamerPlugin", "primitivegsignalconnect", (void*)primitivegsignalconnect},
+ {"GStreamerPlugin", "primitivegstelementfactorycreate", (void*)primitivegstelementfactorycreate},
+ {"GStreamerPlugin", "primitivegstpipelinegetclock", (void*)primitivegstpipelinegetclock},
+ {"GStreamerPlugin", "primitivegstelementlinkfiltered", (void*)primitivegstelementlinkfiltered},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertylongatIndex", (void*)primitivegobjectclasslistpropertylongatIndex},
+ {"GStreamerPlugin", "primitivegstcapsfromstring", (void*)primitivegstcapsfromstring},
+ {"GStreamerPlugin", "primitivegstbinnew", (void*)primitivegstbinnew},
+ {"GStreamerPlugin", "primitiveSqueakSinkGetHeight", (void*)primitiveSqueakSinkGetHeight},
  {"GStreamerPlugin", "primitivegobjectclasslistpropertyulongatIndex", (void*)primitivegobjectclasslistpropertyulongatIndex},
- {"GStreamerPlugin", "primitivegobjectsetulonglongon", (void*)primitivegobjectsetulonglongon},
- {"GStreamerPlugin", "primitivegstelementgsignalconnect", (void*)primitivegstelementgsignalconnect},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertylonglongatIndex", (void*)primitivegobjectclasslistpropertylonglongatIndex},
- {"GStreamerPlugin", "primitivegstelementsetstate", (void*)primitivegstelementsetstate},
+ {"GStreamerPlugin", "primitivegstpipelinenew", (void*)primitivegstpipelinenew},
+ {"GStreamerPlugin", "primitivegstmessageparsestatechanged", (void*)primitivegstmessageparsestatechanged},
+ {"GStreamerPlugin", "primitivegobjectgetstringfrom", (void*)primitivegobjectgetstringfrom},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertypointeratIndex", (void*)primitivegobjectclasslistpropertypointeratIndex},
  {"GStreamerPlugin", "primitivegstversionstring", (void*)primitivegstversionstring},
- {"GStreamerPlugin", "primitiveSqueakSinkAllocate", (void*)primitiveSqueakSinkAllocate},
+ {"GStreamerPlugin", "primitivegstpipelinesetnewstreamtime", (void*)primitivegstpipelinesetnewstreamtime},
+ {"GStreamerPlugin", "primitivegstsegtrapsetenabled", (void*)primitivegstsegtrapsetenabled},
+ {"GStreamerPlugin", "primitivegstpipelinesetautoflushbus", (void*)primitivegstpipelinesetautoflushbus},
+ {"GStreamerPlugin", "primitivegstsegtrapisenabled", (void*)primitivegstsegtrapisenabled},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertydoubleatIndex", (void*)primitivegobjectclasslistpropertydoubleatIndex},
+ {"GStreamerPlugin", "primitivegstelementqueryduration", (void*)primitivegstelementqueryduration},
+ {"GStreamerPlugin", "primitivegstmessageparseduration", (void*)primitivegstmessageparseduration},
+ {"GStreamerPlugin", "primitivegstelementfactorymake", (void*)primitivegstelementfactorymake},
+ {"GStreamerPlugin", "primitivegstinitcheck", (void*)primitivegstinitcheck},
+ {"GStreamerPlugin", "primitivegstmessageparsesegmentstart", (void*)primitivegstmessageparsesegmentstart},
+ {"GStreamerPlugin", "primitivegstpadsetcaps", (void*)primitivegstpadsetcaps},
+ {"GStreamerPlugin", "primitivegstelementfactoryfind", (void*)primitivegstelementfactoryfind},
+ {"GStreamerPlugin", "primitiveSqueakSinkGetFrameRateDenominator", (void*)primitiveSqueakSinkGetFrameRateDenominator},
  {"GStreamerPlugin", "primitivegobjectgetfloatfrom", (void*)primitivegobjectgetfloatfrom},
- {"GStreamerPlugin", "primitivegobjectsetulongon", (void*)primitivegobjectsetulongon},
  {"GStreamerPlugin", "primitivegstmessageunref", (void*)primitivegstmessageunref},
- {"GStreamerPlugin", "primitivegstmessageparsesegmentdone", (void*)primitivegstmessageparsesegmentdone},
- {"GStreamerPlugin", "primitivegstelementfactoryfind", (void*)primitivegstelementfactoryfind},
- {"GStreamerPlugin", "primitivegstsegtrapisenabled", (void*)primitivegstsegtrapisenabled},
- {"GStreamerPlugin", "primitivegstbinadd", (void*)primitivegstbinadd},
- {"GStreamerPlugin", "primitivegstelementqueryposition", (void*)primitivegstelementqueryposition},
- {"GStreamerPlugin", "primitivegstcapstostring", (void*)primitivegstcapstostring},
- {"GStreamerPlugin", "primitiveSqueakSinkGetFrameRateNumerator", (void*)primitiveSqueakSinkGetFrameRateNumerator},
- {"GStreamerPlugin", "primitivegstinitcheck", (void*)primitivegstinitcheck},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertyenumatIndex", (void*)primitivegobjectclasslistpropertyenumatIndex},
- {"GStreamerPlugin", "primitivegstelementreleaserequestpad", (void*)primitivegstelementreleaserequestpad},
- {"GStreamerPlugin", "primitivegstregistryforksetenabled", (void*)primitivegstregistryforksetenabled},
- {"GStreamerPlugin", "primitivegstobjectunref", (void*)primitivegstobjectunref},
  {"GStreamerPlugin", "primitivegobjectsetdoubleon", (void*)primitivegobjectsetdoubleon},
- {"GStreamerPlugin", "primitivegstbuspop", (void*)primitivegstbuspop},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertyboolatIndex", (void*)primitivegobjectclasslistpropertyboolatIndex},
+ {"GStreamerPlugin", "primitivegetoop", (void*)primitivegetoop},
+ {"GStreamerPlugin", "primitivegobjectsetlongon", (void*)primitivegobjectsetlongon},
+ {"GStreamerPlugin", "primitivegobjectsetfloaton", (void*)primitivegobjectsetfloaton},
+ {"GStreamerPlugin", "primitivegstelementseek", (void*)primitivegstelementseek},
+ {"GStreamerPlugin", "primitivegstghostpadnew", (void*)primitivegstghostpadnew},
+ {"GStreamerPlugin", "primitivegstelementgetstaticpad", (void*)primitivegstelementgetstaticpad},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertylonglongatIndex", (void*)primitivegobjectclasslistpropertylonglongatIndex},
+ {"GStreamerPlugin", "primitivegstpipelineuseclock", (void*)primitivegstpipelineuseclock},
+ {"GStreamerPlugin", "primitivegobjectgetsmalltalkobject", (void*)primitivegobjectgetsmalltalkobject},
+ {"GStreamerPlugin", "primitivegobjectgetboolfrom", (void*)primitivegobjectgetboolfrom},
+ {"GStreamerPlugin", "primitivegstbuspeek", (void*)primitivegstbuspeek},
  {"GStreamerPlugin", "primitivegstelementfactorygetauthor", (void*)primitivegstelementfactorygetauthor},
- {"GStreamerPlugin", "primitivegobjectgetstringfrom", (void*)primitivegobjectgetstringfrom},
- {"GStreamerPlugin", "primitivegstcapsfromstring", (void*)primitivegstcapsfromstring},
- {"GStreamerPlugin", "primitivegstelementfactorygeturitype", (void*)primitivegstelementfactorygeturitype},
- {"GStreamerPlugin", "primitivegstelementqueryduration", (void*)primitivegstelementqueryduration},
- {"GStreamerPlugin", "primitivegstelementadd", (void*)primitivegstelementadd},
- {"GStreamerPlugin", "primitivegstbinnew", (void*)primitivegstbinnew},
- {"GStreamerPlugin", "primitivegstpipelinegetclock", (void*)primitivegstpipelinegetclock},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertyuintatIndex", (void*)primitivegobjectclasslistpropertyuintatIndex},
- {"GStreamerPlugin", "primitivegobjectgetboolfrom", (void*)primitivegobjectgetboolfrom},
+ {"GStreamerPlugin", "primitiveSqueakSinkVideo", (void*)primitiveSqueakSinkVideo},
  {"GStreamerPlugin", "primitivegobjectgetlonglongfrom", (void*)primitivegobjectgetlonglongfrom},
- {"GStreamerPlugin", "primitivegstmessageparsewarning", (void*)primitivegstmessageparsewarning},
- {"GStreamerPlugin", "primitivegobjectgetsmalltalkobject", (void*)primitivegobjectgetsmalltalkobject},
- {"GStreamerPlugin", "primitivegstelementgetrequestpad", (void*)primitivegstelementgetrequestpad},
- {"GStreamerPlugin", "primitivegstpipelinesetclock", (void*)primitivegstpipelinesetclock},
- {"GStreamerPlugin", "primitivegstpadsetcaps", (void*)primitivegstpadsetcaps},
- {"GStreamerPlugin", "primitivegobjectsetfloaton", (void*)primitivegobjectsetfloaton},
+ {"GStreamerPlugin", "primitivegstobjectunref", (void*)primitivegstobjectunref},
+ {"GStreamerPlugin", "primitivegobjectgetulongfrom", (void*)primitivegobjectgetulongfrom},
+ {"GStreamerPlugin", "primitivegstelementgetstate", (void*)primitivegstelementgetstate},
  {"GStreamerPlugin", "primitivegstpadgetcaps", (void*)primitivegstpadgetcaps},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertymetaDataatIndex", (void*)primitivegobjectclasslistpropertymetaDataatIndex},
- {"GStreamerPlugin", "primitivegstpipelinegetlaststreamtime", (void*)primitivegstpipelinegetlaststreamtime},
- {"GStreamerPlugin", "primitivegstbuspopfilter", (void*)primitivegstbuspopfilter},
- {"GStreamerPlugin", "primitivegstpipelinenew", (void*)primitivegstpipelinenew},
- {"GStreamerPlugin", "primitivegobjectsetpointeron", (void*)primitivegobjectsetpointeron},
- {"GStreamerPlugin", "primitivegstmessageparsestatechanged", (void*)primitivegstmessageparsestatechanged},
- {"GStreamerPlugin", "primitivegstmessageparseerror", (void*)primitivegstmessageparseerror},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertyuintatIndex", (void*)primitivegobjectclasslistpropertyuintatIndex},
+ {"GStreamerPlugin", "primitivegobjectsetlonglongon", (void*)primitivegobjectsetlonglongon},
+ {"GStreamerPlugin", "primitivegobjectsetboolon", (void*)primitivegobjectsetboolon},
+ {"GStreamerPlugin", "primitivegstpadacceptcaps", (void*)primitivegstpadacceptcaps},
  {"GStreamerPlugin", "getModuleName", (void*)getModuleName},
- {"GStreamerPlugin", "primitivegstghostpadnew", (void*)primitivegstghostpadnew},
- {"GStreamerPlugin", "primitivegstelementseek", (void*)primitivegstelementseek},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertydoubleatIndex", (void*)primitivegobjectclasslistpropertydoubleatIndex},
- {"GStreamerPlugin", "primitivegstmessageparseinfo", (void*)primitivegstmessageparseinfo},
+ {"GStreamerPlugin", "primitivegetinterpreterproxy", (void*)primitivegetinterpreterproxy},
+ {"GStreamerPlugin", "primitivegstelementadd", (void*)primitivegstelementadd},
+ {"GStreamerPlugin", "primitiveSqueakSinkGetWidth", (void*)primitiveSqueakSinkGetWidth},
+ {"GStreamerPlugin", "primitivegobjectclasslistpropertyenumatIndex", (void*)primitivegobjectclasslistpropertyenumatIndex},
  {"GStreamerPlugin", "primitivegobjectgetlongfrom", (void*)primitivegobjectgetlongfrom},
- {"GStreamerPlugin", "primitivegstelementlinkfiltered", (void*)primitivegstelementlinkfiltered},
- {"GStreamerPlugin", "primitivegstmessageparseduration", (void*)primitivegstmessageparseduration},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertystringatIndex", (void*)primitivegobjectclasslistpropertystringatIndex},
- {"GStreamerPlugin", "primitivegetinterpreterproxy", (void*)primitivegetinterpreterproxy},
- {"GStreamerPlugin", "primitiveSqueakSinkVideo", (void*)primitiveSqueakSinkVideo},
- {"GStreamerPlugin", "primitivegstelementseeksimple", (void*)primitivegstelementseeksimple},
- {"GStreamerPlugin", "primitivegobjectsetlonglongon", (void*)primitivegobjectsetlonglongon},
- {"GStreamerPlugin", "primitiveSqueakSinkGetHeight", (void*)primitiveSqueakSinkGetHeight},
- {"GStreamerPlugin", "primitivegstelementfactorygetklass", (void*)primitivegstelementfactorygetklass},
- {"GStreamerPlugin", "primitivegstelementfactorygetdescription", (void*)primitivegstelementfactorygetdescription},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertypointeratIndex", (void*)primitivegobjectclasslistpropertypointeratIndex},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertyintatIndex", (void*)primitivegobjectclasslistpropertyintatIndex},
- {"GStreamerPlugin", "primitivegobjectclasslistpropertyulonglongatIndex", (void*)primitivegobjectclasslistpropertyulonglongatIndex},
- {"GStreamerPlugin", "primitivegstpipelinesetautoflushbus", (void*)primitivegstpipelinesetautoflushbus},
- {"GStreamerPlugin", "primitivegstelementgetstaticpad", (void*)primitivegstelementgetstaticpad},
- {"GStreamerPlugin", "primitivegetoop", (void*)primitivegetoop},
- {"GStreamerPlugin", "primitivegstelementfactorycreate", (void*)primitivegstelementfactorycreate},
- {"GStreamerPlugin", "primitivegstpipelineuseclock", (void*)primitivegstpipelineuseclock},
+ {"GStreamerPlugin", "primitivegstelementgsignalconnect", (void*)primitivegstelementgsignalconnect},
+ {"GStreamerPlugin", "primitivegstbuspop", (void*)primitivegstbuspop},
+ {"GStreamerPlugin", "primitiveSqueakSrcWithTime", (void*)primitiveSqueakSrcWithTime},
+ {"GStreamerPlugin", "primitivegstelementfactorygeturitype", (void*)primitivegstelementfactorygeturitype},
+ {"GStreamerPlugin", "primitivegstbinadd", (void*)primitivegstbinadd},
+ {"GStreamerPlugin", "primitiveSqueakSinkAllocate", (void*)primitiveSqueakSinkAllocate},
+ {"GStreamerPlugin", "primitivegstelementqueryconvert", (void*)primitivegstelementqueryconvert},
+ {"GStreamerPlugin", "primitivegstpipelinegetbus", (void*)primitivegstpipelinegetbus},
+ {"GStreamerPlugin", "primitivegstmessageparsesegmentdone", (void*)primitivegstmessageparsesegmentdone},
+ {"GStreamerPlugin", "primitiveSqueakSrcAllocate", (void*)primitiveSqueakSrcAllocate},
+ {"GStreamerPlugin", "primitivegobjectfree", (void*)primitivegobjectfree},
+ {"GStreamerPlugin", "primitivegstelementlink", (void*)primitivegstelementlink},
+ {"GStreamerPlugin", "primitivegobjectsetpointeron", (void*)primitivegobjectsetpointeron},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(21 April 2009 5:17:38 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:57 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -62,9 +62,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "HostWindowPlugin 21 April 2009 (i)"
+ "HostWindowPlugin 26 August 2009 (i)"
 #else
- "HostWindowPlugin 21 April 2009 (e)"
+ "HostWindowPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -369,17 +369,17 @@
 
 
 void* HostWindowPlugin_exports[][3] = {
- {"HostWindowPlugin", "primitiveCreateHostWindow", (void*)primitiveCreateHostWindow},
+ {"HostWindowPlugin", "primitiveHostWindowPositionSet", (void*)primitiveHostWindowPositionSet},
+ {"HostWindowPlugin", "primitiveHostWindowSize", (void*)primitiveHostWindowSize},
  {"HostWindowPlugin", "primitiveHostWindowPosition", (void*)primitiveHostWindowPosition},
- {"HostWindowPlugin", "primitiveCloseHostWindow", (void*)primitiveCloseHostWindow},
  {"HostWindowPlugin", "shutdownModule", (void*)shutdownModule},
- {"HostWindowPlugin", "setInterpreter", (void*)setInterpreter},
- {"HostWindowPlugin", "primitiveHostWindowPositionSet", (void*)primitiveHostWindowPositionSet},
  {"HostWindowPlugin", "primitiveHostWindowTitle", (void*)primitiveHostWindowTitle},
  {"HostWindowPlugin", "primitiveShowHostWindowRect", (void*)primitiveShowHostWindowRect},
+ {"HostWindowPlugin", "setInterpreter", (void*)setInterpreter},
  {"HostWindowPlugin", "getModuleName", (void*)getModuleName},
+ {"HostWindowPlugin", "primitiveCloseHostWindow", (void*)primitiveCloseHostWindow},
  {"HostWindowPlugin", "primitiveHostWindowSizeSet", (void*)primitiveHostWindowSizeSet},
- {"HostWindowPlugin", "primitiveHostWindowSize", (void*)primitiveHostWindowSize},
+ {"HostWindowPlugin", "primitiveCreateHostWindow", (void*)primitiveCreateHostWindow},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/ImmX11Plugin/ImmX11Plugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/ImmX11Plugin/ImmX11Plugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/ImmX11Plugin/ImmX11Plugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:40 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:58 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -82,9 +82,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "ImmX11Plugin 10 November 2008 (i)"
+ "ImmX11Plugin 26 August 2009 (i)"
 #else
- "ImmX11Plugin 10 November 2008 (e)"
+ "ImmX11Plugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -521,7 +521,7 @@
 
 
 void* ImmX11Plugin_exports[][3] = {
- {"ImmX11Plugin", "primSetLocaleEncoding", (void*)primSetLocaleEncoding},
+ {"ImmX11Plugin", "primSetTextEnc", (void*)primSetTextEnc},
  {"ImmX11Plugin", "primSetTextEncToLocale", (void*)primSetTextEncToLocale},
  {"ImmX11Plugin", "shutdownModule", (void*)shutdownModule},
  {"ImmX11Plugin", "primGetLocaleEncoding", (void*)primGetLocaleEncoding},
@@ -529,22 +529,22 @@
  {"ImmX11Plugin", "setInterpreter", (void*)setInterpreter},
  {"ImmX11Plugin", "primGetEncoding", (void*)primGetEncoding},
  {"ImmX11Plugin", "primGetLocale", (void*)primGetLocale},
+ {"ImmX11Plugin", "primSetLocale", (void*)primSetLocale},
+ {"ImmX11Plugin", "primSetXWinEnc", (void*)primSetXWinEnc},
  {"ImmX11Plugin", "getModuleName", (void*)getModuleName},
- {"ImmX11Plugin", "primSetXWinEnc", (void*)primSetXWinEnc},
  {"ImmX11Plugin", "primGetXWinEnc", (void*)primGetXWinEnc},
- {"ImmX11Plugin", "primSetPathEnc", (void*)primSetPathEnc},
+ {"ImmX11Plugin", "primSetEncoding", (void*)primSetEncoding},
+ {"ImmX11Plugin", "primSetCompositionFocus", (void*)primSetCompositionFocus},
  {"ImmX11Plugin", "primSetXWinEncToLocale", (void*)primSetXWinEncToLocale},
- {"ImmX11Plugin", "primSetCompositionFocus", (void*)primSetCompositionFocus},
+ {"ImmX11Plugin", "initialiseModule", (void*)initialiseModule},
  {"ImmX11Plugin", "primSetPathEncToLocale", (void*)primSetPathEncToLocale},
+ {"ImmX11Plugin", "primIsTextEncUTF8", (void*)primIsTextEncUTF8},
+ {"ImmX11Plugin", "primSetTextEncUTF8", (void*)primSetTextEncUTF8},
  {"ImmX11Plugin", "primGetPathEnc", (void*)primGetPathEnc},
- {"ImmX11Plugin", "primSetLocale", (void*)primSetLocale},
- {"ImmX11Plugin", "primIsTextEncUTF8", (void*)primIsTextEncUTF8},
- {"ImmX11Plugin", "primSetEncoding", (void*)primSetEncoding},
- {"ImmX11Plugin", "initialiseModule", (void*)initialiseModule},
  {"ImmX11Plugin", "primSetCompositionWindowPosition", (void*)primSetCompositionWindowPosition},
- {"ImmX11Plugin", "primSetTextEnc", (void*)primSetTextEnc},
+ {"ImmX11Plugin", "primSetLocaleEncoding", (void*)primSetLocaleEncoding},
+ {"ImmX11Plugin", "primSetPathEnc", (void*)primSetPathEnc},
  {"ImmX11Plugin", "primGetTextEnc", (void*)primGetTextEnc},
- {"ImmX11Plugin", "primSetTextEncUTF8", (void*)primSetTextEncUTF8},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/KedamaPlugin/KedamaPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/KedamaPlugin/KedamaPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/KedamaPlugin/KedamaPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:41 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:01 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -107,9 +107,9 @@
 static unsigned int kedamaRandomSeed;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "KedamaPlugin 10 November 2008 (i)"
+ "KedamaPlugin 26 August 2009 (i)"
 #else
- "KedamaPlugin 10 November 2008 (e)"
+ "KedamaPlugin 26 August 2009 (e)"
 #endif
 ;
 static unsigned int randA;
@@ -313,6 +313,8 @@
     sqInt headingOop;
     sqInt index;
     float *headingArray;
+    double deg;
+    double degrees;
 
  headingOop = interpreterProxy->stackValue(0);
  index = interpreterProxy->stackIntegerValue(1);
@@ -329,7 +331,13 @@
  }
  headingArray = interpreterProxy->firstIndexableField(headingOop);
  heading = headingArray[index - 1];
- heading = radiansToDegrees(heading);
+ /* begin radiansToDegrees: */
+ degrees = heading / 0.0174532925199433;
+ deg = 90.0 - degrees;
+ if (!(deg > 0.0)) {
+ deg += 360.0;
+ }
+ heading = deg;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -780,6 +788,9 @@
     double newX;
     float *headingArray;
     sqInt bottomEdgeMode;
+    double newX1;
+    double headingRadians;
+    double newY1;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -823,8 +834,70 @@
  i = index - 1;
  newX = (xArray[i]) + (dist * (cos(headingArray[i])));
  newY = (yArray[i]) - (dist * (sin(headingArray[i])));
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX1 = newX;
+ if (newX1 < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX1 += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX1 = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX1 = 0.0 - newX1;
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX1 >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX1 -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX1 = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[i] = newX1;
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY1 = newY;
+ if (newY1 < 0.0) {
+ if (topEdgeMode == 1) {
+ newY1 += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY1 = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY1 = 0.0 - newY1;
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ if (newY1 >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY1 -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY1 = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ yArray[i] = newY1;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -945,6 +1018,9 @@
     double dist;
     float *headingArray;
     sqInt bottomEdgeMode;
+    double newX1;
+    double headingRadians;
+    double newY1;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -1012,8 +1088,70 @@
  }
  newX = (xArray[i]) + (dist * (cos(headingArray[i])));
  newY = (yArray[i]) - (dist * (sin(headingArray[i])));
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX1 = newX;
+ if (newX1 < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX1 += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX1 = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX1 = 0.0 - newX1;
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX1 >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX1 -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX1 = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[i] = newX1;
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY1 = newY;
+ if (newY1 < 0.0) {
+ if (topEdgeMode == 1) {
+ newY1 += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY1 = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY1 = 0.0 - newY1;
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ if (newY1 >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY1 -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY1 = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ yArray[i] = newY1;
  }
  if (interpreterProxy->failed()) {
  return null;
@@ -1034,7 +1172,7 @@
     sqInt startX;
     sqInt width;
     sqInt height;
-    sqInt ret;
+    double ret;
     sqInt endY;
     sqInt y;
     sqInt turtleX;
@@ -1044,6 +1182,8 @@
     double tX;
     sqInt sniffRange;
     sqInt maxValX;
+    double deg;
+    double degrees;
 
  sniffRange = interpreterProxy->stackIntegerValue(0);
  height = interpreterProxy->stackIntegerValue(1);
@@ -1088,7 +1228,13 @@
  }
  }
  if (-1 == maxValX) {
- ret = radiansToDegrees(tH);
+ /* begin radiansToDegrees: */
+ degrees = tH / 0.0174532925199433;
+ deg = 90.0 - degrees;
+ if (!(deg > 0.0)) {
+ deg += 360.0;
+ }
+ ret = deg;
  } else {
  ret = (degreesFromXy(((double) (maxValX - turtleX)), ((double) (maxValY - turtleY)))) + 90.0;
  }
@@ -1888,6 +2034,8 @@
     double x;
     double r;
     double fromX;
+    double theta;
+    double tanVal;
 
  fromY = interpreterProxy->stackFloatValue(0);
  fromX = interpreterProxy->stackFloatValue(1);
@@ -1898,7 +2046,33 @@
  }
  x = toX - fromX;
  y = toY - fromY;
- r = degreesFromXy(x, y);
+ /* begin degreesFromX:y: */
+ if (x == 0.0) {
+ if (y >= 0.0) {
+ r = 90.0;
+ goto l1;
+ } else {
+ r = 270.0;
+ goto l1;
+ }
+ } else {
+ tanVal = y / x;
+ theta = atan(tanVal);
+ if (x >= 0.0) {
+ if (y >= 0.0) {
+ r = theta / 0.0174532925199433;
+ goto l1;
+ } else {
+ r = 360.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ } else {
+ r = 180.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ }
+ r = 0.0;
+l1: /* end degreesFromX:y: */;
  r += 90.0;
  if (r > 360.0) {
  r -= 360.0;
@@ -2018,6 +2192,12 @@
     sqInt i;
     sqInt isValVector;
     float *headingArray;
+    double deg;
+    double headingRadians;
+    int q;
+    double deg1;
+    double headingRadians1;
+    int q1;
 
  resultOop = interpreterProxy->stackValue(0);
  headingOop = interpreterProxy->stackValue(1);
@@ -2048,12 +2228,26 @@
  resultArray = interpreterProxy->firstIndexableField(resultOop);
  } else {
  heading = interpreterProxy->floatValueOf(resultOop);
- heading = degreesToRadians(heading);
+ /* begin degreesToRadians: */
+ deg = 90.0 - heading;
+ q = deg / 360.0;
+ if (deg < 0.0) {
+ q -= 1;
+ }
+ headingRadians = (deg - (q * 360.0)) * 0.0174532925199433;
+ heading = headingRadians;
  }
  for (i = 0; i <= (size - 1); i += 1) {
  if (isValVector) {
  heading = resultArray[i];
- heading = degreesToRadians(heading);
+ /* begin degreesToRadians: */
+ deg1 = 90.0 - heading;
+ q1 = deg1 / 360.0;
+ if (deg1 < 0.0) {
+ q1 -= 1;
+ }
+ headingRadians1 = (deg1 - (q1 * 360.0)) * 0.0174532925199433;
+ heading = headingRadians1;
  }
  headingArray[i] = heading;
  }
@@ -2121,6 +2315,8 @@
     sqInt xIndex;
     float *xArray;
     float *headingArray;
+    double newX;
+    double headingRadians;
 
  rightEdgeMode = interpreterProxy->stackIntegerValue(0);
  leftEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -2147,7 +2343,43 @@
  }
  xArray = interpreterProxy->firstIndexableField(xOop);
  headingArray = interpreterProxy->firstIndexableField(headingOop);
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(xIndex - 1, xArray, headingArray, val, destWidth, leftEdgeMode, rightEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX = val;
+ if (newX < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX = 0.0 - newX;
+ headingRadians = headingArray[xIndex - 1];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[xIndex - 1] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[xIndex - 1] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX = (destWidth - 1.0e-6) - (newX - destWidth);
+ headingRadians = headingArray[xIndex - 1];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[xIndex - 1] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[xIndex - 1] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[xIndex - 1] = newX;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -2165,6 +2397,7 @@
     double destHeight;
     sqInt topEdgeMode;
     float *headingArray;
+    double newY;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -2191,7 +2424,33 @@
  }
  yArray = interpreterProxy->firstIndexableField(yOop);
  headingArray = interpreterProxy->firstIndexableField(headingOop);
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(yIndex - 1, yArray, headingArray, val, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY = val;
+ if (newY < 0.0) {
+ if (topEdgeMode == 1) {
+ newY += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY = 0.0 - newY;
+ headingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));
+ }
+ }
+ if (newY >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY = (destHeight - 1.0e-6) - (newY - destHeight);
+ headingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));
+ }
+ }
+ yArray[yIndex - 1] = newY;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -2213,6 +2472,8 @@
     double newX;
     sqInt valOop;
     float *headingArray;
+    double newX1;
+    double headingRadians;
 
  rightEdgeMode = interpreterProxy->stackIntegerValue(0);
  leftEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -2265,7 +2526,43 @@
  } else {
  newX = val;
  }
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX1 = newX;
+ if (newX1 < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX1 += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX1 = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX1 = 0.0 - newX1;
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX1 >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX1 -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX1 = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[i] = newX1;
  }
  if (interpreterProxy->failed()) {
  return null;
@@ -2288,6 +2585,7 @@
     sqInt valOop;
     sqInt bottomEdgeMode;
     float *headingArray;
+    double newY1;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -2340,7 +2638,33 @@
  } else {
  newY = val;
  }
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY1 = newY;
+ if (newY1 < 0.0) {
+ if (topEdgeMode == 1) {
+ newY1 += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY1 = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY1 = 0.0 - newY1;
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ if (newY1 >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY1 -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY1 = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ yArray[i] = newY1;
  }
  if (interpreterProxy->failed()) {
  return null;
@@ -2366,7 +2690,9 @@
     double y;
     float *pX;
     double ppy;
-    sqInt r;
+    double r;
+    double theta;
+    double tanVal;
 
  resultOop = interpreterProxy->stackValue(0);
  yArrayOop = interpreterProxy->stackValue(1);
@@ -2444,7 +2770,33 @@
  }
  x = ppx - (xArray[index]);
  y = ppy - (yArray[index]);
- r = degreesFromXy(x, y);
+ /* begin degreesFromX:y: */
+ if (x == 0.0) {
+ if (y >= 0.0) {
+ r = 90.0;
+ goto l1;
+ } else {
+ r = 270.0;
+ goto l1;
+ }
+ } else {
+ tanVal = y / x;
+ theta = atan(tanVal);
+ if (x >= 0.0) {
+ if (y >= 0.0) {
+ r = theta / 0.0174532925199433;
+ goto l1;
+ } else {
+ r = 360.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ } else {
+ r = 180.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ }
+ r = 0.0;
+ l1: /* end degreesFromX:y: */;
  r += 90.0;
  if (r > 360.0) {
  r -= 360.0;

Modified: trunk/platforms/unix/src/plugins/KedamaPlugin2/KedamaPlugin2.c
===================================================================
--- trunk/platforms/unix/src/plugins/KedamaPlugin2/KedamaPlugin2.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/KedamaPlugin2/KedamaPlugin2.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:43 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:08 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -130,9 +130,9 @@
 static unsigned int kedamaRandomSeed;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "KedamaPlugin2 10 November 2008 (i)"
+ "KedamaPlugin2 26 August 2009 (i)"
 #else
- "KedamaPlugin2 10 November 2008 (e)"
+ "KedamaPlugin2 26 August 2009 (e)"
 #endif
 ;
 static unsigned int randA;
@@ -336,6 +336,8 @@
     sqInt headingOop;
     sqInt index;
     float *headingArray;
+    double deg;
+    double degrees;
 
  headingOop = interpreterProxy->stackValue(0);
  index = interpreterProxy->stackIntegerValue(1);
@@ -352,7 +354,13 @@
  }
  headingArray = interpreterProxy->firstIndexableField(headingOop);
  heading = headingArray[index - 1];
- heading = radiansToDegrees(heading);
+ /* begin radiansToDegrees: */
+ degrees = heading / 0.0174532925199433;
+ deg = 90.0 - degrees;
+ if (!(deg > 0.0)) {
+ deg += 360.0;
+ }
+ heading = deg;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -803,6 +811,9 @@
     double newX;
     float *headingArray;
     sqInt bottomEdgeMode;
+    double newX1;
+    double headingRadians;
+    double newY1;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -846,8 +857,70 @@
  i = index - 1;
  newX = (xArray[i]) + (dist * (cos(headingArray[i])));
  newY = (yArray[i]) - (dist * (sin(headingArray[i])));
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX1 = newX;
+ if (newX1 < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX1 += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX1 = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX1 = 0.0 - newX1;
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX1 >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX1 -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX1 = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[i] = newX1;
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY1 = newY;
+ if (newY1 < 0.0) {
+ if (topEdgeMode == 1) {
+ newY1 += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY1 = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY1 = 0.0 - newY1;
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ if (newY1 >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY1 -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY1 = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ yArray[i] = newY1;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -990,6 +1063,9 @@
     double dist;
     float *headingArray;
     sqInt bottomEdgeMode;
+    double newX1;
+    double headingRadians;
+    double newY1;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -1068,8 +1144,70 @@
  }
  newX = (xArray[i]) + (dist * (cos(headingArray[i])));
  newY = (yArray[i]) - (dist * (sin(headingArray[i])));
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX1 = newX;
+ if (newX1 < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX1 += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX1 = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX1 = 0.0 - newX1;
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX1 >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX1 -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX1 = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[i] = newX1;
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY1 = newY;
+ if (newY1 < 0.0) {
+ if (topEdgeMode == 1) {
+ newY1 += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY1 = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY1 = 0.0 - newY1;
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ if (newY1 >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY1 -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY1 = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ yArray[i] = newY1;
  }
  }
  if (interpreterProxy->failed()) {
@@ -1091,7 +1229,7 @@
     sqInt startX;
     sqInt width;
     sqInt height;
-    sqInt ret;
+    double ret;
     sqInt endY;
     sqInt y;
     sqInt turtleX;
@@ -1101,6 +1239,8 @@
     double tX;
     sqInt sniffRange;
     sqInt maxValX;
+    double deg;
+    double degrees;
 
  sniffRange = interpreterProxy->stackIntegerValue(0);
  height = interpreterProxy->stackIntegerValue(1);
@@ -1145,7 +1285,13 @@
  }
  }
  if (-1 == maxValX) {
- ret = radiansToDegrees(tH);
+ /* begin radiansToDegrees: */
+ degrees = tH / 0.0174532925199433;
+ deg = 90.0 - degrees;
+ if (!(deg > 0.0)) {
+ deg += 360.0;
+ }
+ ret = deg;
  } else {
  ret = (degreesFromXy(((double) (maxValX - turtleX)), ((double) (maxValY - turtleY)))) + 90.0;
  }
@@ -3454,6 +3600,8 @@
     double x;
     double r;
     double fromX;
+    double theta;
+    double tanVal;
 
  fromY = interpreterProxy->stackFloatValue(0);
  fromX = interpreterProxy->stackFloatValue(1);
@@ -3464,7 +3612,33 @@
  }
  x = toX - fromX;
  y = toY - fromY;
- r = degreesFromXy(x, y);
+ /* begin degreesFromX:y: */
+ if (x == 0.0) {
+ if (y >= 0.0) {
+ r = 90.0;
+ goto l1;
+ } else {
+ r = 270.0;
+ goto l1;
+ }
+ } else {
+ tanVal = y / x;
+ theta = atan(tanVal);
+ if (x >= 0.0) {
+ if (y >= 0.0) {
+ r = theta / 0.0174532925199433;
+ goto l1;
+ } else {
+ r = 360.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ } else {
+ r = 180.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ }
+ r = 0.0;
+l1: /* end degreesFromX:y: */;
  r += 90.0;
  if (r > 360.0) {
  r -= 360.0;
@@ -3586,6 +3760,12 @@
     sqInt isValVector;
     unsigned char *pArray;
     float *headingArray;
+    double deg;
+    double headingRadians;
+    int q;
+    double deg1;
+    double headingRadians1;
+    int q1;
 
  resultOop = interpreterProxy->stackValue(0);
  headingOop = interpreterProxy->stackValue(1);
@@ -3622,13 +3802,27 @@
  resultArray = interpreterProxy->firstIndexableField(resultOop);
  } else {
  heading = interpreterProxy->floatValueOf(resultOop);
- heading = degreesToRadians(heading);
+ /* begin degreesToRadians: */
+ deg = 90.0 - heading;
+ q = deg / 360.0;
+ if (deg < 0.0) {
+ q -= 1;
+ }
+ headingRadians = (deg - (q * 360.0)) * 0.0174532925199433;
+ heading = headingRadians;
  }
  for (i = 0; i <= (size - 1); i += 1) {
  if ((pArray[i]) == 1) {
  if (isValVector) {
  heading = resultArray[i];
- heading = degreesToRadians(heading);
+ /* begin degreesToRadians: */
+ deg1 = 90.0 - heading;
+ q1 = deg1 / 360.0;
+ if (deg1 < 0.0) {
+ q1 -= 1;
+ }
+ headingRadians1 = (deg1 - (q1 * 360.0)) * 0.0174532925199433;
+ heading = headingRadians1;
  }
  headingArray[i] = heading;
  }
@@ -3697,6 +3891,8 @@
     sqInt xIndex;
     float *xArray;
     float *headingArray;
+    double newX;
+    double headingRadians;
 
  rightEdgeMode = interpreterProxy->stackIntegerValue(0);
  leftEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -3723,7 +3919,43 @@
  }
  xArray = interpreterProxy->firstIndexableField(xOop);
  headingArray = interpreterProxy->firstIndexableField(headingOop);
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(xIndex - 1, xArray, headingArray, val, destWidth, leftEdgeMode, rightEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX = val;
+ if (newX < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX = 0.0 - newX;
+ headingRadians = headingArray[xIndex - 1];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[xIndex - 1] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[xIndex - 1] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX = (destWidth - 1.0e-6) - (newX - destWidth);
+ headingRadians = headingArray[xIndex - 1];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[xIndex - 1] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[xIndex - 1] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[xIndex - 1] = newX;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -3741,6 +3973,7 @@
     double destHeight;
     sqInt topEdgeMode;
     float *headingArray;
+    double newY;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -3767,7 +4000,33 @@
  }
  yArray = interpreterProxy->firstIndexableField(yOop);
  headingArray = interpreterProxy->firstIndexableField(headingOop);
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(yIndex - 1, yArray, headingArray, val, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY = val;
+ if (newY < 0.0) {
+ if (topEdgeMode == 1) {
+ newY += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY = 0.0 - newY;
+ headingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));
+ }
+ }
+ if (newY >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY = (destHeight - 1.0e-6) - (newY - destHeight);
+ headingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));
+ }
+ }
+ yArray[yIndex - 1] = newY;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -3793,6 +4052,8 @@
     unsigned char *pArray;
     sqInt valOop;
     float *headingArray;
+    double newX1;
+    double headingRadians;
 
  rightEdgeMode = interpreterProxy->stackIntegerValue(0);
  leftEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -3866,7 +4127,43 @@
  } else {
  newX = val;
  }
- scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);
+ /* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */
+ newX1 = newX;
+ if (newX1 < 0.0) {
+ if (leftEdgeMode == 1) {
+ newX1 += destWidth;
+ }
+ if (leftEdgeMode == 2) {
+ newX1 = 0.0;
+ }
+ if (leftEdgeMode == 3) {
+ newX1 = 0.0 - newX1;
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ if (newX1 >= destWidth) {
+ if (rightEdgeMode == 1) {
+ newX1 -= destWidth;
+ }
+ if (rightEdgeMode == 2) {
+ newX1 = destWidth - 1.0e-6;
+ }
+ if (rightEdgeMode == 3) {
+ newX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);
+ headingRadians = headingArray[i];
+ if (headingRadians < 3.141592653589793) {
+ headingArray[i] = (3.141592653589793 - headingRadians);
+ } else {
+ headingArray[i] = (9.42477796076938 - headingRadians);
+ }
+ }
+ }
+ xArray[i] = newX1;
  }
  }
  if (interpreterProxy->failed()) {
@@ -3894,6 +4191,7 @@
     sqInt valOop;
     sqInt bottomEdgeMode;
     float *headingArray;
+    double newY1;
 
  bottomEdgeMode = interpreterProxy->stackIntegerValue(0);
  topEdgeMode = interpreterProxy->stackIntegerValue(1);
@@ -3967,7 +4265,33 @@
  } else {
  newY = val;
  }
- scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);
+ /* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */
+ newY1 = newY;
+ if (newY1 < 0.0) {
+ if (topEdgeMode == 1) {
+ newY1 += destHeight;
+ }
+ if (topEdgeMode == 2) {
+ newY1 = 0.0;
+ }
+ if (topEdgeMode == 3) {
+ newY1 = 0.0 - newY1;
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ if (newY1 >= destHeight) {
+ if (bottomEdgeMode == 1) {
+ newY1 -= destHeight;
+ }
+ if (bottomEdgeMode == 2) {
+ newY1 = destHeight - 1.0e-6;
+ }
+ if (bottomEdgeMode == 3) {
+ newY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);
+ headingArray[i] = (6.283185307179586 - (headingArray[i]));
+ }
+ }
+ yArray[i] = newY1;
  }
  }
  if (interpreterProxy->failed()) {
@@ -3994,7 +4318,9 @@
     double y;
     float *pX;
     double ppy;
-    sqInt r;
+    double r;
+    double theta;
+    double tanVal;
 
  resultOop = interpreterProxy->stackValue(0);
  yArrayOop = interpreterProxy->stackValue(1);
@@ -4072,7 +4398,33 @@
  }
  x = ppx - (xArray[index]);
  y = ppy - (yArray[index]);
- r = degreesFromXy(x, y);
+ /* begin degreesFromX:y: */
+ if (x == 0.0) {
+ if (y >= 0.0) {
+ r = 90.0;
+ goto l1;
+ } else {
+ r = 270.0;
+ goto l1;
+ }
+ } else {
+ tanVal = y / x;
+ theta = atan(tanVal);
+ if (x >= 0.0) {
+ if (y >= 0.0) {
+ r = theta / 0.0174532925199433;
+ goto l1;
+ } else {
+ r = 360.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ } else {
+ r = 180.0 + (theta / 0.0174532925199433);
+ goto l1;
+ }
+ }
+ r = 0.0;
+ l1: /* end degreesFromX:y: */;
  r += 90.0;
  if (r > 360.0) {
  r -= 360.0;

Modified: trunk/platforms/unix/src/plugins/MIDIPlugin/MIDIPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/MIDIPlugin/MIDIPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/MIDIPlugin/MIDIPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:44 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:12 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -68,9 +68,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "MIDIPlugin 10 November 2008 (i)"
+ "MIDIPlugin 26 August 2009 (i)"
 #else
- "MIDIPlugin 10 November 2008 (e)"
+ "MIDIPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -338,19 +338,19 @@
 
 
 void* MIDIPlugin_exports[][3] = {
- {"MIDIPlugin", "primitiveMIDIClosePort", (void*)primitiveMIDIClosePort},
- {"MIDIPlugin", "primitiveMIDIWrite", (void*)primitiveMIDIWrite},
+ {"MIDIPlugin", "shutdownModule", (void*)shutdownModule},
+ {"MIDIPlugin", "primitiveMIDIParameterSet", (void*)primitiveMIDIParameterSet},
+ {"MIDIPlugin", "primitiveMIDIGetPortName", (void*)primitiveMIDIGetPortName},
  {"MIDIPlugin", "primitiveMIDIParameterGet", (void*)primitiveMIDIParameterGet},
- {"MIDIPlugin", "shutdownModule", (void*)shutdownModule},
- {"MIDIPlugin", "primitiveMIDIOpenPort", (void*)primitiveMIDIOpenPort},
+ {"MIDIPlugin", "setInterpreter", (void*)setInterpreter},
+ {"MIDIPlugin", "primitiveMIDIGetPortDirectionality", (void*)primitiveMIDIGetPortDirectionality},
  {"MIDIPlugin", "initialiseModule", (void*)initialiseModule},
- {"MIDIPlugin", "setInterpreter", (void*)setInterpreter},
  {"MIDIPlugin", "primitiveMIDIGetPortCount", (void*)primitiveMIDIGetPortCount},
+ {"MIDIPlugin", "primitiveMIDIRead", (void*)primitiveMIDIRead},
  {"MIDIPlugin", "getModuleName", (void*)getModuleName},
- {"MIDIPlugin", "primitiveMIDIRead", (void*)primitiveMIDIRead},
- {"MIDIPlugin", "primitiveMIDIGetPortDirectionality", (void*)primitiveMIDIGetPortDirectionality},
- {"MIDIPlugin", "primitiveMIDIParameterSet", (void*)primitiveMIDIParameterSet},
- {"MIDIPlugin", "primitiveMIDIGetPortName", (void*)primitiveMIDIGetPortName},
+ {"MIDIPlugin", "primitiveMIDIOpenPort", (void*)primitiveMIDIOpenPort},
+ {"MIDIPlugin", "primitiveMIDIClosePort", (void*)primitiveMIDIClosePort},
+ {"MIDIPlugin", "primitiveMIDIWrite", (void*)primitiveMIDIWrite},
  {"MIDIPlugin", "primitiveMIDIGetClock", (void*)primitiveMIDIGetClock},
  {"MIDIPlugin", "primitiveMIDIParameterGetOrSet", (void*)primitiveMIDIParameterGetOrSet},
  {NULL, NULL, NULL}

Modified: trunk/platforms/unix/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:53:01 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:14 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -67,8 +67,8 @@
 EXPORT(sqInt) primitiveMPEG3PreviousFrame(void);
 EXPORT(sqInt) primitiveMPEG3ReReadAudio(void);
 EXPORT(sqInt) primitiveMPEG3ReadAudio(void);
+EXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void);
 EXPORT(sqInt) primitiveMPEG3ReadFrame(void);
-EXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void);
 EXPORT(sqInt) primitiveMPEG3SampleRate(void);
 EXPORT(sqInt) primitiveMPEG3SeekPercentage(void);
 EXPORT(sqInt) primitiveMPEG3SetCpus(void);
@@ -97,9 +97,9 @@
 static sqInt maximumNumberOfFilesToWatch;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "Mpeg3Plugin 10 November 2008 (i)"
+ "Mpeg3Plugin 26 August 2009 (i)"
 #else
- "Mpeg3Plugin 10 November 2008 (e)"
+ "Mpeg3Plugin 26 August 2009 (e)"
 #endif
 ;
 static mpeg3_t *mpegFiles[1024+1];
@@ -927,14 +927,15 @@
  int color_model,
  int stream) */
 
-EXPORT(sqInt) primitiveMPEG3ReadFrame(void) {
- unsigned char * bufferBaseAddr;
+EXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void) {
+ unsigned char *bufferBaseAddr;
  sqInt result;
  sqInt i;
- unsigned char  **  outputRowsPtr;
- mpeg3_t *  file;
+ unsigned char  ** outputRowsPtr;
+ mpeg3_t * file;
  sqInt fileHandle;
  usqInt *aBuffer;
+ sqInt aBufferOffset;
  sqInt xNumber;
  sqInt yNumber;
  sqInt width;
@@ -946,9 +947,10 @@
  sqInt aByteNumber;
  sqInt _return_value;
 
- fileHandle = interpreterProxy->stackValue(10);
- interpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(9)));
- aBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));
+ fileHandle = interpreterProxy->stackValue(11);
+ interpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(10)));
+ aBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(10))));
+ aBufferOffset = interpreterProxy->stackIntegerValue(9);
  xNumber = interpreterProxy->stackIntegerValue(8);
  yNumber = interpreterProxy->stackIntegerValue(7);
  width = interpreterProxy->stackIntegerValue(6);
@@ -966,7 +968,7 @@
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(12, 0);
+ interpreterProxy->popthenPush(13, 0);
  return null;
  }
  if (aNumber < 0) {
@@ -978,13 +980,13 @@
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(12, 0);
+ interpreterProxy->popthenPush(13, 0);
  return null;
  }
  bufferBaseAddr = ((unsigned char *) aBuffer);
  outputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight);
  for (i = 0; i <= (outHeight - 1); i += 1) {
- outputRowsPtr[i] = (bufferBaseAddr + (aByteNumber * i));
+ outputRowsPtr[i] = ((bufferBaseAddr + aBufferOffset) + (aByteNumber * i));
  }
  result = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber);
  memoryFree(outputRowsPtr);
@@ -992,7 +994,7 @@
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(12, _return_value);
+ interpreterProxy->popthenPush(13, _return_value);
  return null;
 }
 
@@ -1008,15 +1010,14 @@
  int color_model,
  int stream) */
 
-EXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void) {
- unsigned char *bufferBaseAddr;
+EXPORT(sqInt) primitiveMPEG3ReadFrame(void) {
+ unsigned char * bufferBaseAddr;
  sqInt result;
  sqInt i;
- unsigned char  ** outputRowsPtr;
- mpeg3_t * file;
+ unsigned char  **  outputRowsPtr;
+ mpeg3_t *  file;
  sqInt fileHandle;
  usqInt *aBuffer;
- sqInt aBufferOffset;
  sqInt xNumber;
  sqInt yNumber;
  sqInt width;
@@ -1028,10 +1029,9 @@
  sqInt aByteNumber;
  sqInt _return_value;
 
- fileHandle = interpreterProxy->stackValue(11);
- interpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(10)));
- aBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(10))));
- aBufferOffset = interpreterProxy->stackIntegerValue(9);
+ fileHandle = interpreterProxy->stackValue(10);
+ interpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(9)));
+ aBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));
  xNumber = interpreterProxy->stackIntegerValue(8);
  yNumber = interpreterProxy->stackIntegerValue(7);
  width = interpreterProxy->stackIntegerValue(6);
@@ -1049,7 +1049,7 @@
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(13, 0);
+ interpreterProxy->popthenPush(12, 0);
  return null;
  }
  if (aNumber < 0) {
@@ -1061,13 +1061,13 @@
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(13, 0);
+ interpreterProxy->popthenPush(12, 0);
  return null;
  }
  bufferBaseAddr = ((unsigned char *) aBuffer);
  outputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight);
  for (i = 0; i <= (outHeight - 1); i += 1) {
- outputRowsPtr[i] = ((bufferBaseAddr + aBufferOffset) + (aByteNumber * i));
+ outputRowsPtr[i] = (bufferBaseAddr + (aByteNumber * i));
  }
  result = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber);
  memoryFree(outputRowsPtr);
@@ -1075,7 +1075,7 @@
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(13, _return_value);
+ interpreterProxy->popthenPush(12, _return_value);
  return null;
 }
 
@@ -1571,43 +1571,43 @@
 
 
 void* Mpeg3Plugin_exports[][3] = {
- {"Mpeg3Plugin", "primitiveMPEG3ReadAudio", (void*)primitiveMPEG3ReadAudio},
- {"Mpeg3Plugin", "primitiveMPEG3PreviousFrame", (void*)primitiveMPEG3PreviousFrame},
+ {"Mpeg3Plugin", "primitiveMPEG3EndOfAudio", (void*)primitiveMPEG3EndOfAudio},
+ {"Mpeg3Plugin", "primitiveMPEG3EndOfVideo", (void*)primitiveMPEG3EndOfVideo},
+ {"Mpeg3Plugin", "primitiveMPEG3GenerateToc", (void*)primitiveMPEG3GenerateToc},
  {"Mpeg3Plugin", "shutdownModule", (void*)shutdownModule},
- {"Mpeg3Plugin", "primitiveMPEG3GetFrame", (void*)primitiveMPEG3GetFrame},
- {"Mpeg3Plugin", "primitiveMPEG3ReReadAudio", (void*)primitiveMPEG3ReReadAudio},
  {"Mpeg3Plugin", "setInterpreter", (void*)setInterpreter},
- {"Mpeg3Plugin", "primitiveMPEG3DropFrames", (void*)primitiveMPEG3DropFrames},
- {"Mpeg3Plugin", "primitiveMPEG3CheckSig", (void*)primitiveMPEG3CheckSig},
+ {"Mpeg3Plugin", "primitiveMPEG3TotalAStreams", (void*)primitiveMPEG3TotalAStreams},
+ {"Mpeg3Plugin", "primitiveMPEG3SetMmx", (void*)primitiveMPEG3SetMmx},
  {"Mpeg3Plugin", "primitiveMPEG3ReadFrame", (void*)primitiveMPEG3ReadFrame},
- {"Mpeg3Plugin", "primitiveMPEG3TotalVStreams", (void*)primitiveMPEG3TotalVStreams},
- {"Mpeg3Plugin", "primitiveMPEG3VideoFrames", (void*)primitiveMPEG3VideoFrames},
- {"Mpeg3Plugin", "primitiveMPEG3HasAudio", (void*)primitiveMPEG3HasAudio},
- {"Mpeg3Plugin", "primitiveMPEG3EndOfVideo", (void*)primitiveMPEG3EndOfVideo},
- {"Mpeg3Plugin", "primitiveMPEG3VideoWidth", (void*)primitiveMPEG3VideoWidth},
+ {"Mpeg3Plugin", "primitiveMPEG3SeekPercentage", (void*)primitiveMPEG3SeekPercentage},
+ {"Mpeg3Plugin", "primitiveMPEG3ReReadAudio", (void*)primitiveMPEG3ReReadAudio},
+ {"Mpeg3Plugin", "primitiveMPEG3SetCpus", (void*)primitiveMPEG3SetCpus},
  {"Mpeg3Plugin", "initialiseModule", (void*)initialiseModule},
  {"Mpeg3Plugin", "primitiveMPEG3AudioChannels", (void*)primitiveMPEG3AudioChannels},
- {"Mpeg3Plugin", "primitiveMPEG3SetSample", (void*)primitiveMPEG3SetSample},
- {"Mpeg3Plugin", "primitiveMPEG3SetFrame", (void*)primitiveMPEG3SetFrame},
+ {"Mpeg3Plugin", "primitiveMPEG3HasVideo", (void*)primitiveMPEG3HasVideo},
  {"Mpeg3Plugin", "primitiveMPEG3VideoHeight", (void*)primitiveMPEG3VideoHeight},
- {"Mpeg3Plugin", "primitiveMPEG3SetMmx", (void*)primitiveMPEG3SetMmx},
- {"Mpeg3Plugin", "primitiveMPEG3FrameRate", (void*)primitiveMPEG3FrameRate},
- {"Mpeg3Plugin", "primitiveMPEG3Open", (void*)primitiveMPEG3Open},
+ {"Mpeg3Plugin", "primitiveMPEG3HasAudio", (void*)primitiveMPEG3HasAudio},
+ {"Mpeg3Plugin", "primitiveMPEG3SampleRate", (void*)primitiveMPEG3SampleRate},
+ {"Mpeg3Plugin", "primitiveMPEG3DropFrames", (void*)primitiveMPEG3DropFrames},
+ {"Mpeg3Plugin", "primitiveMPEG3AudioSamples", (void*)primitiveMPEG3AudioSamples},
+ {"Mpeg3Plugin", "primitiveMPEG3VideoWidth", (void*)primitiveMPEG3VideoWidth},
  {"Mpeg3Plugin", "getModuleName", (void*)getModuleName},
- {"Mpeg3Plugin", "primitiveMPEG3SampleRate", (void*)primitiveMPEG3SampleRate},
- {"Mpeg3Plugin", "primitiveMPEG3SetCpus", (void*)primitiveMPEG3SetCpus},
+ {"Mpeg3Plugin", "primitiveMPEG3ReadFrameBufferOffset", (void*)primitiveMPEG3ReadFrameBufferOffset},
  {"Mpeg3Plugin", "primitiveMPEG3Close", (void*)primitiveMPEG3Close},
- {"Mpeg3Plugin", "primitiveMPEG3HasVideo", (void*)primitiveMPEG3HasVideo},
- {"Mpeg3Plugin", "primitiveMPEG3ReadFrameBufferOffset", (void*)primitiveMPEG3ReadFrameBufferOffset},
+ {"Mpeg3Plugin", "primitiveMPEG3GetFrame", (void*)primitiveMPEG3GetFrame},
  {"Mpeg3Plugin", "primitiveMPEG3OpenABuffer", (void*)primitiveMPEG3OpenABuffer},
- {"Mpeg3Plugin", "primitiveMPEG3AudioSamples", (void*)primitiveMPEG3AudioSamples},
  {"Mpeg3Plugin", "primitiveMPEG3TellPercentage", (void*)primitiveMPEG3TellPercentage},
+ {"Mpeg3Plugin", "primitiveMPEG3VideoFrames", (void*)primitiveMPEG3VideoFrames},
+ {"Mpeg3Plugin", "primitiveMPEG3CheckSig", (void*)primitiveMPEG3CheckSig},
+ {"Mpeg3Plugin", "primitiveMPEG3SetFrame", (void*)primitiveMPEG3SetFrame},
+ {"Mpeg3Plugin", "primitiveMPEG3GetTime", (void*)primitiveMPEG3GetTime},
+ {"Mpeg3Plugin", "primitiveMPEG3ReadAudio", (void*)primitiveMPEG3ReadAudio},
+ {"Mpeg3Plugin", "primitiveMPEG3TotalVStreams", (void*)primitiveMPEG3TotalVStreams},
+ {"Mpeg3Plugin", "primitiveMPEG3PreviousFrame", (void*)primitiveMPEG3PreviousFrame},
+ {"Mpeg3Plugin", "primitiveMPEG3Open", (void*)primitiveMPEG3Open},
  {"Mpeg3Plugin", "primitiveMPEG3GetSample", (void*)primitiveMPEG3GetSample},
- {"Mpeg3Plugin", "primitiveMPEG3GenerateToc", (void*)primitiveMPEG3GenerateToc},
- {"Mpeg3Plugin", "primitiveMPEG3EndOfAudio", (void*)primitiveMPEG3EndOfAudio},
- {"Mpeg3Plugin", "primitiveMPEG3GetTime", (void*)primitiveMPEG3GetTime},
- {"Mpeg3Plugin", "primitiveMPEG3SeekPercentage", (void*)primitiveMPEG3SeekPercentage},
- {"Mpeg3Plugin", "primitiveMPEG3TotalAStreams", (void*)primitiveMPEG3TotalAStreams},
+ {"Mpeg3Plugin", "primitiveMPEG3FrameRate", (void*)primitiveMPEG3FrameRate},
+ {"Mpeg3Plugin", "primitiveMPEG3SetSample", (void*)primitiveMPEG3SetSample},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/OggPlugin/OggPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/OggPlugin/OggPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/OggPlugin/OggPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:44 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:17 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -72,9 +72,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "OggPlugin 10 November 2008 (i)"
+ "OggPlugin 26 August 2009 (i)"
 #else
- "OggPlugin 10 November 2008 (e)"
+ "OggPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -501,26 +501,26 @@
 
 
 void* OggPlugin_exports[][3] = {
- {"OggPlugin", "primitiveWriteEOS", (void*)primitiveWriteEOS},
- {"OggPlugin", "primitiveGetCommentSize", (void*)primitiveGetCommentSize},
- {"OggPlugin", "primitivePacketFlush", (void*)primitivePacketFlush},
+ {"OggPlugin", "primitiveSetChannels", (void*)primitiveSetChannels},
  {"OggPlugin", "setInterpreter", (void*)setInterpreter},
+ {"OggPlugin", "primitiveVersion", (void*)primitiveVersion},
+ {"OggPlugin", "primitiveGetComment", (void*)primitiveGetComment},
  {"OggPlugin", "primitiveClose", (void*)primitiveClose},
- {"OggPlugin", "primitiveVersion", (void*)primitiveVersion},
  {"OggPlugin", "getModuleName", (void*)getModuleName},
- {"OggPlugin", "primitiveGetVendor", (void*)primitiveGetVendor},
+ {"OggPlugin", "primitiveGetCommentSize", (void*)primitiveGetCommentSize},
+ {"OggPlugin", "primitivePacketFlush", (void*)primitivePacketFlush},
+ {"OggPlugin", "primitiveGetChannels", (void*)primitiveGetChannels},
+ {"OggPlugin", "primitiveExtractMono", (void*)primitiveExtractMono},
  {"OggPlugin", "primitiveSetQuality", (void*)primitiveSetQuality},
+ {"OggPlugin", "primitiveGetState", (void*)primitiveGetState},
  {"OggPlugin", "primitiveReadSize", (void*)primitiveReadSize},
- {"OggPlugin", "primitiveExtractMono", (void*)primitiveExtractMono},
- {"OggPlugin", "primitiveGetChannels", (void*)primitiveGetChannels},
  {"OggPlugin", "primitiveOpen", (void*)primitiveOpen},
- {"OggPlugin", "primitiveSetChannels", (void*)primitiveSetChannels},
+ {"OggPlugin", "primitiveWriteEOS", (void*)primitiveWriteEOS},
  {"OggPlugin", "primitiveWrite", (void*)primitiveWrite},
  {"OggPlugin", "primitiveRead", (void*)primitiveRead},
- {"OggPlugin", "primitiveGetComment", (void*)primitiveGetComment},
+ {"OggPlugin", "primitiveGetVendor", (void*)primitiveGetVendor},
+ {"OggPlugin", "primitiveGetRate", (void*)primitiveGetRate},
  {"OggPlugin", "primitiveSetRate", (void*)primitiveSetRate},
- {"OggPlugin", "primitiveGetRate", (void*)primitiveGetRate},
- {"OggPlugin", "primitiveGetState", (void*)primitiveGetState},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/PseudoTTYPlugin/PseudoTTYPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/PseudoTTYPlugin/PseudoTTYPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/PseudoTTYPlugin/PseudoTTYPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:44 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:18 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -61,9 +61,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "PseudoTTYPlugin 10 November 2008 (i)"
+ "PseudoTTYPlugin 26 August 2009 (i)"
 #else
- "PseudoTTYPlugin 10 November 2008 (e)"
+ "PseudoTTYPlugin 26 August 2009 (e)"
 #endif
 ;
 static sqInt sCOAFfn;
@@ -224,13 +224,13 @@
 
 
 void* PseudoTTYPlugin_exports[][3] = {
- {"PseudoTTYPlugin", "primPtyWindowSize", (void*)primPtyWindowSize},
  {"PseudoTTYPlugin", "getModuleName", (void*)getModuleName},
  {"PseudoTTYPlugin", "shutdownModule", (void*)shutdownModule},
+ {"PseudoTTYPlugin", "primPtyClose", (void*)primPtyClose},
  {"PseudoTTYPlugin", "initialiseModule", (void*)initialiseModule},
+ {"PseudoTTYPlugin", "primPtyForkAndExec", (void*)primPtyForkAndExec},
  {"PseudoTTYPlugin", "setInterpreter", (void*)setInterpreter},
- {"PseudoTTYPlugin", "primPtyClose", (void*)primPtyClose},
- {"PseudoTTYPlugin", "primPtyForkAndExec", (void*)primPtyForkAndExec},
+ {"PseudoTTYPlugin", "primPtyWindowSize", (void*)primPtyWindowSize},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/RomePlugin/RomePlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/RomePlugin/RomePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/RomePlugin/RomePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:46 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:22 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -66,7 +66,7 @@
 #define FormHeightIndex 2
 #define FormInstSize 5
 #define FormWidthIndex 1
-#define PluginVersion 37
+#define PluginVersion 38
 #define TextLineBottomIndex 3
 #define TextLineEndIndex 5
 #define TextLineInternalSpaceIndex 6
@@ -111,9 +111,12 @@
 static sqInt msg(char * s);
 static void polyPathfrom(cairo_t* context, sqInt pointsOop);
 #pragma export on
+EXPORT(sqInt) primitivePangoBlockAtIndex(void);
 EXPORT(sqInt) primitiveClear(void);
 EXPORT(sqInt) primitiveClipRectangleLeftRightTopBottom(void);
 EXPORT(sqInt) primitiveClose(void);
+EXPORT(sqInt) primitivePangoComposeString(void);
+EXPORT(sqInt) primitivePangoComposeString2(void);
 EXPORT(sqInt) primitiveCreateFormHandle(void);
 EXPORT(sqInt) primitiveDestroyFormHandle(void);
 EXPORT(sqInt) primitiveDrawArcRadiusXYFromTo(void);
@@ -135,16 +138,12 @@
 EXPORT(sqInt) primitiveFontFace(void);
 EXPORT(sqInt) primitiveFontSize(void);
 EXPORT(sqInt) primitiveGetLineWidth(void);
+EXPORT(sqInt) primitivePangoFontDescriptionIndex(void);
 EXPORT(sqInt) primitiveGetTransform(void);
+EXPORT(sqInt) primitivePangoIndexAtPoint(void);
 EXPORT(sqInt) primitiveLanguageAttributes(void);
 EXPORT(sqInt) primitiveOpen(void);
-EXPORT(sqInt) primitivePangoBlockAtIndex(void);
-EXPORT(sqInt) primitivePangoComposeString(void);
-EXPORT(sqInt) primitivePangoComposeString2(void);
-EXPORT(sqInt) primitivePangoFontDescriptionIndex(void);
-EXPORT(sqInt) primitivePangoIndexAtPoint(void);
 EXPORT(sqInt) primitivePangoIsAvailable(void);
-EXPORT(sqInt) primitivePangoShowString(void);
 EXPORT(sqInt) primitivePluginVersion(void);
 EXPORT(sqInt) primitiveRestoreState(void);
 EXPORT(sqInt) primitiveRotateBy(void);
@@ -152,6 +151,7 @@
 EXPORT(sqInt) primitiveScaleBy(void);
 EXPORT(sqInt) primitiveSetLineWidth(void);
 EXPORT(sqInt) primitiveSetTransform(void);
+EXPORT(sqInt) primitivePangoShowString(void);
 EXPORT(sqInt) primitiveShowZeroTerminatedUtf8StringXY(void);
 EXPORT(sqInt) primitiveStencilImageSrcLRTBDestLRTB(void);
 EXPORT(sqInt) primitiveTransformBy(void);
@@ -192,9 +192,9 @@
 static sqInt maxSurfaceID;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "RomePlugin pango_yo.37 10 November 2008 (i)"
+ "RomePlugin pango_yo.38 26 August 2009 (i)"
 #else
- "RomePlugin pango_yo.37 10 November 2008 (e)"
+ "RomePlugin pango_yo.38 26 August 2009 (e)"
 #endif
 ;
 static fn_ioRegisterSurface registerSurfaceFn;
@@ -826,6 +826,105 @@
  }
 }
 
+EXPORT(sqInt) primitivePangoBlockAtIndex(void) {
+ sqInt atEnd;
+ sqInt index;
+ PangoRectangle pos;
+ unsigned char* aString;
+ sqInt aStringOop;
+ sqInt trailing;
+ sqInt origin;
+ sqInt corner;
+ sqInt canvasOop;
+ cairo_t* context;
+ PangoAttrList* attrList;
+ sqInt charData;
+ sqInt stringLength;
+ PangoLayout* layout;
+ sqInt inStringOop;
+ sqInt utf8Index;
+ sqInt x;
+ sqInt y;
+ sqInt sqAttrArray;
+ sqInt w;
+ sqInt h;
+ sqInt withWrap;
+ sqInt cData;
+ sqInt _return_value;
+
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(8), "Object"));
+ inStringOop = interpreterProxy->stackValue(8);
+ utf8Index = interpreterProxy->stackIntegerValue(7);
+ x = interpreterProxy->stackIntegerValue(6);
+ y = interpreterProxy->stackIntegerValue(5);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), "Object"));
+ sqAttrArray = interpreterProxy->stackValue(4);
+ w = interpreterProxy->stackIntegerValue(3);
+ h = interpreterProxy->stackIntegerValue(2);
+ withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
+ cData = interpreterProxy->stackValue(0);
+ ;
+ canvasOop = interpreterProxy->stackValue(9);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ context = contextFrom(canvasOop);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ aStringOop = inStringOop;
+ aString = interpreterProxy->firstIndexableField(aStringOop);
+ layout = pango_cairo_create_layout(context);
+ attrList = pango_attr_list_new();
+ translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
+ pango_layout_set_text(layout, aString, strlen(aString));
+ pango_layout_set_attributes(layout, attrList);
+ pango_layout_set_width(layout, w * (PANGO_SCALE));
+ if (withWrap) {
+ pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
+ }
+ cairo_translate(context, x, y);
+ pango_cairo_update_layout(context, layout);
+ stringLength = strlen(aString);
+ if (utf8Index == (stringLength + 1)) {
+ atEnd = 1;
+ pango_layout_index_to_pos(layout, ((((((utf8Index - 1) < 0) ? 0 : (utf8Index - 1))) < stringLength) ? ((((utf8Index - 1) < 0) ? 0 : (utf8Index - 1))) : stringLength), &pos);
+ pos.x = pos.x + pos.width;
+ } else {
+ atEnd = 0;
+ pango_layout_index_to_pos(layout, (((((utf8Index < 0) ? 0 : utf8Index)) < stringLength) ? (((utf8Index < 0) ? 0 : utf8Index)) : stringLength), &pos);
+ }
+ pango_attr_list_unref(attrList);
+ g_object_unref(layout);
+ if (cairo_status(context)) {
+ failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
+ return null;
+ }
+ interpreterProxy->pushRemappableOop(aStringOop);
+ interpreterProxy->pushRemappableOop(cData);
+ origin = interpreterProxy->makePointwithxValueyValue((PANGO_PIXELS(pos.x)) + x, (PANGO_PIXELS(pos.y)) + y);
+ interpreterProxy->pushRemappableOop(origin);
+ corner = interpreterProxy->makePointwithxValueyValue((PANGO_PIXELS(pos.x+pos.width)) + x, (PANGO_PIXELS(pos.y+pos.height)) + y);
+ origin = interpreterProxy->popRemappableOop();
+ charData = interpreterProxy->popRemappableOop();
+ aStringOop = interpreterProxy->popRemappableOop();
+ aString = interpreterProxy->firstIndexableField(aStringOop);
+ interpreterProxy->storePointerofObjectwithValue(0, charData, origin);
+ interpreterProxy->storePointerofObjectwithValue(1, charData, corner);
+ index = sqCharCountInfromto(aString, 0, utf8Index);
+ if (!(atEnd)) {
+ index += 1;
+ }
+ interpreterProxy->storePointerofObjectwithValue(2, charData, ((index << 1) | 1));
+ _return_value = interpreterProxy->integerObjectOf(index);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(10, _return_value);
+ return null;
+}
+
 EXPORT(sqInt) primitiveClear(void) {
  sqInt canvasOop;
  cairo_t* context;
@@ -915,6 +1014,269 @@
  return null;
 }
 
+EXPORT(sqInt) primitivePangoComposeString(void) {
+ sqInt linesSize;
+ sqInt lineIndex;
+ sqInt baseline;
+ sqInt next;
+ PangoRectangle ink;
+ PangoRectangle logical;
+ sqInt lastLine;
+ sqInt lineCount;
+ sqInt sqStart;
+ sqInt prevBaseline;
+ PangoLayoutLine* line;
+ sqInt newW;
+ sqInt sqEnd;
+ sqInt start;
+ sqInt canvasOop;
+ cairo_t* context;
+ PangoLayoutIter* lineIter;
+ sqInt totalY;
+ PangoAttrList* attrList;
+ sqInt addition;
+ PangoLayout* layout;
+ char *aString;
+ sqInt x;
+ sqInt y;
+ sqInt sqAttrArray;
+ sqInt w;
+ sqInt h;
+ sqInt withWrap;
+ sqInt lines;
+ sqInt _return_value;
+
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(7)));
+ aString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(7))));
+ x = interpreterProxy->stackIntegerValue(6);
+ y = interpreterProxy->stackIntegerValue(5);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), "Object"));
+ sqAttrArray = interpreterProxy->stackValue(4);
+ w = interpreterProxy->stackIntegerValue(3);
+ h = interpreterProxy->stackIntegerValue(2);
+ withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
+ lines = interpreterProxy->stackValue(0);
+ ;
+ canvasOop = interpreterProxy->stackValue(8);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ context = contextFrom(canvasOop);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ layout = pango_cairo_create_layout(context);
+ attrList = pango_attr_list_new();
+ translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
+ pango_layout_set_text(layout, aString, strlen(aString));
+ pango_layout_set_attributes(layout, attrList);
+ pango_layout_set_width(layout, w * (PANGO_SCALE));
+ if (withWrap) {
+ pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
+ }
+ cairo_translate(context, x, y);
+ pango_cairo_update_layout(context, layout);
+ lineCount = pango_layout_get_line_count(layout);
+ lineIter = pango_layout_get_iter(layout);
+ baseline = pango_layout_iter_get_baseline(lineIter);
+ prevBaseline = 0;
+ cairo_translate(context, 0, PANGO_PIXELS(baseline));
+ sqEnd = 0;
+ totalY = 0;
+ linesSize = interpreterProxy->stSizeOf(lines);
+ lastLine = (((lineCount < linesSize) ? lineCount : linesSize)) - 1;
+ for (lineIndex = 0; lineIndex <= lastLine; lineIndex += 1) {
+ line = pango_layout_iter_get_line_readonly(lineIter);
+ pango_layout_line_get_extents(line, &ink, &logical);
+ sqStart = sqEnd + 1;
+ start = line->start_index;
+
+ /* self log: 'sqStart, sqEnd: %d %d' with: sqStart with: sqEnd. */
+
+ sqEnd = (sqStart + (sqCharCountInfromto(aString, start, start + (line->length)))) - 1;
+ if (((start + (line->length)) < (interpreterProxy->stSizeOf(((int) aString)))) && ((aString[start + (line->length)]) == 13)) {
+ sqEnd += 1;
+ }
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineStartIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), sqStart);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineEndIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), sqEnd);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineLeftIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), (PANGO_PIXELS(logical.x)) + x);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineRightIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), (PANGO_PIXELS(logical.x+logical.width)) + x);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineTopIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), totalY + y);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineInternalSpaceIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), ((0 << 1) | 1));
+ interpreterProxy->storeIntegerofObjectwithValue(TextLinePaddingWidthIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), ((0 << 1) | 1));
+ next = pango_layout_iter_next_line(lineIter);
+ if (next) {
+ addition = (logical.height) + (pango_layout_get_spacing(layout));
+ } else {
+ addition = logical.height;
+ }
+ totalY += PANGO_PIXELS(addition);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineBottomIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), totalY + y);
+ }
+ pango_layout_get_extents(layout, &ink, &logical);
+ newW = PANGO_PIXELS(logical.width);
+ pango_layout_iter_free(lineIter);
+ pango_attr_list_unref(attrList);
+ g_object_unref(layout);
+ if (cairo_status(context)) {
+ failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
+ return null;
+ }
+ _return_value = interpreterProxy->integerObjectOf(newW);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(9, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitivePangoComposeString2(void) {
+ sqInt baseline;
+ sqInt lastLine;
+ sqInt prevBaseline;
+ unsigned char* aString;
+ PangoLayoutLine* line;
+ sqInt sqEnd;
+ sqInt start;
+ cairo_t* context;
+ sqInt totalY;
+ PangoLayoutIter* lineIter;
+ sqInt inStringSize;
+ sqInt textLineClass;
+ sqInt retArrayOop;
+ sqInt addition;
+ sqInt lineIndex;
+ sqInt textLine;
+ sqInt next;
+ PangoRectangle ink;
+ PangoRectangle logical;
+ sqInt i;
+ sqInt sqStart;
+ sqInt lineCount;
+ sqInt newW;
+ sqInt canvasOop;
+ sqInt arrayOop;
+ unsigned char* inString;
+ PangoAttrList* attrList;
+ PangoLayout* layout;
+ sqInt inStringOop;
+ sqInt x;
+ sqInt y;
+ sqInt sqAttrArray;
+ sqInt w;
+ sqInt h;
+ sqInt withWrap;
+ sqInt inTextLineClass;
+
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(7), "Object"));
+ inStringOop = interpreterProxy->stackValue(7);
+ x = interpreterProxy->stackIntegerValue(6);
+ y = interpreterProxy->stackIntegerValue(5);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), "Object"));
+ sqAttrArray = interpreterProxy->stackValue(4);
+ w = interpreterProxy->stackIntegerValue(3);
+ h = interpreterProxy->stackIntegerValue(2);
+ withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
+ inTextLineClass = interpreterProxy->stackValue(0);
+ ;
+ canvasOop = interpreterProxy->stackValue(8);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ context = contextFrom(canvasOop);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ inStringSize = interpreterProxy->stSizeOf(inStringOop);
+ if (inStringSize == 0) {
+ primitiveFail();
+ return null;
+ }
+ aString = alloca(inStringSize);
+ inString = interpreterProxy->firstIndexableField(inStringOop);
+ strncpy(aString, inString, inStringSize);
+ textLineClass = inTextLineClass;
+ layout = pango_cairo_create_layout(context);
+ attrList = pango_attr_list_new();
+ translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
+ pango_layout_set_text(layout, aString, strlen(aString));
+ pango_layout_set_attributes(layout, attrList);
+ pango_layout_set_width(layout, w * (PANGO_SCALE));
+ if (withWrap) {
+ pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
+ }
+ cairo_translate(context, x, y);
+ pango_cairo_update_layout(context, layout);
+ lineCount = pango_layout_get_line_count(layout);
+ lineIter = pango_layout_get_iter(layout);
+ baseline = pango_layout_iter_get_baseline(lineIter);
+ prevBaseline = 0;
+ cairo_translate(context, 0, PANGO_PIXELS(baseline));
+ sqEnd = 0;
+ totalY = 0;
+ interpreterProxy->pushRemappableOop(textLineClass);
+ arrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), lineCount);
+ textLineClass = interpreterProxy->popRemappableOop();
+ for (i = 0; i <= (lineCount - 1); i += 1) {
+ interpreterProxy->pushRemappableOop(textLineClass);
+ interpreterProxy->pushRemappableOop(arrayOop);
+ textLine = interpreterProxy->instantiateClassindexableSize(textLineClass, 0);
+ arrayOop = interpreterProxy->popRemappableOop();
+ textLineClass = interpreterProxy->popRemappableOop();
+ interpreterProxy->storePointerofObjectwithValue(i, arrayOop, textLine);
+ }
+ lastLine = lineCount - 1;
+ for (lineIndex = 0; lineIndex <= lastLine; lineIndex += 1) {
+ line = pango_layout_iter_get_line_readonly(lineIter);
+ pango_layout_line_get_extents(line, &ink, &logical);
+ sqStart = sqEnd + 1;
+ start = line->start_index;
+
+ /* self log: 'sqStart, sqEnd: %d %d' with: sqStart with: sqEnd. */
+
+ sqEnd = (sqStart + (sqCharCountInfromto(aString, start, start + (line->length)))) - 1;
+ if (((start + (line->length)) < (interpreterProxy->stSizeOf(((int) aString)))) && ((aString[start + (line->length)]) == 13)) {
+ sqEnd += 1;
+ }
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineStartIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), sqStart);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineEndIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), sqEnd);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineLeftIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), (PANGO_PIXELS(logical.x)) + x);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineRightIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), (PANGO_PIXELS(logical.x+logical.width)) + x);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineTopIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), totalY + y);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineInternalSpaceIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), ((0 << 1) | 1));
+ interpreterProxy->storeIntegerofObjectwithValue(TextLinePaddingWidthIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), ((0 << 1) | 1));
+ next = pango_layout_iter_next_line(lineIter);
+ if (next) {
+ addition = (logical.height) + (pango_layout_get_spacing(layout));
+ } else {
+ addition = logical.height;
+ }
+ totalY += PANGO_PIXELS(addition);
+ interpreterProxy->storeIntegerofObjectwithValue(TextLineBottomIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), totalY + y);
+ }
+ pango_layout_get_extents(layout, &ink, &logical);
+ newW = PANGO_PIXELS(logical.width);
+ pango_layout_iter_free(lineIter);
+ pango_attr_list_unref(attrList);
+ g_object_unref(layout);
+ if (cairo_status(context)) {
+ failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
+ return null;
+ }
+ interpreterProxy->pushRemappableOop(arrayOop);
+ retArrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);
+ arrayOop = interpreterProxy->popRemappableOop();
+ interpreterProxy->storeIntegerofObjectwithValue(0, retArrayOop, newW);
+ interpreterProxy->storePointerofObjectwithValue(1, retArrayOop, arrayOop);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(9, retArrayOop);
+ return null;
+}
+
 EXPORT(sqInt) primitiveCreateFormHandle(void) {
  sqInt formOop;
  sqInt surfaceID;
@@ -1778,542 +2140,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveGetTransform(void) {
- sqInt canvasOop;
- cairo_t* context;
- cairo_matrix_t m;
- float *aTransform;
-
- aTransform = ((float *) (interpreterProxy->arrayValueOf(interpreterProxy->stackValue(0))));
- canvasOop = interpreterProxy->stackValue(1);
- if (interpreterProxy->failed()) {
- return null;
- }
- context = contextFrom(canvasOop);
- if (interpreterProxy->failed()) {
- return null;
- }
- cairo_get_matrix(context, &m);
- aTransform[0] = (m.xx);
- aTransform[1] = (m.xy);
- aTransform[2] = (m.x0);
- aTransform[3] = (m.yx);
- aTransform[4] = (m.yy);
- aTransform[5] = (m.y0);
- if (cairo_status(context)) {
- failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
- return null;
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
-}
-
-EXPORT(sqInt) primitiveLanguageAttributes(void) {
- int * array4;
- sqInt currentTag;
- sqInt arrayIndex;
- sqInt i;
- sqInt currentStart;
- sqInt array4Oop;
- unsigned int * string;
- sqInt ws;
- sqInt stringOop;
- sqInt currentEnd;
- int * array;
- sqInt arrayOop;
- sqInt arraySize;
- sqInt stringSize;
- sqInt lOop;
- sqInt leadingChar;
- sqInt oStringOop;
- sqInt oLOop;
- sqInt oArrayOop;
- sqInt _return_value;
-
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), "Object"));
- oStringOop = interpreterProxy->stackValue(2);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), "Object"));
- oLOop = interpreterProxy->stackValue(1);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
- oArrayOop = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- lOop = oLOop;
- arrayOop = oArrayOop;
- stringOop = oStringOop;
- if (interpreterProxy->isBytes(stringOop)) {
- _return_value = interpreterProxy->integerObjectOf(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(4, _return_value);
- return null;
- }
- if (!(interpreterProxy->isWords(stringOop))) {
- primitiveFail();
- return null;
- }
- arraySize = interpreterProxy->stSizeOf(arrayOop);
- if (arraySize <= 0) {
- primitiveFail();
- return null;
- }
- stringSize = interpreterProxy->stSizeOf(stringOop);
- if (stringSize == 0) {
- _return_value = interpreterProxy->integerObjectOf(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(4, _return_value);
- return null;
- }
- string = interpreterProxy->firstIndexableField(stringOop);
- array = interpreterProxy->firstIndexableField(arrayOop);
- ws = string[0];
- currentTag = leadingCharOf(ws);
- leadingChar = -1;
- currentStart = 0;
- currentEnd = utf8CountFor(ws);
- arrayIndex = 0;
- for (i = 1; i <= (stringSize - 1); i += 1) {
- ws = string[i];
- leadingChar = leadingCharOf(ws);
- if (leadingChar != currentTag) {
- interpreterProxy->pushRemappableOop(stringOop);
- interpreterProxy->pushRemappableOop(arrayOop);
- interpreterProxy->pushRemappableOop(lOop);
- array4Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);
- lOop = interpreterProxy->popRemappableOop();
- arrayOop = interpreterProxy->popRemappableOop();
- stringOop = interpreterProxy->popRemappableOop();
- array = interpreterProxy->firstIndexableField(arrayOop);
- string = interpreterProxy->firstIndexableField(stringOop);
- array4 = interpreterProxy->firstIndexableField(array4Oop);
- array4[0] = lOop;
- array4[1] = (((currentStart << 1) | 1));
- array4[2] = (((currentEnd << 1) | 1));
- array4[3] = (((currentTag << 1) | 1));
- array[arrayIndex] = array4Oop;
- arrayIndex += 1;
- if (arrayIndex >= arraySize) {
- primitiveFail();
- return null;
- }
- currentTag = leadingChar;
- currentStart = currentEnd;
- }
- currentEnd += utf8CountFor(ws);
- }
- interpreterProxy->pushRemappableOop(stringOop);
- interpreterProxy->pushRemappableOop(arrayOop);
- interpreterProxy->pushRemappableOop(lOop);
- array4Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);
- lOop = interpreterProxy->popRemappableOop();
- arrayOop = interpreterProxy->popRemappableOop();
- stringOop = interpreterProxy->popRemappableOop();
- interpreterProxy->storePointerofObjectwithValue(0, array4Oop, lOop);
- interpreterProxy->storeIntegerofObjectwithValue(1, array4Oop, currentStart);
- interpreterProxy->storeIntegerofObjectwithValue(2, array4Oop, currentEnd);
- interpreterProxy->storeIntegerofObjectwithValue(3, array4Oop, currentTag);
- interpreterProxy->storePointerofObjectwithValue(arrayIndex, arrayOop, array4Oop);
- arrayIndex += 1;
- _return_value = interpreterProxy->integerObjectOf(arrayIndex);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(4, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitiveOpen(void) {
- sqInt handleOop;
- sqInt contextIndex;
- sqInt canvasOop;
-
- canvasOop = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- contextIndex = createContextFor(canvasOop);
- if (!(interpreterProxy->failed())) {
- handleOop = interpreterProxy->integerObjectOf(contextIndex);
- interpreterProxy->storePointerofObjectwithValue(CanvasHandleIndex, canvasOop, handleOop);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- return null;
-}
-
-EXPORT(sqInt) primitivePangoBlockAtIndex(void) {
- sqInt atEnd;
- sqInt index;
- PangoRectangle pos;
- unsigned char* aString;
- sqInt aStringOop;
- sqInt trailing;
- sqInt origin;
- sqInt corner;
- sqInt canvasOop;
- cairo_t* context;
- PangoAttrList* attrList;
- sqInt charData;
- sqInt stringLength;
- PangoLayout* layout;
- sqInt inStringOop;
- sqInt utf8Index;
- sqInt x;
- sqInt y;
- sqInt sqAttrArray;
- sqInt w;
- sqInt h;
- sqInt withWrap;
- sqInt cData;
- sqInt _return_value;
-
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(8), "Object"));
- inStringOop = interpreterProxy->stackValue(8);
- utf8Index = interpreterProxy->stackIntegerValue(7);
- x = interpreterProxy->stackIntegerValue(6);
- y = interpreterProxy->stackIntegerValue(5);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), "Object"));
- sqAttrArray = interpreterProxy->stackValue(4);
- w = interpreterProxy->stackIntegerValue(3);
- h = interpreterProxy->stackIntegerValue(2);
- withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
- cData = interpreterProxy->stackValue(0);
- ;
- canvasOop = interpreterProxy->stackValue(9);
- if (interpreterProxy->failed()) {
- return null;
- }
- context = contextFrom(canvasOop);
- if (interpreterProxy->failed()) {
- return null;
- }
- aStringOop = inStringOop;
- aString = interpreterProxy->firstIndexableField(aStringOop);
- layout = pango_cairo_create_layout(context);
- attrList = pango_attr_list_new();
- translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
- pango_layout_set_text(layout, aString, strlen(aString));
- pango_layout_set_attributes(layout, attrList);
- pango_layout_set_width(layout, w * (PANGO_SCALE));
- if (withWrap) {
- pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
- }
- cairo_translate(context, x, y);
- pango_cairo_update_layout(context, layout);
- stringLength = strlen(aString);
- if (utf8Index == (stringLength + 1)) {
- atEnd = 1;
- pango_layout_index_to_pos(layout, ((((((utf8Index - 1) < 0) ? 0 : (utf8Index - 1))) < stringLength) ? ((((utf8Index - 1) < 0) ? 0 : (utf8Index - 1))) : stringLength), &pos);
- pos.x = pos.x + pos.width;
- } else {
- atEnd = 0;
- pango_layout_index_to_pos(layout, (((((utf8Index < 0) ? 0 : utf8Index)) < stringLength) ? (((utf8Index < 0) ? 0 : utf8Index)) : stringLength), &pos);
- }
- pango_attr_list_unref(attrList);
- g_object_unref(layout);
- if (cairo_status(context)) {
- failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
- return null;
- }
- interpreterProxy->pushRemappableOop(aStringOop);
- interpreterProxy->pushRemappableOop(cData);
- origin = interpreterProxy->makePointwithxValueyValue((PANGO_PIXELS(pos.x)) + x, (PANGO_PIXELS(pos.y)) + y);
- interpreterProxy->pushRemappableOop(origin);
- corner = interpreterProxy->makePointwithxValueyValue((PANGO_PIXELS(pos.x+pos.width)) + x, (PANGO_PIXELS(pos.y+pos.height)) + y);
- origin = interpreterProxy->popRemappableOop();
- charData = interpreterProxy->popRemappableOop();
- aStringOop = interpreterProxy->popRemappableOop();
- aString = interpreterProxy->firstIndexableField(aStringOop);
- interpreterProxy->storePointerofObjectwithValue(0, charData, origin);
- interpreterProxy->storePointerofObjectwithValue(1, charData, corner);
- index = sqCharCountInfromto(aString, 0, utf8Index);
- if (!(atEnd)) {
- index += 1;
- }
- interpreterProxy->storePointerofObjectwithValue(2, charData, ((index << 1) | 1));
- _return_value = interpreterProxy->integerObjectOf(index);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(10, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitivePangoComposeString(void) {
- sqInt linesSize;
- sqInt lineIndex;
- sqInt baseline;
- sqInt next;
- PangoRectangle ink;
- PangoRectangle logical;
- sqInt lastLine;
- sqInt lineCount;
- sqInt sqStart;
- sqInt prevBaseline;
- PangoLayoutLine* line;
- sqInt newW;
- sqInt sqEnd;
- sqInt start;
- sqInt canvasOop;
- cairo_t* context;
- PangoLayoutIter* lineIter;
- sqInt totalY;
- PangoAttrList* attrList;
- sqInt addition;
- PangoLayout* layout;
- char *aString;
- sqInt x;
- sqInt y;
- sqInt sqAttrArray;
- sqInt w;
- sqInt h;
- sqInt withWrap;
- sqInt lines;
- sqInt _return_value;
-
- interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(7)));
- aString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(7))));
- x = interpreterProxy->stackIntegerValue(6);
- y = interpreterProxy->stackIntegerValue(5);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), "Object"));
- sqAttrArray = interpreterProxy->stackValue(4);
- w = interpreterProxy->stackIntegerValue(3);
- h = interpreterProxy->stackIntegerValue(2);
- withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
- lines = interpreterProxy->stackValue(0);
- ;
- canvasOop = interpreterProxy->stackValue(8);
- if (interpreterProxy->failed()) {
- return null;
- }
- context = contextFrom(canvasOop);
- if (interpreterProxy->failed()) {
- return null;
- }
- layout = pango_cairo_create_layout(context);
- attrList = pango_attr_list_new();
- translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
- pango_layout_set_text(layout, aString, strlen(aString));
- pango_layout_set_attributes(layout, attrList);
- pango_layout_set_width(layout, w * (PANGO_SCALE));
- if (withWrap) {
- pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
- }
- cairo_translate(context, x, y);
- pango_cairo_update_layout(context, layout);
- lineCount = pango_layout_get_line_count(layout);
- lineIter = pango_layout_get_iter(layout);
- baseline = pango_layout_iter_get_baseline(lineIter);
- prevBaseline = 0;
- cairo_translate(context, 0, PANGO_PIXELS(baseline));
- sqEnd = 0;
- totalY = 0;
- linesSize = interpreterProxy->stSizeOf(lines);
- lastLine = (((lineCount < linesSize) ? lineCount : linesSize)) - 1;
- for (lineIndex = 0; lineIndex <= lastLine; lineIndex += 1) {
- line = pango_layout_iter_get_line_readonly(lineIter);
- pango_layout_line_get_extents(line, &ink, &logical);
- sqStart = sqEnd + 1;
- start = line->start_index;
-
- /* self log: 'sqStart, sqEnd: %d %d' with: sqStart with: sqEnd. */
-
- sqEnd = (sqStart + (sqCharCountInfromto(aString, start, start + (line->length)))) - 1;
- if (((start + (line->length)) < (interpreterProxy->stSizeOf(((int) aString)))) && ((aString[start + (line->length)]) == 13)) {
- sqEnd += 1;
- }
- interpreterProxy->storeIntegerofObjectwithValue(TextLineStartIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), sqStart);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineEndIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), sqEnd);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineLeftIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), (PANGO_PIXELS(logical.x)) + x);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineRightIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), (PANGO_PIXELS(logical.x+logical.width)) + x);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineTopIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), totalY + y);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineInternalSpaceIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), ((0 << 1) | 1));
- interpreterProxy->storeIntegerofObjectwithValue(TextLinePaddingWidthIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), ((0 << 1) | 1));
- next = pango_layout_iter_next_line(lineIter);
- if (next) {
- addition = (logical.height) + (pango_layout_get_spacing(layout));
- } else {
- addition = logical.height;
- }
- totalY += PANGO_PIXELS(addition);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineBottomIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), totalY + y);
- }
- pango_layout_get_extents(layout, &ink, &logical);
- newW = PANGO_PIXELS(logical.width);
- pango_layout_iter_free(lineIter);
- pango_attr_list_unref(attrList);
- g_object_unref(layout);
- if (cairo_status(context)) {
- failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
- return null;
- }
- _return_value = interpreterProxy->integerObjectOf(newW);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(9, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitivePangoComposeString2(void) {
- sqInt baseline;
- sqInt lastLine;
- sqInt prevBaseline;
- unsigned char* aString;
- PangoLayoutLine* line;
- sqInt sqEnd;
- sqInt start;
- cairo_t* context;
- sqInt totalY;
- PangoLayoutIter* lineIter;
- sqInt inStringSize;
- sqInt textLineClass;
- sqInt retArrayOop;
- sqInt addition;
- sqInt lineIndex;
- sqInt textLine;
- sqInt next;
- PangoRectangle ink;
- PangoRectangle logical;
- sqInt i;
- sqInt sqStart;
- sqInt lineCount;
- sqInt newW;
- sqInt canvasOop;
- sqInt arrayOop;
- unsigned char* inString;
- PangoAttrList* attrList;
- PangoLayout* layout;
- sqInt inStringOop;
- sqInt x;
- sqInt y;
- sqInt sqAttrArray;
- sqInt w;
- sqInt h;
- sqInt withWrap;
- sqInt inTextLineClass;
-
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(7), "Object"));
- inStringOop = interpreterProxy->stackValue(7);
- x = interpreterProxy->stackIntegerValue(6);
- y = interpreterProxy->stackIntegerValue(5);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), "Object"));
- sqAttrArray = interpreterProxy->stackValue(4);
- w = interpreterProxy->stackIntegerValue(3);
- h = interpreterProxy->stackIntegerValue(2);
- withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
- inTextLineClass = interpreterProxy->stackValue(0);
- ;
- canvasOop = interpreterProxy->stackValue(8);
- if (interpreterProxy->failed()) {
- return null;
- }
- context = contextFrom(canvasOop);
- if (interpreterProxy->failed()) {
- return null;
- }
- inStringSize = interpreterProxy->stSizeOf(inStringOop);
- if (inStringSize == 0) {
- primitiveFail();
- return null;
- }
- aString = alloca(inStringSize);
- inString = interpreterProxy->firstIndexableField(inStringOop);
- strncpy(aString, inString, inStringSize);
- textLineClass = inTextLineClass;
- layout = pango_cairo_create_layout(context);
- attrList = pango_attr_list_new();
- translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
- pango_layout_set_text(layout, aString, strlen(aString));
- pango_layout_set_attributes(layout, attrList);
- pango_layout_set_width(layout, w * (PANGO_SCALE));
- if (withWrap) {
- pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
- }
- cairo_translate(context, x, y);
- pango_cairo_update_layout(context, layout);
- lineCount = pango_layout_get_line_count(layout);
- lineIter = pango_layout_get_iter(layout);
- baseline = pango_layout_iter_get_baseline(lineIter);
- prevBaseline = 0;
- cairo_translate(context, 0, PANGO_PIXELS(baseline));
- sqEnd = 0;
- totalY = 0;
- interpreterProxy->pushRemappableOop(textLineClass);
- arrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), lineCount);
- textLineClass = interpreterProxy->popRemappableOop();
- for (i = 0; i <= (lineCount - 1); i += 1) {
- interpreterProxy->pushRemappableOop(textLineClass);
- interpreterProxy->pushRemappableOop(arrayOop);
- textLine = interpreterProxy->instantiateClassindexableSize(textLineClass, 0);
- arrayOop = interpreterProxy->popRemappableOop();
- textLineClass = interpreterProxy->popRemappableOop();
- interpreterProxy->storePointerofObjectwithValue(i, arrayOop, textLine);
- }
- lastLine = lineCount - 1;
- for (lineIndex = 0; lineIndex <= lastLine; lineIndex += 1) {
- line = pango_layout_iter_get_line_readonly(lineIter);
- pango_layout_line_get_extents(line, &ink, &logical);
- sqStart = sqEnd + 1;
- start = line->start_index;
-
- /* self log: 'sqStart, sqEnd: %d %d' with: sqStart with: sqEnd. */
-
- sqEnd = (sqStart + (sqCharCountInfromto(aString, start, start + (line->length)))) - 1;
- if (((start + (line->length)) < (interpreterProxy->stSizeOf(((int) aString)))) && ((aString[start + (line->length)]) == 13)) {
- sqEnd += 1;
- }
- interpreterProxy->storeIntegerofObjectwithValue(TextLineStartIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), sqStart);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineEndIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), sqEnd);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineLeftIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), (PANGO_PIXELS(logical.x)) + x);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineRightIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), (PANGO_PIXELS(logical.x+logical.width)) + x);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineTopIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), totalY + y);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineInternalSpaceIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), ((0 << 1) | 1));
- interpreterProxy->storeIntegerofObjectwithValue(TextLinePaddingWidthIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), ((0 << 1) | 1));
- next = pango_layout_iter_next_line(lineIter);
- if (next) {
- addition = (logical.height) + (pango_layout_get_spacing(layout));
- } else {
- addition = logical.height;
- }
- totalY += PANGO_PIXELS(addition);
- interpreterProxy->storeIntegerofObjectwithValue(TextLineBottomIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), totalY + y);
- }
- pango_layout_get_extents(layout, &ink, &logical);
- newW = PANGO_PIXELS(logical.width);
- pango_layout_iter_free(lineIter);
- pango_attr_list_unref(attrList);
- g_object_unref(layout);
- if (cairo_status(context)) {
- failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
- return null;
- }
- interpreterProxy->pushRemappableOop(arrayOop);
- retArrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);
- arrayOop = interpreterProxy->popRemappableOop();
- interpreterProxy->storeIntegerofObjectwithValue(0, retArrayOop, newW);
- interpreterProxy->storePointerofObjectwithValue(1, retArrayOop, arrayOop);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(9, retArrayOop);
- return null;
-}
-
 EXPORT(sqInt) primitivePangoFontDescriptionIndex(void) {
  sqInt newInd;
  char *familyName;
@@ -2410,6 +2236,39 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveGetTransform(void) {
+ sqInt canvasOop;
+ cairo_t* context;
+ cairo_matrix_t m;
+ float *aTransform;
+
+ aTransform = ((float *) (interpreterProxy->arrayValueOf(interpreterProxy->stackValue(0))));
+ canvasOop = interpreterProxy->stackValue(1);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ context = contextFrom(canvasOop);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ cairo_get_matrix(context, &m);
+ aTransform[0] = (m.xx);
+ aTransform[1] = (m.xy);
+ aTransform[2] = (m.x0);
+ aTransform[3] = (m.yx);
+ aTransform[4] = (m.yy);
+ aTransform[5] = (m.y0);
+ if (cairo_status(context)) {
+ failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
+ return null;
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(1);
+ return null;
+}
+
 EXPORT(sqInt) primitivePangoIndexAtPoint(void) {
  sqInt lineIndex;
  sqInt index;
@@ -2475,18 +2334,21 @@
  line = null;
  if (!(inside)) {
  pango_layout_index_to_line_x(layout, index, trailing, &lineIndex, &xPos);
- line = pango_layout_get_line_readonly(layout, (((lineIndex - 1) < 0) ? 0 : (lineIndex - 1)));
+
+ /* self log: 'lineIndex %x' with: line. */
+
+ line = pango_layout_get_line_readonly(layout, ((lineIndex < 0) ? 0 : lineIndex));
  if (line == null) {
  index = strlen(aString);
  } else {
  pango_layout_line_ref(line);
- if (xPos > 0) {
- index = line->start_index + line->length;
- if (trailing > 0) {
- trailing = 1;
- }
- } else {
- index = line->start_index;
+
+ /* self log: 'line->length %d' with: (self cCode: 'line->length'). */
+
+ index = line->start_index;
+ index += line->length;
+ if (trailing > 0) {
+ trailing = 1;
  }
  }
  }
@@ -2523,138 +2385,200 @@
  return null;
 }
 
-EXPORT(sqInt) primitivePangoIsAvailable(void) {
- sqInt canvasOop;
- cairo_t* context;
- PangoLayout* layout;
+EXPORT(sqInt) primitiveLanguageAttributes(void) {
+ int * array4;
+ sqInt currentTag;
+ sqInt arrayIndex;
+ sqInt i;
+ sqInt currentStart;
+ sqInt array4Oop;
+ unsigned int * string;
+ sqInt ws;
+ sqInt stringOop;
+ sqInt currentEnd;
+ int * array;
+ sqInt arrayOop;
+ sqInt arraySize;
+ sqInt stringSize;
+ sqInt lOop;
+ sqInt leadingChar;
+ sqInt oStringOop;
+ sqInt oLOop;
+ sqInt oArrayOop;
  sqInt _return_value;
+ sqInt v;
 
- canvasOop = interpreterProxy->stackValue(0);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), "Object"));
+ oStringOop = interpreterProxy->stackValue(2);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), "Object"));
+ oLOop = interpreterProxy->stackValue(1);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
+ oArrayOop = interpreterProxy->stackValue(0);
  if (interpreterProxy->failed()) {
  return null;
  }
- context = contextFrom(canvasOop);
  if (interpreterProxy->failed()) {
  return null;
  }
- layout = pango_cairo_create_layout(context);
- if (layout == null) {
- _return_value = interpreterProxy->integerObjectOf(2);
+ lOop = oLOop;
+ arrayOop = oArrayOop;
+ stringOop = oStringOop;
+ if (interpreterProxy->isBytes(stringOop)) {
+ _return_value = interpreterProxy->integerObjectOf(0);
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(1, _return_value);
+ interpreterProxy->popthenPush(4, _return_value);
  return null;
  }
- g_object_unref(layout);
- _return_value = (1? interpreterProxy->trueObject(): interpreterProxy->falseObject());
+ if (!(interpreterProxy->isWords(stringOop))) {
+ primitiveFail();
+ return null;
+ }
+ arraySize = interpreterProxy->stSizeOf(arrayOop);
+ if (arraySize <= 0) {
+ primitiveFail();
+ return null;
+ }
+ stringSize = interpreterProxy->stSizeOf(stringOop);
+ if (stringSize == 0) {
+ _return_value = interpreterProxy->integerObjectOf(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(4, _return_value);
+ return null;
+ }
+ string = interpreterProxy->firstIndexableField(stringOop);
+ array = interpreterProxy->firstIndexableField(arrayOop);
+ ws = string[0];
+ currentTag = ((usqInt) (ws & 1069547520) >> 22);
+ leadingChar = -1;
+ currentStart = 0;
+ /* begin utf8CountFor: */
+ v = ws & 2097151;
+ if ((0 <= v) && (v <= 127)) {
+ currentEnd = 1;
+ goto l1;
+ }
+ if ((128 <= v) && (v <= 2047)) {
+ currentEnd = 2;
+ goto l1;
+ }
+ if ((2048 <= v) && (v <= 55295)) {
+ currentEnd = 3;
+ goto l1;
+ }
+ if ((57344 <= v) && (v <= 65535)) {
+ currentEnd = 3;
+ goto l1;
+ }
+ if ((65536 <= v) && (v <= 1114111)) {
+ currentEnd = 4;
+ goto l1;
+ }
+ currentEnd = 0;
+l1: /* end utf8CountFor: */;
+ arrayIndex = 0;
+ for (i = 1; i <= (stringSize - 1); i += 1) {
+ ws = string[i];
+ leadingChar = ((usqInt) (ws & 1069547520) >> 22);
+ if (leadingChar != currentTag) {
+ interpreterProxy->pushRemappableOop(stringOop);
+ interpreterProxy->pushRemappableOop(arrayOop);
+ interpreterProxy->pushRemappableOop(lOop);
+ array4Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);
+ lOop = interpreterProxy->popRemappableOop();
+ arrayOop = interpreterProxy->popRemappableOop();
+ stringOop = interpreterProxy->popRemappableOop();
+ array = interpreterProxy->firstIndexableField(arrayOop);
+ string = interpreterProxy->firstIndexableField(stringOop);
+ array4 = interpreterProxy->firstIndexableField(array4Oop);
+ array4[0] = lOop;
+ array4[1] = (((currentStart << 1) | 1));
+ array4[2] = (((currentEnd << 1) | 1));
+ array4[3] = (((currentTag << 1) | 1));
+ array[arrayIndex] = array4Oop;
+ arrayIndex += 1;
+ if (arrayIndex >= arraySize) {
+ primitiveFail();
+ return null;
+ }
+ currentTag = leadingChar;
+ currentStart = currentEnd;
+ }
+ currentEnd += utf8CountFor(ws);
+ }
+ interpreterProxy->pushRemappableOop(stringOop);
+ interpreterProxy->pushRemappableOop(arrayOop);
+ interpreterProxy->pushRemappableOop(lOop);
+ array4Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);
+ lOop = interpreterProxy->popRemappableOop();
+ arrayOop = interpreterProxy->popRemappableOop();
+ stringOop = interpreterProxy->popRemappableOop();
+ interpreterProxy->storePointerofObjectwithValue(0, array4Oop, lOop);
+ interpreterProxy->storeIntegerofObjectwithValue(1, array4Oop, currentStart);
+ interpreterProxy->storeIntegerofObjectwithValue(2, array4Oop, currentEnd);
+ interpreterProxy->storeIntegerofObjectwithValue(3, array4Oop, currentTag);
+ interpreterProxy->storePointerofObjectwithValue(arrayIndex, arrayOop, array4Oop);
+ arrayIndex += 1;
+ _return_value = interpreterProxy->integerObjectOf(arrayIndex);
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(1, _return_value);
+ interpreterProxy->popthenPush(4, _return_value);
  return null;
 }
 
-EXPORT(sqInt) primitivePangoShowString(void) {
- PangoRectangle ink;
- PangoRectangle logical;
- unsigned int cursorColor;
- sqInt lineCount;
- sqInt prevBaseline;
- PangoLayoutLine* line;
- sqInt indexToX;
- sqInt newW;
- PangoRectangle startRect;
+EXPORT(sqInt) primitiveOpen(void) {
+ sqInt handleOop;
+ sqInt contextIndex;
  sqInt canvasOop;
+
+ canvasOop = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ contextIndex = createContextFor(canvasOop);
+ if (!(interpreterProxy->failed())) {
+ handleOop = interpreterProxy->integerObjectOf(contextIndex);
+ interpreterProxy->storePointerofObjectwithValue(CanvasHandleIndex, canvasOop, handleOop);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ return null;
+}
+
+EXPORT(sqInt) primitivePangoIsAvailable(void) {
+ sqInt canvasOop;
  cairo_t* context;
- PangoLayoutIter* lineIter;
- PangoAttrList* attrList;
  PangoLayout* layout;
- char *aString;
- sqInt x;
- sqInt y;
- sqInt sqAttrArray;
- sqInt w;
- sqInt h;
- sqInt withWrap;
- sqInt selStart;
- sqInt selEnd;
- sqInt cPixel;
  sqInt _return_value;
 
- interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(9)));
- aString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));
- x = interpreterProxy->stackIntegerValue(8);
- y = interpreterProxy->stackIntegerValue(7);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(6), "Object"));
- sqAttrArray = interpreterProxy->stackValue(6);
- w = interpreterProxy->stackIntegerValue(5);
- h = interpreterProxy->stackIntegerValue(4);
- withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(3));
- selStart = interpreterProxy->stackIntegerValue(2);
- selEnd = interpreterProxy->stackIntegerValue(1);
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
- cPixel = interpreterProxy->stackValue(0);
- ;
- canvasOop = interpreterProxy->stackValue(10);
+ canvasOop = interpreterProxy->stackValue(0);
  if (interpreterProxy->failed()) {
  return null;
  }
  context = contextFrom(canvasOop);
- cursorColor = interpreterProxy->positive32BitValueOf(cPixel);
  if (interpreterProxy->failed()) {
  return null;
  }
  layout = pango_cairo_create_layout(context);
- attrList = pango_attr_list_new();
- translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
- if (!(selStart == selEnd)) {
- if ((selStart >= 0) && (selEnd >= 0)) {
- addSelectionFromtopixelinto(selStart, selEnd, cursorColor, attrList);
+ if (layout == null) {
+ _return_value = interpreterProxy->integerObjectOf(2);
+ if (interpreterProxy->failed()) {
+ return null;
  }
+ interpreterProxy->popthenPush(1, _return_value);
+ return null;
  }
- pango_layout_set_text(layout, aString, strlen(aString));
- pango_layout_set_attributes(layout, attrList);
- pango_layout_set_width(layout, w * (PANGO_SCALE));
- if (withWrap) {
- pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
- }
- cairo_translate(context, x, y);
- pango_cairo_update_layout(context, layout);
-
- /* lineIter := self pangoLayoutGetIter: layout.
- baseline := self pangoLayoutIterGetBaseline: lineIter.
- prevBaseline := 0.
- */
-
- lineCount = pango_layout_get_line_count(layout);
- if (1) {
- pango_cairo_show_layout(context, layout);
- } else {
- null;
- }
- if (selStart == selEnd) {
- if ((selStart >= 0) && (selEnd >= 0)) {
- pango_layout_index_to_pos(layout, selStart, &startRect);
- addSelectionAtpixelwith(&startRect, cursorColor, context);
- }
- }
- pango_layout_get_extents(layout, &ink, &logical);
-
- /* self pangoLayoutIterFree: lineIter. */
-
- newW = PANGO_PIXELS(logical.width);
- pango_attr_list_unref(attrList);
  g_object_unref(layout);
- if (cairo_status(context)) {
- failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
- return null;
- }
- _return_value = interpreterProxy->integerObjectOf(newW);
+ _return_value = (1? interpreterProxy->trueObject(): interpreterProxy->falseObject());
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->popthenPush(11, _return_value);
+ interpreterProxy->popthenPush(1, _return_value);
  return null;
 }
 
@@ -2823,7 +2747,110 @@
  return null;
 }
 
+EXPORT(sqInt) primitivePangoShowString(void) {
+ PangoRectangle ink;
+ PangoRectangle logical;
+ unsigned int cursorColor;
+ sqInt lineCount;
+ sqInt prevBaseline;
+ PangoLayoutLine* line;
+ sqInt indexToX;
+ sqInt newW;
+ PangoRectangle startRect;
+ sqInt canvasOop;
+ cairo_t* context;
+ PangoLayoutIter* lineIter;
+ PangoAttrList* attrList;
+ PangoLayout* layout;
+ char *aString;
+ sqInt x;
+ sqInt y;
+ sqInt sqAttrArray;
+ sqInt w;
+ sqInt h;
+ sqInt withWrap;
+ sqInt selStart;
+ sqInt selEnd;
+ sqInt cPixel;
+ sqInt _return_value;
 
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(9)));
+ aString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));
+ x = interpreterProxy->stackIntegerValue(8);
+ y = interpreterProxy->stackIntegerValue(7);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(6), "Object"));
+ sqAttrArray = interpreterProxy->stackValue(6);
+ w = interpreterProxy->stackIntegerValue(5);
+ h = interpreterProxy->stackIntegerValue(4);
+ withWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(3));
+ selStart = interpreterProxy->stackIntegerValue(2);
+ selEnd = interpreterProxy->stackIntegerValue(1);
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), "Object"));
+ cPixel = interpreterProxy->stackValue(0);
+ ;
+ canvasOop = interpreterProxy->stackValue(10);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ context = contextFrom(canvasOop);
+ cursorColor = interpreterProxy->positive32BitValueOf(cPixel);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ layout = pango_cairo_create_layout(context);
+ attrList = pango_attr_list_new();
+ translateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);
+ if (!(selStart == selEnd)) {
+ if ((selStart >= 0) && (selEnd >= 0)) {
+ addSelectionFromtopixelinto(selStart, selEnd, cursorColor, attrList);
+ }
+ }
+ pango_layout_set_text(layout, aString, strlen(aString));
+ pango_layout_set_attributes(layout, attrList);
+ pango_layout_set_width(layout, w * (PANGO_SCALE));
+ if (withWrap) {
+ pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
+ }
+ cairo_translate(context, x, y);
+ pango_cairo_update_layout(context, layout);
+
+ /* lineIter := self pangoLayoutGetIter: layout.
+ baseline := self pangoLayoutIterGetBaseline: lineIter.
+ prevBaseline := 0.
+ */
+
+ lineCount = pango_layout_get_line_count(layout);
+ if (1) {
+ pango_cairo_show_layout(context, layout);
+ } else {
+ null;
+ }
+ if (selStart == selEnd) {
+ if ((selStart >= 0) && (selEnd >= 0)) {
+ pango_layout_index_to_pos(layout, selStart, &startRect);
+ addSelectionAtpixelwith(&startRect, cursorColor, context);
+ }
+ }
+ pango_layout_get_extents(layout, &ink, &logical);
+
+ /* self pangoLayoutIterFree: lineIter. */
+
+ newW = PANGO_PIXELS(logical.width);
+ pango_attr_list_unref(attrList);
+ g_object_unref(layout);
+ if (cairo_status(context)) {
+ failwith("cairo error: %s", cairo_status_to_string(cairo_status(context)));
+ return null;
+ }
+ _return_value = interpreterProxy->integerObjectOf(newW);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(11, _return_value);
+ return null;
+}
+
+
 /* Show a string - ignores outline (use drawString primitive for outlines) */
 
 EXPORT(sqInt) primitiveShowZeroTerminatedUtf8StringXY(void) {
@@ -3212,6 +3239,7 @@
  sqInt index;
  sqInt mask;
  sqInt shift;
+ sqInt v;
 
  val = c & 2097151;
  index = utf8Index;
@@ -3219,7 +3247,30 @@
  utf8String[index] = val;
  return utf8Index + 1;
  }
- nBytes = utf8CountFor(c);
+ /* begin utf8CountFor: */
+ v = c & 2097151;
+ if ((0 <= v) && (v <= 127)) {
+ nBytes = 1;
+ goto l1;
+ }
+ if ((128 <= v) && (v <= 2047)) {
+ nBytes = 2;
+ goto l1;
+ }
+ if ((2048 <= v) && (v <= 55295)) {
+ nBytes = 3;
+ goto l1;
+ }
+ if ((57344 <= v) && (v <= 65535)) {
+ nBytes = 3;
+ goto l1;
+ }
+ if ((65536 <= v) && (v <= 1114111)) {
+ nBytes = 4;
+ goto l1;
+ }
+ nBytes = 0;
+l1: /* end utf8CountFor: */;
  mask = utf8Headers[nBytes - 1];
  shift = (nBytes - 1) * -6;
  utf8String[index] = ((((shift < 0) ? ((usqInt) val >> -shift) : ((usqInt) val << shift))) | mask);
@@ -3490,58 +3541,58 @@
 
 
 void* RomePlugin_exports[][3] = {
- {"RomePlugin", "primitiveDestroyFormHandle", (void*)primitiveDestroyFormHandle},
- {"RomePlugin", "primitiveTransformBy", (void*)primitiveTransformBy},
- {"RomePlugin", "primitivePangoBlockAtIndex", (void*)primitivePangoBlockAtIndex},
+ {"RomePlugin", "primitiveUTF8StringWith2Indexes", (void*)primitiveUTF8StringWith2Indexes},
  {"RomePlugin", "shutdownModule", (void*)shutdownModule},
+ {"RomePlugin", "primitiveShowZeroTerminatedUtf8StringXY", (void*)primitiveShowZeroTerminatedUtf8StringXY},
  {"RomePlugin", "primitiveSaveState", (void*)primitiveSaveState},
  {"RomePlugin", "primitivePluginVersion", (void*)primitivePluginVersion},
+ {"RomePlugin", "primitiveDrawRoundRectLeftRightTopBottomRadiusCorner", (void*)primitiveDrawRoundRectLeftRightTopBottomRadiusCorner},
  {"RomePlugin", "primitiveClose", (void*)primitiveClose},
+ {"RomePlugin", "primitiveDrawRectangleLeftRightTopBottom", (void*)primitiveDrawRectangleLeftRightTopBottom},
+ {"RomePlugin", "primitiveLanguageAttributes", (void*)primitiveLanguageAttributes},
+ {"RomePlugin", "primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops", (void*)primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops},
+ {"RomePlugin", "primitiveClear", (void*)primitiveClear},
  {"RomePlugin", "setInterpreter", (void*)setInterpreter},
+ {"RomePlugin", "primitivePangoShowString", (void*)primitivePangoShowString},
+ {"RomePlugin", "primitiveClipRectangleLeftRightTopBottom", (void*)primitiveClipRectangleLeftRightTopBottom},
  {"RomePlugin", "primitivePangoFontDescriptionIndex", (void*)primitivePangoFontDescriptionIndex},
- {"RomePlugin", "primitiveClear", (void*)primitiveClear},
- {"RomePlugin", "primitiveDrawRectangleLeftRightTopBottom", (void*)primitiveDrawRectangleLeftRightTopBottom},
- {"RomePlugin", "primitiveScaleBy", (void*)primitiveScaleBy},
- {"RomePlugin", "primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops", (void*)primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops},
- {"RomePlugin", "primitiveDrawCurveFromXYviaXYandXYtoXY", (void*)primitiveDrawCurveFromXYviaXYandXYtoXY},
+ {"RomePlugin", "primitivePangoComposeString", (void*)primitivePangoComposeString},
+ {"RomePlugin", "primitivePangoIndexAtPoint", (void*)primitivePangoIndexAtPoint},
+ {"RomePlugin", "primitivePangoBlockAtIndex", (void*)primitivePangoBlockAtIndex},
+ {"RomePlugin", "primitiveDrawZeroTerminatedUtf8StringXY", (void*)primitiveDrawZeroTerminatedUtf8StringXY},
+ {"RomePlugin", "primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage", (void*)primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage},
  {"RomePlugin", "primitivePangoIsAvailable", (void*)primitivePangoIsAvailable},
  {"RomePlugin", "moduleUnloaded", (void*)moduleUnloaded},
- {"RomePlugin", "primitivePangoIndexAtPoint", (void*)primitivePangoIndexAtPoint},
+ {"RomePlugin", "primitiveFillColorAlpha", (void*)primitiveFillColorAlpha},
  {"RomePlugin", "primitiveCreateFormHandle", (void*)primitiveCreateFormHandle},
- {"RomePlugin", "primitiveDrawGeneralBezierShape", (void*)primitiveDrawGeneralBezierShape},
+ {"RomePlugin", "primitiveSetTransform", (void*)primitiveSetTransform},
+ {"RomePlugin", "initialiseModule", (void*)initialiseModule},
+ {"RomePlugin", "primitiveDrawPolyline", (void*)primitiveDrawPolyline},
+ {"RomePlugin", "primitiveDrawCurveFromXYviaXYandXYtoXY", (void*)primitiveDrawCurveFromXYviaXYandXYtoXY},
+ {"RomePlugin", "primitiveOpen", (void*)primitiveOpen},
+ {"RomePlugin", "primitiveDrawArcRadiusXYFromTo", (void*)primitiveDrawArcRadiusXYFromTo},
+ {"RomePlugin", "primitiveFontSize", (void*)primitiveFontSize},
+ {"RomePlugin", "primitiveDrawOvalLeftRightTopBottom", (void*)primitiveDrawOvalLeftRightTopBottom},
  {"RomePlugin", "primitiveStencilImageSrcLRTBDestLRTB", (void*)primitiveStencilImageSrcLRTBDestLRTB},
- {"RomePlugin", "primitiveUTF8StringWith2Indexes", (void*)primitiveUTF8StringWith2Indexes},
- {"RomePlugin", "primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage", (void*)primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage},
+ {"RomePlugin", "primitiveRestoreState", (void*)primitiveRestoreState},
+ {"RomePlugin", "primitiveFillLinearOriginXYdirectionXYcolorStops", (void*)primitiveFillLinearOriginXYdirectionXYcolorStops},
+ {"RomePlugin", "primitiveScaleBy", (void*)primitiveScaleBy},
+ {"RomePlugin", "primitiveTransformBy", (void*)primitiveTransformBy},
+ {"RomePlugin", "primitiveGetTransform", (void*)primitiveGetTransform},
  {"RomePlugin", "primitiveDrawImageSrcLRTBDestLRTB", (void*)primitiveDrawImageSrcLRTBDestLRTB},
+ {"RomePlugin", "getModuleName", (void*)getModuleName},
+ {"RomePlugin", "primitiveTranslateBy", (void*)primitiveTranslateBy},
  {"RomePlugin", "primitiveRotateBy", (void*)primitiveRotateBy},
- {"RomePlugin", "primitiveSetTransform", (void*)primitiveSetTransform},
  {"RomePlugin", "primitiveSetLineWidth", (void*)primitiveSetLineWidth},
+ {"RomePlugin", "primitiveFontFace", (void*)primitiveFontFace},
+ {"RomePlugin", "primitiveDestroyFormHandle", (void*)primitiveDestroyFormHandle},
+ {"RomePlugin", "primitiveGetLineWidth", (void*)primitiveGetLineWidth},
  {"RomePlugin", "primitivePangoComposeString2", (void*)primitivePangoComposeString2},
- {"RomePlugin", "primitiveFillLinearOriginXYdirectionXYcolorStops", (void*)primitiveFillLinearOriginXYdirectionXYcolorStops},
- {"RomePlugin", "initialiseModule", (void*)initialiseModule},
- {"RomePlugin", "primitiveFillColorAlpha", (void*)primitiveFillColorAlpha},
- {"RomePlugin", "primitivePangoComposeString", (void*)primitivePangoComposeString},
- {"RomePlugin", "primitiveDrawRoundRectLeftRightTopBottomRadiusCorner", (void*)primitiveDrawRoundRectLeftRightTopBottomRadiusCorner},
- {"RomePlugin", "primitiveDrawZeroTerminatedUtf8StringXY", (void*)primitiveDrawZeroTerminatedUtf8StringXY},
- {"RomePlugin", "primitiveRestoreState", (void*)primitiveRestoreState},
- {"RomePlugin", "primitiveTranslateBy", (void*)primitiveTranslateBy},
- {"RomePlugin", "primitiveOpen", (void*)primitiveOpen},
- {"RomePlugin", "primitiveFontFace", (void*)primitiveFontFace},
- {"RomePlugin", "getModuleName", (void*)getModuleName},
- {"RomePlugin", "primitiveGetTransform", (void*)primitiveGetTransform},
- {"RomePlugin", "primitiveDrawCurveFromXYviaXYtoXY", (void*)primitiveDrawCurveFromXYviaXYtoXY},
- {"RomePlugin", "primitiveDrawArcRadiusXYFromTo", (void*)primitiveDrawArcRadiusXYFromTo},
- {"RomePlugin", "primitivePangoShowString", (void*)primitivePangoShowString},
- {"RomePlugin", "primitiveDrawPolyline", (void*)primitiveDrawPolyline},
- {"RomePlugin", "primitiveShowZeroTerminatedUtf8StringXY", (void*)primitiveShowZeroTerminatedUtf8StringXY},
- {"RomePlugin", "primitiveLanguageAttributes", (void*)primitiveLanguageAttributes},
- {"RomePlugin", "primitiveFontSize", (void*)primitiveFontSize},
  {"RomePlugin", "primitiveDrawPolygon", (void*)primitiveDrawPolygon},
- {"RomePlugin", "primitiveGetLineWidth", (void*)primitiveGetLineWidth},
- {"RomePlugin", "primitiveClipRectangleLeftRightTopBottom", (void*)primitiveClipRectangleLeftRightTopBottom},
+ {"RomePlugin", "primitiveDrawLineFromXYtoXY", (void*)primitiveDrawLineFromXYtoXY},
  {"RomePlugin", "primitiveUTF8StringWithIndex", (void*)primitiveUTF8StringWithIndex},
- {"RomePlugin", "primitiveDrawLineFromXYtoXY", (void*)primitiveDrawLineFromXYtoXY},
- {"RomePlugin", "primitiveDrawOvalLeftRightTopBottom", (void*)primitiveDrawOvalLeftRightTopBottom},
+ {"RomePlugin", "primitiveDrawGeneralBezierShape", (void*)primitiveDrawGeneralBezierShape},
+ {"RomePlugin", "primitiveDrawCurveFromXYviaXYtoXY", (void*)primitiveDrawCurveFromXYviaXYtoXY},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/plugins/Squeak3D/Squeak3D.c
===================================================================
--- trunk/platforms/unix/src/plugins/Squeak3D/Squeak3D.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/Squeak3D/Squeak3D.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:34 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:05:48 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -229,9 +229,9 @@
 static sqInt loadBBFn;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "Squeak3D 10 November 2008 (i)"
+ "Squeak3D 26 August 2009 (i)"
 #else
- "Squeak3D 10 November 2008 (e)"
+ "Squeak3D 26 August 2009 (e)"
 #endif
 ;
 static float* primLight;
@@ -2407,8 +2407,40 @@
 static sqInt shadeVertex(void) {
     double specularFactor;
     double cosAngle;
+    double gPart;
+    double aPart;
+    double rPart;
+    double bPart;
+    double gPart1;
+    double aPart1;
+    double rPart1;
+    double bPart1;
+    double gPart2;
+    double aPart2;
+    double rPart2;
+    double bPart2;
+    double scale;
 
- computeDirection();
+ /* begin computeDirection */
+ if (lightFlags & FlagPositional) {
+ l2vDirection[0] = ((litVertex[PrimVtxPositionX]) - (primLight[PrimLightPositionX]));
+ l2vDirection[1] = ((litVertex[PrimVtxPositionY]) - (primLight[PrimLightPositionY]));
+ l2vDirection[2] = ((litVertex[PrimVtxPositionZ]) - (primLight[PrimLightPositionZ]));
+ l2vDistance = (((l2vDirection[0]) * (l2vDirection[0])) + ((l2vDirection[1]) * (l2vDirection[1]))) + ((l2vDirection[2]) * (l2vDirection[2]));
+ if (!((l2vDistance == 0.0) || (l2vDistance == 1.0))) {
+ l2vDistance = sqrt(l2vDistance);
+ scale = -1.0 / l2vDistance;
+ }
+ l2vDirection[0] = ((l2vDirection[0]) * scale);
+ l2vDirection[1] = ((l2vDirection[1]) * scale);
+ l2vDirection[2] = ((l2vDirection[2]) * scale);
+ } else {
+ if (lightFlags & FlagDirectional) {
+ l2vDirection[0] = (primLight[PrimLightDirectionX]);
+ l2vDirection[1] = (primLight[PrimLightDirectionY]);
+ l2vDirection[2] = (primLight[PrimLightDirectionZ]);
+ }
+ }
  /* begin computeAttenuation */
  lightScale = 1.0;
  if (lightFlags & FlagAttenuated) {
@@ -2419,7 +2451,22 @@
  }
  if (lightScale > 0.001) {
  if (lightFlags & FlagAmbientPart) {
- addPartfromtrackFlagscale(primLight + AmbientPart, primMaterial + AmbientPart, VBTrackAmbient, lightScale);
+ /* begin addPart:from:trackFlag:scale: */
+ if (vbFlags & VBTrackAmbient) {
+ rPart = ((vtxInColor[0]) * ((primLight + AmbientPart)[0])) * lightScale;
+ gPart = ((vtxInColor[1]) * ((primLight + AmbientPart)[1])) * lightScale;
+ bPart = ((vtxInColor[2]) * ((primLight + AmbientPart)[2])) * lightScale;
+ aPart = ((vtxInColor[3]) * ((primLight + AmbientPart)[3])) * lightScale;
+ } else {
+ rPart = (((primMaterial + AmbientPart)[0]) * ((primLight + AmbientPart)[0])) * lightScale;
+ gPart = (((primMaterial + AmbientPart)[1]) * ((primLight + AmbientPart)[1])) * lightScale;
+ bPart = (((primMaterial + AmbientPart)[2]) * ((primLight + AmbientPart)[2])) * lightScale;
+ aPart = (((primMaterial + AmbientPart)[3]) * ((primLight + AmbientPart)[3])) * lightScale;
+ }
+ vtxOutColor[0] = ((vtxOutColor[0]) + rPart);
+ vtxOutColor[1] = ((vtxOutColor[1]) + gPart);
+ vtxOutColor[2] = ((vtxOutColor[2]) + bPart);
+ vtxOutColor[3] = ((vtxOutColor[3]) + aPart);
  }
  if (lightFlags & FlagDiffusePart) {
 
@@ -2430,7 +2477,22 @@
  cosAngle = 0.0 - cosAngle;
  }
  if (cosAngle > 0.0) {
- addPartfromtrackFlagscale(primLight + DiffusePart, primMaterial + DiffusePart, VBTrackDiffuse, lightScale * cosAngle);
+ /* begin addPart:from:trackFlag:scale: */
+ if (vbFlags & VBTrackDiffuse) {
+ rPart1 = ((vtxInColor[0]) * ((primLight + DiffusePart)[0])) * (lightScale * cosAngle);
+ gPart1 = ((vtxInColor[1]) * ((primLight + DiffusePart)[1])) * (lightScale * cosAngle);
+ bPart1 = ((vtxInColor[2]) * ((primLight + DiffusePart)[2])) * (lightScale * cosAngle);
+ aPart1 = ((vtxInColor[3]) * ((primLight + DiffusePart)[3])) * (lightScale * cosAngle);
+ } else {
+ rPart1 = (((primMaterial + DiffusePart)[0]) * ((primLight + DiffusePart)[0])) * (lightScale * cosAngle);
+ gPart1 = (((primMaterial + DiffusePart)[1]) * ((primLight + DiffusePart)[1])) * (lightScale * cosAngle);
+ bPart1 = (((primMaterial + DiffusePart)[2]) * ((primLight + DiffusePart)[2])) * (lightScale * cosAngle);
+ aPart1 = (((primMaterial + DiffusePart)[3]) * ((primLight + DiffusePart)[3])) * (lightScale * cosAngle);
+ }
+ vtxOutColor[0] = ((vtxOutColor[0]) + rPart1);
+ vtxOutColor[1] = ((vtxOutColor[1]) + gPart1);
+ vtxOutColor[2] = ((vtxOutColor[2]) + bPart1);
+ vtxOutColor[3] = ((vtxOutColor[3]) + aPart1);
  }
  }
  }
@@ -2459,7 +2521,22 @@
  specularFactor = pow(cosAngle,(primMaterial[MaterialShininess]));
  }
  }
- addPartfromtrackFlagscale(primLight + SpecularPart, primMaterial + SpecularPart, VBTrackSpecular, specularFactor);
+ /* begin addPart:from:trackFlag:scale: */
+ if (vbFlags & VBTrackSpecular) {
+ rPart2 = ((vtxInColor[0]) * ((primLight + SpecularPart)[0])) * specularFactor;
+ gPart2 = ((vtxInColor[1]) * ((primLight + SpecularPart)[1])) * specularFactor;
+ bPart2 = ((vtxInColor[2]) * ((primLight + SpecularPart)[2])) * specularFactor;
+ aPart2 = ((vtxInColor[3]) * ((primLight + SpecularPart)[3])) * specularFactor;
+ } else {
+ rPart2 = (((primMaterial + SpecularPart)[0]) * ((primLight + SpecularPart)[0])) * specularFactor;
+ gPart2 = (((primMaterial + SpecularPart)[1]) * ((primLight + SpecularPart)[1])) * specularFactor;
+ bPart2 = (((primMaterial + SpecularPart)[2]) * ((primLight + SpecularPart)[2])) * specularFactor;
+ aPart2 = (((primMaterial + SpecularPart)[3]) * ((primLight + SpecularPart)[3])) * specularFactor;
+ }
+ vtxOutColor[0] = ((vtxOutColor[0]) + rPart2);
+ vtxOutColor[1] = ((vtxOutColor[1]) + gPart2);
+ vtxOutColor[2] = ((vtxOutColor[2]) + bPart2);
+ vtxOutColor[3] = ((vtxOutColor[3]) + aPart2);
  }
  }
 }

Modified: trunk/platforms/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
===================================================================
--- trunk/platforms/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:37 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:45 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -141,9 +141,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SqueakFFIPrims 10 November 2008 (i)"
+ "SqueakFFIPrims 26 August 2009 (i)"
 #else
- "SqueakFFIPrims 10 November 2008 (e)"
+ "SqueakFFIPrims 26 August 2009 (e)"
 #endif
 ;
 
@@ -241,6 +241,10 @@
  intValue = interpreterProxy->fetchIntegerofObject(0, oop);
  goto l1;
  }
+ if (oopClass == (interpreterProxy->classLargePositiveInteger())) {
+ intValue = interpreterProxy->positive32BitValueOf(oop);
+ goto l1;
+ }
  intValue = interpreterProxy->signed32BitValueOf(oop);
  l1: /* end ffiIntegerValueOf: */;
  }
@@ -624,6 +628,10 @@
  intValue = interpreterProxy->fetchIntegerofObject(0, valueOop);
  goto l3;
  }
+ if (oopClass2 == (interpreterProxy->classLargePositiveInteger())) {
+ intValue = interpreterProxy->positive32BitValueOf(valueOop);
+ goto l3;
+ }
  intValue = interpreterProxy->signed32BitValueOf(valueOop);
  l3: /* end ffiIntegerValueOf: */;
  }
@@ -1526,6 +1534,9 @@
  if (oopClass == (interpreterProxy->classCharacter())) {
  return interpreterProxy->fetchIntegerofObject(0, oop);
  }
+ if (oopClass == (interpreterProxy->classLargePositiveInteger())) {
+ return interpreterProxy->positive32BitValueOf(oop);
+ }
  return interpreterProxy->signed32BitValueOf(oop);
 }
 

Modified: trunk/platforms/unix/src/plugins/UUIDPlugin/UUIDPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/UUIDPlugin/UUIDPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/UUIDPlugin/UUIDPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:47 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:26 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -58,9 +58,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "UUIDPlugin 10 November 2008 (i)"
+ "UUIDPlugin 26 August 2009 (i)"
 #else
- "UUIDPlugin 10 November 2008 (e)"
+ "UUIDPlugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:48 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:31 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -28,8 +28,8 @@
 #define EXPORT(returnType) static returnType
 #endif
 #include <sys/types.h>
-/* D T Lewis 2005 - UnixOSProcessPlugin.c translated from class
-   UnixOSProcessPluginInterpreterGetThisSession of OSProcessPlugin version 4.2.6 */
+/* D T Lewis - UnixOSProcessPlugin.c translated from class
+   UnixOSProcessPlugin of OSProcessPlugin version 4.3.1 */
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -96,6 +96,9 @@
 static sqInt makePipeForReaderwriter(FILEHANDLETYPE * readerIOStreamPtr, FILEHANDLETYPE * writerIOStreamPtr);
 static sqInt maskForThisThreadAndResend(int sigNum);
 static sqInt maskSignalForThisThread(int sigNum);
+#pragma export on
+EXPORT(sqInt) moduleUnloaded(char * aModuleName);
+#pragma export off
 static sqInt msg(char * s);
 static sqInt newPthreadTypeByteArray(sqInt aPthreadType);
 static sqInt newSQFileByteArray(void);
@@ -255,9 +258,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "UnixOSProcessPlugin 10 November 2008 (i)"
+ "UnixOSProcessPlugin 26 August 2009 (i)"
 #else
- "UnixOSProcessPlugin 10 November 2008 (e)"
+ "UnixOSProcessPlugin 26 August 2009 (e)"
 #endif
 ;
 static void *originalSigHandlers[NSIG];
@@ -916,6 +919,13 @@
  pthread_sigmask(SIG_BLOCK, &sigset, NULL);
 }
 
+
+/* The module with the given name was just unloaded.
+ Make sure we have no dangling references. */
+
+EXPORT(sqInt) moduleUnloaded(char * aModuleName) {
+}
+
 static sqInt msg(char * s) {
  fprintf(stderr, "\n%s: %s", moduleName, s);
 }
@@ -3665,7 +3675,7 @@
 /* 4.0 supports 64bit code base */
 
 static char * versionString(void) {
-    static char version[]= "4.2.6";
+    static char version[]= "4.3.1";
 
  return version;
 }
@@ -3700,8 +3710,9 @@
  {"UnixOSProcessPlugin", "primitiveSigQuitNumber", (void*)primitiveSigQuitNumber},
  {"UnixOSProcessPlugin", "primitiveGetPGrp", (void*)primitiveGetPGrp},
  {"UnixOSProcessPlugin", "primitiveSendSigcontTo", (void*)primitiveSendSigcontTo},
+ {"UnixOSProcessPlugin", "moduleUnloaded", (void*)moduleUnloaded},
+ {"UnixOSProcessPlugin", "initialiseModule", (void*)initialiseModule},
  {"UnixOSProcessPlugin", "primitiveFixPointersInArrayOfStrings", (void*)primitiveFixPointersInArrayOfStrings},
- {"UnixOSProcessPlugin", "initialiseModule", (void*)initialiseModule},
  {"UnixOSProcessPlugin", "primitiveSendSigstopTo", (void*)primitiveSendSigstopTo},
  {"UnixOSProcessPlugin", "primitiveGetGid", (void*)primitiveGetGid},
  {"UnixOSProcessPlugin", "primitiveSizeOfInt", (void*)primitiveSizeOfInt},

Modified: trunk/platforms/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c
===================================================================
--- trunk/platforms/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:49 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:02:35 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -42,6 +42,7 @@
 static sqInt halt(void);
 #pragma export on
 EXPORT(sqInt) initialiseModule(void);
+EXPORT(sqInt) moduleUnloaded(char * aModuleName);
 #pragma export off
 static sqInt msg(char * s);
 #pragma export on
@@ -73,9 +74,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "XDisplayControlPlugin 10 November 2008 (i)"
+ "XDisplayControlPlugin 26 August 2009 (i)"
 #else
- "XDisplayControlPlugin 10 November 2008 (e)"
+ "XDisplayControlPlugin 26 August 2009 (e)"
 #endif
 ;
 static int osprocessSandboxSecurity;
@@ -107,6 +108,13 @@
  return 1;
 }
 
+
+/* The module with the given name was just unloaded.
+ Make sure we have no dangling references. */
+
+EXPORT(sqInt) moduleUnloaded(char * aModuleName) {
+}
+
 static sqInt msg(char * s) {
  fprintf(stderr, "\n%s: %s", moduleName, s);
 }
@@ -382,7 +390,7 @@
 /* 2.0 supports 64bit code base */
 
 static char * versionString(void) {
-    static char version[]= "2.1.3";
+    static char version[]= "2.1.4";
 
  return version;
 }
@@ -394,14 +402,15 @@
 void* XDisplayControlPlugin_exports[][3] = {
  {"XDisplayControlPlugin", "primitiveGetDisplayName", (void*)primitiveGetDisplayName},
  {"XDisplayControlPlugin", "shutdownModule", (void*)shutdownModule},
+ {"XDisplayControlPlugin", "moduleUnloaded", (void*)moduleUnloaded},
  {"XDisplayControlPlugin", "primitiveSetDisplayName", (void*)primitiveSetDisplayName},
  {"XDisplayControlPlugin", "primitiveDisconnectDisplay", (void*)primitiveDisconnectDisplay},
  {"XDisplayControlPlugin", "primitiveFlushDisplay", (void*)primitiveFlushDisplay},
  {"XDisplayControlPlugin", "setInterpreter", (void*)setInterpreter},
- {"XDisplayControlPlugin", "initialiseModule", (void*)initialiseModule},
  {"XDisplayControlPlugin", "primitiveOpenDisplay", (void*)primitiveOpenDisplay},
  {"XDisplayControlPlugin", "primitiveCanConnectToDisplay", (void*)primitiveCanConnectToDisplay},
  {"XDisplayControlPlugin", "getModuleName", (void*)getModuleName},
+ {"XDisplayControlPlugin", "initialiseModule", (void*)initialiseModule},
  {"XDisplayControlPlugin", "primitiveKillDisplay", (void*)primitiveKillDisplay},
  {"XDisplayControlPlugin", "primitiveModuleName", (void*)primitiveModuleName},
  {"XDisplayControlPlugin", "primitiveIsConnectedToDisplay", (void*)primitiveIsConnectedToDisplay},

Modified: trunk/platforms/unix/src/plugins.ext
===================================================================
--- trunk/platforms/unix/src/plugins.ext 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/plugins.ext 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,2 +1,2 @@
 # Automatically generated makefile include for external plugins
-EXTERNAL_PLUGINS = B3DAcceleratorPlugin Squeak3D ClipboardExtendedPlugin DBusPlugin SqueakFFIPrims FileCopyPlugin GStreamerPlugin HostWindowPlugin ImmX11Plugin KedamaPlugin KedamaPlugin2 MIDIPlugin OggPlugin PseudoTTYPlugin RomePlugin UUIDPlugin AioPlugin UnixOSProcessPlugin XDisplayControlPlugin
+EXTERNAL_PLUGINS = B3DAcceleratorPlugin Squeak3D ClipboardExtendedPlugin DBusPlugin SqueakFFIPrims FileCopyPlugin GStreamerPlugin HostWindowPlugin ImmX11Plugin KedamaPlugin KedamaPlugin2 MIDIPlugin Mpeg3Plugin OggPlugin PseudoTTYPlugin RomePlugin UUIDPlugin AioPlugin UnixOSProcessPlugin XDisplayControlPlugin

Modified: trunk/platforms/unix/src/vm/interp.c
===================================================================
--- trunk/platforms/unix/src/vm/interp.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/interp.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(29 July 2009 10:59 pm)
-by VMMaker 3.10.7
+/* Automatically generated from Squeak on an Array(26 August 2009 9:59:59 pm)
+by VMMaker 3.11.3
  */
 
 #define SQ_USE_GLOBAL_STRUCT 1
@@ -773,7 +773,7 @@
 struct foo * foo = &fum;
 
 sqInt extraVMMemory;
-const char *interpreterVersion = "Squeak3.10beta of 22 July 2007 [latest update: #7159]";
+const char *interpreterVersion = "Squeak3.10.2 of '5 June 2008' [latest update: #7179]";
 sqInt (*compilerHooks[16])();
 char* obsoleteIndexedPrimitiveTable[][3] = {
 { NULL, NULL, NULL },
@@ -4145,6 +4145,7 @@
     sqInt result;
     sqInt posRcvr;
     sqInt posArg;
+    sqInt successValue;
 
  if (((rcvr & arg) & 1) != 0) {
  integerRcvr = (rcvr >> 1);
@@ -4175,7 +4176,14 @@
  }
  }
  /* begin success: */
- foo->successFlag = ((result ^ (result << 1)) >= 0) && foo->successFlag;
+ successValue =
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) result)) ^ ((((int) result)) << 1)) >= 0)
+# else
+ ((result >= -1073741824) && (result <= 1073741823))
+# endif  // SQ_HOST32
+ ;
+ foo->successFlag = successValue && foo->successFlag;
  return result;
 }
 
@@ -4184,6 +4192,7 @@
     sqInt integerRcvr;
     sqInt integerResult;
     sqInt integerArg;
+    sqInt successValue;
 
  if (((rcvr & arg) & 1) != 0) {
  integerRcvr = (rcvr >> 1);
@@ -4211,7 +4220,14 @@
  }
  }
  /* begin success: */
- foo->successFlag = ((integerResult ^ (integerResult << 1)) >= 0) && foo->successFlag;
+ successValue =
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)
+# else
+ ((integerResult >= -1073741824) && (integerResult <= 1073741823))
+# endif  // SQ_HOST32
+ ;
+ foo->successFlag = successValue && foo->successFlag;
  return integerResult;
 }
 
@@ -8979,7 +8995,13 @@
  arg = longAtPointer(localSP - (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  result = ((rcvr >> 1)) + ((arg >> 1));
- if ((result ^ (result << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) result)) ^ ((((int) result)) << 1)) >= 0)
+# else
+ ((result >= -1073741824) && (result <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP -= (2 - 1) * BytesPerWord, ((result << 1) | 1));
  /* begin fetchNextBytecode */
@@ -9020,7 +9042,13 @@
  arg = longAtPointer(localSP - (0 * BytesPerWord));
  if (((rcvr & arg) & 1) != 0) {
  result = ((rcvr >> 1)) - ((arg >> 1));
- if ((result ^ (result << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) result)) ^ ((((int) result)) << 1)) >= 0)
+# else
+ ((result >= -1073741824) && (result <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP -= (2 - 1) * BytesPerWord, ((result << 1) | 1));
  /* begin fetchNextBytecode */
@@ -9705,7 +9733,13 @@
  rcvr = (rcvr >> 1);
  arg = (arg >> 1);
  result = rcvr * arg;
- if (((arg == 0) || ((result / arg) == rcvr)) && ((result ^ (result << 1)) >= 0)) {
+ if (((arg == 0) || ((result / arg) == rcvr)) && (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) result)) ^ ((((int) result)) << 1)) >= 0)
+# else
+ ((result >= -1073741824) && (result <= 1073741823))
+# endif  // SQ_HOST32
+)) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP -= (2 - 1) * BytesPerWord, ((result << 1) | 1));
  /* begin fetchNextBytecode */
@@ -9749,7 +9783,13 @@
  arg = (arg >> 1);
  if ((arg != 0) && ((rcvr % arg) == 0)) {
  result = rcvr / arg;
- if ((result ^ (result << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) result)) ^ ((((int) result)) << 1)) >= 0)
+# else
+ ((result >= -1073741824) && (result <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin internalPop:thenPush: */
  longAtPointerput(localSP -= (2 - 1) * BytesPerWord, ((result << 1) | 1));
  /* begin fetchNextBytecode */
@@ -11232,10 +11272,28 @@
 
 
 /* Return true if the given value can be represented as a Smalltalk integer value. */
-/* Use a shift and XOR to set the sign bit if and only if the top two bits of the given value are the same, then test the sign bit. Note that the top two bits are equal for exactly those integers in the range that can be represented in 31-bits or 63-bits. */
+/* Use a shift and XOR to set the sign bit if and only if the top two bits of the given
+ value are the same, then test the sign bit. Note that the top two bits are equal for
+ exactly those integers in the range that can be represented in 31-bits or 63-bits.
 
+ Operands are coerced to machine integer size so the test will work with 64 bit
+ images on 32 bit hosts. When running on a 32 bit host, the cast to int has little
+ or no performance impact for either 32 bit or 64 bit images.
+
+ On a 64 bit host, the shift and XOR test is replaced by an explicit range check,
+ which provides the best performance for both 32 bit and 64 bit images.
+
+ If the range of small integers is enlarged for 64 bit images, this method must
+ be updated accordingly. */
+
 sqInt isIntegerValue(sqInt intValue) {
- return (intValue ^ (intValue << 1)) >= 0;
+ return
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) intValue)) ^ ((((int) intValue)) << 1)) >= 0)
+# else
+ ((intValue >= -1073741824) && (intValue <= 1073741823))
+# endif  // SQ_HOST32
+ ;
 }
 
 
@@ -12465,7 +12523,13 @@
     sqInt newLargeInteger;
 
  if (integerValue >= 0) {
- if ((integerValue ^ (integerValue << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)
+# else
+ ((integerValue >= -1073741824) && (integerValue <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  return ((integerValue << 1) | 1);
  }
  }
@@ -12932,7 +12996,13 @@
  /* begin pop2AndPushIntegerIfOK: */
  integerResult = (stackIntegerValue(1)) + (stackIntegerValue(0));
  if (foo->successFlag) {
- if ((integerResult ^ (integerResult << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)
+# else
+ ((integerResult >= -1073741824) && (integerResult <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), ((integerResult << 1) | 1));
  foo->stackPointer = sp;
@@ -14187,7 +14257,13 @@
  quotient = doPrimitiveDivby(longAt(foo->stackPointer - (1 * BytesPerWord)), longAt(foo->stackPointer));
  /* begin pop2AndPushIntegerIfOK: */
  if (foo->successFlag) {
- if ((quotient ^ (quotient << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) quotient)) ^ ((((int) quotient)) << 1)) >= 0)
+# else
+ ((quotient >= -1073741824) && (quotient <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), ((quotient << 1) | 1));
  foo->stackPointer = sp;
@@ -14234,7 +14310,13 @@
  if ((integerArgument != 0) && ((integerReceiver % integerArgument) == 0)) {
  /* begin pop2AndPushIntegerIfOK: */
  if (foo->successFlag) {
- if (((integerReceiver / integerArgument) ^ ((integerReceiver / integerArgument) << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) (integerReceiver / integerArgument))) ^ ((((int) (integerReceiver / integerArgument))) << 1)) >= 0)
+# else
+ (((integerReceiver / integerArgument) >= -1073741824) && ((integerReceiver / integerArgument) <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), (((integerReceiver / integerArgument) << 1) | 1));
  foo->stackPointer = sp;
@@ -15803,7 +15885,13 @@
  return null;
  }
  /* begin storeInteger:ofObject:withValue: */
- if (((evtBuf[0]) ^ ((evtBuf[0]) << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) (evtBuf[0]))) ^ ((((int) (evtBuf[0]))) << 1)) >= 0)
+# else
+ (((evtBuf[0]) >= -1073741824) && ((evtBuf[0]) <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((arg + BaseHeaderSize) + (0 << ShiftForWord), (((evtBuf[0]) << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -15813,7 +15901,13 @@
  return null;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((((evtBuf[1]) & MillisecondClockMask) ^ (((evtBuf[1]) & MillisecondClockMask) << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) ((evtBuf[1]) & MillisecondClockMask))) ^ ((((int) ((evtBuf[1]) & MillisecondClockMask))) << 1)) >= 0)
+# else
+ ((((evtBuf[1]) & MillisecondClockMask) >= -1073741824) && (((evtBuf[1]) & MillisecondClockMask) <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((arg + BaseHeaderSize) + (1 << ShiftForWord), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -15824,9 +15918,21 @@
  }
  for (i = 2; i <= 7; i += 1) {
  value = evtBuf[i];
- if ((value ^ (value << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) value)) ^ ((((int) value)) << 1)) >= 0)
+# else
+ ((value >= -1073741824) && (value <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin storeInteger:ofObject:withValue: */
- if ((value ^ (value << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) value)) ^ ((((int) value)) << 1)) >= 0)
+# else
+ ((value >= -1073741824) && (value <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((arg + BaseHeaderSize) + (i << ShiftForWord), ((value << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -16431,7 +16537,13 @@
  value = intAt(addr);
  /* begin pop: */
  foo->stackPointer -= 2 * BytesPerWord;
- if ((value ^ (value << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) value)) ^ ((((int) value)) << 1)) >= 0)
+# else
+ ((value >= -1073741824) && (value <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pushInteger: */
  /* begin push: */
  longAtput(sp = foo->stackPointer + BytesPerWord, ((value << 1) | 1));
@@ -17407,7 +17519,13 @@
  mod = doPrimitiveModby(longAt(foo->stackPointer - (1 * BytesPerWord)), longAt(foo->stackPointer));
  /* begin pop2AndPushIntegerIfOK: */
  if (foo->successFlag) {
- if ((mod ^ (mod << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) mod)) ^ ((((int) mod)) << 1)) >= 0)
+# else
+ ((mod >= -1073741824) && (mod <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), ((mod << 1) | 1));
  foo->stackPointer = sp;
@@ -17522,7 +17640,13 @@
  if ((integerArg == 0) || ((integerResult / integerArg) == integerRcvr)) {
  /* begin pop2AndPushIntegerIfOK: */
  if (foo->successFlag) {
- if ((integerResult ^ (integerResult << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)
+# else
+ ((integerResult >= -1073741824) && (integerResult <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), ((integerResult << 1) | 1));
  foo->stackPointer = sp;
@@ -17741,7 +17865,13 @@
  if (foo->successFlag) {
  stream = longAt(foo->stackPointer);
  /* begin storeInteger:ofObject:withValue: */
- if ((index ^ (index << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) index)) ^ ((((int) index)) << 1)) >= 0)
+# else
+ ((index >= -1073741824) && (index <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((stream + BaseHeaderSize) + (StreamIndexIndex << ShiftForWord), ((index << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -17918,7 +18048,13 @@
 l1: /* end commonVariable:at:put:cacheIndex: */;
  if (foo->successFlag) {
  /* begin storeInteger:ofObject:withValue: */
- if ((index ^ (index << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) index)) ^ ((((int) index)) << 1)) >= 0)
+# else
+ ((index >= -1073741824) && (index <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((stream + BaseHeaderSize) + (StreamIndexIndex << ShiftForWord), ((index << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -18663,7 +18799,13 @@
  }
  /* begin pop2AndPushIntegerIfOK: */
  if (foo->successFlag) {
- if ((integerResult ^ (integerResult << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)
+# else
+ ((integerResult >= -1073741824) && (integerResult <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), ((integerResult << 1) | 1));
  foo->stackPointer = sp;
@@ -19009,20 +19151,38 @@
 
  ascii = byteAt((sourceString + BaseHeaderSize) + (scanLastIndex - 1));
  if (!((stopReason = longAt((stops + BaseHeaderSize) + (ascii << ShiftForWord))) == nilOop)) {
- if (!((scanDestX ^ (scanDestX << 1)) >= 0)) {
+ if (!(
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)
+# else
+ ((scanDestX >= -1073741824) && (scanDestX <= 1073741823))
+# endif  // SQ_HOST32
+ )) {
  /* begin primitiveFail */
  foo->successFlag = 0;
  return null;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((scanDestX ^ (scanDestX << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)
+# else
+ ((scanDestX >= -1073741824) && (scanDestX <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((rcvr + BaseHeaderSize) + (0 << ShiftForWord), ((scanDestX << 1) | 1));
  } else {
  /* begin primitiveFail */
  foo->successFlag = 0;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((scanLastIndex ^ (scanLastIndex << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanLastIndex)) ^ ((((int) scanLastIndex)) << 1)) >= 0)
+# else
+ ((scanLastIndex >= -1073741824) && (scanLastIndex <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((rcvr + BaseHeaderSize) + (1 << ShiftForWord), ((scanLastIndex << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -19054,20 +19214,38 @@
  }
  nextDestX = (scanDestX + sourceX2) - sourceX;
  if (nextDestX > scanRightX) {
- if (!((scanDestX ^ (scanDestX << 1)) >= 0)) {
+ if (!(
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)
+# else
+ ((scanDestX >= -1073741824) && (scanDestX <= 1073741823))
+# endif  // SQ_HOST32
+ )) {
  /* begin primitiveFail */
  foo->successFlag = 0;
  return null;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((scanDestX ^ (scanDestX << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)
+# else
+ ((scanDestX >= -1073741824) && (scanDestX <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((rcvr + BaseHeaderSize) + (0 << ShiftForWord), ((scanDestX << 1) | 1));
  } else {
  /* begin primitiveFail */
  foo->successFlag = 0;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((scanLastIndex ^ (scanLastIndex << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanLastIndex)) ^ ((((int) scanLastIndex)) << 1)) >= 0)
+# else
+ ((scanLastIndex >= -1073741824) && (scanLastIndex <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((rcvr + BaseHeaderSize) + (1 << ShiftForWord), ((scanLastIndex << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -19083,20 +19261,38 @@
  scanDestX = nextDestX + kernDelta;
  scanLastIndex += 1;
  }
- if (!((scanDestX ^ (scanDestX << 1)) >= 0)) {
+ if (!(
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)
+# else
+ ((scanDestX >= -1073741824) && (scanDestX <= 1073741823))
+# endif  // SQ_HOST32
+ )) {
  /* begin primitiveFail */
  foo->successFlag = 0;
  return null;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((scanDestX ^ (scanDestX << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)
+# else
+ ((scanDestX >= -1073741824) && (scanDestX <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((rcvr + BaseHeaderSize) + (0 << ShiftForWord), ((scanDestX << 1) | 1));
  } else {
  /* begin primitiveFail */
  foo->successFlag = 0;
  }
  /* begin storeInteger:ofObject:withValue: */
- if ((scanStopIndex ^ (scanStopIndex << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) scanStopIndex)) ^ ((((int) scanStopIndex)) << 1)) >= 0)
+# else
+ ((scanStopIndex >= -1073741824) && (scanStopIndex <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((rcvr + BaseHeaderSize) + (1 << ShiftForWord), ((scanStopIndex << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -20557,7 +20753,13 @@
  /* begin pop2AndPushIntegerIfOK: */
  integerResult = (stackIntegerValue(1)) - (stackIntegerValue(0));
  if (foo->successFlag) {
- if ((integerResult ^ (integerResult << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)
+# else
+ ((integerResult >= -1073741824) && (integerResult <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  /* begin pop:thenPush: */
  longAtput(sp = foo->stackPointer - ((2 - 1) * BytesPerWord), ((integerResult << 1) | 1));
  foo->stackPointer = sp;
@@ -21480,7 +21682,13 @@
  excessSignals = fetchIntegerofObject(ExcessSignalsIndex, sema);
  if (excessSignals > 0) {
  /* begin storeInteger:ofObject:withValue: */
- if (((excessSignals - 1) ^ ((excessSignals - 1) << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) (excessSignals - 1))) ^ ((((int) (excessSignals - 1))) << 1)) >= 0)
+# else
+ (((excessSignals - 1) >= -1073741824) && ((excessSignals - 1) <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((sema + BaseHeaderSize) + (ExcessSignalsIndex << ShiftForWord), (((excessSignals - 1) << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -22373,7 +22581,13 @@
     sqInt newLargeInteger;
     sqInt largeClass;
 
- if ((integerValue ^ (integerValue << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)
+# else
+ ((integerValue >= -1073741824) && (integerValue <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  return ((integerValue << 1) | 1);
  }
  if (integerValue < 0) {
@@ -23190,7 +23404,13 @@
 /* Note: May be called by translated primitive code. */
 
 sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) {
- if ((integerValue ^ (integerValue << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)
+# else
+ ((integerValue >= -1073741824) && (integerValue <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((objectPointer + BaseHeaderSize) + (fieldIndex << ShiftForWord), ((integerValue << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -23382,7 +23602,13 @@
  if ((longAt((aSemaphore + BaseHeaderSize) + (FirstLinkIndex << ShiftForWord))) == foo->nilObj) {
  excessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore);
  /* begin storeInteger:ofObject:withValue: */
- if (((excessSignals + 1) ^ ((excessSignals + 1) << 1)) >= 0) {
+ if (
+# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host
+ (((((int) (excessSignals + 1))) ^ ((((int) (excessSignals + 1))) << 1)) >= 0)
+# else
+ (((excessSignals + 1) >= -1073741824) && ((excessSignals + 1) <= 1073741823))
+# endif  // SQ_HOST32
+ ) {
  longAtput((aSemaphore + BaseHeaderSize) + (ExcessSignalsIndex << ShiftForWord), (((excessSignals + 1) << 1) | 1));
  } else {
  /* begin primitiveFail */
@@ -24165,15 +24391,15 @@
  {"", "addGCRoot", (void*)addGCRoot},
  {"", "callbackLeave", (void*)callbackLeave},
  {"", "callbackEnter", (void*)callbackEnter},
+ {"", "primitiveIsRoot", (void*)primitiveIsRoot},
  {"", "primitiveRootTableAt", (void*)primitiveRootTableAt},
- {"", "primitiveIsRoot", (void*)primitiveIsRoot},
  {"", "primitiveChangeClassWithClass", (void*)primitiveChangeClassWithClass},
  {"", "primitiveIsYoung", (void*)primitiveIsYoung},
  {"", "primitiveForceTenure", (void*)primitiveForceTenure},
  {"", "moduleUnloaded", (void*)moduleUnloaded},
  {"", "primitiveDisablePowerManager", (void*)primitiveDisablePowerManager},
+ {"", "primitiveScreenDepth", (void*)primitiveScreenDepth},
  {"", "primitiveSetGCSemaphore", (void*)primitiveSetGCSemaphore},
- {"", "primitiveScreenDepth", (void*)primitiveScreenDepth},
  {"", "removeGCRoot", (void*)removeGCRoot},
  {"", "primitiveSetGCBiasToGrowGCLimit", (void*)primitiveSetGCBiasToGrowGCLimit},
  {"", "primitiveRootTable", (void*)primitiveRootTable},

Modified: trunk/platforms/unix/src/vm/interp.h
===================================================================
--- trunk/platforms/unix/src/vm/interp.h 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/interp.h 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(29 July 2009 10:58:55 pm)
-by VMMaker 3.10.7
+/* Automatically generated from Squeak on an Array(26 August 2009 9:59:45 pm)
+by VMMaker 3.11.3
  */
 
 #define SQ_VI_BYTES_PER_WORD 4

Modified: trunk/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:52:59 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:21 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -62,9 +62,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "ADPCMCodecPlugin 10 November 2008 (i)"
+ "ADPCMCodecPlugin 26 August 2009 (i)"
 #else
- "ADPCMCodecPlugin 10 November 2008 (e)"
+ "ADPCMCodecPlugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:12 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:23 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -36,6 +36,7 @@
 
 /*** Function Prototypes ***/
 static AsyncFile * asyncFileValueOf(sqInt oop);
+static char * bufferPointerstartIndex(sqInt buffer, sqInt startIndex);
 static VirtualMachine * getInterpreter(void);
 #pragma export on
 EXPORT(const char*) getModuleName(void);
@@ -65,9 +66,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "AsynchFilePlugin 10 November 2008 (i)"
+ "AsynchFilePlugin 26 August 2009 (i)"
 #else
- "AsynchFilePlugin 10 November 2008 (e)"
+ "AsynchFilePlugin 26 August 2009 (e)"
 #endif
 ;
 static void * sCOAFfn;
@@ -85,6 +86,14 @@
 }
 
 
+/* Adjust for zero-origin indexing. This is implemented as a separate method in order
+ to encourage inlining. */
+
+static char * bufferPointerstartIndex(sqInt buffer, sqInt startIndex) {
+ return (((pointerForOop(buffer)) + ( 4)) + startIndex) - 1;
+}
+
+
 /* Note: This is coded so that plugins can be run from Squeak. */
 
 static VirtualMachine * getInterpreter(void) {
@@ -190,7 +199,7 @@
  sqInt startIndex;
  sqInt bufferSize;
  sqInt r;
- sqInt bufferPtr;
+ char * bufferPtr;
  sqInt fhandle;
  sqInt buffer;
  sqInt start;
@@ -217,10 +226,7 @@
  bufferSize = bufferSize * 4;
  }
  interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= bufferSize));
-
- /* adjust for zero-origin indexing */
-
- bufferPtr = ((oopForPointer(interpreterProxy->firstIndexableField(buffer))) + startIndex) - 1;
+ bufferPtr = (((pointerForOop(buffer)) + ( 4)) + startIndex) - 1;
  if (!(interpreterProxy->failed())) {
  r = asyncFileReadResult(f, bufferPtr, count);
  }
@@ -278,7 +284,7 @@
  sqInt count;
  sqInt startIndex;
  sqInt bufferSize;
- sqInt bufferPtr;
+ char * bufferPtr;
  sqInt fHandle;
  sqInt fPosition;
  sqInt buffer;
@@ -304,15 +310,12 @@
 
  bufferSize = interpreterProxy->slotSizeOf(buffer);
  if (interpreterProxy->isWords(buffer)) {
- count = count * 4;
- startIndex = ((startIndex - 1) * 4) + 1;
- bufferSize = bufferSize * 4;
+ count = count * ( 4);
+ startIndex = ((startIndex - 1) * ( 4)) + 1;
+ bufferSize = bufferSize * ( 4);
  }
  interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= bufferSize));
-
- /* adjust for zero-origin indexing */
-
- bufferPtr = ((oopForPointer(interpreterProxy->firstIndexableField(buffer))) + startIndex) - 1;
+ bufferPtr = (((pointerForOop(buffer)) + ( 4)) + startIndex) - 1;
  if (!(interpreterProxy->failed())) {
  asyncFileWriteStart(f, fPosition, bufferPtr, count);
  }
@@ -354,17 +357,17 @@
 
 
 void* AsynchFilePlugin_exports[][3] = {
- {"AsynchFilePlugin", "primitiveAsyncFileReadStart", (void*)primitiveAsyncFileReadStart},
- {"AsynchFilePlugin", "primitiveAsyncFileClose", (void*)primitiveAsyncFileClose},
+ {"AsynchFilePlugin", "primitiveAsyncFileOpen", (void*)primitiveAsyncFileOpen},
  {"AsynchFilePlugin", "shutdownModule", (void*)shutdownModule},
  {"AsynchFilePlugin", "primitiveAsyncFileReadResult", (void*)primitiveAsyncFileReadResult},
  {"AsynchFilePlugin", "moduleUnloaded", (void*)moduleUnloaded},
  {"AsynchFilePlugin", "setInterpreter", (void*)setInterpreter},
+ {"AsynchFilePlugin", "primitiveAsyncFileReadStart", (void*)primitiveAsyncFileReadStart},
  {"AsynchFilePlugin", "initialiseModule", (void*)initialiseModule},
+ {"AsynchFilePlugin", "primitiveAsyncFileWriteStart", (void*)primitiveAsyncFileWriteStart},
  {"AsynchFilePlugin", "getModuleName", (void*)getModuleName},
- {"AsynchFilePlugin", "primitiveAsyncFileWriteStart", (void*)primitiveAsyncFileWriteStart},
  {"AsynchFilePlugin", "primitiveAsyncFileWriteResult", (void*)primitiveAsyncFileWriteResult},
- {"AsynchFilePlugin", "primitiveAsyncFileOpen", (void*)primitiveAsyncFileOpen},
+ {"AsynchFilePlugin", "primitiveAsyncFileClose", (void*)primitiveAsyncFileClose},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/B2DPlugin/B2DPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/B2DPlugin/B2DPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/B2DPlugin/B2DPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:16 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:35 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -728,9 +728,9 @@
 static void * loadBBFn;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "B2DPlugin 10 November 2008 (i)"
+ "B2DPlugin 26 August 2009 (i)"
 #else
- "B2DPlugin 10 November 2008 (e)"
+ "B2DPlugin 26 August 2009 (e)"
 #endif
 ;
 static int* objBuffer;
@@ -9644,9 +9644,18 @@
 /* Transform the given point. If haveMatrix is true then use the current transformation. */
 
 static sqInt transformPoint(int * point) {
+    sqInt x;
+    float * transform;
+    sqInt y;
+
  if ((workBuffer[GWHasEdgeTransform]) != 0) {
  /* begin transformPoint:into: */
- transformPointXyinto(((double) ((((int *) point))[0]) ), ((double) ((((int *) point))[1]) ), ((int *) point));
+ /* begin transformPointX:y:into: */
+ transform = ((float *) (workBuffer + GWEdgeTransform));
+ x = ((sqInt) (((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))) );
+ y = ((sqInt) (((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))) );
+ (((int *) point))[0] = x;
+ (((int *) point))[1] = y;
  } else {
  point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
  point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
@@ -9659,7 +9668,16 @@
  the declarations and adding argument coercions at the appropriate points) */
 
 static sqInt transformPointinto(sqInt srcPoint, sqInt dstPoint) {
- transformPointXyinto(((double) ((((int *) srcPoint))[0]) ), ((double) ((((int *) srcPoint))[1]) ), ((int *) dstPoint));
+    sqInt x;
+    float * transform;
+    sqInt y;
+
+ /* begin transformPointX:y:into: */
+ transform = ((float *) (workBuffer + GWEdgeTransform));
+ x = ((sqInt) (((((transform[0]) * (((double) ((((int *) srcPoint))[0]) ))) + ((transform[1]) * (((double) ((((int *) srcPoint))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))) );
+ y = ((sqInt) (((((transform[3]) * (((double) ((((int *) srcPoint))[0]) ))) + ((transform[4]) * (((double) ((((int *) srcPoint))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))) );
+ (((int *) dstPoint))[0] = x;
+ (((int *) dstPoint))[1] = y;
 }
 
 

Modified: trunk/platforms/unix/src/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:13 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:24 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -53,9 +53,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "BMPReadWriterPlugin 10 November 2008 (i)"
+ "BMPReadWriterPlugin 26 August 2009 (i)"
 #else
- "BMPReadWriterPlugin 10 November 2008 (e)"
+ "BMPReadWriterPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -99,6 +99,9 @@
  return interpreterProxy->primitiveFail();
  }
  width = interpreterProxy->stackIntegerValue(0);
+ if (width <= 0) {
+ return interpreterProxy->primitiveFail();
+ }
  formBitsIndex = interpreterProxy->stackIntegerValue(1);
  formBitsOop = interpreterProxy->stackObjectValue(2);
  pixelLineOop = interpreterProxy->stackObjectValue(3);
@@ -146,6 +149,9 @@
  return interpreterProxy->primitiveFail();
  }
  width = interpreterProxy->stackIntegerValue(0);
+ if (width <= 0) {
+ return interpreterProxy->primitiveFail();
+ }
  formBitsIndex = interpreterProxy->stackIntegerValue(1);
  formBitsOop = interpreterProxy->stackObjectValue(2);
  pixelLineOop = interpreterProxy->stackObjectValue(3);

Modified: trunk/platforms/unix/src/vm/intplugins/BitBltPlugin/BitBltPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/BitBltPlugin/BitBltPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/BitBltPlugin/BitBltPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:19 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:48 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -270,9 +270,9 @@
 };
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "BitBltPlugin 10 November 2008 (i)"
+ "BitBltPlugin 26 August 2009 (i)"
 #else
- "BitBltPlugin 10 November 2008 (e)"
+ "BitBltPlugin 26 August 2009 (e)"
 #endif
 ;
 static sqInt nWords;
@@ -3400,10 +3400,21 @@
  /* optimized first step */
 
  result = ((usqInt) (((((word1 & sMask) + 1) * ((word2 & sMask) + 1)) - 1) & dMask)) >> nBits;
+ if (nParts == 1) {
+ return result;
+ }
  product = (((((((usqInt) word1) >> nBits) & sMask) + 1) * (((((usqInt) word2) >> nBits) & sMask) + 1)) - 1) & dMask;
  result = result | (product & dMask);
+ if (nParts == 2) {
+ return result;
+ }
  product = (((((((usqInt) word1) >> (2 * nBits)) & sMask) + 1) * (((((usqInt) word2) >> (2 * nBits)) & sMask) + 1)) - 1) & dMask;
  result = result | ((product & dMask) << nBits);
+ if (nParts == 3) {
+ return result;
+ }
+ product = (((((((usqInt) word1) >> (3 * nBits)) & sMask) + 1) * (((((usqInt) word2) >> (3 * nBits)) & sMask) + 1)) - 1) & dMask;
+ result = result | ((product & dMask) << (2 * nBits));
  return result;
 }
 
@@ -4034,6 +4045,13 @@
 EXPORT(sqInt) primitiveWarpBits(void) {
     sqInt rcvr;
     sqInt ns;
+    sqInt sourceHandle;
+    sqInt l;
+    sqInt b;
+    sqInt destHandle;
+    sqInt r;
+    sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt);
+    sqInt t;
     sqInt endBits;
     sqInt pixPerM1;
     sqInt startBits;
@@ -4049,9 +4067,57 @@
  noSource = ns;
  if (noSource || ((bbW <= 0) || (bbH <= 0))) {
  affectedL = affectedR = affectedT = affectedB = 0;
- goto l1;
+ goto l2;
  }
- lockSurfaces();
+ /* begin lockSurfaces */
+ hasSurfaceLock = 0;
+ if (destBits == 0) {
+ if (lockSurfaceFn == 0) {
+ if (!(loadSurfacePlugin())) {
+ goto l1;
+ }
+ }
+ fn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn);
+ destHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, destForm);
+ if ((sourceBits == 0) && (!noSource)) {
+ sourceHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, sourceForm);
+ if (sourceHandle == destHandle) {
+ if (isWarping) {
+ l = ((sx < dx) ? sx : dx);
+ r = (((sx < dx) ? dx : sx)) + bbW;
+ t = ((sy < dy) ? sy : dy);
+ b = (((sy < sy) ? sy : sy)) + bbH;
+ sourceBits = fn(sourceHandle, &sourcePitch, l, t, r-l, b-t);
+ } else {
+ sourceBits = fn(sourceHandle, &sourcePitch, 0,0, sourceWidth, sourceHeight);
+ }
+ destBits = sourceBits;
+ destPitch = sourcePitch;
+ hasSurfaceLock = 1;
+ destBits != 0;
+ goto l1;
+ }
+ }
+ destBits = fn(destHandle, &destPitch, dx, dy, bbW, bbH);
+ hasSurfaceLock = 1;
+ }
+ if ((sourceBits == 0) && (!noSource)) {
+ sourceHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, sourceForm);
+ if (lockSurfaceFn == 0) {
+ if (!(loadSurfacePlugin())) {
+ goto l1;
+ }
+ }
+ fn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn);
+ if (isWarping) {
+ sourceBits = fn(sourceHandle, &sourcePitch, 0, 0, sourceWidth, sourceHeight);
+ } else {
+ sourceBits = fn(sourceHandle, &sourcePitch, sx, sy, bbW, bbH);
+ }
+ hasSurfaceLock = 1;
+ }
+ (destBits != 0) && ((sourceBits != 0) || (noSource));
+l1: /* end lockSurfaces */;
  /* begin destMaskAndPointerInit */
  pixPerM1 = destPPW - 1;
  startBits = destPPW - (dx & pixPerM1);
@@ -4092,7 +4158,7 @@
  affectedB = dy + 1;
  }
  unlockSurfaces();
-l1: /* end warpBits */;
+l2: /* end warpBits */;
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -4147,7 +4213,7 @@
  if (destDepth == 16) {
  return (partitionedAddtonBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedAddtonBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);
  } else {
- return partitionedAddtonBitsnPartitions(sourceWord, destinationWord, 8, 3);
+ return partitionedAddtonBitsnPartitions(sourceWord, destinationWord, 8, 4);
  }
 }
 
@@ -4304,7 +4370,7 @@
  /* begin partitionedMax:with:nBits:nPartitions: */
  mask3 = maskTable[8];
  result1 = 0;
- for (i1 = 1; i1 <= 3; i1 += 1) {
+ for (i1 = 1; i1 <= 4; i1 += 1) {
  result1 = result1 | ((((destinationWord & mask3) < (sourceWord & mask3)) ? (sourceWord & mask3) : (destinationWord & mask3)));
  mask3 = mask3 << 8;
  }
@@ -4336,7 +4402,7 @@
  /* begin partitionedMin:with:nBits:nPartitions: */
  mask3 = maskTable[8];
  result1 = 0;
- for (i1 = 1; i1 <= 3; i1 += 1) {
+ for (i1 = 1; i1 <= 4; i1 += 1) {
  result1 = result1 | ((((destinationWord & mask3) < (sourceWord & mask3)) ? (destinationWord & mask3) : (sourceWord & mask3)));
  mask3 = mask3 << 8;
  }
@@ -4370,7 +4436,7 @@
  /* begin partitionedMin:with:nBits:nPartitions: */
  mask3 = maskTable[8];
  result1 = 0;
- for (i1 = 1; i1 <= 3; i1 += 1) {
+ for (i1 = 1; i1 <= 4; i1 += 1) {
  result1 = result1 | ((((destinationWord & mask3) < (sourceWord & mask3)) ? (destinationWord & mask3) : (sourceWord & mask3)));
  mask3 = mask3 << 8;
  }
@@ -4385,7 +4451,7 @@
  if (destDepth == 16) {
  return (partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedMulwithnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);
  } else {
- return partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 8, 3);
+ return partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 8, 4);
  }
 }
 
@@ -4396,7 +4462,7 @@
  if (destDepth == 16) {
  return (partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedSubfromnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);
  } else {
- return partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 3);
+ return partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 4);
  }
 }
 
@@ -4792,6 +4858,13 @@
 
 static sqInt warpBits(void) {
     sqInt ns;
+    sqInt sourceHandle;
+    sqInt l;
+    sqInt b;
+    sqInt destHandle;
+    sqInt r;
+    sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt);
+    sqInt t;
     sqInt endBits;
     sqInt pixPerM1;
     sqInt startBits;
@@ -4804,7 +4877,55 @@
  affectedL = affectedR = affectedT = affectedB = 0;
  return null;
  }
- lockSurfaces();
+ /* begin lockSurfaces */
+ hasSurfaceLock = 0;
+ if (destBits == 0) {
+ if (lockSurfaceFn == 0) {
+ if (!(loadSurfacePlugin())) {
+ goto l1;
+ }
+ }
+ fn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn);
+ destHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, destForm);
+ if ((sourceBits == 0) && (!noSource)) {
+ sourceHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, sourceForm);
+ if (sourceHandle == destHandle) {
+ if (isWarping) {
+ l = ((sx < dx) ? sx : dx);
+ r = (((sx < dx) ? dx : sx)) + bbW;
+ t = ((sy < dy) ? sy : dy);
+ b = (((sy < sy) ? sy : sy)) + bbH;
+ sourceBits = fn(sourceHandle, &sourcePitch, l, t, r-l, b-t);
+ } else {
+ sourceBits = fn(sourceHandle, &sourcePitch, 0,0, sourceWidth, sourceHeight);
+ }
+ destBits = sourceBits;
+ destPitch = sourcePitch;
+ hasSurfaceLock = 1;
+ destBits != 0;
+ goto l1;
+ }
+ }
+ destBits = fn(destHandle, &destPitch, dx, dy, bbW, bbH);
+ hasSurfaceLock = 1;
+ }
+ if ((sourceBits == 0) && (!noSource)) {
+ sourceHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, sourceForm);
+ if (lockSurfaceFn == 0) {
+ if (!(loadSurfacePlugin())) {
+ goto l1;
+ }
+ }
+ fn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn);
+ if (isWarping) {
+ sourceBits = fn(sourceHandle, &sourcePitch, 0, 0, sourceWidth, sourceHeight);
+ } else {
+ sourceBits = fn(sourceHandle, &sourcePitch, sx, sy, bbW, bbH);
+ }
+ hasSurfaceLock = 1;
+ }
+ (destBits != 0) && ((sourceBits != 0) || (noSource));
+l1: /* end lockSurfaces */;
  /* begin destMaskAndPointerInit */
  pixPerM1 = destPPW - 1;
  startBits = destPPW - (dx & pixPerM1);

Modified: trunk/platforms/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/CroquetPlugin/CroquetPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:21 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:53 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -51,9 +51,11 @@
 EXPORT(sqInt) primitiveTransformMatrixWithInto(void);
 EXPORT(sqInt) primitiveTransformVector3(void);
 EXPORT(sqInt) primitiveTransposeMatrix(void);
+EXPORT(sqInt) primitiveTriBoxIntersects(void);
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);
 #pragma export off
 static void* stackMatrix(sqInt index);
+static void* stackVector3(sqInt index);
 static sqInt transformMatrixwithinto(float *src, float *arg, float *dst);
 /*** Variables ***/
 
@@ -63,9 +65,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "CroquetPlugin 10 November 2008 (i)"
+ "CroquetPlugin 26 August 2009 (i)"
 #else
- "CroquetPlugin 10 November 2008 (e)"
+ "CroquetPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -521,6 +523,33 @@
 }
 
 
+/* Primitive. Answer whether an AABB intersects with a given triangle */
+
+EXPORT(sqInt) primitiveTriBoxIntersects(void) {
+    float* maxCorner;
+    float* v0;
+    float* v2;
+    float* v1;
+    float* minCorner;
+    sqInt result;
+
+ if (!((interpreterProxy->methodArgumentCount()) == 5)) {
+ return interpreterProxy->primitiveFail();
+ }
+ v2 = stackVector3(0);
+ v1 = stackVector3(1);
+ v0 = stackVector3(2);
+ maxCorner = stackVector3(3);
+ minCorner = stackVector3(4);
+ result = triBoxOverlap(minCorner, maxCorner, v0, v1, v2);
+ if (result < 0) {
+ return interpreterProxy->primitiveFail();
+ }
+ interpreterProxy->pop(6);
+ interpreterProxy->pushBool(result);
+}
+
+
 /* Note: This is coded so that is can be run from Squeak. */
 
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {
@@ -553,6 +582,23 @@
 }
 
 
+/* Load a Vector3 from the interpreter stack.
+ Return a pointer to the float data if successful, nil otherwise. */
+
+static void* stackVector3(sqInt index) {
+    sqInt oop;
+
+ oop = interpreterProxy->stackObjectValue(index);
+ if (oop == null) {
+ return null;
+ }
+ if ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 3)) {
+ return interpreterProxy->firstIndexableField(oop);
+ }
+ return null;
+}
+
+
 /* Transform src with arg into dst.
  It is allowed that src == dst but not arg == dst */
 
@@ -602,6 +648,7 @@
  {"CroquetPlugin", "primitiveTransformDirection", (void*)primitiveTransformDirection},
  {"CroquetPlugin", "getModuleName", (void*)getModuleName},
  {"CroquetPlugin", "primitiveTransformMatrixWithInto", (void*)primitiveTransformMatrixWithInto},
+ {"CroquetPlugin", "primitiveTriBoxIntersects", (void*)primitiveTriBoxIntersects},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/DSAPrims/DSAPrims.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/DSAPrims/DSAPrims.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/DSAPrims/DSAPrims.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:21 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:55 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -65,9 +65,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "DSAPrims 10 November 2008 (i)"
+ "DSAPrims 26 August 2009 (i)"
 #else
- "DSAPrims 10 November 2008 (e)"
+ "DSAPrims 26 August 2009 (e)"
 #endif
 ;
 static sqInt remainderDigitCount;

Modified: trunk/platforms/unix/src/vm/intplugins/DropPlugin/DropPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/DropPlugin/DropPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/DropPlugin/DropPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:22 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:59 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -44,17 +44,16 @@
 EXPORT(sqInt) initialiseModule(void);
 #pragma export off
 static sqInt msg(char * s);
+static sqInt primitiveDndOutAcceptedType(void);
+static sqInt primitiveDndOutSend(sqInt bytes);
+static sqInt primitiveDndOutStart(sqInt types);
 #pragma export on
-EXPORT(sqInt) primitiveDndOutAcceptedType(void);
-EXPORT(sqInt) primitiveDndOutSend(void);
-EXPORT(sqInt) primitiveDndOutStart(void);
 EXPORT(sqInt) primitiveDropRequestFileHandle(void);
 EXPORT(sqInt) primitiveDropRequestFileName(void);
 EXPORT(sqInt) setFileAccessCallback(int address);
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);
 EXPORT(sqInt) shutdownModule(void);
 #pragma export off
-static sqInt sqAssert(sqInt aBool);
 /*** Variables ***/
 
 #ifdef SQUEAK_BUILTIN_PLUGIN
@@ -63,9 +62,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "DropPlugin 10 November 2008 (i)"
+ "DropPlugin 26 August 2009 (i)"
 #else
- "DropPlugin 10 November 2008 (e)"
+ "DropPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -99,62 +98,36 @@
  fprintf(stderr, "\n%s: %s", moduleName, s);
 }
 
-EXPORT(sqInt) primitiveDndOutAcceptedType(void) {
- sqInt _return_value;
-
- _return_value = sqDndOutAcceptedType();
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(1, _return_value);
- return null;
+static sqInt primitiveDndOutAcceptedType(void) {
+ primitiveparameters("primitiveDndOutAcceptedType", "XXX UNTRANSLATABLE CONSTANT XXX");
+ return sqDndOutAcceptedType();
 }
 
-EXPORT(sqInt) primitiveDndOutSend(void) {
- sqInt nbytes;
- char *bytes;
+static sqInt primitiveDndOutSend(sqInt bytes) {
+    sqInt nbytes;
 
- interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));
- bytes = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));
- if (interpreterProxy->failed()) {
- return null;
- }
- nbytes = interpreterProxy->slotSizeOf((oopForPointer( bytes ) - 4));
+ primitiveparameters("primitiveDndOutSend", "XXX UNTRANSLATABLE CONSTANT XXX");
+ nbytes = interpreterProxy->slotSizeOf(cPtrAsOop(bytes));
  sqDndOutSend(bytes, nbytes);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
 }
 
 
 /* Start drag out session. Formats are types for the data separated with NULL. */
 
-EXPORT(sqInt) primitiveDndOutStart(void) {
- sqInt ntypes;
- char *types;
+static sqInt primitiveDndOutStart(sqInt types) {
+    sqInt ntypes;
 
- interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));
- types = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));
- if (interpreterProxy->failed()) {
- return null;
- }
- ntypes = interpreterProxy->slotSizeOf((oopForPointer( types ) - 4));
+ primitiveparameters("primitiveDndOutStart", "XXX UNTRANSLATABLE CONSTANT XXX");
+ ntypes = interpreterProxy->slotSizeOf(cPtrAsOop(types));
  sqDndOutStart(types, ntypes);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
 }
 
 
 /* Note: File handle creation needs to be handled by specific support code explicitly bypassing the plugin file sand box. */
 
 EXPORT(sqInt) primitiveDropRequestFileHandle(void) {
- sqInt handleOop;
- sqInt dropIndex;
+    sqInt handleOop;
+    sqInt dropIndex;
 
  if (!((interpreterProxy->methodArgumentCount()) == 1)) {
  return interpreterProxy->primitiveFail();
@@ -174,12 +147,12 @@
 /* Note: File handle creation needs to be handled by specific support code explicitly bypassing the plugin file sand box. */
 
 EXPORT(sqInt) primitiveDropRequestFileName(void) {
- sqInt nameOop;
- sqInt i;
- char * dropName;
- sqInt nameLength;
- sqInt dropIndex;
- char * namePtr;
+    sqInt nameOop;
+    sqInt i;
+    char * dropName;
+    sqInt nameLength;
+    sqInt dropIndex;
+    char * namePtr;
 
  if (!((interpreterProxy->methodArgumentCount()) == 1)) {
  return interpreterProxy->primitiveFail();
@@ -210,7 +183,7 @@
 /* Note: This is coded so that is can be run from Squeak. */
 
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {
- sqInt ok;
+    sqInt ok;
 
  interpreterProxy = anInterpreter;
  ok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;
@@ -225,25 +198,18 @@
  return dropShutdown();
 }
 
-static sqInt sqAssert(sqInt aBool) {
- /* missing DebugCode */;
-}
 
-
 #ifdef SQUEAK_BUILTIN_PLUGIN
 
 
 void* DropPlugin_exports[][3] = {
+ {"DropPlugin", "getModuleName", (void*)getModuleName},
  {"DropPlugin", "shutdownModule", (void*)shutdownModule},
- {"DropPlugin", "primitiveDndOutAcceptedType", (void*)primitiveDndOutAcceptedType},
+ {"DropPlugin", "setFileAccessCallback", (void*)setFileAccessCallback},
  {"DropPlugin", "primitiveDropRequestFileName", (void*)primitiveDropRequestFileName},
- {"DropPlugin", "primitiveDndOutStart", (void*)primitiveDndOutStart},
+ {"DropPlugin", "primitiveDropRequestFileHandle", (void*)primitiveDropRequestFileHandle},
  {"DropPlugin", "setInterpreter", (void*)setInterpreter},
- {"DropPlugin", "primitiveDndOutSend", (void*)primitiveDndOutSend},
  {"DropPlugin", "initialiseModule", (void*)initialiseModule},
- {"DropPlugin", "primitiveDropRequestFileHandle", (void*)primitiveDropRequestFileHandle},
- {"DropPlugin", "getModuleName", (void*)getModuleName},
- {"DropPlugin", "setFileAccessCallback", (void*)setFileAccessCallback},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/FFTPlugin/FFTPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/FFTPlugin/FFTPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/FFTPlugin/FFTPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:23 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:06 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -66,9 +66,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "FFTPlugin 10 November 2008 (i)"
+ "FFTPlugin 26 August 2009 (i)"
 #else
- "FFTPlugin 10 November 2008 (e)"
+ "FFTPlugin 26 August 2009 (e)"
 #endif
 ;
 static sqInt nu;

Modified: trunk/platforms/unix/src/vm/intplugins/FilePlugin/FilePlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/FilePlugin/FilePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/FilePlugin/FilePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:23 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:07 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -90,9 +90,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "FilePlugin 10 November 2008 (i)"
+ "FilePlugin 26 August 2009 (i)"
 #else
- "FilePlugin 10 November 2008 (e)"
+ "FilePlugin 26 August 2009 (e)"
 #endif
 ;
 static void * sCCPfn;
@@ -461,9 +461,6 @@
  if (sDFAfn != 0) {
  ((sqInt (*)(void))sDFAfn)();
  }
- if (!(interpreterProxy->failed())) {
- interpreterProxy->pop(1);
- }
 }
 
 EXPORT(sqInt) primitiveFileAtEnd(void) {

Modified: trunk/platforms/unix/src/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:24 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:09 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -65,9 +65,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "FloatArrayPlugin 10 November 2008 (i)"
+ "FloatArrayPlugin 26 August 2009 (i)"
 #else
- "FloatArrayPlugin 10 November 2008 (e)"
+ "FloatArrayPlugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/FloatMathPlugin/FloatMathPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/FloatMathPlugin/FloatMathPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/FloatMathPlugin/FloatMathPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:24 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:10 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -74,9 +74,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "FloatMathPlugin 10 November 2008 (i)"
+ "FloatMathPlugin 26 August 2009 (i)"
 #else
- "FloatMathPlugin 10 November 2008 (e)"
+ "FloatMathPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -118,6 +118,9 @@
  return null;
  }
  result = __ieee754_acos(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -134,6 +137,9 @@
  return null;
  }
  result = __ieee754_acosh(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -150,6 +156,9 @@
  return null;
  }
  result = __ieee754_asin(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -166,6 +175,9 @@
  return null;
  }
  result = __ieee754_asinh(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -182,6 +194,9 @@
  return null;
  }
  result = __ieee754_atan(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -200,6 +215,9 @@
  return null;
  }
  result = __ieee754_atan2(rcvr, arg);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -216,6 +234,9 @@
  return null;
  }
  result = __ieee754_atanh(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -232,6 +253,9 @@
  return null;
  }
  result = __ieee754_cos(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -248,6 +272,9 @@
  return null;
  }
  result = __ieee754_cosh(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -264,6 +291,9 @@
  return null;
  }
  result = __ieee754_exp(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -282,6 +312,9 @@
  return null;
  }
  result = __ieee754_fmod(rcvr, arg);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -299,6 +332,9 @@
  return null;
  }
  result = __ieee754_modf(rcvr, &trunc);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -317,6 +353,9 @@
  return null;
  }
  result = __ieee754_hypot(rcvr, arg);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -336,6 +375,9 @@
  return interpreterProxy->primitiveFail();
  }
  result = __ieee754_log10(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -355,6 +397,9 @@
  return interpreterProxy->primitiveFail();
  }
  result = __ieee754_log(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -373,6 +418,9 @@
  return null;
  }
  result = __ieee754_pow(rcvr, arg);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -389,6 +437,9 @@
  return null;
  }
  result = __ieee754_sin(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -405,6 +456,9 @@
  return null;
  }
  result = __ieee754_sinh(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -424,6 +478,9 @@
  return interpreterProxy->primitiveFail();
  }
  result = __ieee754_sqrt(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -440,6 +497,9 @@
  return null;
  }
  result = __ieee754_tan(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -456,6 +516,9 @@
  return null;
  }
  result = __ieee754_tanh(rcvr);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }
@@ -474,6 +537,9 @@
  return null;
  }
  result = __ieee754_ldexp(rcvr, arg);
+ if (isnan(result)) {
+ return interpreterProxy->primitiveFail();
+ }
  interpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);
  interpreterProxy->pushFloat(result);
 }

Modified: trunk/platforms/unix/src/vm/intplugins/GeniePlugin/GeniePlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/GeniePlugin/GeniePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/GeniePlugin/GeniePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:25 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:11 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -58,9 +58,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "GeniePlugin v2.0 10 November 2008 (i)"
+ "GeniePlugin v2.0 26 August 2009 (i)"
 #else
- "GeniePlugin v2.0 10 November 2008 (e)"
+ "GeniePlugin v2.0 26 August 2009 (e)"
 #endif
 ;
 
@@ -138,9 +138,7 @@
  int *   rowBase;
  sqInt otherPointsSize;
  int *   otherPoints;
- sqInt mySquaredLengthsSize;
  sqInt jM1T2;
- sqInt myPointsSize;
  int *   rowInsertRemoveCount;
  sqInt otherSquaredLengthsSize;
  int *   otherVectors;
@@ -221,17 +219,19 @@
  rowBase = interpreterProxy->firstIndexableField(rowBaseOop);
  rowInsertRemove = interpreterProxy->firstIndexableField(rowInsertRemoveOop);
 
+ /* Note: myPointsSize and mySquaredLengthsSize variables eliminated to reduce
+ method temporary variable count for closure-enabled images */
  /* PointArrays */
+ /* myPointsSize := (interpreterProxy stSizeOf: myPointsOop) bitShift: -1. */
 
  rowInsertRemoveCount = interpreterProxy->firstIndexableField(rowInsertRemoveCountOop);
- myPointsSize = ((usqInt) (interpreterProxy->stSizeOf(myPointsOop)) >> 1);
  otherPointsSize = ((usqInt) (interpreterProxy->stSizeOf(otherPointsOop)) >> 1);
  myVectorsSize = ((usqInt) (interpreterProxy->stSizeOf(myVectorsOop)) >> 1);
 
  /* IntegerArrays */
+ /* mySquaredLengthsSize := interpreterProxy stSizeOf: mySquaredLengthsOop. */
 
  otherVectorsSize = ((usqInt) (interpreterProxy->stSizeOf(otherVectorsOop)) >> 1);
- mySquaredLengthsSize = interpreterProxy->stSizeOf(mySquaredLengthsOop);
  otherSquaredLengthsSize = interpreterProxy->stSizeOf(otherSquaredLengthsOop);
  rowBaseSize = interpreterProxy->stSizeOf(rowBaseOop);
  interpreterProxy->success(((rowBaseSize == (interpreterProxy->stSizeOf(rowInsertRemoveOop))) && (rowBaseSize == (interpreterProxy->stSizeOf(rowInsertRemoveCountOop)))) && (rowBaseSize > otherVectorsSize));
@@ -239,7 +239,7 @@
  msg("failed 4");
  return null;
  }
- interpreterProxy->success((((((mySquaredLengthsSize >= (myVectorsSize - 1)) && (myPointsSize >= myVectorsSize)) && (otherSquaredLengthsSize >= (otherVectorsSize - 1))) && (otherPointsSize >= otherVectorsSize)) && ((interpreterProxy->stSizeOf(myAnglesOop)) >= (myVectorsSize - 1))) && ((interpreterProxy->stSizeOf(otherAnglesOop)) >= (otherVectorsSize - 1)));
+ interpreterProxy->success(((((((interpreterProxy->stSizeOf(mySquaredLengthsOop)) >= (myVectorsSize - 1)) && ((((usqInt) (interpreterProxy->stSizeOf(myPointsOop)) >> 1)) >= myVectorsSize)) && (otherSquaredLengthsSize >= (otherVectorsSize - 1))) && (otherPointsSize >= otherVectorsSize)) && ((interpreterProxy->stSizeOf(myAnglesOop)) >= (myVectorsSize - 1))) && ((interpreterProxy->stSizeOf(otherAnglesOop)) >= (otherVectorsSize - 1)));
  if (interpreterProxy->failed()) {
  msg("failed 5");
  return null;

Modified: trunk/platforms/unix/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:25 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:13 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -66,9 +66,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "JPEGReadWriter2Plugin 10 November 2008 (i)"
+ "JPEGReadWriter2Plugin 26 August 2009 (i)"
 #else
- "JPEGReadWriter2Plugin 10 November 2008 (e)"
+ "JPEGReadWriter2Plugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -671,18 +671,18 @@
 
 void* JPEGReadWriter2Plugin_exports[][3] = {
  {"JPEGReadWriter2Plugin", "primJPEGDecompressStructSize", (void*)primJPEGDecompressStructSize},
+ {"JPEGReadWriter2Plugin", "primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr", (void*)primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr},
+ {"JPEGReadWriter2Plugin", "primJPEGReadHeaderfromByteArrayerrorMgr", (void*)primJPEGReadHeaderfromByteArrayerrorMgr},
  {"JPEGReadWriter2Plugin", "shutdownModule", (void*)shutdownModule},
  {"JPEGReadWriter2Plugin", "primJPEGPluginIsPresent", (void*)primJPEGPluginIsPresent},
- {"JPEGReadWriter2Plugin", "primImageHeight", (void*)primImageHeight},
+ {"JPEGReadWriter2Plugin", "primJPEGErrorMgr2StructSize", (void*)primJPEGErrorMgr2StructSize},
  {"JPEGReadWriter2Plugin", "initialiseModule", (void*)initialiseModule},
- {"JPEGReadWriter2Plugin", "primJPEGReadHeaderfromByteArrayerrorMgr", (void*)primJPEGReadHeaderfromByteArrayerrorMgr},
  {"JPEGReadWriter2Plugin", "setInterpreter", (void*)setInterpreter},
- {"JPEGReadWriter2Plugin", "primJPEGErrorMgr2StructSize", (void*)primJPEGErrorMgr2StructSize},
  {"JPEGReadWriter2Plugin", "primJPEGCompressStructSize", (void*)primJPEGCompressStructSize},
  {"JPEGReadWriter2Plugin", "getModuleName", (void*)getModuleName},
+ {"JPEGReadWriter2Plugin", "primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr", (void*)primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr},
+ {"JPEGReadWriter2Plugin", "primImageHeight", (void*)primImageHeight},
  {"JPEGReadWriter2Plugin", "primImageWidth", (void*)primImageWidth},
- {"JPEGReadWriter2Plugin", "primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr", (void*)primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr},
- {"JPEGReadWriter2Plugin", "primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr", (void*)primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:25 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:15 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -143,9 +143,9 @@
 static sqInt jsReadLimit;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "JPEGReaderPlugin 10 November 2008 (i)"
+ "JPEGReaderPlugin 26 August 2009 (i)"
 #else
- "JPEGReaderPlugin 10 November 2008 (e)"
+ "JPEGReaderPlugin 26 August 2009 (e)"
 #endif
 ;
 static int *residuals;

Modified: trunk/platforms/unix/src/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:26 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:16 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -60,9 +60,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "JoystickTabletPlugin 10 November 2008 (i)"
+ "JoystickTabletPlugin 26 August 2009 (i)"
 #else
- "JoystickTabletPlugin 10 November 2008 (e)"
+ "JoystickTabletPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -191,13 +191,13 @@
 
 
 void* JoystickTabletPlugin_exports[][3] = {
- {"JoystickTabletPlugin", "primitiveReadTablet", (void*)primitiveReadTablet},
+ {"JoystickTabletPlugin", "getModuleName", (void*)getModuleName},
  {"JoystickTabletPlugin", "shutdownModule", (void*)shutdownModule},
  {"JoystickTabletPlugin", "primitiveReadJoystick", (void*)primitiveReadJoystick},
- {"JoystickTabletPlugin", "getModuleName", (void*)getModuleName},
+ {"JoystickTabletPlugin", "primitiveGetTabletParameters", (void*)primitiveGetTabletParameters},
+ {"JoystickTabletPlugin", "setInterpreter", (void*)setInterpreter},
+ {"JoystickTabletPlugin", "primitiveReadTablet", (void*)primitiveReadTablet},
  {"JoystickTabletPlugin", "initialiseModule", (void*)initialiseModule},
- {"JoystickTabletPlugin", "setInterpreter", (void*)setInterpreter},
- {"JoystickTabletPlugin", "primitiveGetTabletParameters", (void*)primitiveGetTabletParameters},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/Klatt/Klatt.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/Klatt/Klatt.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/Klatt/Klatt.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:26 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:17 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -175,9 +175,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "Klatt 10 November 2008 (i)"
+ "Klatt 26 August 2009 (i)"
 #else
- "Klatt 10 November 2008 (e)"
+ "Klatt 26 August 2009 (e)"
 #endif
 ;
 static float nlast;
@@ -284,9 +284,12 @@
  a = 1.0 / a;
  b = (0.0 - b) * a;
  c = (0.0 - c) * a;
- resonatorAput(index, a);
- resonatorBput(index, b);
- resonatorCput(index, c);
+ /* begin resonatorA:put: */
+ resonators[(index * 5) - 5] = a;
+ /* begin resonatorB:put: */
+ resonators[(index * 5) - 4] = b;
+ /* begin resonatorC:put: */
+ resonators[(index * 5) - 3] = c;
 }
 
 static float antiResonatorvalue(sqInt index, double  aFloat) {
@@ -294,8 +297,10 @@
     double  p1;
 
  answer = (((resonators[(index * 5) - 5]) * aFloat) + ((resonators[(index * 5) - 4]) * (p1 = resonators[(index * 5) - 2]))) + ((resonators[(index * 5) - 3]) * (resonators[(index * 5) - 1]));
- resonatorP2put(index, p1);
- resonatorP1put(index, aFloat);
+ /* begin resonatorP2:put: */
+ resonators[(index * 5) - 1] = p1;
+ /* begin resonatorP1:put: */
+ resonators[(index * 5) - 2] = aFloat;
  return answer;
 }
 
@@ -305,41 +310,134 @@
  tracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */
 
 static float cascadeBranch(float  source) {
-    float  out;
+    float out;
+    float  answer;
+    float  p1;
+    float  answer1;
+    float  p11;
+    float  answer2;
+    float  p12;
+    float  answer3;
+    float  p13;
+    float  answer4;
+    float  p14;
+    float  answer5;
+    float  p15;
+    float  answer6;
+    float  p16;
+    float  answer7;
+    float  p17;
+    double  answer8;
+    double  p18;
+    float  answer9;
+    float  p19;
+    double  answer10;
+    double  p110;
+    float  answer11;
+    float  p111;
 
  if (!(cascade > 0)) {
  return 0.0;
  }
- out = antiResonatorvalue(Rnz, source);
- out = resonatorvalue(Rnpc, out);
- out = antiResonatorvalue(Rtz, out);
-
- /* Do not use unless sample rate >= 16000 */
-
- out = resonatorvalue(Rtpc, out);
+ /* begin antiResonator:value: */
+ answer8 = (((resonators[(Rnz * 5) - 5]) * source) + ((resonators[(Rnz * 5) - 4]) * (p18 = resonators[(Rnz * 5) - 2]))) + ((resonators[(Rnz * 5) - 3]) * (resonators[(Rnz * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rnz * 5) - 1] = p18;
+ /* begin resonatorP1:put: */
+ resonators[(Rnz * 5) - 2] = source;
+ out = answer8;
+ /* begin resonator:value: */
+ answer9 = (((resonators[(Rnpc * 5) - 5]) * out) + ((resonators[(Rnpc * 5) - 4]) * (p19 = resonators[(Rnpc * 5) - 2]))) + ((resonators[(Rnpc * 5) - 3]) * (resonators[(Rnpc * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rnpc * 5) - 1] = p19;
+ /* begin resonatorP1:put: */
+ resonators[(Rnpc * 5) - 2] = answer9;
+ out = answer9;
+ /* begin antiResonator:value: */
+ answer10 = (((resonators[(Rtz * 5) - 5]) * out) + ((resonators[(Rtz * 5) - 4]) * (p110 = resonators[(Rtz * 5) - 2]))) + ((resonators[(Rtz * 5) - 3]) * (resonators[(Rtz * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rtz * 5) - 1] = p110;
+ /* begin resonatorP1:put: */
+ resonators[(Rtz * 5) - 2] = out;
+ out = answer10;
+ /* begin resonator:value: */
+ answer11 = (((resonators[(Rtpc * 5) - 5]) * out) + ((resonators[(Rtpc * 5) - 4]) * (p111 = resonators[(Rtpc * 5) - 2]))) + ((resonators[(Rtpc * 5) - 3]) * (resonators[(Rtpc * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rtpc * 5) - 1] = p111;
+ /* begin resonatorP1:put: */
+ resonators[(Rtpc * 5) - 2] = answer11;
+ out = answer11;
  if (cascade >= 8) {
- out = resonatorvalue(R8c, out);
+ /* begin resonator:value: */
+ answer = (((resonators[(R8c * 5) - 5]) * out) + ((resonators[(R8c * 5) - 4]) * (p1 = resonators[(R8c * 5) - 2]))) + ((resonators[(R8c * 5) - 3]) * (resonators[(R8c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R8c * 5) - 1] = p1;
+ /* begin resonatorP1:put: */
+ resonators[(R8c * 5) - 2] = answer;
+ out = answer;
  }
  if (cascade >= 7) {
- out = resonatorvalue(R7c, out);
+ /* begin resonator:value: */
+ answer1 = (((resonators[(R7c * 5) - 5]) * out) + ((resonators[(R7c * 5) - 4]) * (p11 = resonators[(R7c * 5) - 2]))) + ((resonators[(R7c * 5) - 3]) * (resonators[(R7c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R7c * 5) - 1] = p11;
+ /* begin resonatorP1:put: */
+ resonators[(R7c * 5) - 2] = answer1;
+ out = answer1;
  }
  if (cascade >= 6) {
- out = resonatorvalue(R6c, out);
+ /* begin resonator:value: */
+ answer2 = (((resonators[(R6c * 5) - 5]) * out) + ((resonators[(R6c * 5) - 4]) * (p12 = resonators[(R6c * 5) - 2]))) + ((resonators[(R6c * 5) - 3]) * (resonators[(R6c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R6c * 5) - 1] = p12;
+ /* begin resonatorP1:put: */
+ resonators[(R6c * 5) - 2] = answer2;
+ out = answer2;
  }
  if (cascade >= 5) {
- out = resonatorvalue(R5c, out);
+ /* begin resonator:value: */
+ answer3 = (((resonators[(R5c * 5) - 5]) * out) + ((resonators[(R5c * 5) - 4]) * (p13 = resonators[(R5c * 5) - 2]))) + ((resonators[(R5c * 5) - 3]) * (resonators[(R5c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R5c * 5) - 1] = p13;
+ /* begin resonatorP1:put: */
+ resonators[(R5c * 5) - 2] = answer3;
+ out = answer3;
  }
  if (cascade >= 4) {
- out = resonatorvalue(R4c, out);
+ /* begin resonator:value: */
+ answer4 = (((resonators[(R4c * 5) - 5]) * out) + ((resonators[(R4c * 5) - 4]) * (p14 = resonators[(R4c * 5) - 2]))) + ((resonators[(R4c * 5) - 3]) * (resonators[(R4c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R4c * 5) - 1] = p14;
+ /* begin resonatorP1:put: */
+ resonators[(R4c * 5) - 2] = answer4;
+ out = answer4;
  }
  if (cascade >= 3) {
- out = resonatorvalue(R3c, out);
+ /* begin resonator:value: */
+ answer5 = (((resonators[(R3c * 5) - 5]) * out) + ((resonators[(R3c * 5) - 4]) * (p15 = resonators[(R3c * 5) - 2]))) + ((resonators[(R3c * 5) - 3]) * (resonators[(R3c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R3c * 5) - 1] = p15;
+ /* begin resonatorP1:put: */
+ resonators[(R3c * 5) - 2] = answer5;
+ out = answer5;
  }
  if (cascade >= 2) {
- out = resonatorvalue(R2c, out);
+ /* begin resonator:value: */
+ answer6 = (((resonators[(R2c * 5) - 5]) * out) + ((resonators[(R2c * 5) - 4]) * (p16 = resonators[(R2c * 5) - 2]))) + ((resonators[(R2c * 5) - 3]) * (resonators[(R2c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R2c * 5) - 1] = p16;
+ /* begin resonatorP1:put: */
+ resonators[(R2c * 5) - 2] = answer6;
+ out = answer6;
  }
  if (cascade >= 1) {
- out = resonatorvalue(R1c, out);
+ /* begin resonator:value: */
+ answer7 = (((resonators[(R1c * 5) - 5]) * out) + ((resonators[(R1c * 5) - 4]) * (p17 = resonators[(R1c * 5) - 2]))) + ((resonators[(R1c * 5) - 3]) * (resonators[(R1c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R1c * 5) - 1] = p17;
+ /* begin resonatorP1:put: */
+ resonators[(R1c * 5) - 2] = answer7;
+ out = answer7;
  }
  return out;
 }
@@ -651,9 +749,12 @@
  arg = ((PI * 2.0) / samplingRate) * freq;
  b = (r * (cos(arg))) * 2.0;
  a = (1.0 - b) - c;
- resonatorAput(index, a);
- resonatorBput(index, b);
- resonatorCput(index, c);
+ /* begin resonatorA:put: */
+ resonators[(index * 5) - 5] = a;
+ /* begin resonatorB:put: */
+ resonators[(index * 5) - 4] = b;
+ /* begin resonatorC:put: */
+ resonators[(index * 5) - 3] = c;
 }
 
 
@@ -662,7 +763,8 @@
 
 static void resonatorfrequencybandwidthgain(sqInt index, float  freq, float  bw, float  gain) {
  resonatorfrequencybandwidth(index, freq, bw);
- resonatorAput(index, (resonators[(index * 5) - 5]) * gain);
+ /* begin resonatorA:put: */
+ resonators[(index * 5) - 5] = ((resonators[(index * 5) - 5]) * gain);
 }
 
 static float resonatorvalue(sqInt index, float  aFloat) {
@@ -674,8 +776,10 @@
  (answer between: -100000 and: 100000) ifFalse: [self halt]. */
 
  answer = (((resonators[(index * 5) - 5]) * aFloat) + ((resonators[(index * 5) - 4]) * (p1 = resonators[(index * 5) - 2]))) + ((resonators[(index * 5) - 3]) * (resonators[(index * 5) - 1]));
- resonatorP2put(index, p1);
- resonatorP1put(index, answer);
+ /* begin resonatorP2:put: */
+ resonators[(index * 5) - 1] = p1;
+ /* begin resonatorP1:put: */
+ resonators[(index * 5) - 2] = answer;
  return answer;
 }
 
@@ -735,6 +839,10 @@
     float  gamma;
     float  gammapwr;
     float  r;
+    float  s1;
+    sqInt ingore;
+    float  s2;
+    float  s0;
 
  te = ((sqInt) (t0 * roNumber) );
  ro = (((double) te )) / (((double) t0 ));
@@ -761,7 +869,18 @@
  gammapwr = pow(gamma,(t0 - te));
  b1 = gamma;
  c1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);
- normalizeGlottalPulse();
+ /* begin normalizeGlottalPulse */
+ s0 = 0.0;
+ s1 = x1;
+ s2 = x2;
+ for (ingore = 1; ingore <= nopen; ingore += 1) {
+ s0 = (a1 * s1) + (a2 * s2);
+ s2 = s1;
+ s1 = s0;
+ }
+ if (!(s0 == 0.0)) {
+ x1 = (x1 / s0) * 10000.0;
+ }
 }
 
 static sqInt saveTo(sqInt origKlattOop) {
@@ -841,48 +960,48 @@
 
  /* -4.44 dB */
 
- ampFNV = (linearFromdB(frame[Anv])) * 0.6;
+ ampFNV = ((pow(2.0,(((frame[Anv]) - 87.0) / 6.0))) * 32.767) * 0.6;
 
  /* -4.44 dB */
 
- ampFTV = (linearFromdB(frame[Atv])) * 0.6;
+ ampFTV = ((pow(2.0,(((frame[Atv]) - 87.0) / 6.0))) * 32.767) * 0.6;
 
  /* -7.96 dB */
 
- ampF1V = (linearFromdB(frame[A1v])) * 0.4;
+ ampF1V = ((pow(2.0,(((frame[A1v]) - 87.0) / 6.0))) * 32.767) * 0.4;
 
  /* -16.5 dB */
 
- ampF2V = (linearFromdB(frame[A2v])) * 0.15;
+ ampF2V = ((pow(2.0,(((frame[A2v]) - 87.0) / 6.0))) * 32.767) * 0.15;
 
  /* -24.4 dB */
 
- ampF3V = (linearFromdB(frame[A3v])) * 0.06;
+ ampF3V = ((pow(2.0,(((frame[A3v]) - 87.0) / 6.0))) * 32.767) * 0.06;
 
  /* -28.0 dB */
 
- ampF4V = (linearFromdB(frame[A4v])) * 0.04;
+ ampF4V = ((pow(2.0,(((frame[A4v]) - 87.0) / 6.0))) * 32.767) * 0.04;
 
  /* -16.5 dB */
 
- ampF2F = (linearFromdB(frame[A2f])) * 0.15;
+ ampF2F = ((pow(2.0,(((frame[A2f]) - 87.0) / 6.0))) * 32.767) * 0.15;
 
  /* -24.4 dB */
 
- ampF3F = (linearFromdB(frame[A3f])) * 0.06;
+ ampF3F = ((pow(2.0,(((frame[A3f]) - 87.0) / 6.0))) * 32.767) * 0.06;
 
  /* -28.0 dB */
 
- ampF4F = (linearFromdB(frame[A4f])) * 0.04;
+ ampF4F = ((pow(2.0,(((frame[A4f]) - 87.0) / 6.0))) * 32.767) * 0.04;
 
  /* -33.2 dB */
 
- ampF5F = (linearFromdB(frame[A5f])) * 0.022;
+ ampF5F = ((pow(2.0,(((frame[A5f]) - 87.0) / 6.0))) * 32.767) * 0.022;
 
  /* -30.5 dB */
  /* Set coefficients of variable cascade resonators */
 
- ampF6F = (linearFromdB(frame[A6f])) * 0.03;
+ ampF6F = ((pow(2.0,(((frame[A6f]) - 87.0) / 6.0))) * 32.767) * 0.03;
  if (cascade >= 8) {
  if (samplingRate >= 16000) {
  resonatorfrequencybandwidth(R8c, 7500, 600);
@@ -951,35 +1070,63 @@
     float  frictionNoise;
     float  turbulence;
     float  gain;
-    float  voice;
+    float voice;
     float  aspirationNoise;
     float  glotout;
-    float  out;
+    float out;
     sqInt top;
     float  parVoicing;
     sqInt temp;
     float  friction;
+    float  x0;
+    float out1;
+    float  answer;
+    float  p1;
+    float  answer1;
+    float  p11;
+    float  answer2;
+    float  p12;
+    float  answer3;
+    float  p13;
+    float  answer4;
+    float  p14;
+    float  answer5;
+    float  p15;
+    float  answer6;
+    float  p16;
+    float  answer7;
+    float  p17;
+    double  answer8;
+    double  p18;
+    float  answer9;
+    float  p19;
+    double  answer10;
+    double  p110;
+    float  answer11;
+    float  p111;
+    float  answer12;
+    float  p112;
 
  setCurrentFrame(aKlattFrame);
  if (pitch > 0) {
- voicing = linearFromdB((frame[Voicing]) - 7);
- parVoicing = linearFromdB(frame[Voicing]);
- turbulence = (linearFromdB(frame[Turbulence])) * 0.1;
+ voicing = (pow(2.0,((((frame[Voicing]) - 7) - 87.0) / 6.0))) * 32.767;
+ parVoicing = (pow(2.0,(((frame[Voicing]) - 87.0) / 6.0))) * 32.767;
+ turbulence = ((pow(2.0,(((frame[Turbulence]) - 87.0) / 6.0))) * 32.767) * 0.1;
  } else {
  voicing = parVoicing = turbulence = 0.0;
  }
- friction = (linearFromdB(frame[Friction])) * 0.25;
- aspiration = (linearFromdB(frame[Aspiration])) * 0.05;
+ friction = ((pow(2.0,(((frame[Friction]) - 87.0) / 6.0))) * 32.767) * 0.25;
+ aspiration = ((pow(2.0,(((frame[Aspiration]) - 87.0) / 6.0))) * 32.767) * 0.05;
 
  /* -26.0 dB */
  /* Flod overall gain into output resonator (low-pass filter) */
 
- bypass = (linearFromdB(frame[Bypass])) * 0.05;
+ bypass = ((pow(2.0,(((frame[Bypass]) - 87.0) / 6.0))) * 32.767) * 0.05;
  gain = (frame[Gain]) - 3;
  if (gain <= 0) {
  gain = 57;
  }
- ampGain = linearFromdB(gain);
+ ampGain = (pow(2.0,((gain - 87.0) / 6.0))) * 32.767;
  resonatorfrequencybandwidthgain(Rout, 0, samplingRate, ampGain);
  noise = nlast;
  index = startIndex;
@@ -1004,7 +1151,65 @@
  /* Compute voicing waveform. */
 
  frictionNoise = friction * noise;
- voice = glottalSource();
+ /* begin glottalSource */
+ if (t0 == 0) {
+ voice = 0;
+ goto l1;
+ }
+ if (nper < nopen) {
+ x0 = (a1 * x1) + (a2 * x2);
+ x2 = x1;
+ x1 = x0;
+ } else {
+ x0 = (b1 * x1) - c1;
+ x1 = x0;
+ }
+ if (nper >= t0) {
+ nper = 0;
+ /* begin pitchSynchronousReset */
+ if ((frame[F0]) > 0) {
+ /* begin voicedPitchSynchronousReset */
+ pitch = frame[F0];
+ addFlutter();
+ /* begin addJitter */
+ pitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);
+ /* begin addFrequencyDiplophonia */
+ if ((periodCount % 2) == 0) {
+ pitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));
+ } else {
+ pitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));
+ }
+ if (pitch < 0) {
+ pitch = 0;
+ }
+ t0 = ((sqInt) (samplingRate / pitch) );
+ nmod = t0;
+ if ((frame[Voicing]) > 0) {
+ nmod = ((sqInt) nmod >> 1);
+ }
+ nopen = ((sqInt) (t0 * (frame[Ro])) );
+ rorark(frame[Ro], frame[Ra], frame[Rk]);
+ /* begin addShimmer */
+ x1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;
+ if (x1 > 0) {
+ x1 = 0;
+ }
+ /* begin addAmplitudeDiplophonia */
+ if (!((periodCount % 2) == 0)) {
+ x1 = x1 * (1.0 - (frame[Diplophonia]));
+ if (x1 > 0) {
+ x1 = 0;
+ }
+ }
+ periodCount = (periodCount + 1) % 65535;
+ } else {
+ t0 = 1;
+ nmod = t0;
+ }
+ }
+ nper += 1;
+ voice = x0;
+ l1: /* end glottalSource */;
 
  /* Add turbulence during glottal open phase.
  Use random rather than noise because noise is low-passed. */
@@ -1026,11 +1231,114 @@
  tracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */
 
  parGlotout += aspirationNoise;
+ /* begin cascadeBranch: */
+ if (!(cascade > 0)) {
+ out = 0.0;
+ goto l2;
+ }
+ /* begin antiResonator:value: */
+ answer8 = (((resonators[(Rnz * 5) - 5]) * glotout) + ((resonators[(Rnz * 5) - 4]) * (p18 = resonators[(Rnz * 5) - 2]))) + ((resonators[(Rnz * 5) - 3]) * (resonators[(Rnz * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rnz * 5) - 1] = p18;
+ /* begin resonatorP1:put: */
+ resonators[(Rnz * 5) - 2] = glotout;
+ out1 = answer8;
+ /* begin resonator:value: */
+ answer9 = (((resonators[(Rnpc * 5) - 5]) * out1) + ((resonators[(Rnpc * 5) - 4]) * (p19 = resonators[(Rnpc * 5) - 2]))) + ((resonators[(Rnpc * 5) - 3]) * (resonators[(Rnpc * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rnpc * 5) - 1] = p19;
+ /* begin resonatorP1:put: */
+ resonators[(Rnpc * 5) - 2] = answer9;
+ out1 = answer9;
+ /* begin antiResonator:value: */
+ answer10 = (((resonators[(Rtz * 5) - 5]) * out1) + ((resonators[(Rtz * 5) - 4]) * (p110 = resonators[(Rtz * 5) - 2]))) + ((resonators[(Rtz * 5) - 3]) * (resonators[(Rtz * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rtz * 5) - 1] = p110;
+ /* begin resonatorP1:put: */
+ resonators[(Rtz * 5) - 2] = out1;
+ out1 = answer10;
+ /* begin resonator:value: */
+ answer11 = (((resonators[(Rtpc * 5) - 5]) * out1) + ((resonators[(Rtpc * 5) - 4]) * (p111 = resonators[(Rtpc * 5) - 2]))) + ((resonators[(Rtpc * 5) - 3]) * (resonators[(Rtpc * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rtpc * 5) - 1] = p111;
+ /* begin resonatorP1:put: */
+ resonators[(Rtpc * 5) - 2] = answer11;
+ out1 = answer11;
+ if (cascade >= 8) {
+ /* begin resonator:value: */
+ answer = (((resonators[(R8c * 5) - 5]) * out1) + ((resonators[(R8c * 5) - 4]) * (p1 = resonators[(R8c * 5) - 2]))) + ((resonators[(R8c * 5) - 3]) * (resonators[(R8c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R8c * 5) - 1] = p1;
+ /* begin resonatorP1:put: */
+ resonators[(R8c * 5) - 2] = answer;
+ out1 = answer;
+ }
+ if (cascade >= 7) {
+ /* begin resonator:value: */
+ answer1 = (((resonators[(R7c * 5) - 5]) * out1) + ((resonators[(R7c * 5) - 4]) * (p11 = resonators[(R7c * 5) - 2]))) + ((resonators[(R7c * 5) - 3]) * (resonators[(R7c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R7c * 5) - 1] = p11;
+ /* begin resonatorP1:put: */
+ resonators[(R7c * 5) - 2] = answer1;
+ out1 = answer1;
+ }
+ if (cascade >= 6) {
+ /* begin resonator:value: */
+ answer2 = (((resonators[(R6c * 5) - 5]) * out1) + ((resonators[(R6c * 5) - 4]) * (p12 = resonators[(R6c * 5) - 2]))) + ((resonators[(R6c * 5) - 3]) * (resonators[(R6c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R6c * 5) - 1] = p12;
+ /* begin resonatorP1:put: */
+ resonators[(R6c * 5) - 2] = answer2;
+ out1 = answer2;
+ }
+ if (cascade >= 5) {
+ /* begin resonator:value: */
+ answer3 = (((resonators[(R5c * 5) - 5]) * out1) + ((resonators[(R5c * 5) - 4]) * (p13 = resonators[(R5c * 5) - 2]))) + ((resonators[(R5c * 5) - 3]) * (resonators[(R5c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R5c * 5) - 1] = p13;
+ /* begin resonatorP1:put: */
+ resonators[(R5c * 5) - 2] = answer3;
+ out1 = answer3;
+ }
+ if (cascade >= 4) {
+ /* begin resonator:value: */
+ answer4 = (((resonators[(R4c * 5) - 5]) * out1) + ((resonators[(R4c * 5) - 4]) * (p14 = resonators[(R4c * 5) - 2]))) + ((resonators[(R4c * 5) - 3]) * (resonators[(R4c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R4c * 5) - 1] = p14;
+ /* begin resonatorP1:put: */
+ resonators[(R4c * 5) - 2] = answer4;
+ out1 = answer4;
+ }
+ if (cascade >= 3) {
+ /* begin resonator:value: */
+ answer5 = (((resonators[(R3c * 5) - 5]) * out1) + ((resonators[(R3c * 5) - 4]) * (p15 = resonators[(R3c * 5) - 2]))) + ((resonators[(R3c * 5) - 3]) * (resonators[(R3c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R3c * 5) - 1] = p15;
+ /* begin resonatorP1:put: */
+ resonators[(R3c * 5) - 2] = answer5;
+ out1 = answer5;
+ }
+ if (cascade >= 2) {
+ /* begin resonator:value: */
+ answer6 = (((resonators[(R2c * 5) - 5]) * out1) + ((resonators[(R2c * 5) - 4]) * (p16 = resonators[(R2c * 5) - 2]))) + ((resonators[(R2c * 5) - 3]) * (resonators[(R2c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R2c * 5) - 1] = p16;
+ /* begin resonatorP1:put: */
+ resonators[(R2c * 5) - 2] = answer6;
+ out1 = answer6;
+ }
+ if (cascade >= 1) {
+ /* begin resonator:value: */
+ answer7 = (((resonators[(R1c * 5) - 5]) * out1) + ((resonators[(R1c * 5) - 4]) * (p17 = resonators[(R1c * 5) - 2]))) + ((resonators[(R1c * 5) - 3]) * (resonators[(R1c * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(R1c * 5) - 1] = p17;
+ /* begin resonatorP1:put: */
+ resonators[(R1c * 5) - 2] = answer7;
+ out1 = answer7;
+ }
+ out = out1;
+ l2: /* end cascadeBranch: */;
 
- /* Voice-excited parallel vocal tract F1, F2, F3, F4, FNP and FTP. */
-
- out = cascadeBranch(glotout);
-
  /* Source is voicing plus aspiration. */
 
  source = parGlotout;
@@ -1040,15 +1348,21 @@
  parallel resonators is friction plus first difference of
  voicing waveform. */
 
- out += parallelVoicedBranch(source);
+ out += (((((resonatorvalue(R1vp, source)) + (resonatorvalue(R2vp, source))) + (resonatorvalue(R3vp, source))) + (resonatorvalue(R4vp, source))) + (resonatorvalue(Rnpp, source))) + (resonatorvalue(Rtpp, source));
  source = (frictionNoise + parGlotout) - glast;
  glast = parGlotout;
 
  /* Apply bypas and output low-pass filter */
 
- out = (parallelFrictionBranch(source)) - out;
+ out = (((((resonatorvalue(R2fp, source)) - (resonatorvalue(R3fp, source))) + (resonatorvalue(R4fp, source))) - (resonatorvalue(R5fp, source))) + (resonatorvalue(R6fp, source))) - out;
  out = (bypass * source) - out;
- out = resonatorvalue(Rout, out);
+ /* begin resonator:value: */
+ answer12 = (((resonators[(Rout * 5) - 5]) * out) + ((resonators[(Rout * 5) - 4]) * (p112 = resonators[(Rout * 5) - 2]))) + ((resonators[(Rout * 5) - 3]) * (resonators[(Rout * 5) - 1]));
+ /* begin resonatorP2:put: */
+ resonators[(Rout * 5) - 1] = p112;
+ /* begin resonatorP1:put: */
+ resonators[(Rout * 5) - 2] = answer12;
+ out = answer12;
  temp = ((sqInt) (out * ampGain) );
  if (temp < -32768) {
  temp = -32768;

Modified: trunk/platforms/unix/src/vm/intplugins/LargeIntegers/LargeIntegers.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/LargeIntegers/LargeIntegers.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/LargeIntegers/LargeIntegers.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:27 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:19 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -34,9 +34,6 @@
 /*** Constants ***/
 
 /*** Function Prototypes ***/
-#pragma export on
-EXPORT(sqInt) _primDigitBitShift(void);
-#pragma export off
 static sqInt anyBitOfBytesfromto(sqInt aBytesOop, sqInt start, sqInt stopArg);
 static sqInt byteSizeOfBytes(sqInt bytesOop);
 static sqInt bytesLshift(sqInt aBytesOop, sqInt shiftCount);
@@ -85,6 +82,7 @@
 EXPORT(sqInt) primAnyBitFromTo(void);
 EXPORT(sqInt) primAsLargeInteger(void);
 EXPORT(sqInt) primCheckIfCModuleExists(void);
+EXPORT(sqInt) _primDigitBitShift(void);
 EXPORT(sqInt) primDigitAdd(void);
 EXPORT(sqInt) primDigitAddWith(void);
 EXPORT(sqInt) primDigitBitAnd(void);
@@ -119,64 +117,16 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "LargeIntegers v1.5 10 November 2008 (i)"
+ "LargeIntegers v1.5 26 August 2009 (i)"
 #else
- "LargeIntegers v1.5 10 November 2008 (e)"
+ "LargeIntegers v1.5 26 August 2009 (e)"
 #endif
 ;
 static const int  orOpIndex = 1;
 static const int  xorOpIndex = 2;
 
 
-EXPORT(sqInt) _primDigitBitShift(void) {
- sqInt rShift;
- sqInt aLarge;
- sqInt anInteger;
- sqInt shiftCount;
- sqInt _return_value;
- sqInt aLargeInteger;
 
- interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), "Integer"));
- anInteger = interpreterProxy->stackValue(1);
- shiftCount = interpreterProxy->stackIntegerValue(0);
- /* missing DebugCode */;
- if (interpreterProxy->failed()) {
- return null;
- }
- if ((anInteger & 1)) {
- aLarge = createLargeFromSmallInteger(anInteger);
- } else {
- aLarge = anInteger;
- }
- if (shiftCount >= 0) {
- _return_value = bytesLshift(aLarge, shiftCount);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(3, _return_value);
- return null;
- } else {
- rShift = 0 - shiftCount;
- /* begin normalize: */
- aLargeInteger = bytesRshiftbyteslookfirst(aLarge, rShift & 7, ((usqInt) rShift >> 3), interpreterProxy->slotSizeOf(aLarge));
- /* missing DebugCode */;
- if ((interpreterProxy->fetchClassOf(aLargeInteger)) == (interpreterProxy->classLargePositiveInteger())) {
- _return_value = normalizePositive(aLargeInteger);
- goto l1;
- } else {
- _return_value = normalizeNegative(aLargeInteger);
- goto l1;
- }
- l1: /* end normalize: */;
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(3, _return_value);
- return null;
- }
-}
-
-
 /* Argument has to be aBytesOop! */
 /* Tests for any magnitude bits in the interval from start to stopArg. */
 
@@ -1476,6 +1426,54 @@
  return null;
 }
 
+EXPORT(sqInt) _primDigitBitShift(void) {
+ sqInt rShift;
+ sqInt aLarge;
+ sqInt anInteger;
+ sqInt shiftCount;
+ sqInt _return_value;
+ sqInt aLargeInteger;
+
+ interpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), "Integer"));
+ anInteger = interpreterProxy->stackValue(1);
+ shiftCount = interpreterProxy->stackIntegerValue(0);
+ /* missing DebugCode */;
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ if ((anInteger & 1)) {
+ aLarge = createLargeFromSmallInteger(anInteger);
+ } else {
+ aLarge = anInteger;
+ }
+ if (shiftCount >= 0) {
+ _return_value = bytesLshift(aLarge, shiftCount);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(3, _return_value);
+ return null;
+ } else {
+ rShift = 0 - shiftCount;
+ /* begin normalize: */
+ aLargeInteger = bytesRshiftbyteslookfirst(aLarge, rShift & 7, ((usqInt) rShift >> 3), interpreterProxy->slotSizeOf(aLarge));
+ /* missing DebugCode */;
+ if ((interpreterProxy->fetchClassOf(aLargeInteger)) == (interpreterProxy->classLargePositiveInteger())) {
+ _return_value = normalizePositive(aLargeInteger);
+ goto l1;
+ } else {
+ _return_value = normalizeNegative(aLargeInteger);
+ goto l1;
+ }
+ l1: /* end normalize: */;
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(3, _return_value);
+ return null;
+ }
+}
+
 EXPORT(sqInt) primDigitAdd(void) {
  sqInt secondLarge;
  sqInt firstLarge;
@@ -2275,32 +2273,32 @@
 
 
 void* LargeIntegers_exports[][3] = {
- {"LargeIntegers", "primDigitMultiplyNegative", (void*)primDigitMultiplyNegative},
+ {"LargeIntegers", "primDigitBitOr", (void*)primDigitBitOr},
  {"LargeIntegers", "primNormalizePositive", (void*)primNormalizePositive},
+ {"LargeIntegers", "primDigitSubtractWith", (void*)primDigitSubtractWith},
+ {"LargeIntegers", "primDigitCompare", (void*)primDigitCompare},
  {"LargeIntegers", "primAnyBitFromTo", (void*)primAnyBitFromTo},
+ {"LargeIntegers", "primDigitBitShift", (void*)primDigitBitShift},
+ {"LargeIntegers", "primDigitDivNegative", (void*)primDigitDivNegative},
  {"LargeIntegers", "setInterpreter", (void*)setInterpreter},
+ {"LargeIntegers", "primNormalize", (void*)primNormalize},
+ {"LargeIntegers", "primDigitCompareWith", (void*)primDigitCompareWith},
+ {"LargeIntegers", "primDigitBitAnd", (void*)primDigitBitAnd},
+ {"LargeIntegers", "primDigitMultiplyNegative", (void*)primDigitMultiplyNegative},
  {"LargeIntegers", "getModuleName", (void*)getModuleName},
+ {"LargeIntegers", "primDigitDivWithNegative", (void*)primDigitDivWithNegative},
+ {"LargeIntegers", "primDigitAddWith", (void*)primDigitAddWith},
  {"LargeIntegers", "primAsLargeInteger", (void*)primAsLargeInteger},
- {"LargeIntegers", "primDigitBitAnd", (void*)primDigitBitAnd},
  {"LargeIntegers", "primGetModuleName", (void*)primGetModuleName},
- {"LargeIntegers", "_primDigitBitShift", (void*)_primDigitBitShift},
- {"LargeIntegers", "primDigitAddWith", (void*)primDigitAddWith},
- {"LargeIntegers", "primDigitCompareWith", (void*)primDigitCompareWith},
- {"LargeIntegers", "primDigitSubtractWith", (void*)primDigitSubtractWith},
- {"LargeIntegers", "primDigitBitShift", (void*)primDigitBitShift},
- {"LargeIntegers", "primDigitSubtract", (void*)primDigitSubtract},
- {"LargeIntegers", "primNormalizeNegative", (void*)primNormalizeNegative},
- {"LargeIntegers", "primDigitBitLogicWithOp", (void*)primDigitBitLogicWithOp},
  {"LargeIntegers", "primDigitAdd", (void*)primDigitAdd},
- {"LargeIntegers", "primDigitDivWithNegative", (void*)primDigitDivWithNegative},
  {"LargeIntegers", "primDigitBitShiftMagnitude", (void*)primDigitBitShiftMagnitude},
- {"LargeIntegers", "primDigitBitOr", (void*)primDigitBitOr},
- {"LargeIntegers", "primDigitMultiplyWithNegative", (void*)primDigitMultiplyWithNegative},
  {"LargeIntegers", "primDigitBitXor", (void*)primDigitBitXor},
+ {"LargeIntegers", "primDigitSubtract", (void*)primDigitSubtract},
+ {"LargeIntegers", "primNormalizeNegative", (void*)primNormalizeNegative},
+ {"LargeIntegers", "primDigitMultiplyWithNegative", (void*)primDigitMultiplyWithNegative},
  {"LargeIntegers", "primCheckIfCModuleExists", (void*)primCheckIfCModuleExists},
- {"LargeIntegers", "primDigitDivNegative", (void*)primDigitDivNegative},
- {"LargeIntegers", "primDigitCompare", (void*)primDigitCompare},
- {"LargeIntegers", "primNormalize", (void*)primNormalize},
+ {"LargeIntegers", "primDigitBitLogicWithOp", (void*)primDigitBitLogicWithOp},
+ {"LargeIntegers", "_primDigitBitShift", (void*)_primDigitBitShift},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/LocalePlugin/LocalePlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/LocalePlugin/LocalePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/LocalePlugin/LocalePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:28 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:20 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -69,9 +69,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "LocalePlugin 10 November 2008 (i)"
+ "LocalePlugin 26 August 2009 (i)"
 #else
- "LocalePlugin 10 November 2008 (e)"
+ "LocalePlugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:28 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:21 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -72,9 +72,9 @@
 static double m23ResultY;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "Matrix2x3Plugin 10 November 2008 (i)"
+ "Matrix2x3Plugin 26 August 2009 (i)"
 #else
- "Matrix2x3Plugin 10 November 2008 (e)"
+ "Matrix2x3Plugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:29 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:23 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -62,9 +62,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "MiscPrimitivePlugin 10 November 2008 (i)"
+ "MiscPrimitivePlugin 26 August 2009 (i)"
 #else
- "MiscPrimitivePlugin 10 November 2008 (e)"
+ "MiscPrimitivePlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -110,6 +110,8 @@
  255 next 4 bytes */
 
 static sqInt encodeIntinat(sqInt anInt, unsigned char *ba, sqInt i) {
+    sqInt j;
+
  if (anInt <= 223) {
  ba[i] = anInt;
  return i + 1;
@@ -120,7 +122,11 @@
  return i + 2;
  }
  ba[i] = 255;
- return encodeBytesOfinat(anInt, ba, i + 1);
+ /* begin encodeBytesOf:in:at: */
+ for (j = 0; j <= 3; j += 1) {
+ ba[(i + 1) + j] = ((((usqInt) anInt) >> ((3 - j) * 8)) & 255);
+ }
+ return (i + 1) + 4;
 }
 
 
@@ -253,6 +259,13 @@
     sqInt i;
     sqInt lowByte;
     sqInt m;
+    sqInt j1;
+    sqInt j2;
+    sqInt j3;
+    sqInt j4;
+    sqInt j5;
+    sqInt j6;
+    sqInt j7;
 
  rcvr = stackValue(2);
  bm = arrayValueOf(stackValue(1));
@@ -263,7 +276,25 @@
  return null;
  }
  size = sizeOfSTArrayFromCPrimitive(bm + 1);
- i = encodeIntinat(size, ba, 1);
+ /* begin encodeInt:in:at: */
+ if (size <= 223) {
+ ba[1] = size;
+ i = 1 + 1;
+ goto l5;
+ }
+ if (size <= 7935) {
+ ba[1] = ((((sqInt) size >> 8)) + 224);
+ ba[1 + 1] = (size % 256);
+ i = 1 + 2;
+ goto l5;
+ }
+ ba[1] = 255;
+ /* begin encodeBytesOf:in:at: */
+ for (j7 = 0; j7 <= 3; j7 += 1) {
+ ba[(1 + 1) + j7] = ((((usqInt) size) >> ((3 - j7) * 8)) & 255);
+ }
+ i = (1 + 1) + 4;
+l5: /* end encodeInt:in:at: */;
  k = 1;
  while (k <= size) {
  word = bm[k];
@@ -275,17 +306,75 @@
  }
  if (j > k) {
  if (eqBytes) {
- i = encodeIntinat((((j - k) + 1) * 4) + 1, ba, i);
+ /* begin encodeInt:in:at: */
+ if (((((j - k) + 1) * 4) + 1) <= 223) {
+ ba[i] = ((((j - k) + 1) * 4) + 1);
+ i += 1;
+ goto l1;
+ }
+ if (((((j - k) + 1) * 4) + 1) <= 7935) {
+ ba[i] = ((((sqInt) ((((j - k) + 1) * 4) + 1) >> 8)) + 224);
+ ba[i + 1] = (((((j - k) + 1) * 4) + 1) % 256);
+ i += 2;
+ goto l1;
+ }
+ ba[i] = 255;
+ /* begin encodeBytesOf:in:at: */
+ for (j3 = 0; j3 <= 3; j3 += 1) {
+ ba[(i + 1) + j3] = ((((usqInt) ((((j - k) + 1) * 4) + 1)) >> ((3 - j3) * 8)) & 255);
+ }
+ i = (i + 1) + 4;
+ l1: /* end encodeInt:in:at: */;
  ba[i] = lowByte;
  i += 1;
  } else {
- i = encodeIntinat((((j - k) + 1) * 4) + 2, ba, i);
- i = encodeBytesOfinat(word, ba, i);
+ /* begin encodeInt:in:at: */
+ if (((((j - k) + 1) * 4) + 2) <= 223) {
+ ba[i] = ((((j - k) + 1) * 4) + 2);
+ i += 1;
+ goto l2;
+ }
+ if (((((j - k) + 1) * 4) + 2) <= 7935) {
+ ba[i] = ((((sqInt) ((((j - k) + 1) * 4) + 2) >> 8)) + 224);
+ ba[i + 1] = (((((j - k) + 1) * 4) + 2) % 256);
+ i += 2;
+ goto l2;
+ }
+ ba[i] = 255;
+ /* begin encodeBytesOf:in:at: */
+ for (j4 = 0; j4 <= 3; j4 += 1) {
+ ba[(i + 1) + j4] = ((((usqInt) ((((j - k) + 1) * 4) + 2)) >> ((3 - j4) * 8)) & 255);
+ }
+ i = (i + 1) + 4;
+ l2: /* end encodeInt:in:at: */;
+ /* begin encodeBytesOf:in:at: */
+ for (j1 = 0; j1 <= 3; j1 += 1) {
+ ba[i + j1] = ((((usqInt) word) >> ((3 - j1) * 8)) & 255);
+ }
+ i += 4;
  }
  k = j + 1;
  } else {
  if (eqBytes) {
- i = encodeIntinat((1 * 4) + 1, ba, i);
+ /* begin encodeInt:in:at: */
+ if (((1 * 4) + 1) <= 223) {
+ ba[i] = ((1 * 4) + 1);
+ i += 1;
+ goto l3;
+ }
+ if (((1 * 4) + 1) <= 7935) {
+ ba[i] = ((((sqInt) ((1 * 4) + 1) >> 8)) + 224);
+ ba[i + 1] = (((1 * 4) + 1) % 256);
+ i += 2;
+ goto l3;
+ }
+ ba[i] = 255;
+ /* begin encodeBytesOf:in:at: */
+ for (j5 = 0; j5 <= 3; j5 += 1) {
+ ba[(i + 1) + j5] = ((((usqInt) ((1 * 4) + 1)) >> ((3 - j5) * 8)) & 255);
+ }
+ i = (i + 1) + 4;
+ l3: /* end encodeInt:in:at: */;
  ba[i] = lowByte;
  i += 1;
  k += 1;
@@ -296,9 +385,31 @@
  if (j == size) {
  j += 1;
  }
- i = encodeIntinat(((j - k) * 4) + 3, ba, i);
+ /* begin encodeInt:in:at: */
+ if ((((j - k) * 4) + 3) <= 223) {
+ ba[i] = (((j - k) * 4) + 3);
+ i += 1;
+ goto l4;
+ }
+ if ((((j - k) * 4) + 3) <= 7935) {
+ ba[i] = ((((sqInt) (((j - k) * 4) + 3) >> 8)) + 224);
+ ba[i + 1] = ((((j - k) * 4) + 3) % 256);
+ i += 2;
+ goto l4;
+ }
+ ba[i] = 255;
+ /* begin encodeBytesOf:in:at: */
+ for (j6 = 0; j6 <= 3; j6 += 1) {
+ ba[(i + 1) + j6] = ((((usqInt) (((j - k) * 4) + 3)) >> ((3 - j6) * 8)) & 255);
+ }
+ i = (i + 1) + 4;
+ l4: /* end encodeInt:in:at: */;
  for (m = k; m <= (j - 1); m += 1) {
- i = encodeBytesOfinat(bm[m], ba, i);
+ /* begin encodeBytesOf:in:at: */
+ for (j2 = 0; j2 <= 3; j2 += 1) {
+ ba[i + j2] = ((((usqInt) (bm[m])) >> ((3 - j2) * 8)) & 255);
+ }
+ i += 4;
  }
  k = j;
  }

Modified: trunk/platforms/unix/src/vm/intplugins/RePlugin/RePlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/RePlugin/RePlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/RePlugin/RePlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:29 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:25 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -87,9 +87,9 @@
 static sqInt matchFlags;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "RePlugin 10 November 2008 (i)"
+ "RePlugin 26 August 2009 (i)"
 #else
- "RePlugin 10 November 2008 (e)"
+ "RePlugin 26 August 2009 (e)"
 #endif
 ;
 static int netMemory = 0;
@@ -259,6 +259,7 @@
  sqInt result;
  char * searchBuffer;
  sqInt matchSpaceSize;
+ sqInt extraObj;
 
  searchObject = interpreterProxy->stackObjectValue(0);
  searchBuffer = interpreterProxy->arrayValueOf(searchObject);
@@ -266,7 +267,14 @@
  /* begin loadRcvrFromStackAt: */
  rcvr = interpreterProxy->stackObjectValue(1);
  pcrePtr = ((int) (interpreterProxy->fetchArrayofObject(2, rcvr)));
- extraPtr = rcvrExtraPtr();
+ /* begin rcvrExtraPtr */
+ extraObj = interpreterProxy->fetchPointerofObject(3, rcvr);
+ if (extraObj == (interpreterProxy->nilObject())) {
+ extraPtr = (int) NULL;
+ goto l1;
+ }
+ extraPtr = ((int) (interpreterProxy->arrayValueOf(extraObj)));
+l1: /* end rcvrExtraPtr */;
  matchFlags = interpreterProxy->fetchIntegerofObject(6, rcvr);
  matchSpacePtr = ((int *) (interpreterProxy->fetchArrayofObject(7, rcvr)));
  matchSpaceSize = ((sqInt) (interpreterProxy->byteSizeOf(interpreterProxy->fetchPointerofObject(7, rcvr))) >> 2);
@@ -299,6 +307,7 @@
  char * searchBuffer;
  sqInt matchSpaceSize;
  sqInt fromInteger;
+ sqInt extraObj;
 
  toInteger = interpreterProxy->stackIntegerValue(0);
  fromInteger = interpreterProxy->stackIntegerValue(1);
@@ -320,7 +329,14 @@
 
  searchBuffer += fromInteger;
  pcrePtr = ((int) (interpreterProxy->fetchArrayofObject(2, rcvr)));
- extraPtr = rcvrExtraPtr();
+ /* begin rcvrExtraPtr */
+ extraObj = interpreterProxy->fetchPointerofObject(3, rcvr);
+ if (extraObj == (interpreterProxy->nilObject())) {
+ extraPtr = (int) NULL;
+ goto l1;
+ }
+ extraPtr = ((int) (interpreterProxy->arrayValueOf(extraObj)));
+l1: /* end rcvrExtraPtr */;
  matchFlags = interpreterProxy->fetchIntegerofObject(6, rcvr);
  matchSpacePtr = ((int *) (interpreterProxy->fetchArrayofObject(7, rcvr)));
  matchSpaceSize = ((sqInt) (interpreterProxy->byteSizeOf(interpreterProxy->fetchPointerofObject(7, rcvr))) >> 2);

Modified: trunk/platforms/unix/src/vm/intplugins/SecurityPlugin/SecurityPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/SecurityPlugin/SecurityPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/SecurityPlugin/SecurityPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:30 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:26 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -77,9 +77,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SecurityPlugin 10 November 2008 (i)"
+ "SecurityPlugin 26 August 2009 (i)"
 #else
- "SecurityPlugin 10 November 2008 (e)"
+ "SecurityPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -120,9 +120,6 @@
 
 EXPORT(sqInt) primitiveDisableImageWrite(void) {
  ioDisableImageWrite();
- if (!(interpreterProxy->failed())) {
- interpreterProxy->pop(1);
- }
 }
 
 

Modified: trunk/platforms/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/SerialPlugin/SerialPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:30 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:27 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -35,6 +35,7 @@
 /*** Constants ***/
 
 /*** Function Prototypes ***/
+static char * allocateTerminatedString(char * unterminatedCharactersInStringObject);
 static VirtualMachine * getInterpreter(void);
 #pragma export on
 EXPORT(const char*) getModuleName(void);
@@ -46,9 +47,13 @@
 static sqInt msg(char * s);
 #pragma export on
 EXPORT(sqInt) primitiveSerialPortClose(void);
+EXPORT(sqInt) primitiveSerialPortCloseByName(void);
 EXPORT(sqInt) primitiveSerialPortOpen(void);
+EXPORT(sqInt) primitiveSerialPortOpenByName(void);
 EXPORT(sqInt) primitiveSerialPortRead(void);
+EXPORT(sqInt) primitiveSerialPortReadByName(void);
 EXPORT(sqInt) primitiveSerialPortWrite(void);
+EXPORT(sqInt) primitiveSerialPortWriteByName(void);
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);
 EXPORT(sqInt) shutdownModule(void);
 #pragma export off
@@ -61,14 +66,33 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SerialPlugin 10 November 2008 (i)"
+ "SerialPlugin 26 August 2009 (i)"
 #else
- "SerialPlugin 10 November 2008 (e)"
+ "SerialPlugin 26 August 2009 (e)"
 #endif
 ;
 
 
 
+/* Allocate a C string with contents of a String value. May cause garbage collection. */
+
+static char * allocateTerminatedString(char * unterminatedCharactersInStringObject) {
+ sqInt len;
+ sqInt terminatedString;
+ char * p;
+
+ len = interpreterProxy->sizeOfSTArrayFromCPrimitive(unterminatedCharactersInStringObject);
+ terminatedString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);
+ p = interpreterProxy->arrayValueOf(terminatedString);
+ p[len] = 0;
+ while (len >= 0) {
+ len -= 1;
+ p[len] = (unterminatedCharactersInStringObject[len]);
+ }
+ return p;
+}
+
+
 /* Note: This is coded so that plugins can be run from Squeak. */
 
 static VirtualMachine * getInterpreter(void) {
@@ -112,6 +136,36 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveSerialPortCloseByName(void) {
+ char * cString;
+ char *deviceName;
+ sqInt len;
+ sqInt terminatedString;
+ char * p;
+
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));
+ deviceName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ /* begin allocateTerminatedString: */
+ len = interpreterProxy->sizeOfSTArrayFromCPrimitive(deviceName);
+ terminatedString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);
+ p = interpreterProxy->arrayValueOf(terminatedString);
+ p[len] = 0;
+ while (len >= 0) {
+ len -= 1;
+ p[len] = (deviceName[len]);
+ }
+ cString = p;
+ serialPortCloseByName(cString);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(1);
+ return null;
+}
+
 EXPORT(sqInt) primitiveSerialPortOpen(void) {
  sqInt portNum;
  sqInt baudRate;
@@ -145,8 +199,55 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveSerialPortOpenByName(void) {
+ char * cString;
+ char *deviceName;
+ sqInt baudRate;
+ sqInt stopBitsType;
+ sqInt parityType;
+ sqInt dataBits;
+ sqInt inFlowControl;
+ sqInt outFlowControl;
+ sqInt xOnChar;
+ sqInt xOffChar;
+ sqInt len;
+ sqInt terminatedString;
+ char * p;
+
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(8)));
+ deviceName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(8))));
+ baudRate = interpreterProxy->stackIntegerValue(7);
+ stopBitsType = interpreterProxy->stackIntegerValue(6);
+ parityType = interpreterProxy->stackIntegerValue(5);
+ dataBits = interpreterProxy->stackIntegerValue(4);
+ inFlowControl = interpreterProxy->stackIntegerValue(3);
+ outFlowControl = interpreterProxy->stackIntegerValue(2);
+ xOnChar = interpreterProxy->stackIntegerValue(1);
+ xOffChar = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ /* begin allocateTerminatedString: */
+ len = interpreterProxy->sizeOfSTArrayFromCPrimitive(deviceName);
+ terminatedString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);
+ p = interpreterProxy->arrayValueOf(terminatedString);
+ p[len] = 0;
+ while (len >= 0) {
+ len -= 1;
+ p[len] = (deviceName[len]);
+ }
+ cString = p;
+ serialPortOpenByName(
+ cString, baudRate, stopBitsType, parityType, dataBits,
+ inFlowControl, outFlowControl, xOnChar, xOffChar);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(9);
+ return null;
+}
+
 EXPORT(sqInt) primitiveSerialPortRead(void) {
- sqInt arrayPtr;
  sqInt bytesRead;
  sqInt portNum;
  char *array;
@@ -163,8 +264,7 @@
  return null;
  }
  interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= (interpreterProxy->byteSizeOf((oopForPointer( array ) - 4)))));
- arrayPtr = ((((sqInt) array )) + startIndex) - 1;
- bytesRead = serialPortReadInto( portNum, count, arrayPtr);
+ bytesRead = serialPortReadInto(portNum, count, (array + startIndex) - 1);
  _return_value = interpreterProxy->integerObjectOf(bytesRead);
  if (interpreterProxy->failed()) {
  return null;
@@ -173,8 +273,48 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveSerialPortReadByName(void) {
+ char * cString;
+ sqInt bytesRead;
+ char *deviceName;
+ char *array;
+ sqInt startIndex;
+ sqInt count;
+ sqInt _return_value;
+ sqInt len;
+ sqInt terminatedString;
+ char * p;
+
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(3)));
+ deviceName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));
+ array = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));
+ startIndex = interpreterProxy->stackIntegerValue(1);
+ count = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= (interpreterProxy->byteSizeOf((oopForPointer( array ) - 4)))));
+ /* begin allocateTerminatedString: */
+ len = interpreterProxy->sizeOfSTArrayFromCPrimitive(deviceName);
+ terminatedString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);
+ p = interpreterProxy->arrayValueOf(terminatedString);
+ p[len] = 0;
+ while (len >= 0) {
+ len -= 1;
+ p[len] = (deviceName[len]);
+ }
+ cString = p;
+ bytesRead = serialPortReadIntoByName(cString, count, (array + startIndex) - 1);
+ _return_value = interpreterProxy->integerObjectOf(bytesRead);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(5, _return_value);
+ return null;
+}
+
 EXPORT(sqInt) primitiveSerialPortWrite(void) {
- sqInt arrayPtr;
  sqInt bytesWritten;
  sqInt portNum;
  char *array;
@@ -192,8 +332,7 @@
  }
  interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= (interpreterProxy->byteSizeOf((oopForPointer( array ) - 4)))));
  if (!(interpreterProxy->failed())) {
- arrayPtr = ((((sqInt) array )) + startIndex) - 1;
- bytesWritten = serialPortWriteFrom(portNum, count, arrayPtr);
+ bytesWritten = serialPortWriteFrom(portNum, count, (array + startIndex) - 1);
  }
  _return_value = interpreterProxy->integerObjectOf(bytesWritten);
  if (interpreterProxy->failed()) {
@@ -203,7 +342,50 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveSerialPortWriteByName(void) {
+ char * cString;
+ sqInt bytesWritten;
+ char *deviceName;
+ char *array;
+ sqInt startIndex;
+ sqInt count;
+ sqInt _return_value;
+ sqInt len;
+ sqInt terminatedString;
+ char * p;
 
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(3)));
+ deviceName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));
+ interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));
+ array = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));
+ startIndex = interpreterProxy->stackIntegerValue(1);
+ count = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= (interpreterProxy->byteSizeOf((oopForPointer( array ) - 4)))));
+ if (!(interpreterProxy->failed())) {
+ /* begin allocateTerminatedString: */
+ len = interpreterProxy->sizeOfSTArrayFromCPrimitive(deviceName);
+ terminatedString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);
+ p = interpreterProxy->arrayValueOf(terminatedString);
+ p[len] = 0;
+ while (len >= 0) {
+ len -= 1;
+ p[len] = (deviceName[len]);
+ }
+ cString = p;
+ bytesWritten = serialPortWriteFromByName(cString, count, (array + startIndex) - 1);
+ }
+ _return_value = interpreterProxy->integerObjectOf(bytesWritten);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(5, _return_value);
+ return null;
+}
+
+
 /* Note: This is coded so that is can be run from Squeak. */
 
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {
@@ -232,13 +414,17 @@
 
 void* SerialPlugin_exports[][3] = {
  {"SerialPlugin", "primitiveSerialPortWrite", (void*)primitiveSerialPortWrite},
+ {"SerialPlugin", "primitiveSerialPortOpen", (void*)primitiveSerialPortOpen},
+ {"SerialPlugin", "primitiveSerialPortOpenByName", (void*)primitiveSerialPortOpenByName},
  {"SerialPlugin", "shutdownModule", (void*)shutdownModule},
- {"SerialPlugin", "getModuleName", (void*)getModuleName},
+ {"SerialPlugin", "primitiveSerialPortWriteByName", (void*)primitiveSerialPortWriteByName},
+ {"SerialPlugin", "initialiseModule", (void*)initialiseModule},
  {"SerialPlugin", "primitiveSerialPortClose", (void*)primitiveSerialPortClose},
- {"SerialPlugin", "primitiveSerialPortOpen", (void*)primitiveSerialPortOpen},
  {"SerialPlugin", "setInterpreter", (void*)setInterpreter},
+ {"SerialPlugin", "primitiveSerialPortReadByName", (void*)primitiveSerialPortReadByName},
  {"SerialPlugin", "primitiveSerialPortRead", (void*)primitiveSerialPortRead},
- {"SerialPlugin", "initialiseModule", (void*)initialiseModule},
+ {"SerialPlugin", "primitiveSerialPortCloseByName", (void*)primitiveSerialPortCloseByName},
+ {"SerialPlugin", "getModuleName", (void*)getModuleName},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:30 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:29 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -56,8 +56,8 @@
 EXPORT(sqInt) primitiveResolverAbortLookup(void);
 EXPORT(sqInt) primitiveResolverAddressLookupResult(void);
 EXPORT(sqInt) primitiveResolverError(void);
-EXPORT(sqInt) primitiveResolverGetAddressInfo(void);
 EXPORT(sqInt) primitiveResolverGetAddressInfoFamily(void);
+EXPORT(sqInt) primitiveResolverGetAddressInfo(void);
 EXPORT(sqInt) primitiveResolverGetAddressInfoNext(void);
 EXPORT(sqInt) primitiveResolverGetAddressInfoProtocol(void);
 EXPORT(sqInt) primitiveResolverGetAddressInfoResult(void);
@@ -75,42 +75,42 @@
 EXPORT(sqInt) primitiveResolverStartAddressLookup(void);
 EXPORT(sqInt) primitiveResolverStartNameLookup(void);
 EXPORT(sqInt) primitiveResolverStatus(void);
+EXPORT(sqInt) primitiveSocketBindTo(void);
+EXPORT(sqInt) primitiveSocketBindToPort(void);
+EXPORT(sqInt) primitiveSocketConnectTo(void);
+EXPORT(sqInt) primitiveSocketConnectToPort(void);
+EXPORT(sqInt) primitiveSocketGetOptions(void);
+EXPORT(sqInt) primitiveSocketListenOnPort(void);
+EXPORT(sqInt) primitiveSocketListenOnPortBacklog(void);
+EXPORT(sqInt) primitiveSocketListenOnPortBacklogInterface(void);
+EXPORT(sqInt) primitiveSocketListenWithBacklog(void);
+EXPORT(sqInt) primitiveSocketLocalAddressResult(void);
+EXPORT(sqInt) primitiveSocketReceiveDataBufCount(void);
+EXPORT(sqInt) primitiveSocketReceiveUDPDataBufCount(void);
+EXPORT(sqInt) primitiveSocketRemoteAddressResult(void);
+EXPORT(sqInt) primitiveSocketSendDataBufCount(void);
+EXPORT(sqInt) primitiveSocketSendUDPDataBufCount(void);
+EXPORT(sqInt) primitiveSocketSetOptions(void);
 EXPORT(sqInt) primitiveSocketAbortConnection(void);
 EXPORT(sqInt) primitiveSocketAccept(void);
 EXPORT(sqInt) primitiveSocketAccept3Semaphores(void);
 EXPORT(sqInt) primitiveSocketAddressGetPort(void);
 EXPORT(sqInt) primitiveSocketAddressSetPort(void);
-EXPORT(sqInt) primitiveSocketBindTo(void);
-EXPORT(sqInt) primitiveSocketBindToPort(void);
 EXPORT(sqInt) primitiveSocketCloseConnection(void);
-EXPORT(sqInt) primitiveSocketConnectTo(void);
-EXPORT(sqInt) primitiveSocketConnectToPort(void);
 EXPORT(sqInt) primitiveSocketConnectionStatus(void);
 EXPORT(sqInt) primitiveSocketCreate(void);
 EXPORT(sqInt) primitiveSocketCreate3Semaphores(void);
 EXPORT(sqInt) primitiveSocketDestroy(void);
 EXPORT(sqInt) primitiveSocketError(void);
-EXPORT(sqInt) primitiveSocketGetOptions(void);
-EXPORT(sqInt) primitiveSocketListenOnPort(void);
-EXPORT(sqInt) primitiveSocketListenOnPortBacklog(void);
-EXPORT(sqInt) primitiveSocketListenOnPortBacklogInterface(void);
-EXPORT(sqInt) primitiveSocketListenWithBacklog(void);
 EXPORT(sqInt) primitiveSocketListenWithOrWithoutBacklog(void);
 EXPORT(sqInt) primitiveSocketLocalAddress(void);
-EXPORT(sqInt) primitiveSocketLocalAddressResult(void);
 EXPORT(sqInt) primitiveSocketLocalAddressSize(void);
 EXPORT(sqInt) primitiveSocketLocalPort(void);
 EXPORT(sqInt) primitiveSocketReceiveDataAvailable(void);
-EXPORT(sqInt) primitiveSocketReceiveDataBufCount(void);
-EXPORT(sqInt) primitiveSocketReceiveUDPDataBufCount(void);
 EXPORT(sqInt) primitiveSocketRemoteAddress(void);
-EXPORT(sqInt) primitiveSocketRemoteAddressResult(void);
 EXPORT(sqInt) primitiveSocketRemoteAddressSize(void);
 EXPORT(sqInt) primitiveSocketRemotePort(void);
-EXPORT(sqInt) primitiveSocketSendDataBufCount(void);
 EXPORT(sqInt) primitiveSocketSendDone(void);
-EXPORT(sqInt) primitiveSocketSendUDPDataBufCount(void);
-EXPORT(sqInt) primitiveSocketSetOptions(void);
 EXPORT(sqInt) primitiveSocketSetReusable(void);
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);
 EXPORT(sqInt) shutdownModule(void);
@@ -126,9 +126,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SocketPlugin 10 November 2008 (i)"
+ "SocketPlugin 26 August 2009 (i)"
 #else
- "SocketPlugin 10 November 2008 (e)"
+ "SocketPlugin 26 August 2009 (e)"
 #endif
 ;
 static void * sCCLOPfn;
@@ -215,15 +215,11 @@
  if (sDSAfn != 0) {
  ((int (*) (void)) sDSAfn)();
  }
- if (!(interpreterProxy->failed())) {
- interpreterProxy->pop(1);
- }
 }
 
 EXPORT(sqInt) primitiveHasSocketAccess(void) {
  sqInt hasAccess;
 
- interpreterProxy->pop(1);
  if (sHSAfn != 0) {
  hasAccess =  ((int (*) (void)) sHSAfn)();
  } else {
@@ -285,6 +281,25 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveResolverGetAddressInfoFamily(void) {
+ sqInt family;
+ sqInt _return_value;
+
+ if (!(interpreterProxy->failed())) {
+ family = sqResolverGetAddressInfoFamily();
+ _return_value = interpreterProxy->integerObjectOf(family);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(1, _return_value);
+ return null;
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ return null;
+}
+
 EXPORT(sqInt) primitiveResolverGetAddressInfo(void) {
  sqInt hostSize;
  sqInt servSize;
@@ -318,25 +333,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveResolverGetAddressInfoFamily(void) {
- sqInt family;
- sqInt _return_value;
-
- if (!(interpreterProxy->failed())) {
- family = sqResolverGetAddressInfoFamily();
- _return_value = interpreterProxy->integerObjectOf(family);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(1, _return_value);
- return null;
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- return null;
-}
-
 EXPORT(sqInt) primitiveResolverGetAddressInfoNext(void) {
  sqInt more;
  sqInt _return_value;
@@ -651,140 +647,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketAbortConnection(void) {
- SocketPtr  s;
- sqInt socket;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (!(interpreterProxy->failed())) {
- sqSocketAbortConnection(s);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketAccept(void) {
- sqInt socketOop;
- SocketPtr  serverSocket;
- SocketPtr  s;
- sqInt sockHandle;
- sqInt recvBufSize;
- sqInt sendBufSize;
- sqInt semaIndex;
-
- sockHandle = interpreterProxy->stackValue(3);
- recvBufSize = interpreterProxy->stackIntegerValue(2);
- sendBufSize = interpreterProxy->stackIntegerValue(1);
- semaIndex = interpreterProxy->stackIntegerValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- serverSocket = socketValueOf(sockHandle);
- if (!(interpreterProxy->failed())) {
- socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
- s = socketValueOf(socketOop);
- sqSocketAcceptFromRecvBytesSendBytesSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(5, socketOop);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketAccept3Semaphores(void) {
- sqInt socketOop;
- SocketPtr  serverSocket;
- SocketPtr  s;
- sqInt sockHandle;
- sqInt recvBufSize;
- sqInt sendBufSize;
- sqInt semaIndex;
- sqInt aReadSema;
- sqInt aWriteSema;
-
- sockHandle = interpreterProxy->stackValue(5);
- recvBufSize = interpreterProxy->stackIntegerValue(4);
- sendBufSize = interpreterProxy->stackIntegerValue(3);
- semaIndex = interpreterProxy->stackIntegerValue(2);
- aReadSema = interpreterProxy->stackIntegerValue(1);
- aWriteSema = interpreterProxy->stackIntegerValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- serverSocket = socketValueOf(sockHandle);
- if (!(interpreterProxy->failed())) {
- socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
- s = socketValueOf(socketOop);
- sqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(7, socketOop);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketAddressGetPort(void) {
- sqInt addr;
- sqInt addrSize;
- sqInt port;
- char * addrBase;
- sqInt _return_value;
-
- addr = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- addrSize = interpreterProxy->byteSizeOf(addr);
- addrBase = ((char *) (interpreterProxy->firstIndexableField(addr)));
- if (!(interpreterProxy->failed())) {
- port = sqSocketAddressSizeGetPort(addrBase, addrSize);
- if (!(interpreterProxy->failed())) {
- _return_value = interpreterProxy->integerObjectOf(port);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(1, _return_value);
- return null;
- }
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketAddressSetPort(void) {
- sqInt addr;
- sqInt addrSize;
- char * addrBase;
- sqInt portNumber;
-
- portNumber = interpreterProxy->stackIntegerValue(0);
- addr = interpreterProxy->stackValue(1);
- if (interpreterProxy->failed()) {
- return null;
- }
- addrSize = interpreterProxy->byteSizeOf(addr);
- addrBase = ((char *) (interpreterProxy->firstIndexableField(addr)));
- if (!(interpreterProxy->failed())) {
- sqSocketAddressSizeSetPort(addrBase, addrSize, portNumber);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketBindTo(void) {
  sqInt addrSize;
  SocketPtr s;
@@ -836,25 +698,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketCloseConnection(void) {
- SocketPtr  s;
- sqInt socket;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (!(interpreterProxy->failed())) {
- sqSocketCloseConnection(s);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketConnectTo(void) {
  sqInt addrSize;
  SocketPtr s;
@@ -918,143 +761,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketConnectionStatus(void) {
- SocketPtr  s;
- sqInt status;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (!(interpreterProxy->failed())) {
- status = sqSocketConnectionStatus(s);
- }
- _return_value = interpreterProxy->integerObjectOf(status);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketCreate(void) {
- sqInt socketOop;
- SocketPtr  s;
- sqInt okToCreate;
- sqInt netType;
- sqInt socketType;
- sqInt recvBufSize;
- sqInt sendBufSize;
- sqInt semaIndex;
-
- netType = interpreterProxy->stackIntegerValue(4);
- socketType = interpreterProxy->stackIntegerValue(3);
- recvBufSize = interpreterProxy->stackIntegerValue(2);
- sendBufSize = interpreterProxy->stackIntegerValue(1);
- semaIndex = interpreterProxy->stackIntegerValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- if (sCCSOTfn != 0) {
- okToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, socketType);
- if (!(okToCreate)) {
- interpreterProxy->primitiveFail();
- return null;
- }
- }
- socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
- s = socketValueOf(socketOop);
- sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(s, netType, socketType, recvBufSize, sendBufSize, semaIndex);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(6, socketOop);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketCreate3Semaphores(void) {
- sqInt socketOop;
- SocketPtr  s;
- sqInt okToCreate;
- sqInt netType;
- sqInt socketType;
- sqInt recvBufSize;
- sqInt sendBufSize;
- sqInt semaIndex;
- sqInt aReadSema;
- sqInt aWriteSema;
-
- netType = interpreterProxy->stackIntegerValue(6);
- socketType = interpreterProxy->stackIntegerValue(5);
- recvBufSize = interpreterProxy->stackIntegerValue(4);
- sendBufSize = interpreterProxy->stackIntegerValue(3);
- semaIndex = interpreterProxy->stackIntegerValue(2);
- aReadSema = interpreterProxy->stackIntegerValue(1);
- aWriteSema = interpreterProxy->stackIntegerValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- if (sCCSOTfn != 0) {
- okToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, socketType);
- if (!(okToCreate)) {
- interpreterProxy->primitiveFail();
- return null;
- }
- }
- socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
- s = socketValueOf(socketOop);
- sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, netType, socketType, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(8, socketOop);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketDestroy(void) {
- SocketPtr s;
- sqInt socket;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (!(interpreterProxy->failed())) {
- sqSocketDestroy(s);
- }
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->pop(1);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketError(void) {
- sqInt err;
- SocketPtr  s;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (!(interpreterProxy->failed())) {
- err = sqSocketError(s);
- }
- _return_value = interpreterProxy->integerObjectOf(err);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketGetOptions(void) {
  sqInt returnedValue;
  char * optionNameStart;
@@ -1120,7 +826,9 @@
  return null;
  }
  }
- sqSocketListenOnPort(s, port);
+ if (!(interpreterProxy->failed())) {
+ sqSocketListenOnPort(s, port);
+ }
  if (interpreterProxy->failed()) {
  return null;
  }
@@ -1228,37 +936,6 @@
  return null;
 }
 
-
-/* Backward compatibility */
-
-EXPORT(sqInt) primitiveSocketListenWithOrWithoutBacklog(void) {
- if ((interpreterProxy->methodArgumentCount()) == 2) {
- return primitiveSocketListenOnPort();
- } else {
- return primitiveSocketListenOnPortBacklog();
- }
-}
-
-EXPORT(sqInt) primitiveSocketLocalAddress(void) {
- sqInt addr;
- SocketPtr s;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- addr = sqSocketLocalAddress(s);
- _return_value = intToNetAddress(addr);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketLocalAddressResult(void) {
  sqInt addrSize;
  SocketPtr s;
@@ -1284,72 +961,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketLocalAddressSize(void) {
- sqInt size;
- SocketPtr s;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (interpreterProxy->failed()) {
- return null;
- }
- size = sqSocketLocalAddressSize(s);
- if (interpreterProxy->failed()) {
- return null;
- }
- _return_value = interpreterProxy->integerObjectOf(size);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketLocalPort(void) {
- SocketPtr  s;
- sqInt port;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- port = sqSocketLocalPort(s);
- _return_value = interpreterProxy->integerObjectOf(port);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketReceiveDataAvailable(void) {
- sqInt dataIsAvailable;
- SocketPtr s;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- dataIsAvailable = sqSocketReceiveDataAvailable(s);
- _return_value = (dataIsAvailable) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketReceiveDataBufCount(void) {
  sqInt bytesReceived;
  char * arrayBase;
@@ -1458,26 +1069,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketRemoteAddress(void) {
- sqInt addr;
- SocketPtr s;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- addr = sqSocketRemoteAddress(s);
- _return_value = intToNetAddress(addr);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketRemoteAddressResult(void) {
  sqInt addrSize;
  SocketPtr s;
@@ -1503,52 +1094,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketRemoteAddressSize(void) {
- sqInt size;
- SocketPtr s;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- if (interpreterProxy->failed()) {
- return null;
- }
- size = sqSocketRemoteAddressSize(s);
- if (interpreterProxy->failed()) {
- return null;
- }
- _return_value = interpreterProxy->integerObjectOf(size);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
-EXPORT(sqInt) primitiveSocketRemotePort(void) {
- SocketPtr s;
- sqInt port;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- port = sqSocketRemotePort(s);
- _return_value = interpreterProxy->integerObjectOf(port);
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketSendDataBufCount(void) {
  char * arrayBase;
  sqInt bytesSent;
@@ -1592,26 +1137,6 @@
  return null;
 }
 
-EXPORT(sqInt) primitiveSocketSendDone(void) {
- SocketPtr s;
- sqInt done;
- sqInt socket;
- sqInt _return_value;
-
- socket = interpreterProxy->stackValue(0);
- if (interpreterProxy->failed()) {
- return null;
- }
- s = socketValueOf(socket);
- done = sqSocketSendDone(s);
- _return_value = (done) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();
- if (interpreterProxy->failed()) {
- return null;
- }
- interpreterProxy->popthenPush(2, _return_value);
- return null;
-}
-
 EXPORT(sqInt) primitiveSocketSendUDPDataBufCount(void) {
  char * arrayBase;
  sqInt bytesSent;
@@ -1706,7 +1231,480 @@
  return null;
 }
 
+EXPORT(sqInt) primitiveSocketAbortConnection(void) {
+ SocketPtr  s;
+ sqInt socket;
 
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (!(interpreterProxy->failed())) {
+ sqSocketAbortConnection(s);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(1);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketAccept(void) {
+ sqInt socketOop;
+ SocketPtr  serverSocket;
+ SocketPtr  s;
+ sqInt sockHandle;
+ sqInt recvBufSize;
+ sqInt sendBufSize;
+ sqInt semaIndex;
+
+ sockHandle = interpreterProxy->stackValue(3);
+ recvBufSize = interpreterProxy->stackIntegerValue(2);
+ sendBufSize = interpreterProxy->stackIntegerValue(1);
+ semaIndex = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ serverSocket = socketValueOf(sockHandle);
+ if (!(interpreterProxy->failed())) {
+ socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
+ s = socketValueOf(socketOop);
+ sqSocketAcceptFromRecvBytesSendBytesSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(5, socketOop);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketAccept3Semaphores(void) {
+ sqInt socketOop;
+ SocketPtr  serverSocket;
+ SocketPtr  s;
+ sqInt sockHandle;
+ sqInt recvBufSize;
+ sqInt sendBufSize;
+ sqInt semaIndex;
+ sqInt aReadSema;
+ sqInt aWriteSema;
+
+ sockHandle = interpreterProxy->stackValue(5);
+ recvBufSize = interpreterProxy->stackIntegerValue(4);
+ sendBufSize = interpreterProxy->stackIntegerValue(3);
+ semaIndex = interpreterProxy->stackIntegerValue(2);
+ aReadSema = interpreterProxy->stackIntegerValue(1);
+ aWriteSema = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ serverSocket = socketValueOf(sockHandle);
+ if (!(interpreterProxy->failed())) {
+ socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
+ s = socketValueOf(socketOop);
+ sqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(7, socketOop);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketAddressGetPort(void) {
+ sqInt addr;
+ sqInt addrSize;
+ sqInt port;
+ char * addrBase;
+ sqInt _return_value;
+
+ addr = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ addrSize = interpreterProxy->byteSizeOf(addr);
+ addrBase = ((char *) (interpreterProxy->firstIndexableField(addr)));
+ if (!(interpreterProxy->failed())) {
+ port = sqSocketAddressSizeGetPort(addrBase, addrSize);
+ if (!(interpreterProxy->failed())) {
+ _return_value = interpreterProxy->integerObjectOf(port);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(1, _return_value);
+ return null;
+ }
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketAddressSetPort(void) {
+ sqInt addr;
+ sqInt addrSize;
+ char * addrBase;
+ sqInt portNumber;
+
+ portNumber = interpreterProxy->stackIntegerValue(0);
+ addr = interpreterProxy->stackValue(1);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ addrSize = interpreterProxy->byteSizeOf(addr);
+ addrBase = ((char *) (interpreterProxy->firstIndexableField(addr)));
+ if (!(interpreterProxy->failed())) {
+ sqSocketAddressSizeSetPort(addrBase, addrSize, portNumber);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(1);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketCloseConnection(void) {
+ SocketPtr  s;
+ sqInt socket;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (!(interpreterProxy->failed())) {
+ sqSocketCloseConnection(s);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(1);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketConnectionStatus(void) {
+ SocketPtr  s;
+ sqInt status;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (!(interpreterProxy->failed())) {
+ status = sqSocketConnectionStatus(s);
+ }
+ _return_value = interpreterProxy->integerObjectOf(status);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketCreate(void) {
+ sqInt socketOop;
+ SocketPtr  s;
+ sqInt okToCreate;
+ sqInt netType;
+ sqInt socketType;
+ sqInt recvBufSize;
+ sqInt sendBufSize;
+ sqInt semaIndex;
+
+ netType = interpreterProxy->stackIntegerValue(4);
+ socketType = interpreterProxy->stackIntegerValue(3);
+ recvBufSize = interpreterProxy->stackIntegerValue(2);
+ sendBufSize = interpreterProxy->stackIntegerValue(1);
+ semaIndex = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ if (sCCSOTfn != 0) {
+ okToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, socketType);
+ if (!(okToCreate)) {
+ interpreterProxy->primitiveFail();
+ return null;
+ }
+ }
+ socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
+ s = socketValueOf(socketOop);
+ sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(s, netType, socketType, recvBufSize, sendBufSize, semaIndex);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(6, socketOop);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketCreate3Semaphores(void) {
+ sqInt socketOop;
+ SocketPtr  s;
+ sqInt okToCreate;
+ sqInt netType;
+ sqInt socketType;
+ sqInt recvBufSize;
+ sqInt sendBufSize;
+ sqInt semaIndex;
+ sqInt aReadSema;
+ sqInt aWriteSema;
+
+ netType = interpreterProxy->stackIntegerValue(6);
+ socketType = interpreterProxy->stackIntegerValue(5);
+ recvBufSize = interpreterProxy->stackIntegerValue(4);
+ sendBufSize = interpreterProxy->stackIntegerValue(3);
+ semaIndex = interpreterProxy->stackIntegerValue(2);
+ aReadSema = interpreterProxy->stackIntegerValue(1);
+ aWriteSema = interpreterProxy->stackIntegerValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ if (sCCSOTfn != 0) {
+ okToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, socketType);
+ if (!(okToCreate)) {
+ interpreterProxy->primitiveFail();
+ return null;
+ }
+ }
+ socketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());
+ s = socketValueOf(socketOop);
+ sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, netType, socketType, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(8, socketOop);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketDestroy(void) {
+ SocketPtr s;
+ sqInt socket;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (!(interpreterProxy->failed())) {
+ sqSocketDestroy(s);
+ }
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->pop(1);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketError(void) {
+ sqInt err;
+ SocketPtr  s;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (!(interpreterProxy->failed())) {
+ err = sqSocketError(s);
+ }
+ _return_value = interpreterProxy->integerObjectOf(err);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+
+/* Backward compatibility */
+
+EXPORT(sqInt) primitiveSocketListenWithOrWithoutBacklog(void) {
+ if ((interpreterProxy->methodArgumentCount()) == 2) {
+ return primitiveSocketListenOnPort();
+ } else {
+ return primitiveSocketListenOnPortBacklog();
+ }
+}
+
+EXPORT(sqInt) primitiveSocketLocalAddress(void) {
+ sqInt addr;
+ SocketPtr s;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ addr = sqSocketLocalAddress(s);
+ _return_value = intToNetAddress(addr);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketLocalAddressSize(void) {
+ sqInt size;
+ SocketPtr s;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ size = sqSocketLocalAddressSize(s);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ _return_value = interpreterProxy->integerObjectOf(size);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketLocalPort(void) {
+ SocketPtr  s;
+ sqInt port;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ port = sqSocketLocalPort(s);
+ _return_value = interpreterProxy->integerObjectOf(port);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketReceiveDataAvailable(void) {
+ sqInt dataIsAvailable;
+ SocketPtr s;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ dataIsAvailable = sqSocketReceiveDataAvailable(s);
+ _return_value = (dataIsAvailable) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketRemoteAddress(void) {
+ sqInt addr;
+ SocketPtr s;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ addr = sqSocketRemoteAddress(s);
+ _return_value = intToNetAddress(addr);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketRemoteAddressSize(void) {
+ sqInt size;
+ SocketPtr s;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ size = sqSocketRemoteAddressSize(s);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ _return_value = interpreterProxy->integerObjectOf(size);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketRemotePort(void) {
+ SocketPtr s;
+ sqInt port;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ port = sqSocketRemotePort(s);
+ _return_value = interpreterProxy->integerObjectOf(port);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+EXPORT(sqInt) primitiveSocketSendDone(void) {
+ SocketPtr s;
+ sqInt done;
+ sqInt socket;
+ sqInt _return_value;
+
+ socket = interpreterProxy->stackValue(0);
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ s = socketValueOf(socket);
+ done = sqSocketSendDone(s);
+ _return_value = (done) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();
+ if (interpreterProxy->failed()) {
+ return null;
+ }
+ interpreterProxy->popthenPush(2, _return_value);
+ return null;
+}
+
+
 /* Set the socket to be reusable */
 
 EXPORT(sqInt) primitiveSocketSetReusable(void) {
@@ -1779,73 +1777,73 @@
 
 
 void* SocketPlugin_exports[][3] = {
- {"SocketPlugin", "primitiveSocketError", (void*)primitiveSocketError},
  {"SocketPlugin", "primitiveDisableSocketAccess", (void*)primitiveDisableSocketAccess},
  {"SocketPlugin", "setInterpreter", (void*)setInterpreter},
- {"SocketPlugin", "primitiveSocketRemoteAddressSize", (void*)primitiveSocketRemoteAddressSize},
  {"SocketPlugin", "primitiveResolverGetAddressInfoNext", (void*)primitiveResolverGetAddressInfoNext},
+ {"SocketPlugin", "primitiveSocketRemotePort", (void*)primitiveSocketRemotePort},
  {"SocketPlugin", "primitiveResolverAddressLookupResult", (void*)primitiveResolverAddressLookupResult},
- {"SocketPlugin", "primitiveSocketConnectionStatus", (void*)primitiveSocketConnectionStatus},
- {"SocketPlugin", "primitiveSocketConnectToPort", (void*)primitiveSocketConnectToPort},
- {"SocketPlugin", "primitiveSocketListenWithBacklog", (void*)primitiveSocketListenWithBacklog},
- {"SocketPlugin", "primitiveSocketSetOptions", (void*)primitiveSocketSetOptions},
- {"SocketPlugin", "primitiveResolverGetNameInfoServiceResult", (void*)primitiveResolverGetNameInfoServiceResult},
- {"SocketPlugin", "primitiveSocketRemoteAddress", (void*)primitiveSocketRemoteAddress},
+ {"SocketPlugin", "primitiveResolverGetAddressInfoResult", (void*)primitiveResolverGetAddressInfoResult},
+ {"SocketPlugin", "primitiveSocketConnectTo", (void*)primitiveSocketConnectTo},
+ {"SocketPlugin", "primitiveSocketAddressSetPort", (void*)primitiveSocketAddressSetPort},
  {"SocketPlugin", "primitiveResolverHostNameSize", (void*)primitiveResolverHostNameSize},
- {"SocketPlugin", "primitiveResolverStartNameLookup", (void*)primitiveResolverStartNameLookup},
+ {"SocketPlugin", "primitiveSocketGetOptions", (void*)primitiveSocketGetOptions},
+ {"SocketPlugin", "primitiveSocketAccept3Semaphores", (void*)primitiveSocketAccept3Semaphores},
  {"SocketPlugin", "moduleUnloaded", (void*)moduleUnloaded},
+ {"SocketPlugin", "primitiveSocketLocalPort", (void*)primitiveSocketLocalPort},
+ {"SocketPlugin", "primitiveSocketRemoteAddress", (void*)primitiveSocketRemoteAddress},
+ {"SocketPlugin", "primitiveResolverStartAddressLookup", (void*)primitiveResolverStartAddressLookup},
  {"SocketPlugin", "initialiseModule", (void*)initialiseModule},
- {"SocketPlugin", "primitiveSocketConnectTo", (void*)primitiveSocketConnectTo},
- {"SocketPlugin", "primitiveSocketDestroy", (void*)primitiveSocketDestroy},
+ {"SocketPlugin", "primitiveResolverGetNameInfo", (void*)primitiveResolverGetNameInfo},
  {"SocketPlugin", "primitiveResolverGetAddressInfoSize", (void*)primitiveResolverGetAddressInfoSize},
- {"SocketPlugin", "primitiveResolverHostNameResult", (void*)primitiveResolverHostNameResult},
- {"SocketPlugin", "primitiveSocketReceiveUDPDataBufCount", (void*)primitiveSocketReceiveUDPDataBufCount},
- {"SocketPlugin", "primitiveSocketAccept3Semaphores", (void*)primitiveSocketAccept3Semaphores},
- {"SocketPlugin", "primitiveResolverGetAddressInfoType", (void*)primitiveResolverGetAddressInfoType},
- {"SocketPlugin", "primitiveSocketCreate3Semaphores", (void*)primitiveSocketCreate3Semaphores},
- {"SocketPlugin", "primitiveSocketBindToPort", (void*)primitiveSocketBindToPort},
- {"SocketPlugin", "primitiveResolverStartAddressLookup", (void*)primitiveResolverStartAddressLookup},
+ {"SocketPlugin", "primitiveSocketSendDone", (void*)primitiveSocketSendDone},
+ {"SocketPlugin", "primitiveSocketAbortConnection", (void*)primitiveSocketAbortConnection},
  {"SocketPlugin", "primitiveSocketLocalAddressResult", (void*)primitiveSocketLocalAddressResult},
- {"SocketPlugin", "primitiveResolverGetNameInfo", (void*)primitiveResolverGetNameInfo},
- {"SocketPlugin", "primitiveSocketAccept", (void*)primitiveSocketAccept},
+ {"SocketPlugin", "primitiveResolverGetAddressInfoType", (void*)primitiveResolverGetAddressInfoType},
+ {"SocketPlugin", "primitiveSocketSendDataBufCount", (void*)primitiveSocketSendDataBufCount},
+ {"SocketPlugin", "primitiveSocketBindTo", (void*)primitiveSocketBindTo},
+ {"SocketPlugin", "primitiveResolverHostNameResult", (void*)primitiveResolverHostNameResult},
+ {"SocketPlugin", "primitiveResolverGetAddressInfo", (void*)primitiveResolverGetAddressInfo},
+ {"SocketPlugin", "primitiveSocketListenWithBacklog", (void*)primitiveSocketListenWithBacklog},
+ {"SocketPlugin", "primitiveSocketCreate", (void*)primitiveSocketCreate},
+ {"SocketPlugin", "primitiveSocketLocalAddress", (void*)primitiveSocketLocalAddress},
  {"SocketPlugin", "primitiveResolverNameLookupResult", (void*)primitiveResolverNameLookupResult},
- {"SocketPlugin", "primitiveSocketReceiveDataBufCount", (void*)primitiveSocketReceiveDataBufCount},
- {"SocketPlugin", "primitiveSocketSetReusable", (void*)primitiveSocketSetReusable},
+ {"SocketPlugin", "primitiveSocketRemoteAddressSize", (void*)primitiveSocketRemoteAddressSize},
  {"SocketPlugin", "primitiveInitializeNetwork", (void*)primitiveInitializeNetwork},
+ {"SocketPlugin", "primitiveSocketConnectionStatus", (void*)primitiveSocketConnectionStatus},
  {"SocketPlugin", "primitiveSocketReceiveDataAvailable", (void*)primitiveSocketReceiveDataAvailable},
- {"SocketPlugin", "primitiveSocketSendDone", (void*)primitiveSocketSendDone},
- {"SocketPlugin", "shutdownModule", (void*)shutdownModule},
  {"SocketPlugin", "primitiveSocketListenOnPortBacklog", (void*)primitiveSocketListenOnPortBacklog},
- {"SocketPlugin", "primitiveResolverGetAddressInfo", (void*)primitiveResolverGetAddressInfo},
- {"SocketPlugin", "primitiveSocketRemotePort", (void*)primitiveSocketRemotePort},
- {"SocketPlugin", "primitiveSocketSendDataBufCount", (void*)primitiveSocketSendDataBufCount},
+ {"SocketPlugin", "shutdownModule", (void*)shutdownModule},
+ {"SocketPlugin", "primitiveSocketConnectToPort", (void*)primitiveSocketConnectToPort},
+ {"SocketPlugin", "primitiveSocketAccept", (void*)primitiveSocketAccept},
+ {"SocketPlugin", "primitiveSocketCreate3Semaphores", (void*)primitiveSocketCreate3Semaphores},
+ {"SocketPlugin", "primitiveResolverGetNameInfoServiceResult", (void*)primitiveResolverGetNameInfoServiceResult},
  {"SocketPlugin", "primitiveResolverError", (void*)primitiveResolverError},
- {"SocketPlugin", "primitiveSocketAbortConnection", (void*)primitiveSocketAbortConnection},
- {"SocketPlugin", "primitiveSocketLocalAddressSize", (void*)primitiveSocketLocalAddressSize},
- {"SocketPlugin", "primitiveSocketListenOnPort", (void*)primitiveSocketListenOnPort},
- {"SocketPlugin", "primitiveSocketGetOptions", (void*)primitiveSocketGetOptions},
- {"SocketPlugin", "primitiveSocketRemoteAddressResult", (void*)primitiveSocketRemoteAddressResult},
- {"SocketPlugin", "primitiveResolverGetAddressInfoResult", (void*)primitiveResolverGetAddressInfoResult},
+ {"SocketPlugin", "primitiveSocketError", (void*)primitiveSocketError},
+ {"SocketPlugin", "primitiveSocketSetOptions", (void*)primitiveSocketSetOptions},
  {"SocketPlugin", "primitiveHasSocketAccess", (void*)primitiveHasSocketAccess},
  {"SocketPlugin", "primitiveResolverGetNameInfoServiceSize", (void*)primitiveResolverGetNameInfoServiceSize},
- {"SocketPlugin", "primitiveSocketAddressSetPort", (void*)primitiveSocketAddressSetPort},
+ {"SocketPlugin", "primitiveSocketSetReusable", (void*)primitiveSocketSetReusable},
  {"SocketPlugin", "primitiveSocketAddressGetPort", (void*)primitiveSocketAddressGetPort},
- {"SocketPlugin", "primitiveSocketLocalAddress", (void*)primitiveSocketLocalAddress},
+ {"SocketPlugin", "primitiveSocketCloseConnection", (void*)primitiveSocketCloseConnection},
+ {"SocketPlugin", "primitiveResolverGetNameInfoHostResult", (void*)primitiveResolverGetNameInfoHostResult},
+ {"SocketPlugin", "primitiveSocketReceiveUDPDataBufCount", (void*)primitiveSocketReceiveUDPDataBufCount},
  {"SocketPlugin", "primitiveSocketListenWithOrWithoutBacklog", (void*)primitiveSocketListenWithOrWithoutBacklog},
  {"SocketPlugin", "primitiveResolverGetAddressInfoProtocol", (void*)primitiveResolverGetAddressInfoProtocol},
- {"SocketPlugin", "primitiveSocketListenOnPortBacklogInterface", (void*)primitiveSocketListenOnPortBacklogInterface},
+ {"SocketPlugin", "primitiveSocketListenOnPort", (void*)primitiveSocketListenOnPort},
  {"SocketPlugin", "primitiveResolverAbortLookup", (void*)primitiveResolverAbortLookup},
- {"SocketPlugin", "primitiveSocketLocalPort", (void*)primitiveSocketLocalPort},
  {"SocketPlugin", "primitiveResolverGetAddressInfoFamily", (void*)primitiveResolverGetAddressInfoFamily},
+ {"SocketPlugin", "primitiveSocketLocalAddressSize", (void*)primitiveSocketLocalAddressSize},
  {"SocketPlugin", "getModuleName", (void*)getModuleName},
  {"SocketPlugin", "primitiveResolverLocalAddress", (void*)primitiveResolverLocalAddress},
- {"SocketPlugin", "primitiveSocketBindTo", (void*)primitiveSocketBindTo},
- {"SocketPlugin", "primitiveSocketCreate", (void*)primitiveSocketCreate},
+ {"SocketPlugin", "primitiveSocketSendUDPDataBufCount", (void*)primitiveSocketSendUDPDataBufCount},
+ {"SocketPlugin", "primitiveSocketDestroy", (void*)primitiveSocketDestroy},
+ {"SocketPlugin", "primitiveSocketRemoteAddressResult", (void*)primitiveSocketRemoteAddressResult},
+ {"SocketPlugin", "primitiveSocketBindToPort", (void*)primitiveSocketBindToPort},
  {"SocketPlugin", "primitiveResolverGetNameInfoHostSize", (void*)primitiveResolverGetNameInfoHostSize},
+ {"SocketPlugin", "primitiveResolverStartNameLookup", (void*)primitiveResolverStartNameLookup},
  {"SocketPlugin", "primitiveResolverStatus", (void*)primitiveResolverStatus},
- {"SocketPlugin", "primitiveSocketCloseConnection", (void*)primitiveSocketCloseConnection},
- {"SocketPlugin", "primitiveSocketSendUDPDataBufCount", (void*)primitiveSocketSendUDPDataBufCount},
- {"SocketPlugin", "primitiveResolverGetNameInfoHostResult", (void*)primitiveResolverGetNameInfoHostResult},
+ {"SocketPlugin", "primitiveSocketListenOnPortBacklogInterface", (void*)primitiveSocketListenOnPortBacklogInterface},
+ {"SocketPlugin", "primitiveSocketReceiveDataBufCount", (void*)primitiveSocketReceiveDataBufCount},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:31 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:32 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -55,9 +55,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SoundCodecPrims 10 November 2008 (i)"
+ "SoundCodecPrims 26 August 2009 (i)"
 #else
- "SoundCodecPrims 10 November 2008 (e)"
+ "SoundCodecPrims 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:53 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:33 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -67,9 +67,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SoundGenerationPlugin 10 November 2008 (i)"
+ "SoundGenerationPlugin 26 August 2009 (i)"
 #else
- "SoundGenerationPlugin 10 November 2008 (e)"
+ "SoundGenerationPlugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/SoundPlugin/SoundPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/SoundPlugin/SoundPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/SoundPlugin/SoundPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:32 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:34 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -58,8 +58,8 @@
 EXPORT(sqInt) primitiveSoundSetRecordLevel(void);
 EXPORT(sqInt) primitiveSoundSetSwitch(void);
 EXPORT(sqInt) primitiveSoundStart(void);
+EXPORT(sqInt) primitiveSoundStartWithSemaphore(void);
 EXPORT(sqInt) primitiveSoundStartRecording(void);
-EXPORT(sqInt) primitiveSoundStartWithSemaphore(void);
 EXPORT(sqInt) primitiveSoundStop(void);
 EXPORT(sqInt) primitiveSoundStopRecording(void);
 EXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);
@@ -74,9 +74,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "SoundPlugin 10 November 2008 (i)"
+ "SoundPlugin 26 August 2009 (i)"
 #else
- "SoundPlugin 10 November 2008 (e)"
+ "SoundPlugin 26 August 2009 (e)"
 #endif
 ;
 
@@ -471,48 +471,48 @@
 }
 
 
-/* Start recording sound with the given parameters. */
+/* Start the double-buffered sound output with the given buffer size, sample rate, stereo flag, and semaphore index. */
 
-EXPORT(sqInt) primitiveSoundStartRecording(void) {
- sqInt desiredSamplesPerSec;
+EXPORT(sqInt) primitiveSoundStartWithSemaphore(void) {
+ sqInt bufFrames;
+ sqInt samplesPerSec;
  sqInt stereoFlag;
  sqInt semaIndex;
 
- desiredSamplesPerSec = interpreterProxy->stackIntegerValue(2);
+ bufFrames = interpreterProxy->stackIntegerValue(3);
+ samplesPerSec = interpreterProxy->stackIntegerValue(2);
  stereoFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
  semaIndex = interpreterProxy->stackIntegerValue(0);
  if (interpreterProxy->failed()) {
  return null;
  }
- snd_StartRecording(desiredSamplesPerSec, stereoFlag, semaIndex);
+ interpreterProxy->success(snd_Start(bufFrames, samplesPerSec, stereoFlag, semaIndex));
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->pop(3);
+ interpreterProxy->pop(4);
  return null;
 }
 
 
-/* Start the double-buffered sound output with the given buffer size, sample rate, stereo flag, and semaphore index. */
+/* Start recording sound with the given parameters. */
 
-EXPORT(sqInt) primitiveSoundStartWithSemaphore(void) {
- sqInt bufFrames;
- sqInt samplesPerSec;
+EXPORT(sqInt) primitiveSoundStartRecording(void) {
+ sqInt desiredSamplesPerSec;
  sqInt stereoFlag;
  sqInt semaIndex;
 
- bufFrames = interpreterProxy->stackIntegerValue(3);
- samplesPerSec = interpreterProxy->stackIntegerValue(2);
+ desiredSamplesPerSec = interpreterProxy->stackIntegerValue(2);
  stereoFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));
  semaIndex = interpreterProxy->stackIntegerValue(0);
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->success(snd_Start(bufFrames, samplesPerSec, stereoFlag, semaIndex));
+ snd_StartRecording(desiredSamplesPerSec, stereoFlag, semaIndex);
  if (interpreterProxy->failed()) {
  return null;
  }
- interpreterProxy->pop(4);
+ interpreterProxy->pop(3);
  return null;
 }
 
@@ -567,26 +567,26 @@
 
 void* SoundPlugin_exports[][3] = {
  {"SoundPlugin", "primitiveSoundStart", (void*)primitiveSoundStart},
- {"SoundPlugin", "primitiveSoundInsertSamples", (void*)primitiveSoundInsertSamples},
  {"SoundPlugin", "shutdownModule", (void*)shutdownModule},
- {"SoundPlugin", "primitiveSoundSetLeftVolume", (void*)primitiveSoundSetLeftVolume},
+ {"SoundPlugin", "primitiveSoundSetSwitch", (void*)primitiveSoundSetSwitch},
+ {"SoundPlugin", "primitiveSoundGetSwitch", (void*)primitiveSoundGetSwitch},
+ {"SoundPlugin", "primitiveSoundStartRecording", (void*)primitiveSoundStartRecording},
  {"SoundPlugin", "setInterpreter", (void*)setInterpreter},
+ {"SoundPlugin", "primitiveSoundSetDevice", (void*)primitiveSoundSetDevice},
+ {"SoundPlugin", "primitiveSoundPlaySamples", (void*)primitiveSoundPlaySamples},
  {"SoundPlugin", "primitiveSoundStopRecording", (void*)primitiveSoundStopRecording},
+ {"SoundPlugin", "primitiveSoundSetRecordLevel", (void*)primitiveSoundSetRecordLevel},
  {"SoundPlugin", "getModuleName", (void*)getModuleName},
- {"SoundPlugin", "primitiveSoundGetSwitch", (void*)primitiveSoundGetSwitch},
  {"SoundPlugin", "primitiveSoundRecordSamples", (void*)primitiveSoundRecordSamples},
  {"SoundPlugin", "primitiveSoundAvailableSpace", (void*)primitiveSoundAvailableSpace},
- {"SoundPlugin", "primitiveSoundSetSwitch", (void*)primitiveSoundSetSwitch},
  {"SoundPlugin", "primitiveSoundStartWithSemaphore", (void*)primitiveSoundStartWithSemaphore},
  {"SoundPlugin", "initialiseModule", (void*)initialiseModule},
- {"SoundPlugin", "primitiveSoundSetRecordLevel", (void*)primitiveSoundSetRecordLevel},
- {"SoundPlugin", "primitiveSoundPlaySamples", (void*)primitiveSoundPlaySamples},
- {"SoundPlugin", "primitiveSoundStartRecording", (void*)primitiveSoundStartRecording},
+ {"SoundPlugin", "primitiveSoundSetLeftVolume", (void*)primitiveSoundSetLeftVolume},
  {"SoundPlugin", "primitiveSoundPlaySilence", (void*)primitiveSoundPlaySilence},
  {"SoundPlugin", "primitiveSoundGetRecordingSampleRate", (void*)primitiveSoundGetRecordingSampleRate},
+ {"SoundPlugin", "primitiveSoundInsertSamples", (void*)primitiveSoundInsertSamples},
  {"SoundPlugin", "primitiveSoundGetVolume", (void*)primitiveSoundGetVolume},
  {"SoundPlugin", "primitiveSoundStop", (void*)primitiveSoundStop},
- {"SoundPlugin", "primitiveSoundSetDevice", (void*)primitiveSoundSetDevice},
  {NULL, NULL, NULL}
 };
 

Modified: trunk/platforms/unix/src/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:32 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:35 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -55,9 +55,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "StarSqueakPlugin 10 November 2008 (i)"
+ "StarSqueakPlugin 26 August 2009 (i)"
 #else
- "StarSqueakPlugin 10 November 2008 (e)"
+ "StarSqueakPlugin 26 August 2009 (e)"
 #endif
 ;
 

Modified: trunk/platforms/unix/src/vm/intplugins/ZipPlugin/ZipPlugin.c
===================================================================
--- trunk/platforms/unix/src/vm/intplugins/ZipPlugin/ZipPlugin.c 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/intplugins/ZipPlugin/ZipPlugin.c 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(10 November 2008 3:51:22 pm)
-by VMMaker 3.8b6
+/* Automatically generated from Squeak on an Array(26 August 2009 10:00:57 pm)
+by VMMaker 3.11.3
  */
 
 #include <math.h>
@@ -87,9 +87,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
- "ZipPlugin 10 November 2008 (i)"
+ "ZipPlugin 26 August 2009 (i)"
 #else
- "ZipPlugin 10 November 2008 (e)"
+ "ZipPlugin 26 August 2009 (e)"
 #endif
 ;
 static unsigned int zipBaseDistance[] = {

Modified: trunk/platforms/unix/src/vm/sqNamedPrims.h
===================================================================
--- trunk/platforms/unix/src/vm/sqNamedPrims.h 2009-08-27 02:25:03 UTC (rev 2105)
+++ trunk/platforms/unix/src/vm/sqNamedPrims.h 2009-08-27 06:04:38 UTC (rev 2106)
@@ -1,5 +1,5 @@
-/* Automatically generated from Squeak on an Array(29 July 2009 11:01:55 pm)
-by VMMaker 3.10.7
+/* Automatically generated from Squeak on an Array(26 August 2009 10:01:36 pm)
+by VMMaker 3.11.3
  */
 /* This is an automatically generated table of all builtin modules in the VM */