Mantis - Squeak
Viewing Issue Advanced Details
7794 VM minor always 10-29-13 21:08 12-30-13 18:35
nicolas cellier  
lewis  
normal  
@70@ trunk  
open  
none    
none  
0007794: BitBltSimulation primitiveDisplayString fails to advance destX
BitBlt>>primDisplayString:from:to:map:xTable:kern: regularly fails to increment destX instance variable.

As a consequence, BitBlt>>displayString:on:from:to:at:kern: regularly fall in following fallback protection:

"In some situations BitBlt doesn't return the advance width from the primitive.
Work around the situation"
^aPoint x + (self widthOfString: aString from: startIndex to: stopIndex) + (stopIndex-startIndex+1*kernDelta) @ aPoint y

It's time to change and update the primitive rather than working around...
This primitiveDisplayString does change destX which is a global variable known to the VM.
But then it forgets to copy this global destX into BitBlt's inst.var. destX.

It should send this at the end of its job:

interpreterProxy storeInteger: BBDestXIndex ofObject: bbObj withValue: destX.
 BitBltSimulation-primitiveDisplayString.st [^] (3,180 bytes) 10-29-13 21:08

Notes
(0014471)
nicolas cellier   
10-29-13 21:09   
The provided file was from a COG VM, but should do as well for an interpreter VM (I did not check though)
(0014472)
lewis   
11-01-13 00:00   
The update is included VMMaker-dtl.328 for VMM trunk (interpreter VM). The identical update can be added to oscog for Cog VMs. Will be included in future interpreter VM builds.