[Vm-dev] [commit][2620] VM:

commits at squeakvm.org commits at squeakvm.org
Tue Nov 27 01:13:24 UTC 2012


Revision: 2620
Author:   eliot
Date:     2012-11-26 17:13:23 -0800 (Mon, 26 Nov 2012)
Log Message:
-----------
VM:
Complete multiple bytecode set support plus NewsqueakV4 bytecode set.  Affects
only the Newspeak VMs.

Make instantiation primitives pop arguments, not assume arg count,
for Newspeak.  Make them answer error codes, and streamline,
avoiding using self success.

Integrate primitiveUtcWithOffset.

Rename traceLinkedSends to more general traceFlags.  Add better help for these.

Plugins:
Regenerate most plugins, to eliminate some warnings and to use isIntegerObjectrather than explicit bit test.

ThreadedFFIPlugin:
Fix bug with not attempting to run GC enough times for COGMTVM to
freeze arguments.
Fix bug in ffiCall:ArgArrayOrNil:NumArgs: not checking for an error case.

Modified Paths:
--------------
    branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj
    branches/Cog/nscogsrc/plugins/AsynchFilePlugin/AsynchFilePlugin.c
    branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c
    branches/Cog/nscogsrc/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
    branches/Cog/nscogsrc/plugins/BitBltPlugin/BitBltPlugin.c
    branches/Cog/nscogsrc/plugins/DSAPrims/DSAPrims.c
    branches/Cog/nscogsrc/plugins/DropPlugin/DropPlugin.c
    branches/Cog/nscogsrc/plugins/FileCopyPlugin/FileCopyPlugin.c
    branches/Cog/nscogsrc/plugins/FilePlugin/FilePlugin.c
    branches/Cog/nscogsrc/plugins/FloatArrayPlugin/FloatArrayPlugin.c
    branches/Cog/nscogsrc/plugins/FloatMathPlugin/FloatMathPlugin.c
    branches/Cog/nscogsrc/plugins/IA32ABI/IA32ABI.c
    branches/Cog/nscogsrc/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
    branches/Cog/nscogsrc/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c
    branches/Cog/nscogsrc/plugins/LargeIntegers/LargeIntegers.c
    branches/Cog/nscogsrc/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
    branches/Cog/nscogsrc/plugins/RePlugin/RePlugin.c
    branches/Cog/nscogsrc/plugins/SecurityPlugin/SecurityPlugin.c
    branches/Cog/nscogsrc/plugins/SocketPlugin/SocketPlugin.c
    branches/Cog/nscogsrc/plugins/SoundPlugin/SoundPlugin.c
    branches/Cog/nscogsrc/plugins/UUIDPlugin/UUIDPlugin.c
    branches/Cog/nscogsrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    branches/Cog/nscogsrc/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c
    branches/Cog/nscogsrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
    branches/Cog/nscogsrc/plugins/ZipPlugin/ZipPlugin.c
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cogmethod.h
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nscogsrc/vm/interp.h
    branches/Cog/nscogsrc/vm/vmCallback.h
    branches/Cog/platforms/Cross/vm/dispdbg.h
    branches/Cog/platforms/Mac OS/vm/sqMacMain.c
    branches/Cog/platforms/Mac OS/vm/sqMacUnixCommandLineInterface.c
    branches/Cog/platforms/unix/vm/sqUnixMain.c
    branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c
    branches/Cog/platforms/unix/vm-display-null/sqUnixDisplayNull.c
    branches/Cog/platforms/win32/vm/sqWin32Intel.c
    branches/Cog/platforms/win32/vm/sqWin32Window.c
    branches/Cog/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
    branches/Cog/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
    branches/Cog/src/plugins/B2DPlugin/B2DPlugin.c
    branches/Cog/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
    branches/Cog/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
    branches/Cog/src/plugins/BitBltPlugin/BitBltPlugin.c
    branches/Cog/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
    branches/Cog/src/plugins/CroquetPlugin/CroquetPlugin.c
    branches/Cog/src/plugins/DSAPrims/DSAPrims.c
    branches/Cog/src/plugins/DropPlugin/DropPlugin.c
    branches/Cog/src/plugins/FFTPlugin/FFTPlugin.c
    branches/Cog/src/plugins/FT2Plugin/FT2Plugin.c
    branches/Cog/src/plugins/FileCopyPlugin/FileCopyPlugin.c
    branches/Cog/src/plugins/FilePlugin/FilePlugin.c
    branches/Cog/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
    branches/Cog/src/plugins/FloatMathPlugin/FloatMathPlugin.c
    branches/Cog/src/plugins/GeniePlugin/GeniePlugin.c
    branches/Cog/src/plugins/IA32ABI/IA32ABI.c
    branches/Cog/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
    branches/Cog/src/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c
    branches/Cog/src/plugins/JoystickTabletPlugin/JoystickTabletPlugin.c
    branches/Cog/src/plugins/Klatt/Klatt.c
    branches/Cog/src/plugins/LargeIntegers/LargeIntegers.c
    branches/Cog/src/plugins/LocalePlugin/LocalePlugin.c
    branches/Cog/src/plugins/MIDIPlugin/MIDIPlugin.c
    branches/Cog/src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
    branches/Cog/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
    branches/Cog/src/plugins/QuicktimePlugin/QuicktimePlugin.c
    branches/Cog/src/plugins/RePlugin/RePlugin.c
    branches/Cog/src/plugins/SecurityPlugin/SecurityPlugin.c
    branches/Cog/src/plugins/SerialPlugin/SerialPlugin.c
    branches/Cog/src/plugins/SocketPlugin/SocketPlugin.c
    branches/Cog/src/plugins/SoundCodecPrims/SoundCodecPrims.c
    branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c
    branches/Cog/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
    branches/Cog/src/plugins/StarSqueakPlugin/StarSqueakPlugin.c
    branches/Cog/src/plugins/UUIDPlugin/UUIDPlugin.c
    branches/Cog/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    branches/Cog/src/plugins/VMProfileMacSupportPlugin/VMProfileMacSupportPlugin.c
    branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
    branches/Cog/src/plugins/ZipPlugin/ZipPlugin.c
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogmethod.h
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/src/vm/interp.h
    branches/Cog/src/vm/vmCallback.h

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

