Revision: 3541
Author: eliot
Date: 2015-12-16 14:44:04 -0800 (Wed, 16 Dec 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1601
x64 Cogit:
Rewrite some optional run-time routine generators to avoid generating empty functions.
Add missing exports from SpurMemoryManager to cogits. On 64-bits defaulting to int
foo(int bar) is not merely illegal in C99 but often disastrous.
Refactor compileOpenPIC:numArgs: to pull three probe generation sequences out into a
single method. Use a base register to point to the method cache if MoveMw:r:R:
offsets aren't large enough to access the method cache (as may be the case on 64-bit
systems). Add CogAbstractInstruction>>isWithinMwOffsetRange: to answer if offsets
are within the MoveMw:r:R: range.
Use the same base reg approach to dereference the class table in
genGetClassObjectOfClassIndex:into:scratchReg:.
Slang:
Fix determining types for implicitly typed pointer variables.
Fix indenting of some arithmetic expressions.
Do a better job managing comment production in statement lists by adding variables
to CCodeGenerator that track the last comment node and whether that comment was a
comment from an inlining decision.
Modified Paths:
--------------
branches/Cog/nsspursrc/plugins/B2DPlugin/B2DPlugin.c
branches/Cog/nsspursrc/plugins/BitBltPlugin/BitBltPlugin.c
branches/Cog/nsspursrc/plugins/FilePlugin/FilePlugin.c
branches/Cog/nsspursrc/plugins/IA32ABI/IA32ABI.c
branches/Cog/nsspursrc/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
branches/Cog/nsspursrc/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c
branches/Cog/nsspursrc/plugins/LargeIntegers/LargeIntegers.c
branches/Cog/nsspursrc/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
branches/Cog/nsspursrc/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
branches/Cog/nsspursrc/plugins/RePlugin/RePlugin.c
branches/Cog/nsspursrc/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
branches/Cog/nsspursrc/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c
branches/Cog/nsspursrc/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
branches/Cog/nsspursrc/plugins/ZipPlugin/ZipPlugin.c
branches/Cog/nsspursrc/vm/cogit.h
branches/Cog/nsspursrc/vm/cogitARMv5.c
branches/Cog/nsspursrc/vm/cogitIA32.c
branches/Cog/nsspursrc/vm/cointerp.c
branches/Cog/nsspursrc/vm/cointerp.h
branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
branches/Cog/nsspurstack64src/vm/interp.c
branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
branches/Cog/nsspurstacksrc/vm/interp.c
branches/Cog/spur64src/vm/cogit.h
branches/Cog/spur64src/vm/cogitX64.c
branches/Cog/spur64src/vm/cointerp.c
branches/Cog/spur64src/vm/cointerp.h
branches/Cog/spur64src/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cogit.h
branches/Cog/spursistasrc/vm/cogitARMv5.c
branches/Cog/spursistasrc/vm/cogitIA32.c
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cogit.h
branches/Cog/spursrc/vm/cogitARMv5.c
branches/Cog/spursrc/vm/cogitIA32.c
branches/Cog/spursrc/vm/cointerp.c
branches/Cog/spursrc/vm/cointerp.h
branches/Cog/spursrc/vm/gcc3x-cointerp.c
branches/Cog/spurstack64src/vm/gcc3x-interp.c
branches/Cog/spurstack64src/vm/interp.c
branches/Cog/spurstacksrc/vm/gcc3x-interp.c
branches/Cog/spurstacksrc/vm/interp.c
branches/Cog/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
branches/Cog/src/plugins/B2DPlugin/B2DPlugin.c
branches/Cog/src/plugins/BitBltPlugin/BitBltPlugin.c
branches/Cog/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
branches/Cog/src/plugins/BochsX64Plugin/BochsX64Plugin.c
branches/Cog/src/plugins/CroquetPlugin/CroquetPlugin.c
branches/Cog/src/plugins/FFTPlugin/FFTPlugin.c
branches/Cog/src/plugins/FilePlugin/FilePlugin.c
branches/Cog/src/plugins/GdbARMPlugin/GdbARMPlugin.c
branches/Cog/src/plugins/IA32ABI/IA32ABI.c
branches/Cog/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
branches/Cog/src/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c
branches/Cog/src/plugins/Klatt/Klatt.c
branches/Cog/src/plugins/LargeIntegers/LargeIntegers.c
branches/Cog/src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
branches/Cog/src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
branches/Cog/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
branches/Cog/src/plugins/RePlugin/RePlugin.c
branches/Cog/src/plugins/ScratchPlugin/ScratchPlugin.c
branches/Cog/src/plugins/Squeak3D/Squeak3D.c
branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
branches/Cog/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
branches/Cog/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c
branches/Cog/src/plugins/Win32OSProcessPlugin/Win32OSProcessPlugin.c
branches/Cog/src/plugins/ZipPlugin/ZipPlugin.c
branches/Cog/src/vm/cogit.h
branches/Cog/src/vm/cogitARMv5.c
branches/Cog/src/vm/cogitIA32.c
branches/Cog/src/vm/cointerp.c
branches/Cog/src/vm/cointerp.h
branches/Cog/src/vm/cointerpmt.c
branches/Cog/src/vm/cointerpmt.h
branches/Cog/src/vm/gcc3x-cointerp.c
branches/Cog/src/vm/gcc3x-cointerpmt.c
branches/Cog/stacksrc/vm/gcc3x-interp.c
branches/Cog/stacksrc/vm/interp.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspursrc/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- branches/Cog/nsspursrc/plugins/B2DPlugin/B2DPlugin.c 2015-12-16 02:34:11 UTC (rev 3540)
+++ branches/Cog/nsspursrc/plugins/B2DPlugin/B2DPlugin.c 2015-12-16 22:44:04 UTC (rev 3541)
@@ -1,9 +1,9 @@
/* Automatically generated by
- VMPluginCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+ VMPluginCodeGenerator VMMaker.oscog-eem.1601 uuid: faa527e8-769c-4c9d-b4c9-8ce48b8edbd5
from
- BalloonEnginePlugin VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+ BalloonEnginePlugin VMMaker.oscog-eem.1601 uuid: faa527e8-769c-4c9d-b4c9-8ce48b8edbd5
*/
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker.oscog-eem.1601 uuid: faa527e8-769c-4c9d-b4c9-8ce48b8edbd5 " __DATE__ ;
@@ -836,9 +836,9 @@
static void * loadBBFn;
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
- "B2DPlugin VMMaker.oscog-eem.1325 (i)"
+ "B2DPlugin VMMaker.oscog-eem.1601 (i)"
#else
- "B2DPlugin VMMaker.oscog-eem.1325 (e)"
+ "B2DPlugin VMMaker.oscog-eem.1601 (e)"
#endif
;
static int* objBuffer;
@@ -1084,7 +1084,6 @@
(wideBezierUpdateDataOf(bezier))[GBUpdateX] = (lastX - ((lineWidth - lineOffset) * 256));
/* Set lineWidth pixels down */
-
lastY = (wideBezierUpdateDataOf(bezier))[GBUpdateY];
(wideBezierUpdateDataOf(bezier))[GBUpdateY] = (lastY + (lineWidth * 256));
objBuffer[bezier + GBFinalX] = ((endX - lineOffset) + lineWidth);
@@ -1110,7 +1109,6 @@
/* Don't inline this */
/* Fetch the values the adjustment decisions are based on */
-
yEntry = objBuffer[line + GLWideEntry];
yExit = objBuffer[line + GLWideExit];
baseWidth = objBuffer[line + GLWideExtent];
@@ -1119,13 +1117,11 @@
xDir = objBuffer[line + GLXDirection];
/* Adjust the start of the line to fill an entire rectangle */
-
deltaX = nextX - lastX;
if (yEntry < baseWidth) {
if (xDir < 0) {
/* effectively adding */
-
lineWidth -= deltaX;
}
else {
@@ -1140,7 +1136,6 @@
else {
/* effectively subtracting */
-
lineWidth += objBuffer[line + GLXIncrement];
objBuffer[line + GEXValue] = lastX;
}
@@ -1149,7 +1144,6 @@
if (xDir < 0) {
/* effectively subtracting */
-
lineWidth += deltaX;
objBuffer[line + GEXValue] = lastX;
}
@@ -1228,11 +1222,9 @@
{
/* begin wbStackPush: */
if (!(needAvailableSpace(6))) {
- 0;
goto l1;
}
workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
- 1;
l1: /* end wbStackPush: */;
return (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
}
@@ -1284,14 +1276,12 @@
/* First allocate nSlots in the AET */
-
if (!(needAvailableSpace(nSlots))) {
return 0;
}
if (!((workBuffer[GWAETUsed]) == 0)) {
/* Then move the AET upwards */
-
srcIndex = workBuffer[GWAETUsed];
dstIndex = (workBuffer[GWAETUsed]) + nSlots;
for (i = 1; i <= (workBuffer[GWAETUsed]); i += 1) {
@@ -1371,14 +1361,12 @@
/* First allocate nSlots in the GET */
-
if (!(allocateGETEntry(nSlots))) {
return 0;
}
if (!((workBuffer[GWGETUsed]) == 0)) {
/* Then move the GET upwards */
-
srcIndex = workBuffer[GWGETUsed];
dstIndex = (workBuffer[GWGETUsed]) + nSlots;
for (i = 1; i <= (workBuffer[GWGETUsed]); i += 1) {
@@ -1674,18 +1662,15 @@
rShift = (rShiftTable())[bmDepth];
/* cMask - mask out the pixel from the word */
-
value = (((int*) bits))[(bmRaster * yp) + (((usqInt) xp) >> rShift)];
/* rShift - shift value to move the pixel in the word to the lowest bit position */
-
cMask = (1 << bmDepth) - 1;
rShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);
value = (((usqInt) value) >> rShift) & cMask;
if (bmDepth == 16) {
/* Must convert by expanding bits */
-
if (!(value == 0)) {
b = (value & 0x1F) << 3;
b += ((usqInt) b) >> 5;
@@ -1700,7 +1685,6 @@
else {
/* Must convert by using color map */
-
if ((objBuffer[bmFill + GBColormapSize]) == 0) {
value = 0;
}
@@ -1854,7 +1838,6 @@
/* First check if the oops have the right format */
-
if (!(isWords(indexList))) {
return 0;
}
@@ -1863,7 +1846,6 @@
for (i = 0; i < length; i += 1) {
/* Make sure the fill is okay */
-
fillIndex = fillPtr[i];
if (!(isFillOkay(fillIndex))) {
return 0;
@@ -1912,7 +1894,6 @@
Also, we currently handle only quadratic segments (e.g., 3 points each) and thus either
pSize = nSegments * 3, for ShortPointArrays or,
pSize = nSegments * 6, for PointArrays */
-
pSize = slotSizeOf(points);
if (!((pSize == (nSegments * 3))
|| (pSize == (nSegments * 6)))) {
@@ -2243,13 +2224,10 @@
sqInt viaY;
/* begin allocateBezierStackEntry */
- /* begin wbStackPush: */
if (!(needAvailableSpace(6))) {
- 0;
goto l1;
}
workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
- 1;
l1: /* end wbStackPush: */;
newIndex = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
if (engineStopped) {
@@ -2262,19 +2240,16 @@
endX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];
/* Compute intermediate points */
-
endY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];
leftViaX += (viaX - startX) / 2;
leftViaY += (viaY - startY) / 2;
sharedX = (rightViaX += (endX - viaX) / 2);
/* Compute new shared point */
-
sharedY = (rightViaY += (endY - viaY) / 2);
sharedX += (leftViaX - rightViaX) / 2;
/* Store the first part back */
-
sharedY += (leftViaY - rightViaY) / 2;
workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)] = leftViaX;
workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)] = leftViaY;
@@ -2320,19 +2295,16 @@
endX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];
/* Compute intermediate points */
-
endY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];
sharedX = (leftViaX += ((sqInt)((((double) (viaX - startX) )) * param)));
sharedY = (leftViaY += ((sqInt)((((double) (viaY - startY) )) * param)));
rightViaX += ((sqInt)((((double) (endX - viaX) )) * param));
/* Compute new shared point */
-
rightViaY += ((sqInt)((((double) (endY - viaY) )) * param));
sharedX += ((sqInt)((((double) (rightViaX - leftViaX) )) * param));
/* Check the new via points */
-
sharedY += ((sqInt)((((double) (rightViaY - leftViaY) )) * param));
/* begin assureValue:between:and: */
if (startY > sharedY) {
@@ -2381,13 +2353,10 @@
rightViaY = rightViaY;
l2: /* end assureValue:between:and: */;
/* begin allocateBezierStackEntry */
- /* begin wbStackPush: */
if (!(needAvailableSpace(6))) {
- 0;
goto l3;
}
workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
- 1;
l3: /* end wbStackPush: */;
newIndex = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
if (engineStopped) {
@@ -2453,7 +2422,6 @@
if (copyBitsFn == 0) {
/* We need copyBits here so try to load it implicitly */
-
if (!(initialiseModule())) {
return 0;
}
@@ -2478,11 +2446,9 @@
while (object < end) {
/* Note: addEdgeToGET: may fail on insufficient space but that's not a problem here */
-
if (isEdge(object)) {
/* Check if the edge starts below fillMaxY. */
-
if (!((objBuffer[object + GEYValue]) >= (workBuffer[GWFillMaxY]))) {
/* begin checkedAddEdgeToGET: */
if ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveLine) {
@@ -2494,16 +2460,13 @@
lineWidth1 = 0;
}
if (((objBuffer[object + GLEndY]) + lineWidth1) < (workBuffer[GWFillMinY])) {
- 0;
goto l1;
}
if ((((objBuffer[object + GEXValue]) - lineWidth1) >= (workBuffer[GWFillMaxX]))
&& (((objBuffer[object + GLEndX]) - lineWidth1) >= (workBuffer[GWFillMaxX]))) {
- 0;
goto l1;
}
addEdgeToGET(object);
- null;
goto l1;
}
if ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveBezier) {
@@ -2515,16 +2478,13 @@
lineWidth = 0;
}
if (((objBuffer[object + GBEndY]) + lineWidth) < (workBuffer[GWFillMinY])) {
- 0;
goto l1;
}
if ((((objBuffer[object + GEXValue]) - lineWidth) >= (workBuffer[GWFillMaxX]))
&& (((objBuffer[object + GBEndX]) - lineWidth) >= (workBuffer[GWFillMaxX]))) {
- 0;
goto l1;
}
addEdgeToGET(object);
- null;
goto l1;
}
addEdgeToGET(object);
@@ -2604,7 +2564,6 @@
/* self aaLevelGet > 1 ifTrue:[self adjustAALevel]. */
-
targetX0 = ((usqInt) (workBuffer[GWSpanStart])) >> (workBuffer[GWAAShift]);
if (targetX0 < (workBuffer[GWClipMinX])) {
targetX0 = workBuffer[GWClipMinX];
@@ -2638,7 +2597,6 @@
/* Not for the moment */
-
type = ((usqInt) ((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask)) >> 1;
dispatchedValue = edge;
switch (type) {
@@ -2798,8 +2756,7 @@
static sqInt
errorWrongIndex(void)
{
- ;
-}
+ }
/* Estimate the length of the vector described by deltaX and deltaY.
@@ -2870,7 +2827,6 @@
l5: /* end topRightX */;
while (stopX < rightX) {
/* begin makeUnsignedFrom: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
someIntegerValue = 0;
goto l2;
@@ -2888,13 +2844,11 @@
}
/* begin quickRemoveInvalidFillsAt: */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l1;
}
while ((topRightX()) <= stopX) {
hideFilldepth(topFill(), topDepth());
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l1;
}
}
@@ -2912,7 +2866,6 @@
l3: /* end topRightX */;
}
/* begin makeUnsignedFrom: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
someIntegerValue1 = 0;
goto l6;
@@ -3105,18 +3058,15 @@
rShift = (rShiftTable())[bmDepth];
/* cMask - mask out the pixel from the word */
-
value = (((int*) bits))[(bmRaster * yp) + (((usqInt) xp) >> rShift)];
/* rShift - shift value to move the pixel in the word to the lowest bit position */
-
cMask1 = (1 << bmDepth) - 1;
rShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);
value = (((usqInt) value) >> rShift) & cMask1;
if (bmDepth == 16) {
/* Must convert by expanding bits */
-
if (!(value == 0)) {
b = (value & 0x1F) << 3;
b += ((usqInt) b) >> 5;
@@ -3131,7 +3081,6 @@
else {
/* Must convert by using color map */
-
if ((objBuffer[bmFill + GBColormapSize]) == 0) {
value = 0;
}
@@ -3229,18 +3178,15 @@
rShift1 = (rShiftTable())[bmDepth1];
/* cMask - mask out the pixel from the word */
-
value1 = (((int*) bits))[(bmRaster1 * yp) + (((usqInt) xp) >> rShift1)];
/* rShift - shift value to move the pixel in the word to the lowest bit position */
-
cMask2 = (1 << bmDepth1) - 1;
rShift1 = (32 - bmDepth1) - ((xp & ((1 << rShift1) - 1)) * bmDepth1);
value1 = (((usqInt) value1) >> rShift1) & cMask2;
if (bmDepth1 == 16) {
/* Must convert by expanding bits */
-
if (!(value1 == 0)) {
b1 = (value1 & 0x1F) << 3;
b1 += ((usqInt) b1) >> 5;
@@ -3255,7 +3201,6 @@
else {
/* Must convert by using color map */
-
if ((objBuffer[bmFill + GBColormapSize]) == 0) {
value1 = 0;
}
@@ -3353,18 +3298,15 @@
rShift2 = (rShiftTable())[bmDepth2];
/* cMask - mask out the pixel from the word */
-
value2 = (((int*) bits))[(bmRaster2 * yp) + (((usqInt) xp) >> rShift2)];
/* rShift - shift value to move the pixel in the word to the lowest bit position */
-
cMask3 = (1 << bmDepth2) - 1;
rShift2 = (32 - bmDepth2) - ((xp & ((1 << rShift2) - 1)) * bmDepth2);
value2 = (((usqInt) value2) >> rShift2) & cMask3;
if (bmDepth2 == 16) {
/* Must convert by expanding bits */
-
if (!(value2 == 0)) {
b2 = (value2 & 0x1F) << 3;
b2 += ((usqInt) b2) >> 5;
@@ -3379,7 +3321,6 @@
else {
/* Must convert by using color map */
-
if ((objBuffer[bmFill + GBColormapSize]) == 0) {
value2 = 0;
}
@@ -3426,12 +3367,10 @@
x1 = rightX;
/* Hack for pre-increment */
-
bitX = -1;
if ((workBuffer[GWAALevel]) == 1) {
/* Speedy version for no anti-aliasing */
-
while (x0 < x1) {
fillValue = (((int *) bits))[(bitX += 1)];
spanBuffer[x0] = fillValue;
@@ -3441,7 +3380,6 @@
else {
/* Generic version with anti-aliasing */
-
colorMask = workBuffer[GWAAColorMask];
colorShift = workBuffer[GWAAColorShift];
baseShift = workBuffer[GWAAShift];
@@ -3587,18 +3525,15 @@
rShift = (rShiftTable())[bmDepth];
/* cMask - mask out the pixel from the word */
-
value = (((int*) bits))[(bmRaster * yp) + (((usqInt) xp) >> rShift)];
/* rShift - shift value to move the pixel in the word to the lowest bit position */
-
cMask = (1 << bmDepth) - 1;
rShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);
value = (((usqInt) value) >> rShift) & cMask;
if (bmDepth == 16) {
/* Must convert by expanding bits */
-
if (!(value == 0)) {
b = (value & 0x1F) << 3;
b += ((usqInt) b) >> 5;
@@ -3613,7 +3548,6 @@
else {
/* Must convert by using color map */
-
if ((objBuffer[bmFill + GBColormapSize]) == 0) {
value = 0;
}
@@ -3657,7 +3591,6 @@
/* Not now -- maybe later */
/* Compute the pixel boundaries. */
-
/* begin aaFirstPixelFrom:to: */
firstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & ((unsigned int)~((workBuffer[GWAALevel]) - 1));
if (firstPixel1 > rightX) {
@@ -3674,7 +3607,6 @@
baseShift = workBuffer[GWAAShift];
/* Part a: Deal with the first n sub-pixels */
-
x = leftX;
if (x < firstPixel) {
pv32 = ((usqInt) (pixelValue32 & (workBuffer[GWAAColorMask]))) >> (workBuffer[GWAAColorShift]);
@@ -3717,14 +3649,12 @@
/* Use a unrolled version for anti-aliased fills... */
-
if (!((workBuffer[GWAALevel]) == 1)) {
return fillColorSpanAAx0x1(pixelValue32, leftX, rightX);
}
x0 = leftX;
/* Unroll the inner loop four times, since we're only storing data. */
-
x1 = rightX;
while ((x0 + 4) < x1) {
spanBuffer[x0] = pixelValue32;
@@ -3814,7 +3744,6 @@
l1: /* end aaFirstPixelFrom:to: */;
/* Deal with the first n sub-pixels */
-
lastPixel = (rightX - 1) & ((unsigned int)~((workBuffer[GWAALevel]) - 1));
colorMask = workBuffer[GWAAColorMask];
colorShift = workBuffer[GWAAColorShift];
@@ -3824,7 +3753,6 @@
rampValue = (((int *) ramp))[rampIndex];
/* Copy as many pixels as possible */
-
rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
while ((x < firstPixel)
&& ((ds / 65536) == rampIndex)) {
@@ -3843,7 +3771,6 @@
rampValue = (((int *) ramp))[rampIndex];
/* Copy as many pixels as possible */
-
rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
while ((x < lastPixel)
&& ((ds / 65536) == rampIndex)) {
@@ -3862,7 +3789,6 @@
rampValue = (((int *) ramp))[rampIndex];
/* Copy as many pixels as possible */
-
rampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;
while ((x < rightX)
&& ((ds / 65536) == rampIndex)) {
@@ -3905,7 +3831,6 @@
/* Note: The inner loop has been divided into three parts for speed */
/* Part one: Fill everything outside the left boundary */
-
x1 = rightX;
while (((((rampIndex = ds / 65536)) < 0)
|| (rampIndex >= rampSize))
@@ -3928,7 +3853,6 @@
x01 = x0;
/* Unroll the inner loop four times, since we're only storing data. */
-
x11 = x;
while ((x01 + 4) < x11) {
spanBuffer[x01] = (ramp[rampIndex]);
@@ -3946,7 +3870,6 @@
if ((workBuffer[GWAALevel]) == 1) {
/* Fast version w/o anti-aliasing */
-
while (((((rampIndex = ds / 65536)) < rampSize)
&& (rampIndex >= 0))
&& (x < x1)) {
@@ -3973,7 +3896,6 @@
x02 = x;
/* Unroll the inner loop four times, since we're only storing data. */
-
x12 = x1;
while ((x02 + 4) < x12) {
spanBuffer[x02] = (ramp[rampIndex]);
@@ -4178,7 +4100,6 @@
l1: /* end aaFirstPixelFrom:to: */;
/* Deal with the first n sub-pixels */
-
lastPixel = (x1 - 1) & ((unsigned int)~((workBuffer[GWAALevel]) - 1));
if (x < firstPixel) {
colorMask = workBuffer[GWAAColorMask];
@@ -4188,7 +4109,6 @@
while (x < firstPixel) {
/* Try to copy the current value more than just once */
-
while ((x < firstPixel)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) >= length2)) {
index = ((usqInt) x) >> baseShift;
@@ -4214,7 +4134,6 @@
while (x < lastPixel) {
/* Try to copy the current value more than just once */
-
while ((x < lastPixel)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) >= length2)) {
index = ((usqInt) x) >> baseShift;
@@ -4240,7 +4159,6 @@
while (x < x1) {
/* Try to copy the current value more than just once */
-
while ((x < x1)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) >= length2)) {
index = ((usqInt) x) >> baseShift;
@@ -4292,7 +4210,6 @@
while (x < x1) {
/* Try to copy the current value more than just once */
-
while ((x < x1)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) >= length2)) {
spanBuffer[x] = rampValue;
@@ -4374,11 +4291,9 @@
/* Note: The inner loop has been divided into three parts for speed */
/* Part one: Fill everything outside the left boundary */
-
x1 = rightX;
/* This is the upper bound */
-
length2 = (rampSize - 1) * (rampSize - 1);
while (((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) >= length2)
&& (x < x1)) {
@@ -4395,7 +4310,6 @@
x0 = leftX;
/* Unroll the inner loop four times, since we're only storing data. */
-
x11 = x;
while ((x0 + 4) < x11) {
spanBuffer[x0] = (ramp[rampSize - 1]);
@@ -4417,7 +4331,6 @@
if (x < (objBuffer[fill + GFOriginX])) {
/* Draw the decreasing part */
-
if ((workBuffer[GWAALevel]) == 1) {
/* begin fillRadialDecreasing:ramp:deltaST:dsX:dtX:from:to: */
ds1 = (((int*) deltaST))[0];
@@ -4433,7 +4346,6 @@
while (x2 < x12) {
/* Try to copy the current value more than just once */
-
while ((x2 < x12)
&& ((((ds1 / 65536) * (ds1 / 65536)) + ((dt1 / 65536) * (dt1 / 65536))) >= length21)) {
spanBuffer[x2] = rampValue;
@@ -4459,7 +4371,6 @@
if (x < x1) {
/* Draw the increasing part */
-
if ((workBuffer[GWAALevel]) == 1) {
/* begin fillRadialIncreasing:ramp:deltaST:dsX:dtX:from:to: */
ds2 = (((int*) deltaST))[0];
@@ -4469,7 +4380,6 @@
rampSize1 = objBuffer[fill + GFRampLength];
/* This is the upper bound */
-
length22 = (rampSize1 - 1) * (rampSize1 - 1);
nextLength1 = (rampIndex1 + 1) * (rampIndex1 + 1);
lastLength = ((ds2 / 65536) * (ds2 / 65536)) + ((dt2 / 65536) * (dt2 / 65536));
@@ -4479,7 +4389,6 @@
&& (lastLength < length22)) {
/* Try to copy the current value more than once */
-
while ((x3 < x14)
&& ((((ds2 / 65536) * (ds2 / 65536)) + ((dt2 / 65536) * (dt2 / 65536))) <= nextLength1)) {
spanBuffer[x3] = rampValue1;
@@ -4511,7 +4420,6 @@
x01 = x;
/* Unroll the inner loop four times, since we're only storing data. */
-
x13 = rightX;
while ((x01 + 4) < x13) {
spanBuffer[x01] = (ramp[rampSize - 1]);
@@ -4561,7 +4469,6 @@
rampSize = objBuffer[fill + GFRampLength];
/* This is the upper bound */
-
length2 = (rampSize - 1) * (rampSize - 1);
nextLength = (rampIndex + 1) * (rampIndex + 1);
lastLength = ((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536));
@@ -4579,7 +4486,6 @@
l1: /* end aaFirstPixelFrom:to: */;
/* Deal with the first n subPixels */
-
lastPixel = (rightX - 1) & ((unsigned int)~((workBuffer[GWAALevel]) - 1));
if ((x < firstPixel)
&& (lastLength < length2)) {
@@ -4591,7 +4497,6 @@
&& (lastLength < length2)) {
/* Try to copy the current value more than once */
-
while ((x < firstPixel)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) <= nextLength)) {
index = ((usqInt) x) >> baseShift;
@@ -4619,7 +4524,6 @@
&& (lastLength < length2)) {
/* Try to copy the current value more than once */
-
while ((x < lastPixel)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) <= nextLength)) {
index = ((usqInt) x) >> baseShift;
@@ -4647,7 +4551,6 @@
&& (lastLength < length2)) {
/* Try to copy the current value more than once */
-
while ((x < rightX)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) <= nextLength)) {
index = ((usqInt) x) >> baseShift;
@@ -4695,7 +4598,6 @@
rampSize = objBuffer[fill + GFRampLength];
/* This is the upper bound */
-
length2 = (rampSize - 1) * (rampSize - 1);
nextLength = (rampIndex + 1) * (rampIndex + 1);
lastLength = ((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536));
@@ -4705,7 +4607,6 @@
&& (lastLength < length2)) {
/* Try to copy the current value more than once */
-
while ((x < x1)
&& ((((ds / 65536) * (ds / 65536)) + ((dt / 65536) * (dt / 65536))) <= nextLength)) {
spanBuffer[x] = rampValue;
@@ -4736,7 +4637,6 @@
/* First check the depth value */
-
diff = (workBuffer[(workBuffer[GWBufferTop]) + (fillEntry1 + 1)]) - (workBuffer[(workBuffer[GWBufferTop]) + (fillEntry2 + 1)]);
if (!(diff == 0)) {
return diff > 0;
@@ -4801,7 +4701,6 @@
x01 = x0;
/* Unroll the inner loop four times, since we're only storing data. */
-
x11 = x1;
while ((x01 + 4) < x11) {
spanBuffer[x01] = fill;
@@ -4819,7 +4718,6 @@
else {
/* Store the values for the dispatch */
-
workBuffer[GWLastExportedFill] = fill;
workBuffer[GWLastExportedLeftX] = x0;
workBuffer[GWLastExportedRightX] = x1;
@@ -4889,7 +4787,6 @@
/* As long as we have entries in the GET */
-
yValue = workBuffer[GWCurrentY];
while ((workBuffer[GWGETStart]) < (workBuffer[GWGETUsed])) {
edge = getBuffer[workBuffer[GWGETStart]];
@@ -4966,7 +4863,6 @@
is greater than leftX from next edge.
Currently, we rely here on spanEndAA
from the span buffer fill. */
-
leftEdge = (rightEdge = aetBuffer[workBuffer[GWAETStart]]);
leftX = (rightX = objBuffer[leftEdge + GEXValue]);
if (leftX >= (workBuffer[GWFillMaxX])) {
@@ -4974,13 +4870,11 @@
}
/* begin quickRemoveInvalidFillsAt: */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l3;
}
while ((topRightX()) <= leftX) {
hideFilldepth(topFill(), topDepth());
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l3;
}
}
@@ -5001,9 +4895,7 @@
if (rightX >= (workBuffer[GWFillMinX])) {
/* This is the visible portion */
-
/* begin fillAllFrom:to: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
fill = 0;
goto l8;
@@ -5026,7 +4918,6 @@
l9: /* end topRightX */;
while (stopX < rightX) {
/* begin makeUnsignedFrom: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
someIntegerValue = 0;
goto l6;
@@ -5039,19 +4930,16 @@
fill = someIntegerValue;
if (!(fill == 0)) {
if (fillSpanfromto(fill, startX, stopX)) {
- 1;
goto l2;
}
}
/* begin quickRemoveInvalidFillsAt: */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l1;
}
while ((topRightX()) <= stopX) {
hideFilldepth(topFill(), topDepth());
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l1;
}
}
@@ -5069,7 +4957,6 @@
l7: /* end topRightX */;
}
/* begin makeUnsignedFrom: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
someIntegerValue1 = 0;
goto l10;
@@ -5084,14 +4971,12 @@
fillSpanfromto(fill, startX, rightX);
goto l2;
}
- 0;
l2: /* end fillAllFrom:to: */;
}
}
}
if (rightX < (workBuffer[GWFillMaxX])) {
/* begin fillAllFrom:to: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
fill1 = 0;
goto l13;
@@ -5114,7 +4999,6 @@
l14: /* end topRightX */;
while (stopX1 < (workBuffer[GWFillMaxX])) {
/* begin makeUnsignedFrom: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
someIntegerValue2 = 0;
goto l11;
@@ -5127,19 +5011,16 @@
fill1 = someIntegerValue2;
if (!(fill1 == 0)) {
if (fillSpanfromto(fill1, startX1, stopX1)) {
- 1;
goto l5;
}
}
/* begin quickRemoveInvalidFillsAt: */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l4;
}
while ((topRightX()) <= stopX1) {
hideFilldepth(topFill(), topDepth());
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
- null;
goto l4;
}
}
@@ -5157,7 +5038,6 @@
l12: /* end topRightX */;
}
/* begin makeUnsignedFrom: */
- /* begin topFill */
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {
someIntegerValue11 = 0;
goto l15;
@@ -5172,7 +5052,6 @@
fillSpanfromto(fill1, startX1, workBuffer[GWFillMaxX]);
goto l5;
}
- 0;
l5: /* end fillAllFrom:to: */;
}
return 0;
@@ -5199,13 +5078,11 @@
if (count == 0) {
/* Edge at end -- remove it */
-
removeFirstAETEntry();
}
else {
/* Store remaining lines back */
-
objBuffer[edge + GENumLines] = count;
type = (objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask;
if ((type & GEPrimitiveWideMask) == GEPrimitiveEdge) {
@@ -5433,7 +5310,6 @@
}
if (index == 0) {
/* begin freeStackFillEntry */
- /* begin wbStackPop: */
workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) + 3);
return 1;
}
@@ -5441,7 +5317,6 @@
workBuffer[(workBuffer[GWBufferTop]) + (index + 1)] = (workBuffer[(workBuffer[GWBufferTop]) + (0 + 1)]);
workBuffer[(workBuffer[GWBufferTop]) + (index + 2)] = (workBuffer[(workBuffer[GWBufferTop]) + (0 + 2)]);
/* begin freeStackFillEntry */
- /* begin wbStackPop: */
workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) + 3);
if (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) <= 3) {
return 1;
@@ -5580,7 +5455,6 @@
getBuffer = objBuffer + objUsed;
/* Create the global edge table */
-
aetBuffer = objBuffer + objUsed;
createGlobalEdgeTable();
if (engineStopped) {
@@ -5589,7 +5463,6 @@
if ((workBuffer[GWGETUsed]) == 0) {
/* Nothing to do */
-
workBuffer[GWCurrentY] = (workBuffer[GWFillMaxY]);
return 0;
}
@@ -5620,13 +5493,11 @@
/* Check for the number of lines remaining */
-
if ((objBuffer[edge + GENumLines]) <= 0) {
return null;
}
/* And insert edge */
-
index = indexForInsertingIntoAET(edge);
insertToAETbeforeIndex(edge, index);
}
@@ -5642,7 +5513,6 @@
/* Make sure we have space in the AET */
-
if (!(needAvailableSpace(1))) {
return null;
}
@@ -5946,13 +5816,10 @@
sqInt index2;
/* begin allocateBezierStackEntry */
- /* begin wbStackPush: */
if (!(needAvailableSpace(6))) {
- 0;
goto l1;
}
workBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);
- 1;
l1: /* end wbStackPush: */;
bz1 = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);
if (engineStopped) {
@@ -6031,14 +5898,11 @@
/* begin transformPoints: */
if (2 > 0) {
/* begin transformPoint: */
- /* begin point1Get */
point = ((int *) (workBuffer + GWPoint1));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue = ((double) ((((int *) point))[0]) );
yValue = ((double) ((((int *) point))[1]) );
/* begin edgeTransform */
@@ -6051,21 +5915,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 1) {
/* begin transformPoint: */
- /* begin point2Get */
point1 = ((int *) (workBuffer + GWPoint2));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue1 = ((double) ((((int *) point1))[0]) );
yValue1 = ((double) ((((int *) point1))[1]) );
/* begin edgeTransform */
@@ -6078,21 +5938,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 2) {
/* begin transformPoint: */
- /* begin point3Get */
point2 = ((int *) (workBuffer + GWPoint3));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue2 = ((double) ((((int *) point2))[0]) );
yValue2 = ((double) ((((int *) point2))[1]) );
/* begin edgeTransform */
@@ -6105,21 +5961,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 3) {
/* begin transformPoint: */
- /* begin point4Get */
point3 = ((int *) (workBuffer + GWPoint4));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue3 = ((double) ((((int *) point3))[0]) );
yValue3 = ((double) ((((int *) point3))[1]) );
/* begin edgeTransform */
@@ -6132,7 +5984,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -6197,14 +6048,11 @@
/* begin transformPoints: */
if (3 > 0) {
/* begin transformPoint: */
- /* begin point1Get */
point = ((int *) (workBuffer + GWPoint1));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue = ((double) ((((int *) point))[0]) );
yValue = ((double) ((((int *) point))[1]) );
/* begin edgeTransform */
@@ -6217,21 +6065,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 1) {
/* begin transformPoint: */
- /* begin point2Get */
point1 = ((int *) (workBuffer + GWPoint2));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue1 = ((double) ((((int *) point1))[0]) );
yValue1 = ((double) ((((int *) point1))[1]) );
/* begin edgeTransform */
@@ -6244,21 +6088,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 2) {
/* begin transformPoint: */
- /* begin point3Get */
point2 = ((int *) (workBuffer + GWPoint3));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue2 = ((double) ((((int *) point2))[0]) );
yValue2 = ((double) ((((int *) point2))[1]) );
/* begin edgeTransform */
@@ -6271,21 +6111,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 3) {
/* begin transformPoint: */
- /* begin point4Get */
point3 = ((int *) (workBuffer + GWPoint4));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue3 = ((double) ((((int *) point3))[0]) );
yValue3 = ((double) ((((int *) point3))[1]) );
/* begin edgeTransform */
@@ -6298,7 +6134,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -6310,7 +6145,6 @@
x2 = (point3Get())[0];
/* Check if we can use a line */
-
y2 = (point3Get())[1];
if (((x0 == y0)
&& (x1 == y1))
@@ -6321,7 +6155,6 @@
else {
/* Need bezier */
-
segs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth != 0)
&& (lineFill != 0));
if (engineStopped) {
@@ -6370,7 +6203,6 @@
if ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)]) >= (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)])) {
/* Top to bottom */
-
objBuffer[bezier + GEXValue] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index))]);
objBuffer[bezier + GEYValue] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)]) - yOffset);
objBuffer[bezier + GBViaX] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)]);
@@ -6398,7 +6230,6 @@
if (loadBBFn == 0) {
/* We need copyBits here so try to load it implicitly */
-
if (!(initialiseModule())) {
return 0;
}
@@ -6589,9 +6420,9 @@
float *transform6;
float *transform7;
sqInt x;
- short x0;
- short x1;
- short x2;
+ sqInt x0;
+ sqInt x1;
+ sqInt x2;
sqInt x3;
sqInt x4;
sqInt x5;
@@ -6608,9 +6439,9 @@
double xValue6;
double xValue7;
sqInt y;
- short y0;
- short y1;
- short y2;
+ sqInt y0;
+ sqInt y1;
+ sqInt y2;
sqInt y3;
sqInt y4;
sqInt y5;
@@ -6629,7 +6460,6 @@
/* Check if have anything to do at all */
-
if ((leftFill == rightFill)
&& ((lineWidth == 0)
|| (lineFill == 0))) {
@@ -6637,12 +6467,10 @@
}
/* 3 points with x/y each */
-
index = segmentIndex * 6;
if (pointsShort) {
/* Load short points */
-
/* begin loadPointShortAt:from: */
x0 = (((short *) points))[index];
/* begin loadPointShortAt:from: */
@@ -6670,7 +6498,6 @@
&& (y1 == y2))) {
/* We can use a line from x0/y0 to x2/y2 */
-
if ((x0 == x2)
&& (y0 == y2)) {
return null;
@@ -6682,14 +6509,11 @@
/* begin transformPoints: */
if (2 > 0) {
/* begin transformPoint: */
- /* begin point1Get */
point = ((int *) (workBuffer + GWPoint1));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue = ((double) ((((int *) point))[0]) );
yValue = ((double) ((((int *) point))[1]) );
/* begin edgeTransform */
@@ -6702,21 +6526,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 1) {
/* begin transformPoint: */
- /* begin point2Get */
point1 = ((int *) (workBuffer + GWPoint2));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue1 = ((double) ((((int *) point1))[0]) );
yValue1 = ((double) ((((int *) point1))[1]) );
/* begin edgeTransform */
@@ -6729,21 +6549,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 2) {
/* begin transformPoint: */
- /* begin point3Get */
point2 = ((int *) (workBuffer + GWPoint3));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue2 = ((double) ((((int *) point2))[0]) );
yValue2 = ((double) ((((int *) point2))[1]) );
/* begin edgeTransform */
@@ -6756,21 +6572,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 3) {
/* begin transformPoint: */
- /* begin point4Get */
point3 = ((int *) (workBuffer + GWPoint4));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue3 = ((double) ((((int *) point3))[0]) );
yValue3 = ((double) ((((int *) point3))[1]) );
/* begin edgeTransform */
@@ -6783,7 +6595,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -6799,14 +6610,11 @@
/* begin transformPoints: */
if (3 > 0) {
/* begin transformPoint: */
- /* begin point1Get */
point4 = ((int *) (workBuffer + GWPoint1));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue4 = ((double) ((((int *) point4))[0]) );
yValue4 = ((double) ((((int *) point4))[1]) );
/* begin edgeTransform */
@@ -6819,21 +6627,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 1) {
/* begin transformPoint: */
- /* begin point2Get */
point5 = ((int *) (workBuffer + GWPoint2));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue5 = ((double) ((((int *) point5))[0]) );
yValue5 = ((double) ((((int *) point5))[1]) );
/* begin edgeTransform */
@@ -6846,21 +6650,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 2) {
/* begin transformPoint: */
- /* begin point3Get */
point6 = ((int *) (workBuffer + GWPoint3));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue6 = ((double) ((((int *) point6))[0]) );
yValue6 = ((double) ((((int *) point6))[1]) );
/* begin edgeTransform */
@@ -6873,21 +6673,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 3) {
/* begin transformPoint: */
- /* begin point4Get */
point7 = ((int *) (workBuffer + GWPoint4));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue7 = ((double) ((((int *) point7))[0]) );
yValue7 = ((double) ((((int *) point7))[1]) );
/* begin edgeTransform */
@@ -6900,7 +6696,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -6954,9 +6749,9 @@
sqInt widthRun;
sqInt widthValue;
sqInt x;
- short x0;
- short x1;
- short x2;
+ sqInt x0;
+ sqInt x1;
+ sqInt x2;
sqInt x3;
sqInt x4;
sqInt x5;
@@ -6973,9 +6768,9 @@
double xValue6;
double xValue7;
sqInt y;
- short y0;
- short y1;
- short y2;
+ sqInt y0;
+ sqInt y1;
+ sqInt y2;
sqInt y3;
sqInt y4;
sqInt y5;
@@ -7001,7 +6796,6 @@
for (i = 1; i <= nSegments; i += 1) {
/* Decrement current run length and load new stuff */
-
if (((leftLength -= 1)) <= 0) {
leftRun += 1;
leftLength = ((usqInt) ((((int *) leftFills))[leftRun]) >> 16);
@@ -7043,17 +6837,14 @@
if ((leftValue == rightValue)
&& ((widthValue == 0)
|| (lineFillValue == 0))) {
- null;
goto l1;
}
/* 3 points with x/y each */
-
index = (i - 1) * 6;
if (pointsShort) {
/* Load short points */
-
/* begin loadPointShortAt:from: */
x0 = (((short *) points))[index];
/* begin loadPointShortAt:from: */
@@ -7081,10 +6872,8 @@
&& (y1 == y2))) {
/* We can use a line from x0/y0 to x2/y2 */
-
if ((x0 == x2)
&& (y0 == y2)) {
- null;
goto l1;
}
(point1Get())[0] = x0;
@@ -7094,14 +6883,11 @@
/* begin transformPoints: */
if (2 > 0) {
/* begin transformPoint: */
- /* begin point1Get */
point = ((int *) (workBuffer + GWPoint1));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue = ((double) ((((int *) point))[0]) );
yValue = ((double) ((((int *) point))[1]) );
/* begin edgeTransform */
@@ -7114,21 +6900,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 1) {
/* begin transformPoint: */
- /* begin point2Get */
point1 = ((int *) (workBuffer + GWPoint2));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue1 = ((double) ((((int *) point1))[0]) );
yValue1 = ((double) ((((int *) point1))[1]) );
/* begin edgeTransform */
@@ -7141,21 +6923,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 2) {
/* begin transformPoint: */
- /* begin point3Get */
point2 = ((int *) (workBuffer + GWPoint3));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue2 = ((double) ((((int *) point2))[0]) );
yValue2 = ((double) ((((int *) point2))[1]) );
/* begin edgeTransform */
@@ -7168,21 +6946,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (2 > 3) {
/* begin transformPoint: */
- /* begin point4Get */
point3 = ((int *) (workBuffer + GWPoint4));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue3 = ((double) ((((int *) point3))[0]) );
yValue3 = ((double) ((((int *) point3))[1]) );
/* begin edgeTransform */
@@ -7195,7 +6969,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -7212,14 +6985,11 @@
/* begin transformPoints: */
if (3 > 0) {
/* begin transformPoint: */
- /* begin point1Get */
point4 = ((int *) (workBuffer + GWPoint1));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue4 = ((double) ((((int *) point4))[0]) );
yValue4 = ((double) ((((int *) point4))[1]) );
/* begin edgeTransform */
@@ -7232,21 +7002,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 1) {
/* begin transformPoint: */
- /* begin point2Get */
point5 = ((int *) (workBuffer + GWPoint2));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue5 = ((double) ((((int *) point5))[0]) );
yValue5 = ((double) ((((int *) point5))[1]) );
/* begin edgeTransform */
@@ -7259,21 +7025,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 2) {
/* begin transformPoint: */
- /* begin point3Get */
point6 = ((int *) (workBuffer + GWPoint3));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue6 = ((double) ((((int *) point6))[0]) );
yValue6 = ((double) ((((int *) point6))[1]) );
/* begin edgeTransform */
@@ -7286,21 +7048,17 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
}
if (3 > 3) {
/* begin transformPoint: */
- /* begin point4Get */
point7 = ((int *) (workBuffer + GWPoint4));
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue7 = ((double) ((((int *) point7))[0]) );
yValue7 = ((double) ((((int *) point7))[1]) );
/* begin edgeTransform */
@@ -7313,7 +7071,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -7321,7 +7078,6 @@
segs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (widthValue != 0)
&& (lineFillValue != 0));
if (engineStopped) {
- null;
goto l1;
}
loadWideBezierlineFillleftFillrightFilln(widthValue, lineFillValue, leftValue, rightValue, segs);
@@ -7429,9 +7185,7 @@
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue = ((double) ((((int *) point1))[0]) );
yValue = ((double) ((((int *) point1))[1]) );
/* begin edgeTransform */
@@ -7444,7 +7198,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -7452,9 +7205,7 @@
if ((workBuffer[GWHasEdgeTransform]) != 0) {
/* Note: AA adjustment is done in #transformPoint: for higher accuracy */
-
/* begin transformPoint:into: */
- /* begin transformPointX:y:into: */
xValue1 = ((double) ((((int *) point2))[0]) );
yValue1 = ((double) ((((int *) point2))[1]) );
/* begin edgeTransform */
@@ -7467,7 +7218,6 @@
else {
/* Multiply each component by aaLevel and add a half pixel */
-
point2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));
point2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));
}
@@ -7475,9 +7225,7 @@
if ((workBuffer[GWHasEdgeTransform]) != 0) {
@@ Diff output truncated at 50000 characters. @@