Revision: 3151
Author: lewis
Date: 2014-11-25 17:09:16 -0800 (Tue, 25 Nov 2014)
Log Message:
-----------
VMMaker 4.13.8
Complete the adoption of oscog improvements that eliminate use of #asSymbol hacks, and to produce correct code generation for #sizeOf: and #flag: methods. Also includes generation of constants in hex format, which improves readability of generated code.
Modified Paths:
--------------
trunk/src/ckformat.c
trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
trunk/src/plugins/AioPlugin/AioPlugin.c
trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
trunk/src/plugins/B2DPlugin/B2DPlugin.c
trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
trunk/src/plugins/BitBltPlugin/BitBltPlugin.c
trunk/src/plugins/CameraPlugin/CameraPlugin.c
trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
trunk/src/plugins/CroquetPlugin/CroquetPlugin.c
trunk/src/plugins/DBusPlugin/DBusPlugin.c
trunk/src/plugins/DSAPrims/DSAPrims.c
trunk/src/plugins/DropPlugin/DropPlugin.c
trunk/src/plugins/FFTPlugin/FFTPlugin.c
trunk/src/plugins/FT2Plugin/FT2Plugin.c
trunk/src/plugins/FileCopyPlugin/FileCopyPlugin.c
trunk/src/plugins/FilePlugin/FilePlugin.c
trunk/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
trunk/src/plugins/FloatMathPlugin/FloatMathPlugin.c
trunk/src/plugins/GeniePlugin/GeniePlugin.c
trunk/src/plugins/HostWindowPlugin/HostWindowPlugin.c
trunk/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
trunk/src/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c
trunk/src/plugins/JoystickTabletPlugin/JoystickTabletPlugin.c
trunk/src/plugins/KedamaPlugin2/KedamaPlugin2.c
trunk/src/plugins/Klatt/Klatt.c
trunk/src/plugins/LargeIntegers/LargeIntegers.c
trunk/src/plugins/LocalePlugin/LocalePlugin.c
trunk/src/plugins/MIDIPlugin/MIDIPlugin.c
trunk/src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
trunk/src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
trunk/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
trunk/src/plugins/RePlugin/RePlugin.c
trunk/src/plugins/RomePlugin/RomePlugin.c
trunk/src/plugins/ScratchPlugin/ScratchPlugin.c
trunk/src/plugins/SecurityPlugin/SecurityPlugin.c
trunk/src/plugins/SerialPlugin/SerialPlugin.c
trunk/src/plugins/SocketPlugin/SocketPlugin.c
trunk/src/plugins/SoundCodecPrims/SoundCodecPrims.c
trunk/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c
trunk/src/plugins/SoundPlugin/SoundPlugin.c
trunk/src/plugins/Squeak3D/Squeak3D.c
trunk/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
trunk/src/plugins/SqueakSSL/SqueakSSL.c
trunk/src/plugins/StarSqueakPlugin/StarSqueakPlugin.c
trunk/src/plugins/UUIDPlugin/UUIDPlugin.c
trunk/src/plugins/UnicodePlugin/UnicodePlugin.c
trunk/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
trunk/src/plugins/WeDoPlugin/WeDoPlugin.c
trunk/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c
trunk/src/vm/interp.c
trunk/src/vm/interp.h
trunk/src/vm/sqNamedPrims.h
Modified: trunk/src/ckformat.c
===================================================================
--- trunk/src/ckformat.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/ckformat.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -5,7 +5,7 @@
/* Usage: ckformat imageFileName */
/* --- DO NOT EDIT THIS FILE --- */
-/* --- Automatically generated from class ImageFormat 2014-10-24T08:36:03.45+01:00--- */
+/* --- Automatically generated from class ImageFormat 2014-11-25T20:00:13.974+01:00--- */
/* --- Source code is in package ImageFormat in the VMMaker repository --- */
/* --- DO NOT EDIT THIS FILE --- */
Modified: trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
===================================================================
--- trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:35:59 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:03 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ VMPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
- ADPCMCodecPlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ ADPCMCodecPlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
*/
-static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c " __DATE__ ;
+static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27 " __DATE__ ;
@@ -70,9 +70,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "ADPCMCodecPlugin 24 October 2014 (i)"
+ "ADPCMCodecPlugin 25 November 2014 (i)"
#else
- "ADPCMCodecPlugin 24 October 2014 (e)"
+ "ADPCMCodecPlugin 25 November 2014 (e)"
#endif
;
@@ -178,13 +178,13 @@
} else {
result += ((usqInt) currentByte) >> (0 - shift);
bitPosition -= remaining;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
predicted = result;
goto l1;
}
}
l1: /* end nextBits: */;
- if (predicted > 32767) {
+ if (predicted > 0x7FFF) {
predicted -= 65536;
}
/* begin nextBits: */
@@ -200,7 +200,7 @@
} else {
result1 += ((usqInt) currentByte) >> (0 - shift1);
bitPosition -= remaining1;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
index = result1;
goto l2;
}
@@ -221,7 +221,7 @@
} else {
result2 += ((usqInt) currentByte) >> (0 - shift2);
bitPosition -= remaining2;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
delta = result2;
goto l3;
}
@@ -243,8 +243,8 @@
} else {
predicted += predictedDelta;
}
- if (predicted > 32767) {
- predicted = 32767;
+ if (predicted > 0x7FFF) {
+ predicted = 0x7FFF;
} else {
if (predicted < -32768) {
predicted = -32768;
@@ -376,7 +376,7 @@
} else {
result += ((usqInt) currentByte) >> (0 - shift);
bitPosition -= remaining;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
predictedLeft = result;
goto l1;
}
@@ -395,7 +395,7 @@
} else {
result1 += ((usqInt) currentByte) >> (0 - shift1);
bitPosition -= remaining1;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
indexLeft = result1;
goto l2;
}
@@ -414,7 +414,7 @@
} else {
result2 += ((usqInt) currentByte) >> (0 - shift2);
bitPosition -= remaining2;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
predictedRight = result2;
goto l3;
}
@@ -433,16 +433,16 @@
} else {
result3 += ((usqInt) currentByte) >> (0 - shift3);
bitPosition -= remaining3;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
indexRight = result3;
goto l4;
}
}
l4: /* end nextBits: */;
- if (predictedLeft > 32767) {
+ if (predictedLeft > 0x7FFF) {
predictedLeft -= 65536;
}
- if (predictedRight > 32767) {
+ if (predictedRight > 0x7FFF) {
predictedRight -= 65536;
}
samples[(sampleIndex += 1)] = predictedLeft;
@@ -461,7 +461,7 @@
} else {
result4 += ((usqInt) currentByte) >> (0 - shift4);
bitPosition -= remaining4;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
deltaLeft = result4;
goto l5;
}
@@ -480,7 +480,7 @@
} else {
result5 += ((usqInt) currentByte) >> (0 - shift5);
bitPosition -= remaining5;
- currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
+ currentByte = currentByte & (((usqInt) 0xFF) >> (8 - bitPosition));
deltaRight = result5;
goto l6;
}
@@ -513,15 +513,15 @@
} else {
predictedRight += predictedDeltaRight;
}
- if (predictedLeft > 32767) {
- predictedLeft = 32767;
+ if (predictedLeft > 0x7FFF) {
+ predictedLeft = 0x7FFF;
} else {
if (predictedLeft < -32768) {
predictedLeft = -32768;
}
}
- if (predictedRight > 32767) {
- predictedRight = 32767;
+ if (predictedRight > 0x7FFF) {
+ predictedRight = 0x7FFF;
} else {
if (predictedRight < -32768) {
predictedRight = -32768;
@@ -658,9 +658,9 @@
if (diff1 < 0) {
diff1 = 0 - diff1;
}
- bestIndex = 63;
- for (j = 1; j <= 62; j += 1) {
- if (bestIndex == 63) {
+ bestIndex = 0x3F;
+ for (j = 1; j <= 0x3E; j += 1) {
+ if (bestIndex == 0x3F) {
if ((stepSizeTable[j]) >= diff1) {
bestIndex = j;
}
@@ -719,8 +719,8 @@
} else {
predicted += predictedDelta;
}
- if (predicted > 32767) {
- predicted = 32767;
+ if (predicted > 0x7FFF) {
+ predicted = 0x7FFF;
} else {
if (predicted < -32768) {
predicted = -32768;
Modified: trunk/src/plugins/AioPlugin/AioPlugin.c
===================================================================
--- trunk/src/plugins/AioPlugin/AioPlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/AioPlugin/AioPlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,6 +1,6 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:36:03 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:13 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ VMPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
UnixAioPlugin VMConstruction-Plugins-AioPlugin-eem.15 uuid: 0029df1c-3720-4b61-8579-4851417d24a7
*/
@@ -88,9 +88,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "AioPlugin 24 October 2014 (i)"
+ "AioPlugin 25 November 2014 (i)"
#else
- "AioPlugin 24 October 2014 (e)"
+ "AioPlugin 25 November 2014 (e)"
#endif
;
Modified: trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
===================================================================
--- trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:35:59 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:03 pm */
/* Automatically generated by
- SmartSyntaxPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ SmartSyntaxPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
- AsynchFilePlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ AsynchFilePlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
*/
-static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c " __DATE__ ;
+static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27 " __DATE__ ;
@@ -67,9 +67,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "AsynchFilePlugin 24 October 2014 (i)"
+ "AsynchFilePlugin 25 November 2014 (i)"
#else
- "AsynchFilePlugin 24 October 2014 (e)"
+ "AsynchFilePlugin 25 November 2014 (e)"
#endif
;
static void * sCOAFfn;
Modified: trunk/src/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- trunk/src/plugins/B2DPlugin/B2DPlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/B2DPlugin/B2DPlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:35:59 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:05 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ VMPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
- BalloonEnginePlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ BalloonEnginePlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
*/
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27 " __DATE__ ;
@@ -120,17 +120,17 @@
#define GEPrimitiveBezier 6
#define GEPrimitiveClippedBitmapFill 1024
#define GEPrimitiveEdge 2
-#define GEPrimitiveEdgeMask 255
+#define GEPrimitiveEdgeMask 0xFF
#define GEPrimitiveFill 256
-#define GEPrimitiveFillMask 65280
+#define GEPrimitiveFillMask 0xFF00
#define GEPrimitiveLine 4
#define GEPrimitiveLinearGradientFill 512
#define GEPrimitiveRadialGradientFill 768
-#define GEPrimitiveTypeMask 65535
+#define GEPrimitiveTypeMask 0xFFFF
#define GEPrimitiveWide 1
#define GEPrimitiveWideBezier 7
#define GEPrimitiveWideLine 5
-#define GEPrimitiveWideMask 254
+#define GEPrimitiveWideMask 0xFE
#define GEStateAddingFromGET 1
#define GEStateBlitBuffer 5
#define GEStateCompleted 8
@@ -222,7 +222,7 @@
#define GWMagicIndex 0
#define GWMagicNumber 1097753705
#define GWMinimalSize 256
-#define GWNeedsFlush 63
+#define GWNeedsFlush 0x3F
#define GWObjStart 8
#define GWObjUsed 9
#define GWPoint1 80
@@ -447,9 +447,9 @@
static void * loadBBFn;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "B2DPlugin 24 October 2014 (i)"
+ "B2DPlugin 25 November 2014 (i)"
#else
- "B2DPlugin 24 October 2014 (e)"
+ "B2DPlugin 25 November 2014 (e)"
#endif
;
static int* objBuffer;
@@ -729,7 +729,7 @@
nFills = 0;
for (i = 0; i <= (length - 1); i += 1) {
runLength = ((usqInt) ((((int *) fillPtr))[i]) >> 16);
- runValue = ((((int *) fillPtr))[i]) & 65535;
+ runValue = ((((int *) fillPtr))[i]) & 0xFFFF;
if (!((runValue >= 0) && (runValue <= maxIndex))) {
return 0;
}
@@ -1353,8 +1353,8 @@
bmRaster = objBuffer[bmFill + GBBitmapRaster];
if (bmDepth == 32) {
value = (((int*) bits))[(bmRaster * yp) + xp];
- if ((value != 0) && ((value & 4278190080U) == 0)) {
- value = value | 4278190080U;
+ if ((value != 0) && ((value & 0xFF000000U) == 0)) {
+ value = value | 0xFF000000U;
}
fillValue = uncheckedTransformColor(value);
goto l3;
@@ -1366,13 +1366,13 @@
value = (((usqInt) value) >> rShift) & cMask;
if (bmDepth == 16) {
if (!(value == 0)) {
- b = (value & 31) << 3;
+ b = (value & 0x1F) << 3;
b += ((usqInt) b) >> 5;
- g = ((((usqInt) value) >> 5) & 31) << 3;
+ g = ((((usqInt) value) >> 5) & 0x1F) << 3;
g += ((usqInt) g) >> 5;
- r = ((((usqInt) value) >> 10) & 31) << 3;
+ r = ((((usqInt) value) >> 10) & 0x1F) << 3;
r += ((usqInt) r) >> 5;
- a = 255;
+ a = 0xFF;
value = ((b + (g << 8)) + (r << 16)) + (a << 24);
}
} else {
@@ -1537,8 +1537,8 @@
bmRaster = objBuffer[bmFill + GBBitmapRaster];
if (bmDepth == 32) {
value = (((int*) bits))[(bmRaster * yp) + xp];
- if ((value != 0) && ((value & 4278190080U) == 0)) {
- value = value | 4278190080U;
+ if ((value != 0) && ((value & 0xFF000000U) == 0)) {
+ value = value | 0xFF000000U;
}
fillValue = uncheckedTransformColor(value);
goto l3;
@@ -1550,13 +1550,13 @@
value = (((usqInt) value) >> rShift) & cMask1;
if (bmDepth == 16) {
if (!(value == 0)) {
- b = (value & 31) << 3;
+ b = (value & 0x1F) << 3;
b += ((usqInt) b) >> 5;
- g = ((((usqInt) value) >> 5) & 31) << 3;
+ g = ((((usqInt) value) >> 5) & 0x1F) << 3;
g += ((usqInt) g) >> 5;
- r = ((((usqInt) value) >> 10) & 31) << 3;
+ r = ((((usqInt) value) >> 10) & 0x1F) << 3;
r += ((usqInt) r) >> 5;
- a = 255;
+ a = 0xFF;
value = ((b + (g << 8)) + (r << 16)) + (a << 24);
}
} else {
@@ -1637,8 +1637,8 @@
bmRaster1 = objBuffer[bmFill + GBBitmapRaster];
if (bmDepth1 == 32) {
value1 = (((int*) bits))[(bmRaster1 * yp) + xp];
- if ((value1 != 0) && ((value1 & 4278190080U) == 0)) {
- value1 = value1 | 4278190080U;
+ if ((value1 != 0) && ((value1 & 0xFF000000U) == 0)) {
+ value1 = value1 | 0xFF000000U;
}
fillValue = uncheckedTransformColor(value1);
goto l6;
@@ -1650,13 +1650,13 @@
value1 = (((usqInt) value1) >> rShift1) & cMask2;
if (bmDepth1 == 16) {
if (!(value1 == 0)) {
- b1 = (value1 & 31) << 3;
+ b1 = (value1 & 0x1F) << 3;
b1 += ((usqInt) b1) >> 5;
- g1 = ((((usqInt) value1) >> 5) & 31) << 3;
+ g1 = ((((usqInt) value1) >> 5) & 0x1F) << 3;
g1 += ((usqInt) g1) >> 5;
- r1 = ((((usqInt) value1) >> 10) & 31) << 3;
+ r1 = ((((usqInt) value1) >> 10) & 0x1F) << 3;
r1 += ((usqInt) r1) >> 5;
- a1 = 255;
+ a1 = 0xFF;
value1 = ((b1 + (g1 << 8)) + (r1 << 16)) + (a1 << 24);
}
} else {
@@ -1737,8 +1737,8 @@
bmRaster2 = objBuffer[bmFill + GBBitmapRaster];
if (bmDepth2 == 32) {
value2 = (((int*) bits))[(bmRaster2 * yp) + xp];
- if ((value2 != 0) && ((value2 & 4278190080U) == 0)) {
- value2 = value2 | 4278190080U;
+ if ((value2 != 0) && ((value2 & 0xFF000000U) == 0)) {
+ value2 = value2 | 0xFF000000U;
}
fillValue = uncheckedTransformColor(value2);
goto l9;
@@ -1750,13 +1750,13 @@
value2 = (((usqInt) value2) >> rShift2) & cMask3;
if (bmDepth2 == 16) {
if (!(value2 == 0)) {
- b2 = (value2 & 31) << 3;
+ b2 = (value2 & 0x1F) << 3;
b2 += ((usqInt) b2) >> 5;
- g2 = ((((usqInt) value2) >> 5) & 31) << 3;
+ g2 = ((((usqInt) value2) >> 5) & 0x1F) << 3;
g2 += ((usqInt) g2) >> 5;
- r2 = ((((usqInt) value2) >> 10) & 31) << 3;
+ r2 = ((((usqInt) value2) >> 10) & 0x1F) << 3;
r2 += ((usqInt) r2) >> 5;
- a2 = 255;
+ a2 = 0xFF;
value2 = ((b2 + (g2 << 8)) + (r2 << 16)) + (a2 << 24);
}
} else {
@@ -2529,7 +2529,7 @@
if (x0 >= x1) {
return 0;
}
- if ((fill & 4278190080U) != 0) {
+ if ((fill & 0xFF000000U) != 0) {
/* begin fillColorSpan:from:to: */
if (!((workBuffer[GWAALevel]) == 1)) {
fillColorSpanAAx0x1(fill, x0, x1);
@@ -3153,7 +3153,7 @@
}
static sqInt isFillOkay(sqInt fill) {
- return (fill == 0) || (((fill & 4278190080U) != 0) || (((fill >= 0) && (fill < objUsed)) && (((fill & 4278190080U) != 0) || ((((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask) != 0))));
+ return (fill == 0) || (((fill & 0xFF000000U) != 0) || (((fill >= 0) && (fill < objUsed)) && (((fill & 0xFF000000U) != 0) || ((((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask) != 0))));
}
@@ -3476,7 +3476,7 @@
if (((leftLength -= 1)) <= 0) {
leftRun += 1;
leftLength = ((usqInt) ((((int *) leftFills))[leftRun]) >> 16);
- leftValue = ((((int *) leftFills))[leftRun]) & 65535;
+ leftValue = ((((int *) leftFills))[leftRun]) & 0xFFFF;
if (!(leftValue == 0)) {
leftValue = fillIndexList[leftValue - 1];
leftValue = transformColor(leftValue);
@@ -3488,7 +3488,7 @@
if (((rightLength -= 1)) <= 0) {
rightRun += 1;
rightLength = ((usqInt) ((((int *) rightFills))[rightRun]) >> 16);
- rightValue = ((((int *) rightFills))[rightRun]) & 65535;
+ rightValue = ((((int *) rightFills))[rightRun]) & 0xFFFF;
if (!(rightValue == 0)) {
rightValue = fillIndexList[rightValue - 1];
rightValue = transformColor(rightValue);
@@ -3497,7 +3497,7 @@
if (((widthLength -= 1)) <= 0) {
widthRun += 1;
widthLength = ((usqInt) ((((int *) lineWidths))[widthRun]) >> 16);
- widthValue = ((((int *) lineWidths))[widthRun]) & 65535;
+ widthValue = ((((int *) lineWidths))[widthRun]) & 0xFFFF;
if (!(widthValue == 0)) {
widthValue = transformWidth(widthValue);
}
@@ -3505,7 +3505,7 @@
if (((lineFillLength -= 1)) <= 0) {
lineFillRun += 1;
lineFillLength = ((usqInt) ((((int *) lineFills))[lineFillRun]) >> 16);
- lineFillValue = ((((int *) lineFills))[lineFillRun]) & 65535;
+ lineFillValue = ((((int *) lineFills))[lineFillRun]) & 0xFFFF;
if (!(lineFillValue == 0)) {
lineFillValue = fillIndexList[lineFillValue - 1];
}
@@ -6551,7 +6551,7 @@
workBuffer[GWAALevel] = aaLevel;
if (aaLevel == 1) {
workBuffer[GWAAShift] = 0;
- workBuffer[GWAAColorMask] = 4294967295U;
+ workBuffer[GWAAColorMask] = 0xFFFFFFFFU;
workBuffer[GWAAScanMask] = 0;
}
if (aaLevel == 2) {
@@ -6674,10 +6674,10 @@
if (maxSteps < 2) {
maxSteps = 2;
}
- scaledStepSize = 16777216 / maxSteps;
+ scaledStepSize = 0x1000000 / maxSteps;
/* begin absoluteSquared8Dot24: */
- word1 = scaledStepSize & 65535;
- word2 = (((usqInt) scaledStepSize >> 16)) & 255;
+ word1 = scaledStepSize & 0xFFFF;
+ word2 = (((usqInt) scaledStepSize >> 16)) & 0xFF;
squaredStepSize = ((usqInt) (((((usqInt) (((unsigned) (word1 * word1))) >> 16)) + ((word1 * word2) * 2)) + (((usqInt) (word2 * word2) << 16))) >> 8);
fwDx = fwX1 * scaledStepSize;
fwDDx = (fwX2 * squaredStepSize) * 2;
@@ -7246,7 +7246,7 @@
if (deltaY < 0) {
deltaY = 0 - deltaY;
}
- if (deltaY > 255) {
+ if (deltaY > 0xFF) {
workBuffer[GWBezierHeightSubdivisions] = ((workBuffer[GWBezierHeightSubdivisions]) + 1);
return computeBezierSplitAtHalf(index);
}
@@ -7528,13 +7528,13 @@
sqInt r;
float *transform;
- if (!((fillIndex == 0) || ((fillIndex & 4278190080U) != 0))) {
+ if (!((fillIndex == 0) || ((fillIndex & 0xFF000000U) != 0))) {
return fillIndex;
}
- b = fillIndex & 255;
- g = (((usqInt) fillIndex) >> 8) & 255;
- r = (((usqInt) fillIndex) >> 16) & 255;
- a = (((usqInt) fillIndex) >> 24) & 255;
+ b = fillIndex & 0xFF;
+ g = (((usqInt) fillIndex) >> 8) & 0xFF;
+ r = (((usqInt) fillIndex) >> 16) & 0xFF;
+ a = (((usqInt) fillIndex) >> 24) & 0xFF;
if ((workBuffer[GWHasColorTransform]) != 0) {
transform = ((float *) (workBuffer + GWColorTransform));
alphaScale = ((a * (transform[6])) + (transform[7])) / a;
@@ -7543,18 +7543,18 @@
b = ((sqInt)(((b * (transform[4])) + (transform[5])) * alphaScale));
a = a * alphaScale;
r = ((r < 0) ? 0 : r);
- r = ((r < 255) ? r : 255);
+ r = ((r < 0xFF) ? r : 0xFF);
g = ((g < 0) ? 0 : g);
- g = ((g < 255) ? g : 255);
+ g = ((g < 0xFF) ? g : 0xFF);
b = ((b < 0) ? 0 : b);
- b = ((b < 255) ? b : 255);
+ b = ((b < 0xFF) ? b : 0xFF);
a = ((a < 0) ? 0 : a);
- a = ((a < 255) ? a : 255);
+ a = ((a < 0xFF) ? a : 0xFF);
}
if (a < 1) {
return 0;
}
- if ((a < 255) && ((workBuffer[GWNeedsFlush]) != 0)) {
+ if ((a < 0xFF) && ((workBuffer[GWNeedsFlush]) != 0)) {
/* begin stopBecauseOf: */
workBuffer[GWStopReason] = GErrorNeedFlush;
engineStopped = 1;
@@ -7647,23 +7647,23 @@
if (!((workBuffer[GWHasColorTransform]) != 0)) {
return fillIndex;
}
- b = fillIndex & 255;
- g = (((usqInt) fillIndex) >> 8) & 255;
- r = (((usqInt) fillIndex) >> 16) & 255;
- a = (((usqInt) fillIndex) >> 24) & 255;
+ b = fillIndex & 0xFF;
+ g = (((usqInt) fillIndex) >> 8) & 0xFF;
+ r = (((usqInt) fillIndex) >> 16) & 0xFF;
+ a = (((usqInt) fillIndex) >> 24) & 0xFF;
transform = ((float *) (workBuffer + GWColorTransform));
r = ((sqInt)((r * (transform[0])) + (transform[1])));
g = ((sqInt)((g * (transform[2])) + (transform[3])));
b = ((sqInt)((b * (transform[4])) + (transform[5])));
a = ((sqInt)((a * (transform[6])) + (transform[7])));
r = ((r < 0) ? 0 : r);
- r = ((r < 255) ? r : 255);
+ r = ((r < 0xFF) ? r : 0xFF);
g = ((g < 0) ? 0 : g);
- g = ((g < 255) ? g : 255);
+ g = ((g < 0xFF) ? g : 0xFF);
b = ((b < 0) ? 0 : b);
- b = ((b < 255) ? b : 255);
+ b = ((b < 0xFF) ? b : 0xFF);
a = ((a < 0) ? 0 : a);
- a = ((a < 255) ? a : 255);
+ a = ((a < 0xFF) ? a : 0xFF);
if (a < 16) {
return 0;
}
Modified: trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
===================================================================
--- trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:36:01 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:09 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ VMPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
- B3DAcceleratorPlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ B3DAcceleratorPlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
*/
-static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c " __DATE__ ;
+static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27 " __DATE__ ;
@@ -107,9 +107,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "B3DAcceleratorPlugin 24 October 2014 (i)"
+ "B3DAcceleratorPlugin 25 November 2014 (i)"
#else
- "B3DAcceleratorPlugin 24 October 2014 (e)"
+ "B3DAcceleratorPlugin 25 November 2014 (e)"
#endif
;
Modified: trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
===================================================================
--- trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:35:59 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:03 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ VMPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
- BMPReadWriterPlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ BMPReadWriterPlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
*/
-static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c " __DATE__ ;
+static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27 " __DATE__ ;
@@ -58,9 +58,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "BMPReadWriterPlugin 24 October 2014 (i)"
+ "BMPReadWriterPlugin 25 November 2014 (i)"
#else
- "BMPReadWriterPlugin 24 October 2014 (e)"
+ "BMPReadWriterPlugin 25 November 2014 (e)"
#endif
;
Modified: trunk/src/plugins/BitBltPlugin/BitBltPlugin.c
===================================================================
--- trunk/src/plugins/BitBltPlugin/BitBltPlugin.c 2014-11-25 23:33:58 UTC (rev 3150)
+++ trunk/src/plugins/BitBltPlugin/BitBltPlugin.c 2014-11-26 01:09:16 UTC (rev 3151)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.13.7 translated as C source on 24 October 2014 8:36 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.13.8 translated as C source on 25 November 2014 8:00:05 pm */
/* Automatically generated by
- SmartSyntaxPluginCodeGenerator VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ SmartSyntaxPluginCodeGenerator VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
from
- BitBltSimulation VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c
+ BitBltSimulation VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27
*/
-static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.354 uuid: a38a877b-1f44-40b9-9ee8-c812a471808c " __DATE__ ;
+static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.355 uuid: 9e6e08b4-e8f0-44b0-803c-de1559fbcb27 " __DATE__ ;
@@ -45,7 +45,7 @@
/*** Constants ***/
-#define AllOnes 4294967295U
+#define AllOnes 0xFFFFFFFFU
#define AlphaIndex 3
#define BBClipHeightIndex 13
#define BBClipWidthIndex 12
@@ -256,9 +256,9 @@
};
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "BitBltPlugin 24 October 2014 (i)"
+ "BitBltPlugin 25 November 2014 (i)"
#else
- "BitBltPlugin 24 October 2014 (e)"
+ "BitBltPlugin 25 November 2014 (e)"
#endif
;
static sqInt nWords;
@@ -324,12 +324,12 @@
}
if (destDepth == 16) {
diff = partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 5, 3);
- bitCount = ((bitCount + (diff & 31)) + ((((usqInt) diff) >> 5) & 31)) + ((((usqInt) diff) >> 10) & 31);
+ bitCount = ((bitCount + (diff & 0x1F)) + ((((usqInt) diff) >> 5) & 0x1F)) + ((((usqInt) diff) >> 10) & 0x1F);
diff = partitionedSubfromnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3);
- bitCount = ((bitCount + (diff & 31)) + ((((usqInt) diff) >> 5) & 31)) + ((((usqInt) diff) >> 10) & 31);
+ bitCount = ((bitCount + (diff & 0x1F)) + ((((usqInt) diff) >> 5) & 0x1F)) + ((((usqInt) diff) >> 10) & 0x1F);
} else {
diff = partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 3);
- bitCount = ((bitCount + (diff & 255)) + ((((usqInt) diff) >> 8) & 255)) + ((((usqInt) diff) >> 16) & 255);
+ bitCount = ((bitCount + (diff & 0xFF)) + ((((usqInt) diff) >> 8) & 0xFF)) + ((((usqInt) diff) >> 16) & 0xFF);
}
return destinationWord;
}
@@ -384,7 +384,7 @@
/* begin rgbMap:from:to: */
if (((d = cmBitsPerColor - 5)) > 0) {
mask = (1 << 5) - 1;
- srcPix = (destinationWord & 65535) << d;
+ srcPix = (destinationWord & 0xFFFF) << d;
mask = mask << d;
destPix = srcPix & mask;
mask = mask << cmBitsPerColor;
@@ -394,23 +394,23 @@
} else {
if (d == 0) {
if (5 == 5) {
- mapIndex = (destinationWord & 65535) & 32767;
+ mapIndex = (destinationWord & 0xFFFF) & 0x7FFF;
goto l1;
}
if (5 == 8) {
- mapIndex = (destinationWord & 65535) & 16777215;
+ mapIndex = (destinationWord & 0xFFFF) & 0xFFFFFF;
goto l1;
}
- mapIndex = destinationWord & 65535;
+ mapIndex = destinationWord & 0xFFFF;
goto l1;
}
- if ((destinationWord & 65535) == 0) {
- mapIndex = destinationWord & 65535;
+ if ((destinationWord & 0xFFFF) == 0) {
+ mapIndex = destinationWord & 0xFFFF;
goto l1;
}
d = 5 - cmBitsPerColor;
mask = (1 << cmBitsPerColor) - 1;
- srcPix = ((usqInt) (destinationWord & 65535)) >> d;
+ srcPix = ((usqInt) (destinationWord & 0xFFFF)) >> d;
destPix = srcPix & mask;
mask = mask << cmBitsPerColor;
srcPix = ((usqInt) srcPix) >> d;
@@ -437,11 +437,11 @@
} else {
if (d1 == 0) {
if (5 == 5) {
- mapIndex = (((usqInt) destinationWord) >> 16) & 32767;
+ mapIndex = (((usqInt) destinationWord) >> 16) & 0x7FFF;
goto l2;
}
if (5 == 8) {
- mapIndex = (((usqInt) destinationWord) >> 16) & 16777215;
+ mapIndex = (((usqInt) destinationWord) >> 16) & 0xFFFFFF;
goto l2;
}
mapIndex = ((usqInt) destinationWord) >> 16;
@@ -484,11 +484,11 @@
} else {
if (d2 == 0) {
if (8 == 5) {
- mapIndex = destinationWord & 32767;
+ mapIndex = destinationWord & 0x7FFF;
goto l3;
}
if (8 == 8) {
- mapIndex = destinationWord & 16777215;
+ mapIndex = destinationWord & 0xFFFFFF;
goto l3;
}
mapIndex = destinationWord;
@@ -544,10 +544,10 @@
if (alpha == 0) {
return destinationWord;
}
- if (alpha == 255) {
+ if (alpha == 0xFF) {
return sourceWord;
}
- unAlpha = 255 - alpha;
+ unAlpha = 0xFF - alpha;
/* blend red and blue */
@@ -555,7 +555,7 @@
/* blend alpha and green */
- blendAG = (((((((usqInt) sourceWord) >> 8) | 16711680) & 16711935) * alpha) + (((((usqInt) destinationWord) >> 8) & 16711935) * unAlpha)) + 16711935;
+ blendAG = (((((((usqInt) sourceWord) >> 8) | 0xFF0000) & 16711935) * alpha) + (((((usqInt) destinationWord) >> 8) & 16711935) * unAlpha)) + 16711935;
/* divide by 255 */
@@ -605,7 +605,7 @@
if (destDepth < 16) {
return destinationWord;
}
- unAlpha = 255 - sourceAlpha;
+ unAlpha = 0xFF - sourceAlpha;
result = destinationWord;
if (destPPW == 1) {
@@ -633,7 +633,7 @@
} else {
pixMask = maskTable[destDepth];
bitsPerColor = 5;
- rgbMask = 31;
+ rgbMask = 0x1F;
maskShifted = destMask;
destShifted = destinationWord;
sourceShifted = sourceWord;
@@ -644,7 +644,7 @@
pixBlend = 0;
for (i = 1; i <= 3; i += 1) {
shift = (i - 1) * bitsPerColor;
- blend = ((((((((usqInt) sourcePixVal) >> shift) & rgbMask) * sourceAlpha) + (((((usqInt) destPixVal) >> shift) & rgbMask) * unAlpha)) + 254) / 255) & rgbMask;
+ blend = ((((((((usqInt) sourcePixVal) >> shift) & rgbMask) * sourceAlpha) + (((((usqInt) destPixVal) >> shift) & rgbMask) * unAlpha)) + 0xFE) / 0xFF) & rgbMask;
pixBlend = pixBlend | (blend << shift);
}
result = (result & (~(pixMask << ((j - 1) * 16)))) | (pixBlend << ((j - 1) * 16));
@@ -677,7 +677,7 @@
/* High 8 bits of source pixel is source opacity (ARGB format) */
- unAlpha = 255 - (((usqInt) sourceWord) >> 24);
+ unAlpha = 0xFF - (((usqInt) sourceWord) >> 24);
/* blend red and blue components */
@@ -689,11 +689,11 @@
/* saturate red and blue components if there is a carry */
- rb = (rb & 16711935) | (((usqInt) ((rb & 16777472) * 255)) >> 8);
+ rb = (rb & 16711935) | (((usqInt) ((rb & 16777472) * 0xFF)) >> 8);
/* saturate alpha and green components if there is a carry */
- ag = ((ag & 16711935) << 8) | ((ag & 16777472) * 255);
+ ag = ((ag & 16711935) << 8) | ((ag & 16777472) * 0xFF);
return ag | rb;
}
@@ -748,7 +748,7 @@
/* This is the outer loop */
- mask1 = 65535 << (16 - srcShift);
+ mask1 = 0xFFFF << (16 - srcShift);
while (((deltaY -= 1)) != 0) {
srcIndex = (sourceBits + (srcY * sourcePitch)) + (sx * 4);
dstIndex = (destBits + (dstY * destPitch)) + ((((sqInt) dx >> 1)) * 4);
@@ -762,7 +762,7 @@
deltaX = bbW + 1;
dstMask = mask1;
- if (dstMask == 65535) {
+ if (dstMask == 0xFFFF) {
srcShift = 16;
} else {
srcShift = 0;
@@ -771,13 +771,13 @@
ditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];
sourceWord = long32At(srcIndex);
srcAlpha = ((usqInt) sourceWord) >> 24;
- if (srcAlpha == 255) {
+ if (srcAlpha == 0xFF) {
/* Dither from 32 to 16 bit */
/* begin dither32To16:threshold: */
addThreshold = ((usqInt) ditherThreshold << 8);
- sourceWord = ((((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 16)) & 255)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 8)) & 255)]) << 5))) + (dither8Lookup[addThreshold + (sourceWord & 255)]);
+ sourceWord = ((((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 16)) & 0xFF)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 8)) & 0xFF)]) << 5))) + (dither8Lookup[addThreshold + (sourceWord & 0xFF)]);
if (sourceWord == 0) {
sourceWord = 1 << srcShift;
} else {
@@ -806,14 +806,14 @@
/* Mix colors */
- destWord = ((((usqInt) (destWord & 31744) << 9)) | (((usqInt) (destWord & 992) << 6))) | ((((usqInt) (destWord & 31) << 3)) | 4278190080U);
+ destWord = ((((usqInt) (destWord & 0x7C00) << 9)) | (((usqInt) (destWord & 0x3E0) << 6))) | ((((usqInt) (destWord & 0x1F) << 3)) | 0xFF000000U);
/* And dither */
sourceWord = alphaBlendScaledwith(sourceWord, destWord);
/* begin dither32To16:threshold: */
addThreshold1 = ((usqInt) ditherThreshold << 8);
- sourceWord = ((((usqInt) (dither8Lookup[addThreshold1 + ((((usqInt) sourceWord >> 16)) & 255)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold1 + ((((usqInt) sourceWord >> 8)) & 255)]) << 5))) + (dither8Lookup[addThreshold1 + (sourceWord & 255)]);
+ sourceWord = ((((usqInt) (dither8Lookup[addThreshold1 + ((((usqInt) sourceWord >> 16)) & 0xFF)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold1 + ((((usqInt) sourceWord >> 8)) & 0xFF)]) << 5))) + (dither8Lookup[addThreshold1 + (sourceWord & 0xFF)]);
if (sourceWord == 0) {
sourceWord = 1 << srcShift;
} else {
@@ -896,14 +896,14 @@
while (((deltaX -= 1)) != 0) {
sourceWord = long32At(srcIndex);
srcAlpha = ((usqInt) sourceWord) >> 24;
- if (srcAlpha == 255) {
+ if (srcAlpha == 0xFF) {
long32Atput(dstIndex, sourceWord);
srcIndex += 4;
/* Now copy as many words as possible with alpha = 255 */
dstIndex += 4;
- while ((((deltaX -= 1)) != 0) && ((((usqInt) ((sourceWord = long32At(srcIndex)))) >> 24) == 255)) {
+ while ((((deltaX -= 1)) != 0) && ((((usqInt) ((sourceWord = long32At(srcIndex)))) >> 24) == 0xFF)) {
long32Atput(dstIndex, sourceWord);
srcIndex += 4;
dstIndex += 4;
@@ -982,7 +982,7 @@
if (destMSB) {
mask1 = 24 - mask1;
}
- mask2 = AllOnes ^ (255 << mask1);
+ mask2 = AllOnes ^ (0xFF << mask1);
if ((dx & 1) == 0) {
adjust = 0;
} else {
@@ -1007,7 +1007,7 @@
while (((deltaX -= 1)) != 0) {
sourceWord = ((long32At(srcIndex)) & (~adjust)) + adjust;
srcAlpha = ((usqInt) sourceWord) >> 24;
- if (srcAlpha > 31) {
+ if (srcAlpha > 0x1F) {
/* Everything below 31 is transparent */
@@ -1054,19 +1054,19 @@
if (srcShift == 0) {
dstIndex += 4;
srcShift = 24;
- dstMask = 16777215;
+ dstMask = 0xFFFFFF;
} else {
srcShift -= 8;
- dstMask = (((usqInt) dstMask) >> 8) | 4278190080U;
+ dstMask = (((usqInt) dstMask) >> 8) | 0xFF000000U;
}
} else {
if (srcShift == 24) {
dstIndex += 4;
srcShift = 0;
- dstMask = 4294967040U;
+ dstMask = 0xFFFFFF00U;
} else {
srcShift += 8;
- dstMask = (dstMask << 8) | 255;
+ dstMask = (dstMask << 8) | 0xFF;
}
}
adjust = adjust ^ 522133279;
@@ -1258,13 +1258,13 @@
}
destPPW = 32 / destDepth;
cmBitsPerColor = 0;
- if (cmMask == 511) {
+ if (cmMask == 0x1FF) {
cmBitsPerColor = 3;
}
- if (cmMask == 4095) {
+ if (cmMask == 0xFFF) {
cmBitsPerColor = 4;
}
- if (cmMask == 32767) {
+ if (cmMask == 0x7FFF) {
cmBitsPerColor = 5;
}
/* begin tryCopyingBitsQuickly */
@@ -1447,13 +1447,13 @@
if (!(!(interpreterProxy->failed()))) {
return interpreterProxy->primitiveFail();
}
- if ((combinationRule == 30) || (combinationRule == 31)) {
+ if ((combinationRule == 30) || (combinationRule == 0x1F)) {
/* Check and fetch source alpha parameter for alpha blend */
if ((interpreterProxy->methodArgumentCount()) == 1) {
sourceAlpha = interpreterProxy->stackIntegerValue(0);
- if (!((!(interpreterProxy->failed())) && ((sourceAlpha >= 0) && (sourceAlpha <= 255)))) {
+ if (!((!(interpreterProxy->failed())) && ((sourceAlpha >= 0) && (sourceAlpha <= 0xFF)))) {
return interpreterProxy->primitiveFail();
}
} else {
@@ -1617,13 +1617,13 @@
if (done) {
return null;
}
- if ((combinationRule == 30) || (combinationRule == 31)) {
+ if ((combinationRule == 30) || (combinationRule == 0x1F)) {
/* Check and fetch source alpha parameter for alpha blend */
if ((interpreterProxy->methodArgumentCount()) == 1) {
sourceAlpha = interpreterProxy->stackIntegerValue(0);
- if (!((!(interpreterProxy->failed())) && ((sourceAlpha >= 0) && (sourceAlpha <= 255)))) {
+ if (!((!(interpreterProxy->failed())) && ((sourceAlpha >= 0) && (sourceAlpha <= 0xFF)))) {
return interpreterProxy->primitiveFail();
}
} else {
@@ -1750,8 +1750,8 @@
/* fetch the forecolor into componentAlphaModeColor. */
- componentAlphaModeAlpha = 255;
- componentAlphaModeColor = 16777215;
+ componentAlphaModeAlpha = 0xFF;
+ componentAlphaModeColor = 0xFFFFFF;
gammaLookupTable = null;
ungammaLookupTable = null;
if ((interpreterProxy->methodArgumentCount()) >= 2) {
@@ -2144,7 +2144,7 @@
destPix = cmLookupTable[sourcePix & cmMask];
destWord1 = destWord1 | ((destPix & destPixMask) << dstShift1);
dstShift1 += dstShiftInc;
- if (!((((srcShift1 += srcShiftInc)) & 4294967264U) == 0)) {
+ if (!((((srcShift1 += srcShiftInc)) & 0xFFFFFFE0U) == 0)) {
if (sourceMSB) {
srcShift1 += 32;
} else {
@@ -2178,7 +2178,7 @@
destPix = pv;
destWord1 = destWord1 | ((destPix & destPixMask) << dstShift1);
dstShift1 += dstShiftInc;
- if (!((((srcShift1 += srcShiftInc)) & 4294967264U) == 0)) {
+ if (!((((srcShift1 += srcShiftInc)) & 0xFFFFFFE0U) == 0)) {
if (sourceMSB) {
srcShift1 += 32;
} else {
@@ -2339,10 +2339,10 @@
if (destinationWord == 0) {
return 0;
}
- if (!((destinationWord & 4278190080U) == 0)) {
+ if (!((destinationWord & 0xFF000000U) == 0)) {
return destinationWord;
}
- return destinationWord | (sourceWord & 4278190080U);
+ return destinationWord | (sourceWord & 0xFF000000U);
}
@@ -2413,10 +2413,10 @@
sqInt value1;
sqInt out;
- for (b = 0; b <= 255; b += 1) {
+ for (b = 0; b <= 0xFF; b += 1) {
for (t = 0; t <= 15; t += 1) {
/* begin expensiveDither32To16:threshold: */
- pv = b & 255;
+ pv = b & 0xFF;
threshold = ditherThresholds16[pv & 7];
value1 = ditherValues16[((usqInt) pv >> 3)];
if (t < threshold) {
@@ -2424,7 +2424,7 @@
} else {
out = value1;
}
- pv = (((usqInt) b >> 8)) & 255;
+ pv = (((usqInt) b >> 8)) & 0xFF;
threshold = ditherThresholds16[pv & 7];
value1 = ditherValues16[((usqInt) pv >> 3)];
if (t < threshold) {
@@ -2432,7 +2432,7 @@
} else {
out = out | (((usqInt) value1 << 5));
}
- pv = (((usqInt) b >> 16)) & 255;
+ pv = (((usqInt) b >> 16)) & 0xFF;
threshold = ditherThresholds16[pv & 7];
value1 = ditherValues16[((usqInt) pv >> 3)];
if (t < threshold) {
@@ -2464,7 +2464,7 @@
if ((shifts == null) || (masks == null)) {
return 1;
}
- if (((shifts[RedIndex]) == 0) && (((shifts[GreenIndex]) == 0) && (((shifts[BlueIndex]) == 0) && (((shifts[AlphaIndex]) == 0) && (((masks[RedIndex]) == 16711680) && (((masks[GreenIndex]) == 65280) && (((masks[BlueIndex]) == 255) && ((masks[AlphaIndex]) == 4278190080U)))))))) {
+ if (((shifts[RedIndex]) == 0) && (((shifts[GreenIndex]) == 0) && (((shifts[BlueIndex]) == 0) && (((shifts[AlphaIndex]) == 0) && (((masks[RedIndex]) == 0xFF0000) && (((masks[GreenIndex]) == 0xFF00) && (((masks[BlueIndex]) == 0xFF) && ((masks[AlphaIndex]) == 0xFF000000U)))))))) {
return 1;
}
return 0;
@@ -3293,7 +3293,7 @@
if (!(loadBitBltFromwarping(bbObj, 0))) {
return interpreterProxy->primitiveFail();
}
- if ((combinationRule == 30) || (combinationRule == 31)) {
+ if ((combinationRule == 30) || (combinationRule == 0x1F)) {
/* needs extra source alpha */
@@ -3577,7 +3577,7 @@
/* make a mask to isolate the pixel within that word */
- mask = ((usqInt) 4294967295U) >> (32 - depth);
+ mask = ((usqInt) 0xFFFFFFFFU) >> (32 - depth);
/* this is the tricky MSB part - we mask the xVal to find how far into the word we need, then add 1 for the pixel we're looking for, then * depth to get the bit shift */
@@ -3718,21 +3718,21 @@
/* Add each pixel separately */
componentMask = (1 << destDepth) - 1;
- carryOverflowMask = (4294967295U / componentMask) << (destDepth - 1);
+ carryOverflowMask = (0xFFFFFFFFU / componentMask) << (destDepth - 1);
return partitionedAddtonBitscomponentMaskcarryOverflowMask(sourceWord, destinationWord, destDepth, componentMask, carryOverflowMask);
}
if (destDepth == 16) {
/* Add RGB components of each pixel separately */
- componentMask = 31;
+ componentMask = 0x1F;
carryOverflowMask = 1108361744;
return partitionedAddtonBitscomponentMaskcarryOverflowMask(sourceWord & 2147450879, destinationWord & 2147450879, 5, componentMask, carryOverflowMask);
} else {
/* Add RGBA components of the pixel separately */
- componentMask = 255;
+ componentMask = 0xFF;
carryOverflowMask = 2155905152U;
return partitionedAddtonBitscomponentMaskcarryOverflowMask(sourceWord, destinationWord, 8, componentMask, carryOverflowMask);
}
@@ -3778,7 +3778,7 @@
/* This is the outer loop */
- mask1 = 65535 << (16 - srcShift);
+ mask1 = 0xFFFF << (16 - srcShift);
while (((deltaY -= 1)) != 0) {
srcIndex = (sourceBits + (srcY * sourcePitch)) + (sx * 4);
dstIndex = (destBits + (dstY * destPitch)) + ((((sqInt) dx >> 1)) * 4);
@@ -3792,7 +3792,7 @@
deltaX = bbW + 1;
dstMask = mask1;
- if (dstMask == 65535) {
+ if (dstMask == 0xFFFF) {
srcShift = 16;
} else {
srcShift = 0;
@@ -3800,7 +3800,7 @@
while (((deltaX -= 1)) != 0) {
ditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];
sourceWord = long32At(srcIndex);
- srcAlpha = sourceWord & 16777215;
+ srcAlpha = sourceWord & 0xFFFFFF;
if (!(srcAlpha == 0)) {
/* 0 < srcAlpha */
@@ -3815,14 +3815,14 @@
/* Mix colors */
- destWord = ((((usqInt) (destWord & 31744) << 9)) | (((usqInt) (destWord & 992) << 6))) | ((((usqInt) (destWord & 31) << 3)) | 4278190080U);
+ destWord = ((((usqInt) (destWord & 0x7C00) << 9)) | (((usqInt) (destWord & 0x3E0) << 6))) | ((((usqInt) (destWord & 0x1F) << 3)) | 0xFF000000U);
/* And dither */
sourceWord = rgbComponentAlpha32with(sourceWord, destWord);
/* begin dither32To16:threshold: */
addThreshold = ((usqInt) ditherThreshold << 8);
- sourceWord = ((((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 16)) & 255)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 8)) & 255)]) << 5))) + (dither8Lookup[addThreshold + (sourceWord & 255)]);
+ sourceWord = ((((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 16)) & 0xFF)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 8)) & 0xFF)]) << 5))) + (dither8Lookup[addThreshold + (sourceWord & 0xFF)]);
if (sourceWord == 0) {
sourceWord = 1 << srcShift;
} else {
@@ -3903,14 +3903,14 @@
deltaX = bbW + 1;
while (((deltaX -= 1)) != 0) {
sourceWord = long32At(srcIndex);
- srcAlpha = sourceWord & 16777215;
+ srcAlpha = sourceWord & 0xFFFFFF;
if (srcAlpha == 0) {
srcIndex += 4;
/* Now skip as many words as possible, */
dstIndex += 4;
- while ((((deltaX -= 1)) != 0) && ((((sourceWord = long32At(srcIndex))) & 16777215) == 0)) {
+ while ((((deltaX -= 1)) != 0) && ((((sourceWord = long32At(srcIndex))) & 0xFFFFFF) == 0)) {
srcIndex += 4;
dstIndex += 4;
}
@@ -3971,60 +3971,60 @@
return destinationWord;
}
srcColor = componentAlphaModeColor;
- srcAlpha = componentAlphaModeAlpha & 255;
- aB = alpha & 255;
+ srcAlpha = componentAlphaModeAlpha & 0xFF;
+ aB = alpha & 0xFF;
alpha = ((usqInt) alpha) >> 8;
- aG = alpha & 255;
+ aG = alpha & 0xFF;
alpha = ((usqInt) alpha) >> 8;
- aR = alpha & 255;
+ aR = alpha & 0xFF;
alpha = ((usqInt) alpha) >> 8;
- aA = alpha & 255;
- if (!(srcAlpha == 255)) {
+ aA = alpha & 0xFF;
+ if (!(srcAlpha == 0xFF)) {
aA = ((usqInt) (aA * srcAlpha)) >> 8;
aR = ((usqInt) (aR * srcAlpha)) >> 8;
aG = ((usqInt) (aG * srcAlpha)) >> 8;
aB = ((usqInt) (aB * srcAlpha)) >> 8;
}
dstMask = destinationWord;
- d = dstMask & 255;
- s = srcColor & 255;
+ d = dstMask & 0xFF;
+ s = srcColor & 0xFF;
if (!(ungammaLookupTable == null)) {
d = ungammaLookupTable[d];
s = ungammaLookupTable[s];
}
- b = (((usqInt) (d * (255 - aB))) >> 8) + (((usqInt) (s * aB)) >> 8);
- if (b > 255) {
- b = 255;
+ b = (((usqInt) (d * (0xFF - aB))) >> 8) + (((usqInt) (s * aB)) >> 8);
+ if (b > 0xFF) {
+ b = 0xFF;
}
if (!(gammaLookupTable == null)) {
b = gammaLookupTable[b];
}
dstMask = ((usqInt) dstMask) >> 8;
srcColor = ((usqInt) srcColor) >> 8;
- d = dstMask & 255;
- s = srcColor & 255;
+ d = dstMask & 0xFF;
+ s = srcColor & 0xFF;
if (!(ungammaLookupTable == null)) {
d = ungammaLookupTable[d];
s = ungammaLookupTable[s];
}
- g = (((usqInt) (d * (255 - aG))) >> 8) + (((usqInt) (s * aG)) >> 8);
- if (g > 255) {
- g = 255;
+ g = (((usqInt) (d * (0xFF - aG))) >> 8) + (((usqInt) (s * aG)) >> 8);
+ if (g > 0xFF) {
+ g = 0xFF;
}
if (!(gammaLookupTable == null)) {
g = gammaLookupTable[g];
}
dstMask = ((usqInt) dstMask) >> 8;
srcColor = ((usqInt) srcColor) >> 8;
- d = dstMask & 255;
- s = srcColor & 255;
+ d = dstMask & 0xFF;
+ s = srcColor & 0xFF;
if (!(ungammaLookupTable == null)) {
d = ungammaLookupTable[d];
s = ungammaLookupTable[s];
}
- r = (((usqInt) (d * (255 - aR))) >> 8) + (((usqInt) (s * aR)) >> 8);
- if (r > 255) {
- r = 255;
+ r = (((usqInt) (d * (0xFF - aR))) >> 8) + (((usqInt) (s * aR)) >> 8);
+ if (r > 0xFF) {
+ r = 0xFF;
}
if (!(gammaLookupTable == null)) {
r = gammaLookupTable[r];
@@ -4034,9 +4034,9 @@
/* no need to gamma correct alpha value ? */
- a = (((usqInt) ((dstMask & 255) * (255 - aA))) >> 8) + aA;
- if (a > 255) {
- a = 255;
+ a = (((usqInt) ((dstMask & 0xFF) * (0xFF - aA))) >> 8) + aA;
+ if (a > 0xFF) {
+ a = 0xFF;
}
answer = (((((a << 8) + r) << 8) + g) << 8) + b;
return answer;
@@ -4085,7 +4085,7 @@
if (destMSB) {
mask1 = 24 - mask1;
}
- mask2 = AllOnes ^ (255 << mask1);
+ mask2 = AllOnes ^ (0xFF << mask1);
if ((dx & 1) == 0) {
adjust = 0;
} else {
@@ -4112,9 +4112,9 @@
/* set srcAlpha to the average of the 3 separate aR,Ag,AB values */
- srcAlpha = sourceWord & 16777215;
- srcAlpha = (((((usqInt) srcAlpha) >> 16) + ((((usqInt) srcAlpha) >> 8) & 255)) + (srcAlpha & 255)) / 3;
- if (srcAlpha > 31) {
+ srcAlpha = sourceWord & 0xFFFFFF;
+ srcAlpha = (((((usqInt) srcAlpha) >> 16) + ((((usqInt) srcAlpha) >> 8) & 0xFF)) + (srcAlpha & 0xFF)) / 3;
+ if (srcAlpha > 0x1F) {
/* Everything below 31 is transparent */
@@ -4122,7 +4122,7 @@
/* treat everything above 224 as opaque */
- sourceWord = 4294967295U;
+ sourceWord = 0xFFFFFFFFU;
}
destWord = long32At(dstIndex);
destWord = destWord & (~dstMask);
@@ -4162,19 +4162,19 @@
if (srcShift == 0) {
dstIndex += 4;
srcShift = 24;
- dstMask = 16777215;
+ dstMask = 0xFFFFFF;
} else {
srcShift -= 8;
- dstMask = (((usqInt) dstMask) >> 8) | 4278190080U;
+ dstMask = (((usqInt) dstMask) >> 8) | 0xFF000000U;
}
} else {
if (srcShift == 32) {
dstIndex += 4;
srcShift = 0;
- dstMask = 4294967040U;
+ dstMask = 0xFFFFFF00U;
} else {
srcShift += 8;
- dstMask = (dstMask << 8) | 255;
+ dstMask = (dstMask << 8) | 0xFF;
}
}
adjust = adjust ^ 522133279;
@@ -4226,11 +4226,11 @@
p2 = ((usqInt) (destinationWord & mask)) >> ((i - 1) * destDepth);
if (!(destDepth == 32)) {
if (destDepth == 16) {
- p1 = ((((p1 & 31) << 3) | ((p1 & 992) << 6)) | ((p1 & 31744) << 9)) | 4278190080U;
- p2 = ((((p2 & 31) << 3) | ((p2 & 992) << 6)) | ((p2 & 31744) << 9)) | 4278190080U;
+ p1 = ((((p1 & 0x1F) << 3) | ((p1 & 0x3E0) << 6)) | ((p1 & 0x7C00) << 9)) | 0xFF000000U;
+ p2 = ((((p2 & 0x1F) << 3) | ((p2 & 0x3E0) << 6)) | ((p2 & 0x7C00) << 9)) | 0xFF000000U;
} else {
- p1 = (rgbMapfromto(p1, destDepth, 32)) | 4278190080U;
- p2 = (rgbMapfromto(p2, destDepth, 32)) | 4278190080U;
+ p1 = (rgbMapfromto(p1, destDepth, 32)) | 0xFF000000U;
+ p2 = (rgbMapfromto(p2, destDepth, 32)) | 0xFF000000U;
}
}
v = rgbComponentAlpha32with(p1, p2);
@@ -4248,11 +4248,11 @@
} else {
if (d == 0) {
if (32 == 5) {
- v = v & 32767;
+ v = v & 0x7FFF;
goto l1;
}
if (32 == 8) {
- v = v & 16777215;
+ v = v & 0xFFFFFF;
goto l1;
}
v = v;
@@ -4304,10 +4304,10 @@
pixMask = maskTable[destDepth];
if (destDepth == 16) {
bitsPerColor = 5;
- rgbMask = 31;
+ rgbMask = 0x1F;
} else {
bitsPerColor = 8;
- rgbMask = 255;
+ rgbMask = 0xFF;
}
maskShifted = destMask;
destShifted = destinationWord;
@@ -4371,14 +4371,14 @@
/* Sometimes called with 16 bits, though pixel is 15,
but we must never return more than 15. */
- return sourcePixel & 32767;
+ return sourcePixel & 0x7FFF;
}
if (nBitsIn == 8) {
/* Sometimes called with 32 bits, though pixel is 24,
but we must never return more than 24. */
- return sourcePixel & 16777215;
+ return sourcePixel & 0xFFFFFF;
}
return sourcePixel;
}
@@ -4656,11 +4656,11 @@
} else {
if (d == 0) {
if (5 == 5) {
- mapIndex = pixVal & 32767;
+ mapIndex = pixVal & 0x7FFF;
goto l1;
}
if (5 == 8) {
- mapIndex = pixVal & 16777215;
+ mapIndex = pixVal & 0xFFFFFF;
goto l1;
}
mapIndex = pixVal;
@@ -4699,11 +4699,11 @@
} else {
if (d1 == 0) {
if (8 == 5) {
- mapIndex = pixVal & 32767;
+ mapIndex = pixVal & 0x7FFF;
goto l2;
}
if (8 == 8) {
- mapIndex = pixVal & 16777215;
+ mapIndex = pixVal & 0xFFFFFF;
goto l2;
}
mapIndex = pixVal;
@@ -5270,14 +5270,14 @@
/* Already in RGB format */
if (sourceDepth == 16) {
- rgb = (((rgb & 31) << 3) | ((rgb & 992) << 6)) | ((rgb & 31744) << 9);
@@ Diff output truncated at 50000 characters. @@