Modified: branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj	2012-09-22 16:56:31 UTC (rev 2619)
+++ branches/Cog/nscogbuild/macbuild/CoreVM.xcodeproj/project.pbxproj	2012-11-27 01:13:23 UTC (rev 2620)
@@ -1710,6 +1710,7 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUGVM=0",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					NO_ISNAN,
 					TARGET_API_MAC_CARBON,
 					SQUEAK_BUILTIN_PLUGIN,
@@ -1749,6 +1750,7 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUGVM=0",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					HAVE_SYS_TIME_H,
 					SQUEAK_BUILTIN_PLUGIN,
 					TARGET_API_MAC_CARBON,
@@ -1780,6 +1782,7 @@
 					"DEBUGVM=1",
 					"VM_LABEL(foo)=0",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					NO_ISNAN,
 					TARGET_API_MAC_CARBON,
 					SQUEAK_BUILTIN_PLUGIN,
@@ -1832,6 +1835,7 @@
 					"NDEBUG=1",
 					"DEBUGVM=0",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					TARGET_API_MAC_CARBON,
 					SQUEAK_BUILTIN_PLUGIN,
 					HAVE_SYS_TIME_H,
@@ -1882,6 +1886,7 @@
 					"NDEBUG=1",
 					"DEBUGVM=0",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					NO_ISNAN,
 					TARGET_API_MAC_CARBON,
 					SQUEAK_BUILTIN_PLUGIN,
@@ -1921,6 +1926,7 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"DEBUGVM=1",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					HAVE_SYS_TIME_H,
 					SQUEAK_BUILTIN_PLUGIN,
 					TARGET_API_MAC_CARBON,
@@ -1944,6 +1950,7 @@
 					"NDEBUG=1",
 					"DEBUGVM=0",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					HAVE_SYS_TIME_H,
 					SQUEAK_BUILTIN_PLUGIN,
 					TARGET_API_MAC_CARBON,
@@ -1971,6 +1978,7 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"NDEBUG=1",
 					"USE_GLOBAL_STRUCT=0",
+					"MULTIPLEBYTECODESETS=1",
 					HAVE_SYS_TIME_H,
 					SQUEAK_BUILTIN_PLUGIN,
 					TARGET_API_MAC_CARBON,

Modified: branches/Cog/nscogsrc/plugins/AsynchFilePlugin/AsynchFilePlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/AsynchFilePlugin/AsynchFilePlugin.c	2012-09-22 16:56:31 UTC (rev 2619)
+++ branches/Cog/nscogsrc/plugins/AsynchFilePlugin/AsynchFilePlugin.c	2012-11-27 01:13:23 UTC (rev 2620)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.222 uuid: 9255d122-7216-4700-8ead-493416ce0cf6
    from
-	AsynchFilePlugin VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+	AsynchFilePlugin VMMaker.oscog-eem.222 uuid: 9255d122-7216-4700-8ead-493416ce0cf6
  */
-static char __buildInfo[] = "AsynchFilePlugin VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "AsynchFilePlugin VMMaker.oscog-eem.222 uuid: 9255d122-7216-4700-8ead-493416ce0cf6 " __DATE__ ;
 
 
 
@@ -38,6 +38,7 @@
 
 
 /*** Constants ***/
+#define BytesPerWord 4
 
 
 /*** Function Prototypes ***/
@@ -67,9 +68,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"AsynchFilePlugin VMMaker.oscog-eem.105 (i)"
+	"AsynchFilePlugin VMMaker.oscog-eem.222 (i)"
 #else
-	"AsynchFilePlugin VMMaker.oscog-eem.105 (e)"
+	"AsynchFilePlugin VMMaker.oscog-eem.222 (e)"
 #endif
 ;
 static void * sCOAFfn;
