[Vm-dev] [commit][3106] CogVM source as per VMMaker.oscog-eem.907

commits at squeakvm.org commits at squeakvm.org
Wed Oct 22 02:17:15 UTC 2014


Revision: 3106
Author:   eliot
Date:     2014-10-21 19:17:13 -0700 (Tue, 21 Oct 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.907

Spur:
Implement image segments.  Use Igor's idea of splitting the computation of the
transitive closure from the writing of the image segment for simplicity, even
if the two are together into a single primitive for backwards-compatibility.

Status is that raw use of the primtiives works, but use in the context of
ImageSegmentTest fails apparently because something somewhere changes the
version stamp at teh start of a segment.  Any clues appreciated.


Rename markAccessibleObjects to markAccessibleObjectsAndFireEphemerons, rename
markObjects to markObjects: flag, where flag is true if objects are known to be
unmarked before hand.  Move expungeDuplicateAndUnmarkedClasses: and
nilUnmarkedWeaklingSlots into markObjects: from globalGarbageCollect.  This is
all to ensure that the mark phase of the storeImageSegment prim does process
weaklings fully before computing the transitive closure.

Extend the object shortening code to include word objects (for the image segment
arrays) and make them deal with new space objects as well as old space objects.
Have freeObject: attempt to coalesce to avoid fragmenting the largest free
chunk all the time it is used for scratch storage).

Nuke the abortive attempt to implement the Spur
image segment code similarly to the V3 code.

Simplify isHiddenObj: for leak checking to tolerate more punned scratch objects
in new space.  Add a flag to checkForLeaks to specifically check for leaks
around the segment prims.

Change readableFormat: so that on Spur there is as
yet no acceptable compatibility version.

All:
Rewrite the two primitives to pass back an error code on failure, and rewrite
the (New)ObjectMemory code to answer informative failure codes.

Make findClassContainingMethod:startingAt: et al robust in the face of
faulted-out classes (nil method dictionaries).

No longer parenthesize BaseHeaderSize (and soon BytesPerOop and BytesPerWord)
for upcoming 64-bit changes.

Fix parenthesization bugs in validation code in some Alien plugin primtiives.

Include the AioPlugin in the Newspeak linux VMs; recent reports indicate it's
essential to good performance in recent versions of OSProcessPlugin.

Modified Paths:
--------------
    branches/Cog/build.linux32x86/newspeak.cog.spur/build/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.spur/build.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.v3/build/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.cog.v3/build.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.spur/build/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.spur/build.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.v3/build/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.sista.v3/build.itimerheartbeat/plugins.int
    branches/Cog/build.linux32x86/newspeak.stack.spur/build/plugins.int
    branches/Cog/build.linux32x86/newspeak.stack.spur/build.assert/plugins.int
    branches/Cog/build.linux32x86/newspeak.stack.spur/build.debug/plugins.int
    branches/Cog/build.linux32x86/newspeak.stack.v3/build/plugins.int
    branches/Cog/build.linux32x86/newspeak.stack.v3/build.assert/plugins.int
    branches/Cog/build.linux32x86/newspeak.stack.v3/build.debug/plugins.int
    branches/Cog/image/buildspurtrunkimage.sh
    branches/Cog/image/getGoodCogNsvm.sh
    branches/Cog/image/getGoodCogVM.sh
    branches/Cog/image/getGoodSpurNsvm.sh
    branches/Cog/image/getGoodSpurVM.sh
    branches/Cog/image/makegetnsvmscripts.sh
    branches/Cog/image/makegetvmscripts.sh
    branches/Cog/nscogsrc/plugins/IA32ABI/IA32ABI.c
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/cogit.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/scripts/uploadvms
    branches/Cog/sistasrc/vm/cogit.c
    branches/Cog/sistasrc/vm/cogit.h
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cogit.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cogit.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/plugins/IA32ABI/IA32ABI.c
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

Added Paths:
-----------
    branches/Cog/image/resizesqueakwindow.sh
    branches/Cog/nscogsrc/plugins/AioPlugin/
    branches/Cog/nscogsrc/plugins/AioPlugin/AioPlugin.c

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

Modified: branches/Cog/build.linux32x86/newspeak.cog.spur/build/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/build/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/build/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/build.assert.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/build.debug.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.spur/build.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/build.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/build.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.v3/build/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/build/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/build/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/build.assert.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/build.debug.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.cog.v3/build.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/build.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/build.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.spur/build/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/build/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/build/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/build.assert.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/build.debug.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.spur/build.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/build.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/build.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.v3/build/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/build/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/build/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/build.assert.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/build.debug.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.sista.v3/build.itimerheartbeat/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/build.itimerheartbeat/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/build.itimerheartbeat/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.stack.spur/build/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.spur/build/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.stack.spur/build/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.stack.spur/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.spur/build.assert/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.stack.spur/build.assert/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.stack.spur/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.spur/build.debug/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.stack.spur/build.debug/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.stack.v3/build/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.v3/build/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.stack.v3/build/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.stack.v3/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.v3/build.assert/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.stack.v3/build.assert/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/build.linux32x86/newspeak.stack.v3/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.v3/build.debug/plugins.int	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/build.linux32x86/newspeak.stack.v3/build.debug/plugins.int	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,5 +1,6 @@
 # Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
 INTERNAL_PLUGINS = \
+AioPlugin \
 AsynchFilePlugin \
 BMPReadWriterPlugin \
 B2DPlugin \

Modified: branches/Cog/image/buildspurtrunkimage.sh
===================================================================
--- branches/Cog/image/buildspurtrunkimage.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/buildspurtrunkimage.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -11,9 +11,10 @@
 	$VM trunk46forspur.image BuildSqueakTrunkImage.st
 fi
 
