[Vm-dev] [commit][2848] Source per VMMaker 4.12.14 (VMMaker-dtl.338)
commits at squeakvm.org
commits at squeakvm.org
Tue Jan 21 00:25:08 UTC 2014
Revision: 2848
Author: lewis
Date: 2014-01-20 16:25:06 -0800 (Mon, 20 Jan 2014)
Log Message:
-----------
Source per VMMaker 4.12.14 (VMMaker-dtl.338)
Various code generator updates from oscog.
Note - some generated code changes are related to usage of class MemoryAccess, unrelated to the oscog code generator updates (no functional impact).
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/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/plugins/ZipPlugin/ZipPlugin.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-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/ckformat.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -5,7 +5,7 @@
/* Usage: ckformat imageFileName */
/* --- DO NOT EDIT THIS FILE --- */
-/* --- Automatically generated from class ImageFormat 2014-01-10T17:30:29.261+01:00--- */
+/* --- Automatically generated from class ImageFormat 2014-01-20T19:15:40.803+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-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:29:49 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:30 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ VMPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- ADPCMCodecPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ ADPCMCodecPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -70,9 +70,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "ADPCMCodecPlugin 10 January 2014 (i)"
+ "ADPCMCodecPlugin 20 January 2014 (i)"
#else
- "ADPCMCodecPlugin 10 January 2014 (e)"
+ "ADPCMCodecPlugin 20 January 2014 (e)"
#endif
;
@@ -170,14 +170,15 @@
remaining = 16;
while(1) {
shift = remaining - bitPosition;
- result += ((shift < 0) ? ((usqInt) currentByte >> -shift) : ((usqInt) currentByte << shift));
if (shift > 0) {
+ result += currentByte << shift;
remaining -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result += ((usqInt) currentByte) >> (0 - shift);
bitPosition -= remaining;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
predicted = result;
goto l1;
}
@@ -191,14 +192,15 @@
remaining1 = 6;
while(1) {
shift1 = remaining1 - bitPosition;
- result1 += ((shift1 < 0) ? ((usqInt) currentByte >> -shift1) : ((usqInt) currentByte << shift1));
if (shift1 > 0) {
+ result1 += currentByte << shift1;
remaining1 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result1 += ((usqInt) currentByte) >> (0 - shift1);
bitPosition -= remaining1;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
index = result1;
goto l2;
}
@@ -211,14 +213,15 @@
remaining2 = bitsPerSample;
while(1) {
shift2 = remaining2 - bitPosition;
- result2 += ((shift2 < 0) ? ((usqInt) currentByte >> -shift2) : ((usqInt) currentByte << shift2));
if (shift2 > 0) {
+ result2 += currentByte << shift2;
remaining2 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result2 += ((usqInt) currentByte) >> (0 - shift2);
bitPosition -= remaining2;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
delta = result2;
goto l3;
}
@@ -365,14 +368,15 @@
remaining = 16;
while(1) {
shift = remaining - bitPosition;
- result += ((shift < 0) ? ((usqInt) currentByte >> -shift) : ((usqInt) currentByte << shift));
if (shift > 0) {
+ result += currentByte << shift;
remaining -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result += ((usqInt) currentByte) >> (0 - shift);
bitPosition -= remaining;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
predictedLeft = result;
goto l1;
}
@@ -383,14 +387,15 @@
remaining1 = 6;
while(1) {
shift1 = remaining1 - bitPosition;
- result1 += ((shift1 < 0) ? ((usqInt) currentByte >> -shift1) : ((usqInt) currentByte << shift1));
if (shift1 > 0) {
+ result1 += currentByte << shift1;
remaining1 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result1 += ((usqInt) currentByte) >> (0 - shift1);
bitPosition -= remaining1;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
indexLeft = result1;
goto l2;
}
@@ -401,14 +406,15 @@
remaining2 = 16;
while(1) {
shift2 = remaining2 - bitPosition;
- result2 += ((shift2 < 0) ? ((usqInt) currentByte >> -shift2) : ((usqInt) currentByte << shift2));
if (shift2 > 0) {
+ result2 += currentByte << shift2;
remaining2 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result2 += ((usqInt) currentByte) >> (0 - shift2);
bitPosition -= remaining2;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
predictedRight = result2;
goto l3;
}
@@ -419,14 +425,15 @@
remaining3 = 6;
while(1) {
shift3 = remaining3 - bitPosition;
- result3 += ((shift3 < 0) ? ((usqInt) currentByte >> -shift3) : ((usqInt) currentByte << shift3));
if (shift3 > 0) {
+ result3 += currentByte << shift3;
remaining3 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result3 += ((usqInt) currentByte) >> (0 - shift3);
bitPosition -= remaining3;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
indexRight = result3;
goto l4;
}
@@ -446,14 +453,15 @@
remaining4 = bitsPerSample;
while(1) {
shift4 = remaining4 - bitPosition;
- result4 += ((shift4 < 0) ? ((usqInt) currentByte >> -shift4) : ((usqInt) currentByte << shift4));
if (shift4 > 0) {
+ result4 += currentByte << shift4;
remaining4 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result4 += ((usqInt) currentByte) >> (0 - shift4);
bitPosition -= remaining4;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
deltaLeft = result4;
goto l5;
}
@@ -464,14 +472,15 @@
remaining5 = bitsPerSample;
while(1) {
shift5 = remaining5 - bitPosition;
- result5 += ((shift5 < 0) ? ((usqInt) currentByte >> -shift5) : ((usqInt) currentByte << shift5));
if (shift5 > 0) {
+ result5 += currentByte << shift5;
remaining5 -= bitPosition;
currentByte = encodedBytes[(byteIndex += 1)];
bitPosition = 8;
} else {
+ result5 += ((usqInt) currentByte) >> (0 - shift5);
bitPosition -= remaining5;
- currentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));
+ currentByte = currentByte & (((usqInt) 255) >> (8 - bitPosition));
deltaRight = result5;
goto l6;
}
@@ -629,14 +638,15 @@
while(1) {
bitsAvailable = 8 - bitPosition;
shift = bitsAvailable - bufBits;
- currentByte += ((shift < 0) ? ((usqInt) buf >> -shift) : ((usqInt) buf << shift));
if (shift < 0) {
+ currentByte += ((usqInt) buf) >> (0 - shift);
encodedBytes[(byteIndex += 1)] = currentByte;
bitPosition = 0;
currentByte = 0;
- buf = buf & (((((0 - shift) < 0) ? ((usqInt) 1 >> -(0 - shift)) : ((usqInt) 1 << (0 - shift)))) - 1);
+ buf = buf & ((1 << (0 - shift)) - 1);
bufBits -= bitsAvailable;
} else {
+ currentByte += buf << shift;
bitPosition += bufBits;
goto l1;
}
@@ -664,14 +674,15 @@
while(1) {
bitsAvailable1 = 8 - bitPosition;
shift1 = bitsAvailable1 - bufBits1;
- currentByte += ((shift1 < 0) ? ((usqInt) buf1 >> -shift1) : ((usqInt) buf1 << shift1));
if (shift1 < 0) {
+ currentByte += ((usqInt) buf1) >> (0 - shift1);
encodedBytes[(byteIndex += 1)] = currentByte;
bitPosition = 0;
currentByte = 0;
- buf1 = buf1 & (((((0 - shift1) < 0) ? ((usqInt) 1 >> -(0 - shift1)) : ((usqInt) 1 << (0 - shift1)))) - 1);
+ buf1 = buf1 & ((1 << (0 - shift1)) - 1);
bufBits1 -= bitsAvailable1;
} else {
+ currentByte += buf1 << shift1;
bitPosition += bufBits1;
goto l2;
}
@@ -733,14 +744,15 @@
while(1) {
bitsAvailable2 = 8 - bitPosition;
shift2 = bitsAvailable2 - bufBits2;
- currentByte += ((shift2 < 0) ? ((usqInt) buf2 >> -shift2) : ((usqInt) buf2 << shift2));
if (shift2 < 0) {
+ currentByte += ((usqInt) buf2) >> (0 - shift2);
encodedBytes[(byteIndex += 1)] = currentByte;
bitPosition = 0;
currentByte = 0;
- buf2 = buf2 & (((((0 - shift2) < 0) ? ((usqInt) 1 >> -(0 - shift2)) : ((usqInt) 1 << (0 - shift2)))) - 1);
+ buf2 = buf2 & ((1 << (0 - shift2)) - 1);
bufBits2 -= bitsAvailable2;
} else {
+ currentByte += buf2 << shift2;
bitPosition += bufBits2;
goto l3;
}
Modified: trunk/src/plugins/AioPlugin/AioPlugin.c
===================================================================
--- trunk/src/plugins/AioPlugin/AioPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/AioPlugin/AioPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,6 +1,6 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:30:26 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:40 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ VMPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
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 10 January 2014 (i)"
+ "AioPlugin 20 January 2014 (i)"
#else
- "AioPlugin 10 January 2014 (e)"
+ "AioPlugin 20 January 2014 (e)"
#endif
;
Modified: trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
===================================================================
--- trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:29:50 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:30 pm */
/* Automatically generated by
- SmartSyntaxPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ SmartSyntaxPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- AsynchFilePlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ AsynchFilePlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -67,9 +67,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "AsynchFilePlugin 10 January 2014 (i)"
+ "AsynchFilePlugin 20 January 2014 (i)"
#else
- "AsynchFilePlugin 10 January 2014 (e)"
+ "AsynchFilePlugin 20 January 2014 (e)"
#endif
;
static void * sCOAFfn;
@@ -214,7 +214,7 @@
bufferSize = bufferSize * 4;
}
interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= bufferSize));
- bufferPtr = ((((sqMemoryBase) + buffer) + (BASE_HEADER_SIZE)) + startIndex) - 1;
+ bufferPtr = (((pointerForOop(buffer)) + (BASE_HEADER_SIZE)) + startIndex) - 1;
if (!(interpreterProxy->failed())) {
r = asyncFileReadResult(f, bufferPtr, count);
}
@@ -306,7 +306,7 @@
bufferSize = bufferSize * (BYTES_PER_WORD);
}
interpreterProxy->success((startIndex >= 1) && (((startIndex + count) - 1) <= bufferSize));
- bufferPtr = ((((sqMemoryBase) + buffer) + (BASE_HEADER_SIZE)) + startIndex) - 1;
+ bufferPtr = (((pointerForOop(buffer)) + (BASE_HEADER_SIZE)) + startIndex) - 1;
if (!(interpreterProxy->failed())) {
asyncFileWriteStart(f, fPosition, bufferPtr, count);
}
Modified: trunk/src/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- trunk/src/plugins/B2DPlugin/B2DPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/B2DPlugin/B2DPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:29:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:32 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ VMPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- BalloonEnginePlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ BalloonEnginePlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -447,9 +447,9 @@
static void * loadBBFn;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "B2DPlugin 10 January 2014 (i)"
+ "B2DPlugin 20 January 2014 (i)"
#else
- "B2DPlugin 10 January 2014 (e)"
+ "B2DPlugin 20 January 2014 (e)"
#endif
;
static int* objBuffer;
Modified: trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
===================================================================
--- trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:30:12 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:36 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ VMPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- B3DAcceleratorPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ B3DAcceleratorPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -107,9 +107,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "B3DAcceleratorPlugin 10 January 2014 (i)"
+ "B3DAcceleratorPlugin 20 January 2014 (i)"
#else
- "B3DAcceleratorPlugin 10 January 2014 (e)"
+ "B3DAcceleratorPlugin 20 January 2014 (e)"
#endif
;
Modified: trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
===================================================================
--- trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:29:50 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:30 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ VMPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- BMPReadWriterPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ BMPReadWriterPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -58,9 +58,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "BMPReadWriterPlugin 10 January 2014 (i)"
+ "BMPReadWriterPlugin 20 January 2014 (i)"
#else
- "BMPReadWriterPlugin 10 January 2014 (e)"
+ "BMPReadWriterPlugin 20 January 2014 (e)"
#endif
;
Modified: trunk/src/plugins/BitBltPlugin/BitBltPlugin.c
===================================================================
--- trunk/src/plugins/BitBltPlugin/BitBltPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/BitBltPlugin/BitBltPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:29:56 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:32 pm */
/* Automatically generated by
- SmartSyntaxPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ SmartSyntaxPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- BitBltSimulation VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ BitBltSimulation VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -119,6 +119,7 @@
static sqInt copyLoopPixMap(void);
static unsigned int * default8To32Table(void);
static sqInt destinationWordwith(sqInt sourceWord, sqInt destinationWord);
+static sqInt dstLongAt(sqInt idx);
static sqInt fetchIntOrFloatofObject(sqInt fieldIndex, sqInt objectPointer);
static sqInt fetchIntOrFloatofObjectifNil(sqInt fieldIndex, sqInt objectPointer, sqInt defaultValue);
static sqInt fixAlphawith(sqInt sourceWord, sqInt destinationWord);
@@ -256,9 +257,9 @@
};
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "BitBltPlugin 10 January 2014 (i)"
+ "BitBltPlugin 20 January 2014 (i)"
#else
- "BitBltPlugin 10 January 2014 (e)"
+ "BitBltPlugin 20 January 2014 (e)"
#endif
;
static sqInt nWords;
@@ -728,8 +729,8 @@
sqInt dstY;
sqInt ditherIndex;
sqInt addThreshold;
+ sqInt addThreshold1;
sqInt dstValue;
- sqInt addThreshold1;
sqInt dstValue1;
@@ -769,7 +770,7 @@
}
while (((deltaX -= 1)) != 0) {
ditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]));
+ sourceWord = long32At(srcIndex);
srcAlpha = ((usqInt) sourceWord) >> 24;
if (srcAlpha == 255) {
@@ -784,10 +785,10 @@
sourceWord = sourceWord << srcShift;
}
/* begin dstLongAt:put:mask: */
- dstValue = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ dstValue = long32At(dstIndex);
dstValue = dstValue & dstMask;
dstValue = dstValue | sourceWord;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = dstValue));
+ long32Atput(dstIndex, dstValue);
} else {
/* srcAlpha ~= 255 */
@@ -797,7 +798,7 @@
/* 0 < srcAlpha < 255 */
/* If we have to mix colors then just copy a single word */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ destWord = long32At(dstIndex);
destWord = destWord & (~dstMask);
/* Expand from 16 to 32 bit by adding zero bits */
@@ -820,10 +821,10 @@
sourceWord = sourceWord << srcShift;
}
/* begin dstLongAt:put:mask: */
- dstValue1 = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ dstValue1 = long32At(dstIndex);
dstValue1 = dstValue1 & dstMask;
dstValue1 = dstValue1 | sourceWord;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = dstValue1));
+ long32Atput(dstIndex, dstValue1);
}
}
srcIndex += 4;
@@ -894,17 +895,17 @@
deltaX = bbW + 1;
while (((deltaX -= 1)) != 0) {
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]));
+ sourceWord = long32At(srcIndex);
srcAlpha = ((usqInt) sourceWord) >> 24;
if (srcAlpha == 255) {
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = sourceWord));
+ long32Atput(dstIndex, sourceWord);
srcIndex += 4;
/* Now copy as many words as possible with alpha = 255 */
dstIndex += 4;
- while ((((deltaX -= 1)) != 0) && ((((usqInt) ((sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]))))) >> 24) == 255)) {
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = sourceWord));
+ while ((((deltaX -= 1)) != 0) && ((((usqInt) ((sourceWord = long32At(srcIndex)))) >> 24) == 255)) {
+ long32Atput(dstIndex, sourceWord);
srcIndex += 4;
dstIndex += 4;
}
@@ -919,7 +920,7 @@
/* Now skip as many words as possible, */
dstIndex += 4;
- while ((((deltaX -= 1)) != 0) && ((((usqInt) ((sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]))))) >> 24) == 0)) {
+ while ((((deltaX -= 1)) != 0) && ((((usqInt) ((sourceWord = long32At(srcIndex)))) >> 24) == 0)) {
srcIndex += 4;
dstIndex += 4;
}
@@ -929,9 +930,9 @@
/* 0 < srcAlpha < 255 */
/* If we have to mix colors then just copy a single word */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ destWord = long32At(dstIndex);
destWord = alphaBlendScaledwith(sourceWord, destWord);
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = destWord));
+ long32Atput(dstIndex, destWord);
srcIndex += 4;
dstIndex += 4;
}
@@ -1005,7 +1006,7 @@
dstMask = mask2;
while (((deltaX -= 1)) != 0) {
- sourceWord = ((((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]))) & (~adjust)) + adjust;
+ sourceWord = ((long32At(srcIndex)) & (~adjust)) + adjust;
srcAlpha = ((usqInt) sourceWord) >> 24;
if (srcAlpha > 31) {
@@ -1015,7 +1016,7 @@
/* Everything above 224 is opaque */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ destWord = long32At(dstIndex);
destWord = destWord & (~dstMask);
destWord = ((usqInt) destWord) >> srcShift;
destWord = mappingTable[destWord];
@@ -1044,10 +1045,10 @@
sourceWord = sourceWord << srcShift;
/* begin dstLongAt:put:mask: */
- dstValue = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ dstValue = long32At(dstIndex);
dstValue = dstValue & dstMask;
dstValue = dstValue | sourceWord;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = dstValue));
+ long32Atput(dstIndex, dstValue);
}
srcIndex += 4;
if (destMSB) {
@@ -1804,6 +1805,21 @@
sqInt i;
sqInt thisWord;
sqInt notSkewMask;
+ sqInt idx;
+ sqInt idx1;
+ sqInt idx2;
+ sqInt idx3;
+ sqInt idx4;
+ sqInt idx5;
+ sqInt idx6;
+ sqInt idx7;
+ sqInt idx8;
+ sqInt idx9;
+ sqInt idx10;
+ sqInt idx11;
+ sqInt idx12;
+ sqInt idx13;
+ sqInt idx14;
mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));
mergeFnwith;
@@ -1833,7 +1849,7 @@
halftoneWord = AllOnes;
halftoneHeight = 0;
} else {
- halftoneWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + (halftoneBase + ((0 % halftoneHeight) * 4)))))[0]));
+ halftoneWord = long32At(halftoneBase + ((0 % halftoneHeight) * 4));
}
y = dy;
for (i = 1; i <= bbH; i += 1) {
@@ -1844,33 +1860,38 @@
/* Otherwise, its always the same */
- halftoneWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + (halftoneBase + ((y % halftoneHeight) * 4)))))[0]));
+ halftoneWord = long32At(halftoneBase + ((y % halftoneHeight) * 4));
y += vDir;
}
if (preload) {
/* load the 64-bit shifter */
- prevWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx = sourceIndex;
+ prevWord = long32At(idx);
sourceIndex += hInc;
} else {
prevWord = 0;
}
destMask = mask1;
-
- /* pick up next word */
-
- thisWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx12 = sourceIndex;
+ thisWord = long32At(idx12);
sourceIndex += hInc;
/* 32-bit rotate */
skewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));
prevWord = thisWord;
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx13 = destIndex;
+ destWord = long32At(idx13);
mergeWord = mergeFnwith(skewWord & halftoneWord, destWord);
destWord = (destMask & mergeWord) | (destWord & (~destMask));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx14 = destIndex;
+ long32Atput(idx14, destWord);
/* This central horizontal loop requires no store masking */
@@ -1886,9 +1907,13 @@
/* Woeful patch: revert to older code for hDir = -1 */
for (word = 2; word <= (nWords - 1); word += 1) {
- thisWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx1 = sourceIndex;
+ thisWord = long32At(idx1);
sourceIndex += hInc;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = thisWord));
+ /* begin dstLongAt:put: */
+ idx2 = destIndex;
+ long32Atput(idx2, thisWord);
destIndex += hInc;
}
} else {
@@ -1896,9 +1921,13 @@
/* Note loop starts with prevWord loaded (due to preload) */
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = prevWord));
+ /* begin dstLongAt:put: */
+ idx3 = destIndex;
+ long32Atput(idx3, prevWord);
destIndex += hInc;
- prevWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx4 = sourceIndex;
+ prevWord = long32At(idx4);
sourceIndex += hInc;
}
}
@@ -1907,14 +1936,18 @@
/* Special inner loop for STORE mode -- no need to call merge */
for (word = 2; word <= (nWords - 1); word += 1) {
- thisWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx5 = sourceIndex;
+ thisWord = long32At(idx5);
sourceIndex += hInc;
/* 32-bit rotate */
skewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));
prevWord = thisWord;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = (skewWord & halftoneWord)));
+ /* begin dstLongAt:put: */
+ idx6 = destIndex;
+ long32Atput(idx6, skewWord & halftoneWord);
destIndex += hInc;
}
}
@@ -1923,36 +1956,40 @@
/* Normal inner loop does merge: */
-
- /* pick up next word */
-
- thisWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx7 = sourceIndex;
+ thisWord = long32At(idx7);
sourceIndex += hInc;
/* 32-bit rotate */
skewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));
prevWord = thisWord;
- mergeWord = mergeFnwith(skewWord & halftoneWord, ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0])));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = mergeWord));
+ mergeWord = mergeFnwith(skewWord & halftoneWord, dstLongAt(destIndex));
+ /* begin dstLongAt:put: */
+ idx8 = destIndex;
+ long32Atput(idx8, mergeWord);
destIndex += hInc;
}
}
if (nWords > 1) {
destMask = mask2;
-
- /* pick up next word */
-
- thisWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx9 = sourceIndex;
+ thisWord = long32At(idx9);
sourceIndex += hInc;
/* 32-bit rotate */
skewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx10 = destIndex;
+ destWord = long32At(idx10);
mergeWord = mergeFnwith(skewWord & halftoneWord, destWord);
destWord = (destMask & mergeWord) | (destWord & (~destMask));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx11 = destIndex;
+ long32Atput(idx11, destWord);
destIndex += hInc;
}
sourceIndex += sourceDelta;
@@ -1972,6 +2009,13 @@
sqInt word;
sqInt i;
sqInt idx;
+ sqInt idx1;
+ sqInt idx2;
+ sqInt idx3;
+ sqInt idx4;
+ sqInt idx5;
+ sqInt idx6;
+ sqInt idx7;
mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));
mergeFnwith;
@@ -1984,13 +2028,17 @@
} else {
/* begin halftoneAt: */
idx = (dy + i) - 1;
- halftoneWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + (halftoneBase + ((idx % halftoneHeight) * 4)))))[0]));
+ halftoneWord = long32At(halftoneBase + ((idx % halftoneHeight) * 4));
}
destMask = mask1;
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx6 = destIndex;
+ destWord = long32At(idx6);
mergeWord = mergeFnwith(halftoneWord, destWord);
destWord = (destMask & mergeWord) | (destWord & (~destMask));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx7 = destIndex;
+ long32Atput(idx7, destWord);
/* This central horizontal loop requires no store masking */
@@ -2002,7 +2050,9 @@
destWord = halftoneWord;
for (word = 2; word <= (nWords - 1); word += 1) {
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx1 = destIndex;
+ long32Atput(idx1, destWord);
destIndex += 4;
}
} else {
@@ -2013,18 +2063,26 @@
/* Normal inner loop does merge */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx2 = destIndex;
+ destWord = long32At(idx2);
mergeWord = mergeFnwith(halftoneWord, destWord);
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = mergeWord));
+ /* begin dstLongAt:put: */
+ idx3 = destIndex;
+ long32Atput(idx3, mergeWord);
destIndex += 4;
}
}
if (nWords > 1) {
destMask = mask2;
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx4 = destIndex;
+ destWord = long32At(idx4);
mergeWord = mergeFnwith(halftoneWord, destWord);
destWord = (destMask & mergeWord) | (destWord & (~destMask));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx5 = destIndex;
+ long32Atput(idx5, destWord);
destIndex += 4;
}
destIndex += destDelta;
@@ -2066,6 +2124,10 @@
sqInt nPix;
sqInt scrStartBits;
sqInt idx;
+ sqInt idx1;
+ sqInt value;
+ sqInt idx2;
+ sqInt idx3;
sqInt sourcePix;
sqInt srcShift1;
sqInt sourceWord;
@@ -2074,9 +2136,10 @@
sqInt nPix1;
sqInt destWord1;
sqInt pv;
+ sqInt idx4;
sqInt val;
- sqInt idx1;
- sqInt idx2;
+ sqInt idx11;
+ sqInt idx21;
mergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));
mergeFnwith;
@@ -2124,7 +2187,7 @@
} else {
/* begin halftoneAt: */
idx = (dy + i) - 1;
- halftoneWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + (halftoneBase + ((idx % halftoneHeight) * 4)))))[0]));
+ halftoneWord = long32At(halftoneBase + ((idx % halftoneHeight) * 4));
}
srcBitShift = srcShift;
dstBitShift = dstShift;
@@ -2139,7 +2202,9 @@
/* pick up the word */
/* begin pickSourcePixels:flags:srcMask:destMask:srcShiftInc:dstShiftInc: */
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + sourceIndex)))[0]));
+ /* begin srcLongAt: */
+ idx21 = sourceIndex;
+ sourceWord = long32At(idx21);
destWord1 = 0;
srcShift1 = srcBitShift;
dstShift1 = dstBitShift;
@@ -2157,8 +2222,8 @@
srcShift1 -= 32;
}
/* begin srcLongAt: */
- idx1 = (sourceIndex += 4);
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + idx1)))[0]));
+ idx4 = (sourceIndex += 4);
+ sourceWord = long32At(idx4);
}
} while(!(((nPix1 -= 1)) == 0));
} else {
@@ -2191,8 +2256,8 @@
srcShift1 -= 32;
}
/* begin srcLongAt: */
- idx2 = (sourceIndex += 4);
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + idx2)))[0]));
+ idx11 = (sourceIndex += 4);
+ sourceWord = long32At(idx11);
}
} while(!(((nPix1 -= 1)) == 0));
}
@@ -2203,16 +2268,23 @@
/* avoid read-modify-write */
- mergeWord = mergeFnwith(skewWord & halftoneWord, ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0])));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = (destMask & mergeWord)));
+ mergeWord = mergeFnwith(skewWord & halftoneWord, dstLongAt(destIndex));
+ /* begin dstLongAt:put: */
+ idx1 = destIndex;
+ value = destMask & mergeWord;
+ long32Atput(idx1, value);
} else {
/* General version using dest masking */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx2 = destIndex;
+ destWord = long32At(idx2);
mergeWord = mergeFnwith(skewWord & halftoneWord, destWord & destMask);
destWord = (destMask & mergeWord) | (destWord & (~destMask));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx3 = destIndex;
+ long32Atput(idx3, destWord);
}
destIndex += 4;
if (words == 2) {
@@ -2294,7 +2366,11 @@
return destinationWord;
}
+static sqInt dstLongAt(sqInt idx) {
+ return long32At(idx);
+}
+
/* Return the integer value of the given field of the given object. If the field contains a Float, truncate it and return its integral part. Fail if the given field does not contain a small integer or Float, or if the truncated Float is out of the range of small integers. */
static sqInt fetchIntOrFloatofObject(sqInt fieldIndex, sqInt objectPointer) {
@@ -2494,17 +2570,14 @@
sqInt formPointer;
sqInt formPointer1;
sqInt destBitsSize;
- char *ptr;
sqInt sourceBitsSize;
sqInt oop;
sqInt cmOop;
sqInt cmSize;
sqInt oldStyle;
sqInt halftoneBits;
- char *ptr1;
sqInt mapOop;
sqInt mapOop1;
- char *ptr2;
bitBltOop = bbObj;
isWarping = aBool;
@@ -2597,9 +2670,7 @@
ok = 0;
goto l3;
}
- /* begin bits_oopForPointer: */
- ptr = interpreterProxy->firstIndexableField(destBits);
- destBits = ((usqInt) (ptr - (sqMemoryBase)));
+ destBits = oopForPointer(interpreterProxy->firstIndexableField(destBits));
}
ok = 1;
l3: /* end loadBitBltDestForm */;
@@ -2647,9 +2718,7 @@
ok = 0;
goto l4;
}
- /* begin bits_oopForPointer: */
- ptr1 = interpreterProxy->firstIndexableField(sourceBits);
- sourceBits = ((usqInt) (ptr1 - (sqMemoryBase)));
+ sourceBits = oopForPointer(interpreterProxy->firstIndexableField(sourceBits));
}
ok = 1;
l4: /* end loadBitBltSourceForm */;
@@ -2789,9 +2858,7 @@
halftoneBits = halftoneForm;
halftoneHeight = interpreterProxy->slotSizeOf(halftoneBits);
}
- /* begin bits_oopForPointer: */
- ptr2 = interpreterProxy->firstIndexableField(halftoneBits);
- halftoneBase = ((usqInt) (ptr2 - (sqMemoryBase)));
+ halftoneBase = oopForPointer(interpreterProxy->firstIndexableField(halftoneBits));
ok = 1;
l6: /* end loadHalftoneForm */;
if (!(ok)) {
@@ -3322,7 +3389,7 @@
left = destX;
sourcePtr = interpreterProxy->firstIndexableField(sourceString);
for (charIndex = startIndex; charIndex <= stopIndex; charIndex += 1) {
- ascii = ((sqInt) ((((unsigned char *) ((sourcePtr + charIndex) - 1)))[0]));
+ ascii = byteAtPointer((sourcePtr + charIndex) - 1);
glyphIndex = interpreterProxy->fetchIntegerofObject(ascii, glyphMap);
if ((glyphIndex < 0) || (glyphIndex > maxGlyph)) {
return interpreterProxy->primitiveFail();
@@ -3818,14 +3885,14 @@
}
while (((deltaX -= 1)) != 0) {
ditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]));
+ sourceWord = long32At(srcIndex);
srcAlpha = sourceWord & 16777215;
if (!(srcAlpha == 0)) {
/* 0 < srcAlpha */
/* If we have to mix colors then just copy a single word */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ destWord = long32At(dstIndex);
destWord = destWord & (~dstMask);
/* Expand from 16 to 32 bit by adding zero bits */
@@ -3848,10 +3915,10 @@
sourceWord = sourceWord << srcShift;
}
/* begin dstLongAt:put:mask: */
- dstValue = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ dstValue = long32At(dstIndex);
dstValue = dstValue & dstMask;
dstValue = dstValue | sourceWord;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = dstValue));
+ long32Atput(dstIndex, dstValue);
}
srcIndex += 4;
if (destMSB) {
@@ -3921,7 +3988,7 @@
deltaX = bbW + 1;
while (((deltaX -= 1)) != 0) {
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]));
+ sourceWord = long32At(srcIndex);
srcAlpha = sourceWord & 16777215;
if (srcAlpha == 0) {
srcIndex += 4;
@@ -3929,7 +3996,7 @@
/* Now skip as many words as possible, */
dstIndex += 4;
- while ((((deltaX -= 1)) != 0) && ((((sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0])))) & 16777215) == 0)) {
+ while ((((deltaX -= 1)) != 0) && ((((sourceWord = long32At(srcIndex))) & 16777215) == 0)) {
srcIndex += 4;
dstIndex += 4;
}
@@ -3939,9 +4006,9 @@
/* 0 < srcAlpha */
/* If we have to mix colors then just copy a single word */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ destWord = long32At(dstIndex);
destWord = rgbComponentAlpha32with(sourceWord, destWord);
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = destWord));
+ long32Atput(dstIndex, destWord);
srcIndex += 4;
dstIndex += 4;
}
@@ -4127,7 +4194,7 @@
dstMask = mask2;
while (((deltaX -= 1)) != 0) {
- sourceWord = ((((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]))) & (~adjust)) + adjust;
+ sourceWord = ((long32At(srcIndex)) & (~adjust)) + adjust;
/* set srcAlpha to the average of the 3 separate aR,Ag,AB values */
@@ -4143,7 +4210,7 @@
sourceWord = 4294967295U;
}
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ destWord = long32At(dstIndex);
destWord = destWord & (~dstMask);
destWord = ((usqInt) destWord) >> srcShift;
destWord = mappingTable[destWord];
@@ -4171,10 +4238,10 @@
sourceWord = sourceWord << srcShift;
/* begin dstLongAt:put:mask: */
- dstValue = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0]));
+ dstValue = long32At(dstIndex);
dstValue = dstValue & dstMask;
dstValue = dstValue | sourceWord;
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + dstIndex)))[0] = dstValue));
+ long32Atput(dstIndex, dstValue);
}
srcIndex += 4;
if (destMSB) {
@@ -4829,7 +4896,7 @@
sqInt pAy;
sqInt dstShiftInc;
sqInt pBx;
- usqInt sourceMapOop;
+ sqInt sourceMapOop;
sqInt xDelta;
sqInt pAx;
sqInt deltaP12y;
@@ -4838,7 +4905,10 @@
sqInt deltaP12x;
sqInt smoothingCount;
sqInt idx;
- char *ptr;
+ sqInt idx1;
+ sqInt value;
+ sqInt idx2;
+ sqInt idx3;
sqInt i1;
sqInt words1;
sqInt sourcePix;
@@ -4847,12 +4917,16 @@
sqInt dstMask;
sqInt destWord1;
sqInt pv;
- sqInt val;
+ sqInt xx;
+ sqInt yy;
sqInt sourcePix1;
sqInt sourceWord;
sqInt srcIndex;
sqInt x;
sqInt y;
+ sqInt val;
+ sqInt xx1;
+ sqInt yy1;
sqInt sourcePix2;
sqInt sourceWord1;
sqInt srcIndex1;
@@ -4960,9 +5034,7 @@
return interpreterProxy->primitiveFail();
}
- /* begin bits_oopForPointer: */
- ptr = interpreterProxy->firstIndexableField(sourceMapOop);
- sourceMapOop = ((usqInt) (ptr - (sqMemoryBase)));
+ sourceMapOop = oopForPointer(interpreterProxy->firstIndexableField(sourceMapOop));
}
} else {
smoothingCount = 1;
@@ -5077,7 +5149,7 @@
} else {
/* begin halftoneAt: */
idx = (dy + i) - 1;
- halftoneWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + (halftoneBase + ((idx % halftoneHeight) * 4)))))[0]));
+ halftoneWord = long32At(halftoneBase + ((idx % halftoneHeight) * 4));
}
destMask = mask1;
@@ -5100,12 +5172,14 @@
if (mapperFlags == (ColorMapPresent | ColorMapIndexedPart)) {
do {
/* begin pickWarpPixelAtX:y: */
- if ((sx < 0) || ((sy < 0) || ((((x = ((usqInt) sx) >> BinaryPoint)) >= sourceWidth) || (((y = ((usqInt) sy) >> BinaryPoint)) >= sourceHeight)))) {
+ xx = sx;
+ yy = sy;
+ if ((xx < 0) || ((yy < 0) || ((((x = ((usqInt) xx) >> BinaryPoint)) >= sourceWidth) || (((y = ((usqInt) yy) >> BinaryPoint)) >= sourceHeight)))) {
sourcePix = 0;
goto l7;
}
srcIndex = (sourceBits + (y * sourcePitch)) + ((((usqInt) x) >> warpAlignShift) * 4);
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]));
+ sourceWord = long32At(srcIndex);
srcBitShift = warpBitShiftTable[x & warpAlignMask];
sourcePix1 = (((usqInt) sourceWord) >> srcBitShift) & warpSrcMask;
sourcePix = sourcePix1;
@@ -5119,12 +5193,14 @@
} else {
do {
/* begin pickWarpPixelAtX:y: */
- if ((sx < 0) || ((sy < 0) || ((((x1 = ((usqInt) sx) >> BinaryPoint)) >= sourceWidth) || (((y1 = ((usqInt) sy) >> BinaryPoint)) >= sourceHeight)))) {
+ xx1 = sx;
+ yy1 = sy;
+ if ((xx1 < 0) || ((yy1 < 0) || ((((x1 = ((usqInt) xx1) >> BinaryPoint)) >= sourceWidth) || (((y1 = ((usqInt) yy1) >> BinaryPoint)) >= sourceHeight)))) {
sourcePix = 0;
goto l8;
}
srcIndex1 = (sourceBits + (y1 * sourcePitch)) + ((((usqInt) x1) >> warpAlignShift) * 4);
- sourceWord1 = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex1)))[0]));
+ sourceWord1 = long32At(srcIndex1);
srcBitShift = warpBitShiftTable[x1 & warpAlignMask];
sourcePix2 = (((usqInt) sourceWord1) >> srcBitShift) & warpSrcMask;
sourcePix = sourcePix2;
@@ -5165,16 +5241,23 @@
/* avoid read-modify-write */
- mergeWord = mergeFnwith(skewWord & halftoneWord, ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0])));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = (destMask & mergeWord)));
+ mergeWord = mergeFnwith(skewWord & halftoneWord, dstLongAt(destIndex));
+ /* begin dstLongAt:put: */
+ idx1 = destIndex;
+ value = destMask & mergeWord;
+ long32Atput(idx1, value);
} else {
/* General version using dest masking */
- destWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0]));
+ /* begin dstLongAt: */
+ idx2 = destIndex;
+ destWord = long32At(idx2);
mergeWord = mergeFnwith(skewWord & halftoneWord, destWord & destMask);
destWord = (destMask & mergeWord) | (destWord & (~destMask));
- ((sqInt) ((((unsigned int *) ((sqMemoryBase) + destIndex)))[0] = destWord));
+ /* begin dstLongAt:put: */
+ idx3 = destIndex;
+ long32Atput(idx3, destWord);
}
destIndex += 4;
if (words == 2) {
@@ -5279,7 +5362,7 @@
goto l1;
}
srcIndex = (sourceBits + (y1 * sourcePitch)) + ((((usqInt) x1) >> warpAlignShift) * 4);
- sourceWord = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + srcIndex)))[0]));
+ sourceWord = long32At(srcIndex);
srcBitShift = warpBitShiftTable[x1 & warpAlignMask];
sourcePix = (((usqInt) sourceWord) >> srcBitShift) & warpSrcMask;
rgb = sourcePix;
@@ -5293,7 +5376,7 @@
/* Get RGBA values from sourcemap table */
- rgb = ((sqInt) ((((unsigned int *) ((sqMemoryBase) + (sourceMap + (rgb << 2)))))[0]));
+ rgb = long32At(sourceMap + (rgb << 2));
} else {
/* Already in RGB format */
Modified: trunk/src/plugins/CameraPlugin/CameraPlugin.c
===================================================================
--- trunk/src/plugins/CameraPlugin/CameraPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/CameraPlugin/CameraPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:30:14 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:36 pm */
/* Automatically generated by
- VMPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ VMPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- CameraPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ CameraPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "CameraPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "CameraPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -64,9 +64,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "CameraPlugin 10 January 2014 (i)"
+ "CameraPlugin 20 January 2014 (i)"
#else
- "CameraPlugin 10 January 2014 (e)"
+ "CameraPlugin 20 January 2014 (e)"
#endif
;
Modified: trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
===================================================================
--- trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:30:14 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.12.14 translated as C source on 20 January 2014 7:15:36 pm */
/* Automatically generated by
- SmartSyntaxPluginCodeGenerator VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ SmartSyntaxPluginCodeGenerator VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
from
- ClipboardExtendedPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83
+ ClipboardExtendedPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece
*/
-static char __buildInfo[] = "ClipboardExtendedPlugin VMMaker-dtl.337 uuid: 000f5b24-c747-4c6d-ba3e-ac1985565d83 " __DATE__ ;
+static char __buildInfo[] = "ClipboardExtendedPlugin VMMaker-dtl.338 uuid: 29946156-9015-45c9-83a2-c12d43f67ece " __DATE__ ;
@@ -61,9 +61,9 @@
struct VirtualMachine* interpreterProxy;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "ClipboardExtendedPlugin 10 January 2014 (i)"
+ "ClipboardExtendedPlugin 20 January 2014 (i)"
#else
- "ClipboardExtendedPlugin 10 January 2014 (e)"
+ "ClipboardExtendedPlugin 20 January 2014 (e)"
#endif
;
@@ -215,8 +215,8 @@
{"ClipboardExtendedPlugin", "setInterpreter", (void*)setInterpreter},
{"ClipboardExtendedPlugin", "ioGetClipboardFormat", (void*)ioGetClipboardFormat},
{"ClipboardExtendedPlugin", "ioCreateClipboard", (void*)ioCreateClipboard},
+ {"ClipboardExtendedPlugin", "ioReadClipboardData", (void*)ioReadClipboardData},
{"ClipboardExtendedPlugin", "ioAddClipboardData", (void*)ioAddClipboardData},
- {"ClipboardExtendedPlugin", "ioReadClipboardData", (void*)ioReadClipboardData},
{NULL, NULL, NULL}
};
Modified: trunk/src/plugins/CroquetPlugin/CroquetPlugin.c
===================================================================
--- trunk/src/plugins/CroquetPlugin/CroquetPlugin.c 2014-01-16 18:49:26 UTC (rev 2847)
+++ trunk/src/plugins/CroquetPlugin/CroquetPlugin.c 2014-01-21 00:25:06 UTC (rev 2848)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.4 with VMMaker 4.12.13 translated as C source on 10 January 2014 5:29:57 pm */
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list