@@ -83,7 +84,7 @@
 static AsyncFile *
 asyncFileValueOf(sqInt oop)
 {
-	interpreterProxy->success((!((oop & 1)))
+	interpreterProxy->success((!(interpreterProxy->isIntegerObject(oop)))
 	 && ((interpreterProxy->isBytes(oop))
 	 && ((interpreterProxy->slotSizeOf(oop)) == (sizeof(AsyncFile)))));
 	if (interpreterProxy->failed()) {
@@ -191,12 +192,12 @@
 	}
 
 	/* If the security plugin can be loaded, use it to check for permission.
-	If not, assume it's ok */
+	   If not, assume it's ok */
 
 	fileNameSize = interpreterProxy->slotSizeOf(((int) fileName) - 4);
 	if (sCOAFfn != 0) {
 		okToOpen =  ((sqInt (*) (char *, sqInt, sqInt)) sCOAFfn)(fileName, fileNameSize, writeFlag);
-		if (!(okToOpen)) {
+		if (!okToOpen) {
 			interpreterProxy->primitiveFail();
 			return null;
 		}

Modified: branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c	2012-09-22 16:56:31 UTC (rev 2619)
+++ branches/Cog/nscogsrc/plugins/B2DPlugin/B2DPlugin.c	2012-11-27 01:13:23 UTC (rev 2620)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+	VMPluginCodeGenerator VMMaker.oscog-eem.222 uuid: 9255d122-7216-4700-8ead-493416ce0cf6
    from
-	BalloonEnginePlugin VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463
+	BalloonEnginePlugin VMMaker.oscog-eem.222 uuid: 9255d122-7216-4700-8ead-493416ce0cf6
  */
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.105 uuid: 79234f80-ee6a-404c-9e5c-2134e3b76463 " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.222 uuid: 9255d122-7216-4700-8ead-493416ce0cf6 " __DATE__ ;
 
 
 
@@ -42,6 +42,7 @@
 #define BEFormsIndex 3
 #define BESpanIndex 1
 #define BEWorkBufferIndex 0
+#define BytesPerWord 4
 #define ETBalloonEdgeDataSize 6
 #define ETIndexIndex 0
 #define ETLinesIndex 4
@@ -752,9 +753,9 @@
 static void * loadBBFn;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"B2DPlugin VMMaker.oscog-eem.105 (i)"
+	"B2DPlugin VMMaker.oscog-eem.222 (i)"
 #else
-	"B2DPlugin VMMaker.oscog-eem.105 (e)"
+	"B2DPlugin VMMaker.oscog-eem.222 (e)"
 #endif
 ;
 static int* objBuffer;
@@ -1116,9 +1117,11 @@
 {
 	/* begin wbStackPush: */
 	if (!(needAvailableSpace(6))) {
+		0;
 		goto l1;
 	}
 	workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
+	1;
 l1:	/* end wbStackPush: */;
 	return (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
 }
@@ -1166,6 +1169,9 @@
     sqInt i;
     sqInt srcIndex;
 
+
+	/* First allocate nSlots in the AET */
+
 	if (!(needAvailableSpace(nSlots))) {
 		return 0;
 	}
@@ -1247,6 +1253,9 @@
     sqInt i;
     sqInt srcIndex;
 
+
+	/* First allocate nSlots in the GET */
+
 	if (!(allocateGETEntry(nSlots))) {
 		return 0;
 	}
@@ -1528,10 +1537,10 @@
 	rShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);
 	value = (((usqInt) value) >> rShift) & cMask;
 	if (bmDepth == 16) {
-		if (!(value == 0)) {
 
-			/* Must convert by expanding bits */
+		/* Must convert by expanding bits */
 
+		if (!(value == 0)) {
 			b = (value & 31) << 3;
 			b += ((usqInt) b) >> 5;
 			g = ((((usqInt) value) >> 5) & 31) << 3;
@@ -1543,10 +1552,10 @@
 		}
 	}
 	else {
-		if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 
-			/* Must convert by using color map */
+		/* Must convert by using color map */
 
+		if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 			value = 0;
 		}
 		else {
@@ -1681,6 +1690,9 @@
     sqInt i;
     sqInt length;
 
+
+	/* First check if the oops have the right format */
+
 	if (!(interpreterProxy->isWords(indexList))) {
 		return 0;
 	}
@@ -1733,9 +1745,9 @@
 	}
 
 	/* The points must be either in PointArray format or ShortPointArray format.
-	Also, we currently handle only quadratic segments (e.g., 3 points each) and thus either
-		pSize = nSegments * 3,		for ShortPointArrays or,
-		pSize = nSegments * 6,		for PointArrays */
+	   Also, we currently handle only quadratic segments (e.g., 3 points each) and thus either
+	   pSize = nSegments * 3,		for ShortPointArrays or,
+	   pSize = nSegments * 6,		for PointArrays */
 
 	pSize = interpreterProxy->slotSizeOf(points);
 	if (!((pSize == (nSegments * 3))
@@ -2048,9 +2060,11 @@
 	/* begin allocateBezierStackEntry */
 	/* begin wbStackPush: */
 	if (!(needAvailableSpace(6))) {
+		0;
 		goto l1;
 	}
 	workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
+	1;
 l1:	/* end wbStackPush: */;
 	newIndex = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
 	if (engineStopped) {
@@ -2183,9 +2197,11 @@
 	/* begin allocateBezierStackEntry */
 	/* begin wbStackPush: */
 	if (!(needAvailableSpace(6))) {
+		0;
 		goto l3;
 	}
 	workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
+	1;
 l3:	/* end wbStackPush: */;
 	newIndex = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
 	if (engineStopped) {
@@ -2246,6 +2262,9 @@
 copyBitsFromtoat(sqInt x0, sqInt x1, sqInt yValue)
 {
 	if (copyBitsFn == 0) {
+
+		/* We need copyBits here so try to load it implicitly */
+
 		if (!(initialiseModule())) {
 			return 0;
 		}
@@ -2267,7 +2286,13 @@
 	object = 0;
 	end = objUsed;
 	while (object < end) {
+
+		/* Note: addEdgeToGET: may fail on insufficient space but that's not a problem here */
+
 		if (isEdge(object)) {
+
+			/* Check if the edge starts below fillMaxY. */
+
 			if (!((objBuffer[object + GEYValue]) >= (workBuffer[GWFillMaxY]))) {
 				/* begin checkedAddEdgeToGET: */
 				if ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveLine) {
@@ -2279,13 +2304,16 @@
 						lineWidth1 = 0;
 					}
 					if (((objBuffer[object + GLEndY]) + lineWidth1) < (workBuffer[GWFillMinY])) {
+						0;
 						goto l1;
 					}
 					if ((((objBuffer[object + GEXValue]) - lineWidth1) >= (workBuffer[GWFillMaxX]))
 					 && (((objBuffer[object + GLEndX]) - lineWidth1) >= (workBuffer[GWFillMaxX]))) {
+						0;
 						goto l1;
 					}
 					addEdgeToGET(object);
+					null;
 					goto l1;
 				}
 				if ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveBezier) {
@@ -2297,13 +2325,16 @@
 						lineWidth = 0;
 					}
 					if (((objBuffer[object + GBEndY]) + lineWidth) < (workBuffer[GWFillMinY])) {
+						0;
 						goto l1;
 					}
 					if ((((objBuffer[object + GEXValue]) - lineWidth) >= (workBuffer[GWFillMaxX]))
 					 && (((objBuffer[object + GBEndX]) - lineWidth) >= (workBuffer[GWFillMaxX]))) {
+						0;
 						goto l1;
 					}
 					addEdgeToGET(object);
+					null;
 					goto l1;
 				}
 				addEdgeToGET(object);
@@ -2638,11 +2669,13 @@
 		}
 		/* begin quickRemoveInvalidFillsAt: */
 		if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+			null;
 			goto l1;
 		}
 		while ((topRightX()) <= stopX) {
 			hideFilldepth(topFill(), topDepth());
 			if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+				null;
 				goto l1;
 			}
 		}
@@ -2798,7 +2831,7 @@
 		}
 		xp = ((sqInt) ds >> 16);
 		yp = ((sqInt) dt >> 16);
-		if (!(tileFlag)) {
+		if (!tileFlag) {
 			/* begin clampValue:max: */
 			if (xp < 0) {
 				xp = 0;
@@ -2860,10 +2893,10 @@
 			rShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);
 			value = (((usqInt) value) >> rShift) & cMask1;
 			if (bmDepth == 16) {
-				if (!(value == 0)) {
 
-					/* Must convert by expanding bits */
+				/* Must convert by expanding bits */
 
+				if (!(value == 0)) {
 					b = (value & 31) << 3;
 					b += ((usqInt) b) >> 5;
 					g = ((((usqInt) value) >> 5) & 31) << 3;
@@ -2875,10 +2908,10 @@
 				}
 			}
 			else {
-				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 
-					/* Must convert by using color map */
+				/* Must convert by using color map */
 
+				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 					value = 0;
 				}
 				else {
@@ -2922,7 +2955,7 @@
 		}
 		xp = ((sqInt) ds >> 16);
 		yp = ((sqInt) dt >> 16);
-		if (!(tileFlag)) {
+		if (!tileFlag) {
 			/* begin clampValue:max: */
 			if (xp < 0) {
 				xp = 0;
@@ -2984,10 +3017,10 @@
 			rShift1 = (32 - bmDepth1) - ((xp & ((1 << rShift1) - 1)) * bmDepth1);
 			value1 = (((usqInt) value1) >> rShift1) & cMask2;
 			if (bmDepth1 == 16) {
-				if (!(value1 == 0)) {
 
-					/* Must convert by expanding bits */
+				/* Must convert by expanding bits */
 
+				if (!(value1 == 0)) {
 					b1 = (value1 & 31) << 3;
 					b1 += ((usqInt) b1) >> 5;
 					g1 = ((((usqInt) value1) >> 5) & 31) << 3;
@@ -2999,10 +3032,10 @@
 				}
 			}
 			else {
-				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 
-					/* Must convert by using color map */
+				/* Must convert by using color map */
 
+				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 					value1 = 0;
 				}
 				else {
@@ -3046,7 +3079,7 @@
 		}
 		xp = ((sqInt) ds >> 16);
 		yp = ((sqInt) dt >> 16);
-		if (!(tileFlag)) {
+		if (!tileFlag) {
 			/* begin clampValue:max: */
 			if (xp < 0) {
 				xp = 0;
@@ -3108,10 +3141,10 @@
 			rShift2 = (32 - bmDepth2) - ((xp & ((1 << rShift2) - 1)) * bmDepth2);
 			value2 = (((usqInt) value2) >> rShift2) & cMask3;
 			if (bmDepth2 == 16) {
-				if (!(value2 == 0)) {
 
-					/* Must convert by expanding bits */
+				/* Must convert by expanding bits */
 
+				if (!(value2 == 0)) {
 					b2 = (value2 & 31) << 3;
 					b2 += ((usqInt) b2) >> 5;
 					g2 = ((((usqInt) value2) >> 5) & 31) << 3;
@@ -3123,10 +3156,10 @@
 				}
 			}
 			else {
-				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 
-					/* Must convert by using color map */
+				/* Must convert by using color map */
 
+				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 					value2 = 0;
 				}
 				else {
@@ -3174,6 +3207,9 @@
 
 	bitX = -1;
 	if ((workBuffer[GWAALevel]) == 1) {
+
+		/* Speedy version for no anti-aliasing */
+
 		while (x0 < x1) {
 			fillValue = (((int *) bits))[(bitX += 1)];
 			spanBuffer[x0] = fillValue;
@@ -3275,7 +3311,7 @@
 		}
 		xp = ((sqInt) ds >> 16);
 		yp = ((sqInt) dt >> 16);
-		if (!(tileFlag)) {
+		if (!tileFlag) {
 			/* begin clampValue:max: */
 			if (xp < 0) {
 				xp = 0;
@@ -3337,10 +3373,10 @@
 			rShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);
 			value = (((usqInt) value) >> rShift) & cMask;
 			if (bmDepth == 16) {
-				if (!(value == 0)) {
 
-					/* Must convert by expanding bits */
+				/* Must convert by expanding bits */
 
+				if (!(value == 0)) {
 					b = (value & 31) << 3;
 					b += ((usqInt) b) >> 5;
 					g = ((((usqInt) value) >> 5) & 31) << 3;
@@ -3352,10 +3388,10 @@
 				}
 			}
 			else {
-				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 
-					/* Must convert by using color map */
+				/* Must convert by using color map */
 
+				if ((objBuffer[bmFill + GBColormapSize]) == 0) {
 					value = 0;
 				}
 				else {
@@ -3394,6 +3430,10 @@
     sqInt pv32;
     sqInt x;
 
+
+	/* Not now -- maybe later */
+	/* Compute the pixel boundaries. */
+
 	/* begin aaFirstPixelFrom:to: */
 	firstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));
 	if (firstPixel1 > rightX) {
@@ -3450,6 +3490,9 @@
     sqInt x0;
     sqInt x1;
 
+
+	/* Use a unrolled version for anti-aliased fills... */
+
 	if (!((workBuffer[GWAALevel]) == 1)) {
 		return fillColorSpanAAx0x1(pixelValue32, leftX, rightX);
 	}
@@ -3669,6 +3712,9 @@
 	l1:	/* end fillColorSpan:from:to: */;
 	}
 	if ((workBuffer[GWAALevel]) == 1) {
+
+		/* Fast version w/o anti-aliasing */
+
 		while (((((rampIndex = ((sqInt) ds >> 16))) < rampSize)
  && (rampIndex >= 0))
 		 && (x < x1)) {
@@ -3887,6 +3933,9 @@
 		rampValue = (((int *) ramp))[rampIndex];
 		rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
 		while (x < firstPixel) {
+
+			/* Try to copy the current value more than just once */
+
 			while ((x < firstPixel)
 			 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {
 				index = ((usqInt) x) >> baseShift;
@@ -3910,6 +3959,9 @@
 		rampValue = (((int *) ramp))[rampIndex];
 		rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
 		while (x < lastPixel) {
+
+			/* Try to copy the current value more than just once */
+
 			while ((x < lastPixel)
 			 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {
 				index = ((usqInt) x) >> baseShift;
@@ -3933,6 +3985,9 @@
 		rampValue = (((int *) ramp))[rampIndex];
 		rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
 		while (x < x1) {
+
+			/* Try to copy the current value more than just once */
+
 			while ((x < x1)
 			 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {
 				index = ((usqInt) x) >> baseShift;
@@ -3981,6 +4036,9 @@
 		x1 = objBuffer[fill + GFOriginX];
 	}
 	while (x < x1) {
+
+		/* Try to copy the current value more than just once */
+
 		while ((x < x1)
 		 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {
 			spanBuffer[x] = rampValue;
@@ -4101,6 +4159,9 @@
 	deltaST[0] = ds;
 	deltaST[1] = dt;
 	if (x < (objBuffer[fill + GFOriginX])) {
+
+		/* Draw the decreasing part */
+
 		if ((workBuffer[GWAALevel]) == 1) {
 			/* begin fillRadialDecreasing:ramp:deltaST:dsX:dtX:from:to: */
 			ds1 = (((int*) deltaST))[0];
@@ -4114,6 +4175,9 @@
 				x12 = objBuffer[fill + GFOriginX];
 			}
 			while (x2 < x12) {
+
+				/* Try to copy the current value more than just once */
+
 				while ((x2 < x12)
 				 && ((((((sqInt) ds1 >> 16)) * (((sqInt) ds1 >> 16))) + ((((sqInt) dt1 >> 16)) * (((sqInt) dt1 >> 16)))) >= length21)) {
 					spanBuffer[x2] = rampValue;
@@ -4137,6 +4201,9 @@
 		}
 	}
 	if (x < x1) {
+
+		/* Draw the increasing part */
+
 		if ((workBuffer[GWAALevel]) == 1) {
 			/* begin fillRadialIncreasing:ramp:deltaST:dsX:dtX:from:to: */
 			ds2 = (((int*) deltaST))[0];
@@ -4154,6 +4221,9 @@
 			x14 = x1;
 			while ((x3 < x14)
 			 && (lastLength < length22)) {
+
+				/* Try to copy the current value more than once */
+
 				while ((x3 < x14)
 				 && ((((((sqInt) ds2 >> 16)) * (((sqInt) ds2 >> 16))) + ((((sqInt) dt2 >> 16)) * (((sqInt) dt2 >> 16)))) <= nextLength1)) {
 					spanBuffer[x3] = rampValue1;
@@ -4262,6 +4332,9 @@
 		rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
 		while ((x < firstPixel)
 		 && (lastLength < length2)) {
+
+			/* Try to copy the current value more than once */
+
 			while ((x < firstPixel)
 			 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {
 				index = ((usqInt) x) >> baseShift;
@@ -4287,6 +4360,9 @@
 		rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
 		while ((x < lastPixel)
 		 && (lastLength < length2)) {
+
+			/* Try to copy the current value more than once */
+
 			while ((x < lastPixel)
 			 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {
 				index = ((usqInt) x) >> baseShift;
@@ -4312,6 +4388,9 @@
 		rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
 		while ((x < rightX)
 		 && (lastLength < length2)) {
+
+			/* Try to copy the current value more than once */
+
 			while ((x < rightX)
 			 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {
 				index = ((usqInt) x) >> baseShift;
@@ -4366,6 +4445,9 @@
 	x1 = rightX;
 	while ((x < x1)
 	 && (lastLength < length2)) {
+
+		/* Try to copy the current value more than once */
+
 		while ((x < x1)
 		 && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {
 			spanBuffer[x] = rampValue;
@@ -4475,6 +4557,9 @@
 	l1:	/* end fillColorSpan:from:to: */;
 	}
 	else {
+
+		/* Store the values for the dispatch */
+
 		workBuffer[GWLastExportedFill] = fill;
 		workBuffer[GWLastExportedLeftX] = x0;
 		workBuffer[GWLastExportedRightX] = x1;
@@ -4613,10 +4698,10 @@
 	leftX = (rightX = workBuffer[GWFillMaxX]);
 	while ((workBuffer[GWAETStart]) < (workBuffer[GWAETUsed])) {
 
-		/* TODO: We should check if leftX from last operation 
-			is  greater than leftX from next edge.
-			Currently, we rely here on spanEndAA
-			from the span buffer fill. */
+		/* TODO: We should check if leftX from last operation
+		   is  greater than leftX from next edge.
+		   Currently, we rely here on spanEndAA
+		   from the span buffer fill. */
 
 		leftEdge = (rightEdge = aetBuffer[workBuffer[GWAETStart]]);
 		leftX = (rightX = objBuffer[leftEdge + GEXValue]);
@@ -4625,11 +4710,13 @@
 		}
 		/* begin quickRemoveInvalidFillsAt: */
 		if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+			null;
 			goto l3;
 		}
 		while ((topRightX()) <= leftX) {
 			hideFilldepth(topFill(), topDepth());
 			if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+				null;
 				goto l3;
 			}
 		}
@@ -4648,6 +4735,9 @@
 			rightEdge = aetBuffer[workBuffer[GWAETStart]];
 			rightX = objBuffer[rightEdge + GEXValue];
 			if (rightX >= (workBuffer[GWFillMinX])) {
+
+				/* This is the visible portion */
+
 				/* begin fillAllFrom:to: */
 				/* begin topFill */
 				if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
@@ -4685,16 +4775,19 @@
 					fill = someIntegerValue;
 					if (!(fill == 0)) {
 						if (fillSpanfromto(fill, startX, stopX)) {
+							1;
 							goto l2;
 						}
 					}
 					/* begin quickRemoveInvalidFillsAt: */
 					if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+						null;
 						goto l1;
 					}
 					while ((topRightX()) <= stopX) {
 						hideFilldepth(topFill(), topDepth());
 						if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+							null;
 							goto l1;
 						}
 					}
@@ -4727,6 +4820,7 @@
 					fillSpanfromto(fill, startX, rightX);
 					goto l2;
 				}
+				0;
 			l2:	/* end fillAllFrom:to: */;
 			}
 		}
@@ -4769,16 +4863,19 @@
 			fill1 = someIntegerValue2;
 			if (!(fill1 == 0)) {
 				if (fillSpanfromto(fill1, startX1, stopX1)) {
+					1;
 					goto l5;
 				}
 			}
 			/* begin quickRemoveInvalidFillsAt: */
 			if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+				null;
 				goto l4;
 			}
 			while ((topRightX()) <= stopX1) {
 				hideFilldepth(topFill(), topDepth());
 				if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
+					null;
 					goto l4;
 				}
 			}
@@ -4811,6 +4908,7 @@
 			fillSpanfromto(fill1, startX1, workBuffer[GWFillMaxX]);
 			goto l5;
 		}
+		0;
 	l5:	/* end fillAllFrom:to: */;
 	}
 	return 0;
@@ -4834,9 +4932,15 @@
 		edge = aetBuffer[workBuffer[GWAETStart]];
 		count = (objBuffer[edge + GENumLines]) - 1;
 		if (count == 0) {
+
+			/* Edge at end -- remove it */
+
 			removeFirstAETEntry();
 		}
 		else {
+
+			/* Store remaining lines back */
+
 			objBuffer[edge + GENumLines] = count;
 			type = (objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask;
 			if ((type & GEPrimitiveWideMask) == GEPrimitiveEdge) {
@@ -5206,6 +5310,9 @@
 		return null;
 	}
 	if ((workBuffer[GWGETUsed]) == 0) {
+
+		/* Nothing to do */
+
 		workBuffer[GWCurrentY] = (workBuffer[GWFillMaxY]);
 		return 0;
 	}
@@ -5233,6 +5340,9 @@
 {
     sqInt index;
 
+
+	/* Check for the number of lines remaining */
+
 	if ((objBuffer[edge + GENumLines]) <= 0) {
 		return null;
 	}
@@ -5251,6 +5361,9 @@
 {
     sqInt i;
 
+
+	/* Make sure we have space in the AET */
+
 	if (!(needAvailableSpace(1))) {
 		return null;
 	}
@@ -5518,9 +5631,11 @@
 	/* begin allocateBezierStackEntry */
 	/* begin wbStackPush: */
 	if (!(needAvailableSpace(6))) {
+		0;
 		goto l1;
 	}
 	workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
+	1;
 l1:	/* end wbStackPush: */;
 	bz1 = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
 	if (engineStopped) {
@@ -5593,6 +5708,9 @@
 			/* begin point1Get */
 			point = ((int *) (workBuffer + GWPoint1));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5603,6 +5721,9 @@
 				(((int *) point))[1] = y;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5612,6 +5733,9 @@
 			/* begin point2Get */
 			point1 = ((int *) (workBuffer + GWPoint2));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5622,6 +5746,9 @@
 				(((int *) point1))[1] = y2;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5631,6 +5758,9 @@
 			/* begin point3Get */
 			point2 = ((int *) (workBuffer + GWPoint3));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5641,6 +5771,9 @@
 				(((int *) point2))[1] = y3;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5650,6 +5783,9 @@
 			/* begin point4Get */
 			point3 = ((int *) (workBuffer + GWPoint4));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5660,6 +5796,9 @@
 				(((int *) point3))[1] = y4;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5718,6 +5857,9 @@
 			/* begin point1Get */
 			point = ((int *) (workBuffer + GWPoint1));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5728,6 +5870,9 @@
 				(((int *) point))[1] = y;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5737,6 +5882,9 @@
 			/* begin point2Get */
 			point1 = ((int *) (workBuffer + GWPoint2));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5747,6 +5895,9 @@
 				(((int *) point1))[1] = y3;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5756,6 +5907,9 @@
 			/* begin point3Get */
 			point2 = ((int *) (workBuffer + GWPoint3));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5766,6 +5920,9 @@
 				(((int *) point2))[1] = y4;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5775,6 +5932,9 @@
 			/* begin point4Get */
 			point3 = ((int *) (workBuffer + GWPoint4));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -5785,6 +5945,9 @@
 				(((int *) point3))[1] = y5;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -5805,6 +5968,9 @@
 			loadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point3Get(), lineFill, fillIndex, 0);
 		}
 		else {
+
+			/* Need bezier */
+
 			segs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth != 0)
 			 && (lineFill != 0));
 			if (engineStopped) {
@@ -5829,12 +5995,12 @@
 
 	for (i = 0; i <= (n - 1); i += 1) {
 		value = interpreterProxy->fetchPointerofObject(i, transformOop);
-		if (!(((value & 1))
+		if (!((interpreterProxy->isIntegerObject(value))
 			 || (interpreterProxy->isFloatObject(value)))) {
 			return interpreterProxy->primitiveFail();
 		}
-		if ((value & 1)) {
-			destPtr[i] = (((float) (((double) ((value >> 1)) ))));
+		if (interpreterProxy->isIntegerObject(value)) {
+			destPtr[i] = (((float) (((double) (interpreterProxy->integerValueOf(value)) ))));
 		}
 		else {
 			destPtr[i] = (((float) (interpreterProxy->floatValueOf(value))));
@@ -5849,6 +6015,9 @@
 loadBeziersegmentleftFillrightFilloffset(sqInt bezier, sqInt index, sqInt leftFillIndex, sqInt rightFillIndex, sqInt yOffset)
 {
 	if ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)]) >= (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)])) {
+
+		/* Top to bottom */
+
 		objBuffer[bezier + GEXValue] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)]);
 		objBuffer[bezier + GEYValue] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)]) - yOffset);
 		objBuffer[bezier + GBViaX] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)]);
@@ -5873,6 +6042,9 @@
 loadBitBltFrom(sqInt bbObj)
 {
 	if (loadBBFn == 0) {
+
+		/* We need copyBits here so try to load it implicitly */
+
 		if (!(initialiseModule())) {
 			return 0;
 		}
@@ -5912,7 +6084,7 @@
 		cmSize = interpreterProxy->slotSizeOf(cmOop);
 		cmBits = interpreterProxy->firstIndexableField(cmOop);
 	}
-	if ((formOop & 1)) {
+	if (interpreterProxy->isIntegerObject(formOop)) {
 		return interpreterProxy->primitiveFail();
 	}
 	if (!(interpreterProxy->isPointers(formOop))) {
@@ -6026,7 +6198,7 @@
 	transform = ((float *) (workBuffer + GWColorTransform));
 	workBuffer[GWHasColorTransform] = 0;
 	okay = loadTransformFromintolength(transformOop, transform, 8);
-	if (!(okay)) {
+	if (!okay) {
 		return 0;
 	}
 	workBuffer[GWHasColorTransform] = 1;
@@ -6084,6 +6256,9 @@
     sqInt y8;
     sqInt y9;
 
+
+	/* Check if have anything to do at all */
+
 	if ((leftFill == rightFill)
 	 && ((lineWidth == 0)
 	 || (lineFill == 0))) {
@@ -6094,6 +6269,9 @@
 
 	index = segmentIndex * 6;
 	if (pointsShort) {
+
+		/* Load short points */
+
 		/* begin loadPointShortAt:from: */
 		x0 = ((short) ((((short *) points))[index + 0]));
 		/* begin loadPointShortAt:from: */
@@ -6119,6 +6297,9 @@
  && (y0 == y1))
 	 || ((x1 == x2)
 	 && (y1 == y2))) {
+
+		/* We can use a line from x0/y0 to x2/y2 */
+
 		if ((x0 == x2)
 		 && (y0 == y2)) {
 			return null;
@@ -6133,6 +6314,9 @@
 			/* begin point1Get */
 			point = ((int *) (workBuffer + GWPoint1));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6143,6 +6327,9 @@
 				(((int *) point))[1] = y;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6152,6 +6339,9 @@
 			/* begin point2Get */
 			point1 = ((int *) (workBuffer + GWPoint2));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6162,6 +6352,9 @@
 				(((int *) point1))[1] = y3;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6171,6 +6364,9 @@
 			/* begin point3Get */
 			point2 = ((int *) (workBuffer + GWPoint3));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6181,6 +6377,9 @@
 				(((int *) point2))[1] = y4;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6190,6 +6389,9 @@
 			/* begin point4Get */
 			point3 = ((int *) (workBuffer + GWPoint4));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6200,6 +6402,9 @@
 				(((int *) point3))[1] = y5;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6218,6 +6423,9 @@
 		/* begin point1Get */
 		point4 = ((int *) (workBuffer + GWPoint1));
 		if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+			/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 			/* begin transformPoint:into: */
 			/* begin transformPointX:y:into: */
 			/* begin edgeTransform */
@@ -6228,6 +6436,9 @@
 			(((int *) point4))[1] = y6;
 		}
 		else {
+
+			/* Multiply each component by aaLevel and add a half pixel */
+
 			point4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 			point4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 		}
@@ -6237,6 +6448,9 @@
 		/* begin point2Get */
 		point5 = ((int *) (workBuffer + GWPoint2));
 		if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+			/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 			/* begin transformPoint:into: */
 			/* begin transformPointX:y:into: */
 			/* begin edgeTransform */
@@ -6247,6 +6461,9 @@
 			(((int *) point5))[1] = y7;
 		}
 		else {
+
+			/* Multiply each component by aaLevel and add a half pixel */
+
 			point5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 			point5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 		}
@@ -6256,6 +6473,9 @@
 		/* begin point3Get */
 		point6 = ((int *) (workBuffer + GWPoint3));
 		if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+			/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 			/* begin transformPoint:into: */
 			/* begin transformPointX:y:into: */
 			/* begin edgeTransform */
@@ -6266,6 +6486,9 @@
 			(((int *) point6))[1] = y8;
 		}
 		else {
+
+			/* Multiply each component by aaLevel and add a half pixel */
+
 			point6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 			point6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 		}
@@ -6275,6 +6498,9 @@
 		/* begin point4Get */
 		point7 = ((int *) (workBuffer + GWPoint4));
 		if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+			/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 			/* begin transformPoint:into: */
 			/* begin transformPointX:y:into: */
 			/* begin edgeTransform */
@@ -6285,6 +6511,9 @@
 			(((int *) point7))[1] = y9;
 		}
 		else {
+
+			/* Multiply each component by aaLevel and add a half pixel */
+
 			point7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 			point7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 		}
@@ -6366,10 +6595,10 @@
 	leftLength = (rightLength = (widthLength = (lineFillLength = 1)));
 	leftValue = (rightValue = (widthValue = (lineFillValue = 0)));
 	for (i = 1; i <= nSegments; i += 1) {
-		if (((leftLength -= 1)) <= 0) {
 
-			/* Decrement current run length and load new stuff */
+		/* Decrement current run length and load new stuff */
 
+		if (((leftLength -= 1)) <= 0) {
 			leftRun += 1;
 			leftLength = ((usqInt) ((((int *) leftFills))[leftRun]) >> 16);
 			leftValue = ((((int *) leftFills))[leftRun]) & 65535;
@@ -6410,6 +6639,7 @@
 		if ((leftValue == rightValue)
 		 && ((widthValue == 0)
 		 || (lineFillValue == 0))) {
+			null;
 			goto l1;
 		}
 
@@ -6417,6 +6647,9 @@
 
 		index = (i - 1) * 6;
 		if (pointsShort) {
+
+			/* Load short points */
+
 			/* begin loadPointShortAt:from: */
 			x0 = ((short) ((((short *) points))[index + 0]));
 			/* begin loadPointShortAt:from: */
@@ -6442,8 +6675,12 @@
  && (y0 == y1))
 		 || ((x1 == x2)
 		 && (y1 == y2))) {
+
+			/* We can use a line from x0/y0 to x2/y2 */
+
 			if ((x0 == x2)
 			 && (y0 == y2)) {
+				null;
 				goto l1;
 			}
 			(point1Get())[0] = x0;
@@ -6456,6 +6693,9 @@
 				/* begin point1Get */
 				point = ((int *) (workBuffer + GWPoint1));
 				if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+					/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 					/* begin transformPoint:into: */
 					/* begin transformPointX:y:into: */
 					/* begin edgeTransform */
@@ -6466,6 +6706,9 @@
 					(((int *) point))[1] = y;
 				}
 				else {
+
+					/* Multiply each component by aaLevel and add a half pixel */
+
 					point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 					point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 				}
@@ -6475,6 +6718,9 @@
 				/* begin point2Get */
 				point1 = ((int *) (workBuffer + GWPoint2));
 				if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+					/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 					/* begin transformPoint:into: */
 					/* begin transformPointX:y:into: */
 					/* begin edgeTransform */
@@ -6485,6 +6731,9 @@
 					(((int *) point1))[1] = y3;
 				}
 				else {
+
+					/* Multiply each component by aaLevel and add a half pixel */
+
 					point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 					point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 				}
@@ -6494,6 +6743,9 @@
 				/* begin point3Get */
 				point2 = ((int *) (workBuffer + GWPoint3));
 				if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+					/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 					/* begin transformPoint:into: */
 					/* begin transformPointX:y:into: */
 					/* begin edgeTransform */
@@ -6504,6 +6756,9 @@
 					(((int *) point2))[1] = y4;
 				}
 				else {
+
+					/* Multiply each component by aaLevel and add a half pixel */
+
 					point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 					point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 				}
@@ -6513,6 +6768,9 @@
 				/* begin point4Get */
 				point3 = ((int *) (workBuffer + GWPoint4));
 				if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+					/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 					/* begin transformPoint:into: */
 					/* begin transformPointX:y:into: */
 					/* begin edgeTransform */
@@ -6523,6 +6781,9 @@
 					(((int *) point3))[1] = y5;
 				}
 				else {
+
+					/* Multiply each component by aaLevel and add a half pixel */
+
 					point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 					point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 				}
@@ -6542,6 +6803,9 @@
 			/* begin point1Get */
 			point4 = ((int *) (workBuffer + GWPoint1));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6552,6 +6816,9 @@
 				(((int *) point4))[1] = y6;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6561,6 +6828,9 @@
 			/* begin point2Get */
 			point5 = ((int *) (workBuffer + GWPoint2));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6571,6 +6841,9 @@
 				(((int *) point5))[1] = y7;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6580,6 +6853,9 @@
 			/* begin point3Get */
 			point6 = ((int *) (workBuffer + GWPoint3));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6590,6 +6866,9 @@
 				(((int *) point6))[1] = y8;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6599,6 +6878,9 @@
 			/* begin point4Get */
 			point7 = ((int *) (workBuffer + GWPoint4));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -6609,6 +6891,9 @@
 				(((int *) point7))[1] = y9;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -6616,6 +6901,7 @@
 		segs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (widthValue != 0)
 		 && (lineFillValue != 0));
 		if (engineStopped) {
+			null;
 			goto l1;
 		}
 		loadWideBezierlineFillleftFillrightFilln(widthValue, lineFillValue, leftValue, rightValue, segs);
@@ -6671,7 +6957,7 @@
 	if (interpreterProxy->failed()) {
 		return null;
 	}
-	if (!(okay)) {
+	if (!okay) {
 		return 0;
 	}
 	workBuffer[GWHasEdgeTransform] = 1;
@@ -6712,6 +6998,9 @@
 	point3[1] = ((point3[1]) + (point1[1]));
 	/* begin transformPoint: */
 	if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+		/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 		/* begin transformPoint:into: */
 		/* begin transformPointX:y:into: */
 		/* begin edgeTransform */
@@ -6722,11 +7011,17 @@
 		(((int *) point1))[1] = y;
 	}
 	else {
+
+		/* Multiply each component by aaLevel and add a half pixel */
+
 		point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 		point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 	}
 	/* begin transformPoint: */
 	if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+		/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 		/* begin transformPoint:into: */
 		/* begin transformPointX:y:into: */
 		/* begin edgeTransform */
@@ -6737,11 +7032,17 @@
 		(((int *) point2))[1] = y1;
 	}
 	else {
+
+		/* Multiply each component by aaLevel and add a half pixel */
+
 		point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 		point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 	}
 	/* begin transformPoint: */
 	if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+		/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 		/* begin transformPoint:into: */
 		/* begin transformPointX:y:into: */
 		/* begin edgeTransform */
@@ -6752,6 +7053,9 @@
 		(((int *) point3))[1] = y2;
 	}
 	else {
+
+		/* Multiply each component by aaLevel and add a half pixel */
+
 		point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 		point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 	}
@@ -6810,7 +7114,7 @@
 	formArray = arrayOop;
 	for (i = 0; i <= ((interpreterProxy->slotSizeOf(formArray)) - 1); i += 1) {
 		formOop = interpreterProxy->fetchPointerofObject(i, formArray);
-		if ((formOop & 1)) {
+		if (interpreterProxy->isIntegerObject(formOop)) {
 			return 0;
 		}
 		if (!(interpreterProxy->isPointers(formOop))) {
@@ -6954,7 +7258,7 @@
 	x1 = ((sqInt)((((circleCosTable())[(seg * 2) + 1]) * (((double) w ))) + cx));
 
 	/* NOTE: The intermediate point is the point ON the curve
-	and not yet the control point (which is OFF the curve) */
+	   and not yet the control point (which is OFF the curve) */
 
 	y1 = ((sqInt)((((circleSinTable())[(seg * 2) + 1]) * (((double) h ))) + cy));
 	x1 = (x1 * 2) - (((sqInt) (x0 + x2) >> 1));
@@ -7004,6 +7308,9 @@
 			/* begin point1Get */
 			point = ((int *) (workBuffer + GWPoint1));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -7014,6 +7321,9 @@
 				(((int *) point))[1] = y;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -7023,6 +7333,9 @@
 			/* begin point2Get */
 			point1 = ((int *) (workBuffer + GWPoint2));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -7033,6 +7346,9 @@
 				(((int *) point1))[1] = y1;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -7042,6 +7358,9 @@
 			/* begin point3Get */
 			point2 = ((int *) (workBuffer + GWPoint3));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -7052,6 +7371,9 @@
 				(((int *) point2))[1] = y2;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -7061,6 +7383,9 @@
 			/* begin point4Get */
 			point3 = ((int *) (workBuffer + GWPoint4));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -7071,6 +7396,9 @@
 				(((int *) point3))[1] = y3;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -7117,23 +7445,23 @@
 		return interpreterProxy->primitiveFail();
 	}
 	value = interpreterProxy->fetchPointerofObject(0, pointOop);
-	if (!(((value & 1))
+	if (!((interpreterProxy->isIntegerObject(value))
 		 || (interpreterProxy->isFloatObject(value)))) {
 		return interpreterProxy->primitiveFail();
 	}
-	if ((value & 1)) {
-		pointArray[0] = ((value >> 1));
+	if (interpreterProxy->isIntegerObject(value)) {
+		pointArray[0] = (interpreterProxy->integerValueOf(value));
 	}
 	else {
 		pointArray[0] = (((sqInt)(interpreterProxy->floatValueOf(value))));
 	}
 	value = interpreterProxy->fetchPointerofObject(1, pointOop);
-	if (!(((value & 1))
+	if (!((interpreterProxy->isIntegerObject(value))
 		 || (interpreterProxy->isFloatObject(value)))) {
 		return interpreterProxy->primitiveFail();
 	}
-	if ((value & 1)) {
-		pointArray[1] = ((value >> 1));
+	if (interpreterProxy->isIntegerObject(value)) {
+		pointArray[1] = (interpreterProxy->integerValueOf(value));
 	}
 	else {
 		pointArray[1] = (((sqInt)(interpreterProxy->floatValueOf(value))));
@@ -7196,6 +7524,9 @@
 			/* begin point1Get */
 			point = ((int *) (workBuffer + GWPoint1));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -7206,6 +7537,9 @@
 				(((int *) point))[1] = y;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
 				point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
 			}
@@ -7215,6 +7549,9 @@
 			/* begin point2Get */
 			point1 = ((int *) (workBuffer + GWPoint2));
 			if ((workBuffer[GWHasEdgeTransform]) != 0) {
+
+				/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
+
 				/* begin transformPoint:into: */
 				/* begin transformPointX:y:into: */
 				/* begin edgeTransform */
@@ -7225,6 +7562,9 @@
 				(((int *) point1))[1] = y2;
 			}
 			else {
+
+				/* Multiply each component by aaLevel and add a half pixel */
+
 				point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list