-rm -f temp-spur-repository/* temp-v3-repository/*
-echo $VM trunk46forspur.image WriteSpurPackagesToTempDir.st
-$VM trunk46forspur.image WriteSpurPackagesToTempDir.st
+#Old code pre patchAndUploadUnpatchedInTrunk
+#rm -f temp-spur-repository/* temp-v3-repository/*
+#echo $VM trunk46forspur.image WriteSpurPackagesToTempDir.st
+#$VM trunk46forspur.image WriteSpurPackagesToTempDir.st
 
 # Now choose a suitable VMMaker image (Spur preferred) and get it to convert
 # trunk46forspur to Spur.
@@ -52,5 +53,7 @@
 
 # Now load the modified packages
 . ./getGoodSpurVM.sh
-echo $VM -blockonerror trunk46-spur.image LoadSpurPackagesFromTempDir.st
-$VM -blockonerror trunk46-spur.image LoadSpurPackagesFromTempDir.st
+echo $VM -blockonerror trunk46-spur.image LoadSpurPackages.st
+$VM -blockonerror trunk46-spur.image LoadSpurPackages.st
+
+./resizesqueakwindow.sh trunk46-spur.image 800 600

Modified: branches/Cog/image/getGoodCogNsvm.sh
===================================================================
--- branches/Cog/image/getGoodCogNsvm.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/getGoodCogNsvm.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,32 +1,32 @@
 #!/bin/sh
-# Sets the VM env var to the r3095 Newspeak VM for the current platform.
+# Sets the VM env var to the r3104 Newspeak VM for the current platform.
 # will download and install the VM in this directory if necessary.
 
-TAG=14.39.3095
-REV=3095
-LCBINDIR=4.0-3095
+TAG=14.41.3104
+REV=3104
+LCBINDIR=4.0-3104
 URL=http://www.mirandabanda.org/files/Cog/VM/VM.r$REV/
 
 . ./envvars.sh
 
 case "$OS" in
 Darwin) get_vm_from_tar \
-            "Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" e84764bad961132c21db23a291b35d6c \
-            "Newspeak Virtual Machine.app-$TAG.tgz" 0c8069350a057e03397b02adc85df31a
+            "Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" de5d9665b2e4a49d36059626238cefa4 \
+            "Newspeak Virtual Machine.app-$TAG.tgz" f786ce8a9103c5d73457dd21d3af80cd
         VM="Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine";;
 Linux)
     if expr $OSREL \> 2.6.12; then
         get_vm_from_tar \
         nsvmlinuxht/lib/nsvm/$LCBINDIR/nsvm  \
-        nsvmlinuxht-$TAG.tgz b242db5776e35ceb34669313c5423eea
+        nsvmlinuxht-$TAG.tgz bde6c4aa584cfd25ec6c425ff8d7c476
     else
         get_vm_from_tar \
         nsvmlinux/lib/nsvm/$LCBINDIR/nsvm  \
-        nsvmlinux-$TAG.tgz d39847515fb436bd715e129cf37e79e9
+        nsvmlinux-$TAG.tgz 2df70aec5d0b54577675d07c58211f06
     fi;;
 CYGWIN*) get_vm_from_zip \
-            nsvmwin/nsvmConsole.exe 05cddd5c752019af301815dd18996164 \
-            nsvmwin-$TAG.zip c77545ac931d80fcc917b138c99746fa
+            nsvmwin/nsvmConsole.exe 71cd4966a2f9b76cd8b2d2fd4b942930 \
+            nsvmwin-$TAG.zip 26e033b51244f444c1cc9b3a30c6ce6f
     VM=nsvmwin/nsvmConsole.exe;;
 *)  echo "don't know how to run nsvm on your system.  bailing out." 1>&2; exit 2
 esac

Modified: branches/Cog/image/getGoodCogVM.sh
===================================================================
--- branches/Cog/image/getGoodCogVM.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/getGoodCogVM.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,32 +1,32 @@
 #!/bin/sh
-# Sets the VM env var to the r3095 Cog VM for the current platform.
+# Sets the VM env var to the r3104 Cog VM for the current platform.
 # will download and install the VM in this directory if necessary.
 
-TAG=14.39.3095
-REV=3095
-LCBINDIR=4.0-3095
+TAG=14.41.3104
+REV=3104
+LCBINDIR=4.0-3104
 URL=http://www.mirandabanda.org/files/Cog/VM/VM.r$REV/
 
 . ./envvars.sh
 
 case "$OS" in
 Darwin) get_vm_from_tar \
-            Cog.app/Contents/MacOS/Squeak 4333a73cfdc82b98d5af6bc4214637cf \
-            Cog.app-$TAG.tgz 876826f15ce25e120838459c6ae28c77
+            Cog.app/Contents/MacOS/Squeak 87bccfaa11dafb2c8c16850cbd021fb2 \
+            Cog.app-$TAG.tgz 3e75109726f0970a4e0e61869d1be212
         VM=Cog.app/Contents/MacOS/Squeak;;
 Linux)
     if expr $OSREL \> 2.6.12; then
         get_vm_from_tar \
-        coglinuxht/lib/squeak/$LCBINDIR/squeak c60d17a17c01a6e3540e2d44ff85b3fa \
-        coglinuxht-$TAG.tgz 0e373fb98a13c39451cc7a10117a3b9e
+        coglinuxht/lib/squeak/$LCBINDIR/squeak 706c5ffb7023bd0a9a43d7b6c847df73 \
+        coglinuxht-$TAG.tgz 9d09d5420139535a07af343418ee9985
     else
         get_vm_from_tar \
-        coglinux/lib/squeak/$LCBINDIR/squeak 0a1c7a1038202dc0fd2b9cd296e2e2ea \
-        coglinux-$TAG.tgz 2d7acdf79117c107d62ffd587e8bfd19
+        coglinux/lib/squeak/$LCBINDIR/squeak 1c7188ef81af887abd84b159af52bdaf \
+        coglinux-$TAG.tgz d67b929fbbd20542abb62aaf8cc8cbca
     fi;;
 CYGWIN*) get_vm_from_zip \
-            cogwin/SqueakConsole.exe c20ccbda88943dad5921c5cc3ca396d6 \
-            cogwin-$TAG.zip 84b1167a6766d637b70d358a21ce895f
+            cogwin/SqueakConsole.exe a68530a6d08d2d043eb16ecb932b7383 \
+            cogwin-$TAG.zip a66ba06907bdfdde191b1bf45a495cd2
     VM=cogwin/SqueakConsole.exe;;
 *)  echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
 esac

Modified: branches/Cog/image/getGoodSpurNsvm.sh
===================================================================
--- branches/Cog/image/getGoodSpurNsvm.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/getGoodSpurNsvm.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,26 +1,26 @@
 #!/bin/sh
-# Sets the VM env var to the r3095 Newspeak Spur VM for the current platform.
+# Sets the VM env var to the r3105 Newspeak Spur VM for the current platform.
 # will download and install the VM in this directory if necessary.
 
-TAG=14.39.3095
-REV=3095
-LSBINDIR=5.0-3095
+TAG=14.41.3105
+REV=3105
+LSBINDIR=5.0-3105
 URL=http://www.mirandabanda.org/files/Cog/VM/VM.r$REV/
 
 . ./envvars.sh
 
 case "$OS" in
 Darwin) get_vm_from_tar \
-            "Newspeak Spur Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" e29b2cec39511ceb654976fb6663a119 \
-            "Newspeak Spur Virtual Machine.app-$TAG.tgz" 252be83f5480eb853148b1189f826916
+            "Newspeak Spur Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" b9b6885517bb1ddcc33f1f042b66fc2f \
+            "Newspeak Spur Virtual Machine.app-$TAG.tgz" 516e07fcdd4987ceaa9ce2a1452dc6ce
         VM="Newspeak Spur Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine";;
 Linux) get_vm_from_tar \
         nsvmspurlinuxht/lib/nsvm/$LSBINDIR/nsvm  \
-        nsvmspurlinuxht-$TAG.tgz 6c9d6f70d345a0ff19003a55781a50e2
+        nsvmspurlinuxht-$TAG.tgz 6e8cb761b039cc754887fa88a78cf5f7
     VM=nsvmspurlinuxht/nsvm;;
 CYGWIN*) get_vm_from_zip \
-            nsvmspurwin/nsvmConsole.exe d0c3c8bee789d2bb40f08bf09c5e0818 \
-            nsvmspurwin-$TAG.zip 6b61b05a26022f1d0cbfb4f189efb8bf
+            nsvmspurwin/nsvmConsole.exe f89c87da16fe250063d3b3623b868e33 \
+            nsvmspurwin-$TAG.zip 763b6c882f65a573c7615eb53f2b3aa7
     VM=nsvmspurwin/nsvmConsole.exe;;
 *)  echo "don't know how to run nsvm on your system.  bailing out." 1>&2; exit 2
 esac

Modified: branches/Cog/image/getGoodSpurVM.sh
===================================================================
--- branches/Cog/image/getGoodSpurVM.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/getGoodSpurVM.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -1,26 +1,26 @@
 #!/bin/sh
-# Sets the VM env var to the r3095 Cog Spur VM for the current platform.
+# Sets the VM env var to the r3105 Cog Spur VM for the current platform.
 # will download and install the VM in this directory if necessary.
 
-TAG=14.39.3095
-REV=3095
-LSBINDIR=5.0-3095
+TAG=14.41.3105
+REV=3105
+LSBINDIR=5.0-3105
 URL=http://www.mirandabanda.org/files/Cog/VM/VM.r$REV/
 
 . ./envvars.sh
 
 case "$OS" in
 Darwin) get_vm_from_tar \
-            CogSpur.app/Contents/MacOS/Squeak 2b1088c7b33310ea3a3a71b0e7c2bf76 \
-            CogSpur.app-$TAG.tgz 27bb41ea96cebe32f619cd694cb4f779
+            CogSpur.app/Contents/MacOS/Squeak 13b57f63961b57045300785c8e116a56 \
+            CogSpur.app-$TAG.tgz dae4205b5790577d0190c0c05f9548d0
         VM=CogSpur.app/Contents/MacOS/Squeak;;
 Linux) get_vm_from_tar \
-        cogspurlinuxht/lib/squeak/$LSBINDIR/squeak b549e5341e7c6cfd7902692055eaa5b8 \
-        cogspurlinuxht-$TAG.tgz 621891e9bf782256a3e4e0c89d6e5929
+        cogspurlinuxht/lib/squeak/$LSBINDIR/squeak 795aee1bd9a3d21eb1d02ecabf23b53a \
+        cogspurlinuxht-$TAG.tgz fa3c82f64d6b9ea38618a1a60df8bb50
     VM=cogspurlinuxht/squeak;;
 CYGWIN*) get_vm_from_zip \
-            cogspurwin/SqueakConsole.exe ccd0f3ed63df616574c7f62ca03e6be0 \
-            cogspurwin-$TAG.zip edc82d0157520b10e37f11438f687e33
+            cogspurwin/SqueakConsole.exe 7e33a679a9125743460894498308a612 \
+            cogspurwin-$TAG.zip 015eb95c8850d2aade5d731e3cd617d8
     VM=cogspurwin/SqueakConsole.exe;;
 *)  echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
 esac

Modified: branches/Cog/image/makegetnsvmscripts.sh
===================================================================
--- branches/Cog/image/makegetnsvmscripts.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/makegetnsvmscripts.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -3,8 +3,6 @@
 GetCogScript=getGoodCogNsvm.sh
 GetSpurScript=getGoodSpurNsvm.sh
 
-cd `dirname $0`
-
 REV=
 TAG=
 while getopts 'r:t:?' opt "$@"; do
@@ -17,6 +15,11 @@
 done
 shift `expr $OPTIND - 1`
 
+cd `dirname $0` >/dev/null
+SD=`basename $0 .sh`.$$
+trap 'rm -rf "$SD"; exit 2' HUP INT PIPE TERM 0
+mkdir $SD
+
 test -n "$REV" || REV=`grep 'SvnRawRevisionString.*Rev:' ../platforms/Cross/vm/sqSCCSVersion.h \
 	| sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/'`
 test -n "$TAG" || TAG=`date +%g.%U.`$REV
@@ -28,12 +31,18 @@
 . ./envvars.sh
 
 ABORT=
-for a in "Newspeak Virtual Machine.app-$TAG.tgz" "Newspeak Virtual Machine-$TAG.dmg" nsvmlinuxht-$TAG.tgz nsvmlinux-$TAG.tgz nsvmwin-$TAG.zip\
-		"Newspeak Spur Virtual Machine.app-$TAG.tgz" "Newspeak Spur Virtual Machine-$TAG.dmg" nsvmspurlinuxht-$TAG.tgz nsvmspurwin-$TAG.zip
+for a in "Newspeak Virtual Machine.app-$TAG.tgz" nsvmlinuxht-$TAG.tgz nsvmlinux-$TAG.tgz nsvmwin-$TAG.zip\
+		"Newspeak Spur Virtual Machine.app-$TAG.tgz" nsvmspurlinuxht-$TAG.tgz nsvmspurwin-$TAG.zip
 do
 	test -f "../products/$a" || echo $a does not exist
+	test -f "../products/$a" && (cd "$SD" >/dev/null;
+		case "$a" in
+		*.zip)	unzip -q "../../products/$a";;
+		*)	tar xzf "../../products/$a"
+		esac)
 	ABORT=true
 done
+test -n "$ABORT" || rm -rf "$SD"
 test -n "$ABORT" || exit 1
 
 
@@ -56,7 +65,7 @@
 END
 
 echo -n '            "Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" ' >>$GetCogScript
-echo -n `quietmd5 "../products/Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine"` >>$GetCogScript
+echo -n `quietmd5 "$SD/Newspeak Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine"` >>$GetCogScript
 echo ' \' >> $GetCogScript
 echo -n '            "Newspeak Virtual Machine.app-$TAG.tgz" ' >>$GetCogScript
 quietmd5 "../products/Newspeak Virtual Machine.app-$TAG.tgz" >>$GetCogScript
@@ -69,7 +78,7 @@
 END
 
 echo -n '        nsvmlinuxht/lib/nsvm/$LCBINDIR/nsvm ' >>$GetCogScript
-echo -n `quietmd5 ../products/nsvmlinuxht/lib/nsvm/$LCBINDIR/nsvm` >>$GetCogScript
+echo -n `quietmd5 $SD/nsvmlinuxht/lib/nsvm/$LCBINDIR/nsvm` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '        nsvmlinuxht-$TAG.tgz ' >>$GetCogScript
 quietmd5 ../products/nsvmlinuxht-$TAG.tgz >>$GetCogScript
@@ -80,7 +89,7 @@
 END
 
 echo -n '        nsvmlinux/lib/nsvm/$LCBINDIR/nsvm ' >>$GetCogScript
-echo -n `quietmd5 ../products/nsvmlinux/lib/nsvm/$LCBINDIR/nsvm` >>$GetCogScript
+echo -n `quietmd5 $SD/nsvmlinux/lib/nsvm/$LCBINDIR/nsvm` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '        nsvmlinux-$TAG.tgz ' >>$GetCogScript
 quietmd5 ../products/nsvmlinux-$TAG.tgz >>$GetCogScript
@@ -90,7 +99,7 @@
 END
 
 echo -n '            nsvmwin/nsvmConsole.exe ' >>$GetCogScript
-echo -n `quietmd5 ../products/nsvmwin/nsvmConsole.exe` >>$GetCogScript
+echo -n `quietmd5 $SD/nsvmwin/nsvmConsole.exe` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '            nsvmwin-$TAG.zip ' >>$GetCogScript
 quietmd5 ../products/nsvmwin-$TAG.zip >>$GetCogScript
@@ -120,7 +129,7 @@
 END
 
 echo -n '            "Newspeak Spur Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine" ' >>$GetSpurScript
-echo -n `quietmd5 ../products/"Newspeak Spur Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine"` >>$GetSpurScript
+echo -n `quietmd5 "$SD/Newspeak Spur Virtual Machine.app/Contents/MacOS/Newspeak Virtual Machine"` >>$GetSpurScript
 echo ' \' >>$GetSpurScript
 echo -n '            "Newspeak Spur Virtual Machine.app-$TAG.tgz" ' >>$GetSpurScript
 quietmd5 "../products/Newspeak Spur Virtual Machine.app-$TAG.tgz" >>$GetSpurScript
@@ -131,7 +140,7 @@
 END
 
 echo -n '        nsvmspurlinuxht/lib/nsvm/$LSBINDIR/nsvm ' >>$GetSpurScript
-echo -n `quietmd5 ../products/nsvmspurlinuxht/lib/nsvm/$LSBINDIR/nsvm` >>$GetSpurScript
+echo -n `quietmd5 $SD/nsvmspurlinuxht/lib/nsvm/$LSBINDIR/nsvm` >>$GetSpurScript
 echo ' \' >>$GetSpurScript
 echo -n '        nsvmspurlinuxht-$TAG.tgz ' >>$GetSpurScript
 quietmd5 ../products/nsvmspurlinuxht-$TAG.tgz >>$GetSpurScript
@@ -142,7 +151,7 @@
 END
 
 echo -n '            nsvmspurwin/nsvmConsole.exe ' >>$GetSpurScript
-echo -n `quietmd5 ../products/nsvmspurwin/nsvmConsole.exe` >>$GetSpurScript
+echo -n `quietmd5 $SD/nsvmspurwin/nsvmConsole.exe` >>$GetSpurScript
 echo ' \' >>$GetSpurScript
 echo -n '            nsvmspurwin-$TAG.zip ' >>$GetSpurScript
 quietmd5 ../products/nsvmspurwin-$TAG.zip >>$GetSpurScript
@@ -153,4 +162,5 @@
 esac
 END
 
+rm -rf "$SD"
 chmod a+x $GetSpurScript

Modified: branches/Cog/image/makegetvmscripts.sh
===================================================================
--- branches/Cog/image/makegetvmscripts.sh	2014-10-14 19:54:42 UTC (rev 3105)
+++ branches/Cog/image/makegetvmscripts.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -3,8 +3,6 @@
 GetCogScript=getGoodCogVM.sh
 GetSpurScript=getGoodSpurVM.sh
 
-cd `dirname $0`
-
 REV=
 TAG=
 while getopts 'r:t:?' opt "$@"; do
@@ -17,6 +15,11 @@
 done
 shift `expr $OPTIND - 1`
 
+cd `dirname $0` >/dev/null
+SD=`basename $0 .sh`.$$
+trap 'rm -rf "$SD"; exit 2' HUP INT PIPE TERM 0
+mkdir $SD
+
 test -n "$REV" || REV=`grep 'SvnRawRevisionString.*Rev:' ../platforms/Cross/vm/sqSCCSVersion.h \
 	| sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/'`
 test -n "$TAG" || TAG=`date +%g.%U.`$REV
@@ -32,10 +35,15 @@
 		CogSpur.app-$TAG.tgz cogspurlinuxht-$TAG.tgz cogspurwin-$TAG.zip
 do
 	test -f ../products/$a || echo $a does not exist
+	test -f ../products/$a && (cd "$SD" >/dev/null; tar xzf ../../products/$a)
 	ABORT=true
 done
+test -n "$ABORT" || rm -rf "$SD"
 test -n "$ABORT" || exit 1
 
+
+echo $GetCogScript $GetSpurScript
+
 cat >$GetCogScript <<END
 #!/bin/sh
 # Sets the VM env var to the r$REV Cog VM for the current platform.
@@ -53,7 +61,7 @@
 END
 
 echo -n '            Cog.app/Contents/MacOS/Squeak ' >>$GetCogScript
-echo -n `quietmd5 ../products/Cog.app/Contents/MacOS/Squeak` >>$GetCogScript
+echo -n `quietmd5 "$SD/Cog.app/Contents/MacOS/Squeak"` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '            Cog.app-$TAG.tgz ' >>$GetCogScript
 quietmd5 ../products/Cog.app-$TAG.tgz >>$GetCogScript
@@ -66,7 +74,7 @@
 END
 
 echo -n '        coglinuxht/lib/squeak/$LCBINDIR/squeak ' >>$GetCogScript
-echo -n `quietmd5 ../products/coglinuxht/lib/squeak/$LCBINDIR/squeak` >>$GetCogScript
+echo -n `quietmd5 $SD/coglinuxht/lib/squeak/$LCBINDIR/squeak` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '        coglinuxht-$TAG.tgz ' >>$GetCogScript
 quietmd5 ../products/coglinuxht-$TAG.tgz >>$GetCogScript
@@ -77,7 +85,7 @@
 END
 
 echo -n '        coglinux/lib/squeak/$LCBINDIR/squeak ' >>$GetCogScript
-echo -n `quietmd5 ../products/coglinux/lib/squeak/$LCBINDIR/squeak` >>$GetCogScript
+echo -n `quietmd5 $SD/coglinux/lib/squeak/$LCBINDIR/squeak` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '        coglinux-$TAG.tgz ' >>$GetCogScript
 quietmd5 ../products/coglinux-$TAG.tgz >>$GetCogScript
@@ -87,7 +95,7 @@
 END
 
 echo -n '            cogwin/SqueakConsole.exe ' >>$GetCogScript
-echo -n `quietmd5 ../products/cogwin/SqueakConsole.exe` >>$GetCogScript
+echo -n `quietmd5 $SD/cogwin/SqueakConsole.exe` >>$GetCogScript
 echo ' \' >>$GetCogScript
 echo -n '            cogwin-$TAG.zip ' >>$GetCogScript
 quietmd5 ../products/cogwin-$TAG.zip >>$GetCogScript
@@ -117,7 +125,7 @@
 END
 
 echo -n '            CogSpur.app/Contents/MacOS/Squeak ' >>$GetSpurScript
-echo -n `quietmd5 ../products/CogSpur.app/Contents/MacOS/Squeak` >>$GetSpurScript
+echo -n `quietmd5 $SD/CogSpur.app/Contents/MacOS/Squeak` >>$GetSpurScript
 echo ' \' >>$GetSpurScript
 echo -n '            CogSpur.app-$TAG.tgz ' >>$GetSpurScript
 quietmd5 ../products/CogSpur.app-$TAG.tgz >>$GetSpurScript
@@ -128,7 +136,7 @@
 END
 
 echo -n '        cogspurlinuxht/lib/squeak/$LSBINDIR/squeak ' >>$GetSpurScript
-echo -n `quietmd5 ../products/cogspurlinuxht/lib/squeak/$LSBINDIR/squeak` >>$GetSpurScript
+echo -n `quietmd5 $SD/cogspurlinuxht/lib/squeak/$LSBINDIR/squeak` >>$GetSpurScript
 echo ' \' >>$GetSpurScript
 echo -n '        cogspurlinuxht-$TAG.tgz ' >>$GetSpurScript
 quietmd5 ../products/cogspurlinuxht-$TAG.tgz >>$GetSpurScript
@@ -139,7 +147,7 @@
 END
 
 echo -n '            cogspurwin/SqueakConsole.exe ' >>$GetSpurScript
-echo -n `quietmd5 ../products/cogspurwin/SqueakConsole.exe` >>$GetSpurScript
+echo -n `quietmd5 $SD/cogspurwin/SqueakConsole.exe` >>$GetSpurScript
 echo ' \' >>$GetSpurScript
 echo -n '            cogspurwin-$TAG.zip ' >>$GetSpurScript
 quietmd5 ../products/cogspurwin-$TAG.zip >>$GetSpurScript
@@ -150,4 +158,5 @@
 esac
 END
 
+rm -rf "$SD"
 chmod a+x $GetSpurScript

Added: branches/Cog/image/resizesqueakwindow.sh
===================================================================
--- branches/Cog/image/resizesqueakwindow.sh	                        (rev 0)
+++ branches/Cog/image/resizesqueakwindow.sh	2014-10-22 02:17:13 UTC (rev 3106)
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ $# -ne 3 ]; then
+	echo "Usage: `basename $0` <image> <width> <height>"
+	exit 1
+fi
+echo -ne \\x$(printf "%02X" $[$3%256])\\x$(printf "%02X" $[$3/256])\\x$(printf "%02X" $[$2%256])\\x$(printf "%02X" $[$2/256]) \
+| dd of="$1" obs=1 seek=24 conv=block,notrunc cbs=4


Property changes on: branches/Cog/image/resizesqueakwindow.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogsrc/plugins/AioPlugin/AioPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/AioPlugin/AioPlugin.c	                        (rev 0)
+++ branches/Cog/nscogsrc/plugins/AioPlugin/AioPlugin.c	2014-10-22 02:17:13 UTC (rev 3106)
@@ -0,0 +1,737 @@
+/* Automatically generated by
+	VMPluginCodeGenerator VMMaker.oscog-eem.702 uuid: 2f753471-9a18-4f13-aaef-58ffb0702465
+   from
+	UnixAioPlugin VMConstruction-Plugins-AioPlugin-eem.15 uuid: 0029df1c-3720-4b61-8579-4851417d24a7
+ */
+static char __buildInfo[] = "UnixAioPlugin VMConstruction-Plugins-AioPlugin-eem.15 uuid: 0029df1c-3720-4b61-8579-4851417d24a7 " __DATE__ ;
+
+
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#define FILEHANDLETYPE FILE *  /* the type of low level stream to be used in a struct SQFile */
+
+/* Default EXPORT macro that does nothing (see comment in sq.h): */
+#define EXPORT(returnType) returnType
+
+/* Do not include the entire sq.h file but just those parts needed. */
+/*  The virtual machine proxy definition */
+#include "sqVirtualMachine.h"
+/* Configuration options */
+#include "sqConfig.h"
+/* Platform specific definitions */
+#include "sqPlatformSpecific.h"
+
+#define true 1
+#define false 0
+#define null 0  /* using 'null' because nil is predefined in Think C */
+#ifdef SQUEAK_BUILTIN_PLUGIN
+#undef EXPORT
+// was #undef EXPORT(returnType) but screws NorCroft cc
+#define EXPORT(returnType) static returnType
+#endif
+
+#include "FilePlugin.h"
+#include "SocketPlugin.h"
+#include "config.h"
+#define SESSIONIDENTIFIERTYPE int
+#include "sqaio.h"
+#include "sqMemoryAccess.h"
+
+
+/*** Constants ***/
+
+
+/*** Function Prototypes ***/
+static void aioForwardwithDataandFlags(int fd, void *data, int flags);
+static sqInt fileDescriptorFrom(sqInt aSQFileByteArray);
+static FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray);
+static sqInt fileRecordSize(void);
+static SQFile * fileValueOf(sqInt anSQFileRecord);
+static VirtualMachine * getInterpreter(void);
+EXPORT(const char*) getModuleName(void);
+static sqInt getThisSessionIdentifier(void);
+static sqInt halt(void);
+EXPORT(sqInt) initialiseModule(void);
+static sqInt isNonNullSQFile(sqInt objectPointer);
+static sqInt isNullSQSocket(sqInt objectPointer);
+static sqInt isSQFileObject(sqInt objectPointer);
+static sqInt isSQSocketObject(sqInt objectPointer);
+static sqInt isValidFileSession(sqInt objectPointer);
+EXPORT(sqInt) moduleUnloaded(char *aModuleName);
+static sqInt msg(char *s);
+EXPORT(sqInt) primitiveAioDisable(void);
+EXPORT(sqInt) primitiveAioEnable(void);
+EXPORT(sqInt) primitiveAioHandle(void);
+EXPORT(sqInt) primitiveAioSuspend(void);
+EXPORT(sqInt) primitiveModuleName(void);
+EXPORT(sqInt) primitiveOSFileHandle(void);
+EXPORT(sqInt) primitiveOSSocketHandle(void);
+EXPORT(sqInt) primitiveVersionString(void);
+static SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile);
+EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);
+EXPORT(sqInt) shutdownModule(void);
+static int socketDescriptorFrom(sqInt sqSocketOop);
+static sqInt socketRecordSize(void);
+static SQSocket * socketValueOf(sqInt anSQSocketRecord);
+static sqInt stringFromCString(const char *aCString);
+static char * versionString(void);
+
+
+/*** Variables ***/
+
+#if !defined(SQUEAK_BUILTIN_PLUGIN)
+static void * (*arrayValueOf)(sqInt oop);
+static sqInt (*byteSizeOf)(sqInt oop);
+static sqInt (*classString)(void);
+static sqInt (*getThisSessionID)(void);
+static sqInt (*instantiateClassindexableSize)(sqInt classPointer, sqInt size);
+static sqInt (*isBytes)(sqInt oop);
+static sqInt (*nilObject)(void);
+static sqInt (*pop)(sqInt nItems);
+static sqInt (*popthenPush)(sqInt nItems, sqInt oop);
+static sqInt (*primitiveFail)(void);
+static sqInt (*pushInteger)(sqInt integerValue);
+static sqInt (*signalSemaphoreWithIndex)(sqInt semaIndex);
+static sqInt (*stackIntegerValue)(sqInt offset);
+static sqInt (*stackObjectValue)(sqInt offset);
+static sqInt (*stackValue)(sqInt offset);
+static sqInt (*trueObject)(void);
+#else /* !defined(SQUEAK_BUILTIN_PLUGIN) */
+extern void * arrayValueOf(sqInt oop);
+extern sqInt byteSizeOf(sqInt oop);
+extern sqInt classString(void);
+extern sqInt getThisSessionID(void);
+extern sqInt instantiateClassindexableSize(sqInt classPointer, sqInt size);
+extern sqInt isBytes(sqInt oop);
+extern sqInt nilObject(void);
+extern sqInt pop(sqInt nItems);
+extern sqInt popthenPush(sqInt nItems, sqInt oop);
+extern sqInt primitiveFail(void);
+extern sqInt pushInteger(sqInt integerValue);
+extern sqInt signalSemaphoreWithIndex(sqInt semaIndex);
+extern sqInt stackIntegerValue(sqInt offset);
+extern sqInt stackObjectValue(sqInt offset);
+extern sqInt stackValue(sqInt offset);
+extern sqInt trueObject(void);
+extern
+#endif
+struct VirtualMachine* interpreterProxy;
+static const char *moduleName =
+#ifdef SQUEAK_BUILTIN_PLUGIN
+	"AioPlugin VMConstruction-Plugins-AioPlugin-eem.15 (i)"
+#else
+	"AioPlugin VMConstruction-Plugins-AioPlugin-eem.15 (e)"
+#endif
+;
+
+
+
+/*	This function is called to signal a Smalltalk Semaphore when an
+	asynchronous event is
+	detected. When translated to C, the name of this method is
+	aioForwardwithDataandFlags. The event handler is set up by
+	#primitiveAioHandle. 
+ */
+
+static void
+aioForwardwithDataandFlags(int fd, void *data, int flags)
+{
+    int *pfd;
+    sqInt semaIndex;
+
+	pfd = data;
+	semaIndex = *pfd;
+	signalSemaphoreWithIndex(semaIndex);
+}
+
+
+/*	Answer the OS file descriptor, an integer value, from a SQFile data
+	structure byte array, or answer -1 if unable to obtain the file descriptor
+	(probably due
+	to receiving an incorrect type of object as aFileHandle).
+ */
+/*	return type should be int, but skip the declaration to permit inlining */
+
+static sqInt
+fileDescriptorFrom(sqInt aSQFileByteArray)
+{
+	if (!((((isBytes(aSQFileByteArray))
+		 && ((byteSizeOf(aSQFileByteArray)) == (fileRecordSize())))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(aSQFileByteArray)))))
+		 && (isNonNullSQFile(aSQFileByteArray)))) {
+		return -1;
+	}
+	return fileno(fileHandleFrom(aSQFileByteArray));
+}
+
+
+/*	Answer a file handle from a SQFile structure. On most platforms, this
+	will be a (FILE *). On Win32, it is a HANDLE. */
+
+static FILEHANDLETYPE
+fileHandleFrom(sqInt sqFileStructByteArray)
+{
+    SQFile *sqFile;
+
+	sqFile = arrayValueOf(sqFileStructByteArray);
+	return sqFile->file;
+}
+
+
+/*	Answer the size of a SQFile data structure in bytes. */
+
+static sqInt
+fileRecordSize(void)
+{
+	return sizeof(SQFile);
+}
+
+
+/*	Return a pointer to the first byte of of the SQFile data structure file
+	record within
+	anSQFileRecord, which is expected to be a ByteArray of size
+	self>>fileRecordSize. 
+ */
+
+static SQFile *
+fileValueOf(sqInt anSQFileRecord)
+{
+	return arrayValueOf(anSQFileRecord);
+}
+
+
+/*	Note: This is coded so that plugins can be run from Squeak. */
+
+static VirtualMachine *
+getInterpreter(void)
+{
+	return interpreterProxy;
+}
+
+
+/*	Note: This is hardcoded so it can be run from Squeak.
+	The module name is used for validating a module *after*
+	it is loaded to check if it does really contain the module
+	we're thinking it contains. This is important! */
+
+EXPORT(const char*)
+getModuleName(void)
+{
+	return moduleName;
+}
+
+static sqInt
+getThisSessionIdentifier(void)
+{
+	return getThisSessionID();
+}
+
+static sqInt
+halt(void)
+{
+	;
+	return 0;
+}
+
+EXPORT(sqInt)
+initialiseModule(void)
+{
+	return 1;
+}
+
+
+/*	Check for the common failure mode of a SQFile record with all zeros. */
+
+static sqInt
+isNonNullSQFile(sqInt objectPointer)
+{
+    unsigned idx;
+    unsigned char *sqFileBytes;
+
+	sqFileBytes = arrayValueOf(objectPointer);
+	idx = 0;
+	while (idx < (fileRecordSize())) {
+		if ((sqFileBytes[idx]) != 0) {
+			return 1;
+		}
+		idx += 1;
+	}
+	return 0;
+}
+
+
+/*	Check for the common failure mode of a SQSocket record with all zeros. */
+
+static sqInt
+isNullSQSocket(sqInt objectPointer)
+{
+    sqInt idx;
+    unsigned char *sqSocketBytes;
+
+	sqSocketBytes = arrayValueOf(objectPointer);
+	idx = 0;
+	while (idx < (socketRecordSize())) {
+		if ((sqSocketBytes[idx]) != 0) {
+			return 0;
+		}
+		idx += 1;
+	}
+	return 1;
+}
+
+
+/*	Answer true if objectPointer appears to be a valid SQFile ByteArray.
+	This check is appropriate if objectPointer has been passed as a parameter
+	to a primitive, and is expected to represent a valid file reference. */
+
+static sqInt
+isSQFileObject(sqInt objectPointer)
+{
+	return (((isBytes(objectPointer))
+	 && ((byteSizeOf(objectPointer)) == (fileRecordSize())))
+	 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(objectPointer)))))
+	 && (isNonNullSQFile(objectPointer));
+}
+
+
+/*	Answer true if objectPointer appears to be a valid SQSocket ByteArray.
+	This check
+	is appropriate if objectPointer has been passed as a parameter to a
+	primitive, and
+	is expected to represent a valid socket reference.
+ */
+
+static sqInt
+isSQSocketObject(sqInt objectPointer)
+{
+	return ((isBytes(objectPointer))
+	 && ((byteSizeOf(objectPointer)) == (socketRecordSize())))
+	 && (!(isNullSQSocket(objectPointer)));
+}
+
+
+/*	Answer true if the file session matches the current interpreter session
+	identifier. 
+ */
+
+static sqInt
+isValidFileSession(sqInt objectPointer)
+{
+	return (getThisSessionID()) == (sessionIdentifierFromSqFile(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);
+	return 0;
+}
+
+
+/*	Definitively disable asynchronous event notification for a descriptor. The
+	parameter is an OS level integer file descriptor. */
+
+EXPORT(sqInt)
+primitiveAioDisable(void)
+{
+    sqInt fd;
+
+	if ((nilObject()) == (stackValue(0))) {
+		return primitiveFail();
+	}
+	fd = stackIntegerValue(0);
+	if (fd < 0) {
+		return primitiveFail();
+	}
+	aioDisable(fd);
+	pop(2);
+	pushInteger(fd);
+}
+
+
+/*	Enable asynchronous notification for a descriptor. The first parameter is
+	an OS
+	level integer file descriptor. The second parameter is the index of a
+	Semaphore to
+	be notified, and the third parameter is a flag indicating that descriptor
+	represents an external object and should not be closed on termination of
+	aio handling. Answer
+	the semaphore index.
+ */
+
+EXPORT(sqInt)
+primitiveAioEnable(void)
+{
+    static int eventSemaphoreIndices[FD_SETSIZE];
+    sqInt externalObject;
+    sqInt fd;
+    sqInt flags;
+    sqInt semaIndex;
+
+	if ((nilObject()) == (stackValue(2))) {
+		return primitiveFail();
+	}
+	fd = stackIntegerValue(2);
+	if (fd < 0) {
+		return primitiveFail();
+	}
+	semaIndex = stackIntegerValue(1);
+	eventSemaphoreIndices[semaIndex] = semaIndex;
+	externalObject = stackObjectValue(0);
+	if (externalObject == (trueObject())) {
+		flags = AIO_EXT;
+	}
+	else {
+		flags = 0;
+	}
+	aioEnable(fd, &(eventSemaphoreIndices[semaIndex]), flags);
+	pop(4);
+	pushInteger(semaIndex);
+}
+
+
+/*	Handle asynchronous event notification for a descriptor. The first
+	parameter is
+	an OS level integer file descriptor. The remaining three parameters are
+	Boolean flags representing the types of events for which notification is
+	being requested:
+	handle exceptions, handle for read, and handle for write.
+	Flags are defined in the aio.h source as:
+	AIO_X	(1<<0)	handle for exceptions
+	AIO_R	(1<<1)	handle for read
+	AIO_W	(1<<2)	handle for write */
+
+EXPORT(sqInt)
+primitiveAioHandle(void)
+{
+    sqInt exceptionWatch;
+    sqInt fd;
+    sqInt flags;
+    sqInt readWatch;
+    sqInt writeWatch;
+
+	if ((nilObject()) == (stackValue(3))) {
+		return primitiveFail();
+	}
+	fd = stackIntegerValue(3);
+	if (fd < 0) {
+		return primitiveFail();
+	}
+	exceptionWatch = stackObjectValue(2);
+	readWatch = stackObjectValue(1);
+	writeWatch = stackObjectValue(0);
+	flags = 0;
+	if (exceptionWatch == (trueObject())) {
+		flags = flags | (AIO_X);
+	}
+	if (readWatch == (trueObject())) {
+		flags = flags | (AIO_R);
+	}
+	if (writeWatch == (trueObject())) {
+		flags = flags | (AIO_W);
+	}
+	aioHandle(fd, aioForwardwithDataandFlags, flags);
+	pop(5);
+	pushInteger(flags);
+}
+
+
+/*	Temporarily suspend asynchronous event notification for a descriptor. The
+	first parameter is an OS level integer file descriptor. The remaining
+	three parameters
+	are Boolean flags representing the types of events for which notification
+	is being
+	requested: handle exceptions, handle for read, and handle for write.
+	Flags are defined in the aio.h source as:
+	AIO_X	(1<<0)	handle for exceptions
+	AIO_R	(1<<1)	handle for read
+	AIO_W	(1<<2)	handle for write */
+
+EXPORT(sqInt)
+primitiveAioSuspend(void)
+{
+    sqInt exceptionWatch;
+    sqInt fd;
+    sqInt flags;
+    sqInt readWatch;
+    sqInt writeWatch;
+
+	if ((nilObject()) == (stackValue(3))) {
+		return primitiveFail();
+	}
+	fd = stackIntegerValue(3);
+	if (fd < 0) {
+		return primitiveFail();
+	}
+	exceptionWatch = stackObjectValue(2);
+	readWatch = stackObjectValue(1);
+	writeWatch = stackObjectValue(0);
+	flags = 0;
+	if (exceptionWatch == (trueObject())) {
+		flags = flags | (AIO_X);
+	}
+	if (readWatch == (trueObject())) {
+		flags = flags | (AIO_R);
+	}
+	if (writeWatch == (trueObject())) {
+		flags = flags | (AIO_W);
+	}
+	aioSuspend(fd, flags);
+	pop(5);
+	pushInteger(flags);
+}
+
+
+/*	Answer a string containing the module name string for this plugin. */
+
+EXPORT(sqInt)
+primitiveModuleName(void)
+{
+	popthenPush(1, stringFromCString(getModuleName()));
+}
+
+
+/*	Take a struct SQFile from the stack, and answer the value of its Unix file
+	number. 
+ */
+
+EXPORT(sqInt)
+primitiveOSFileHandle(void)
+{
+    sqInt fileNo;
+    sqInt sqFileOop;
+
+	sqFileOop = stackValue(0);
+	if (!((((isBytes(sqFileOop))
+		 && ((byteSizeOf(sqFileOop)) == (fileRecordSize())))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && (isNonNullSQFile(sqFileOop)))) {
+		return primitiveFail();
+	}
+	/* begin fileDescriptorFrom: */
+	if (!((((isBytes(sqFileOop))
+		 && ((byteSizeOf(sqFileOop)) == (fileRecordSize())))
+		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
+		 && (isNonNullSQFile(sqFileOop)))) {
+		fileNo = -1;
+		goto l1;
+	}
+	fileNo = fileno(fileHandleFrom(sqFileOop));
+l1:	/* end fileDescriptorFrom: */;
+	pop(2);
+	pushInteger(fileNo);
+}
+
+
+/*	Take a struct SQSocket from the stack, and answer the value of its Unix
+	file number.
+ */
+
+EXPORT(sqInt)
+primitiveOSSocketHandle(void)
+{
+    int fileNo;
+    sqInt sqSocketOop;
+
+	sqSocketOop = stackValue(0);
+	if (!(((isBytes(sqSocketOop))
+		 && ((byteSizeOf(sqSocketOop)) == (socketRecordSize())))
+		 && (!(isNullSQSocket(sqSocketOop))))) {
+		return primitiveFail();
+	}
+	fileNo = socketDescriptorFrom(sqSocketOop);
+	if (fileNo < 0) {
+		return primitiveFail();
+	}
+	pop(2);
+	pushInteger(fileNo);
+}
+
+
+/*	Answer a string containing the version string for this plugin. */
+
+EXPORT(sqInt)
+primitiveVersionString(void)
+{
+	popthenPush(1, stringFromCString(versionString()));
+}
+
+
+/*	Answer the session identifier from a SQFile structure. For a valid file
+	reference, this identifier will match the session identifier supplied by

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list