[Vm-dev] VM Maker: VMMaker.oscog-nice.1988.mcz

Eliot Miranda eliot.miranda at gmail.com
Mon Nov 14 23:24:52 UTC 2016


Ah, forgive me.  You've already fixed this :-).  Thanks!  So my comment
about integerValueOf: still stands.

On Mon, Nov 14, 2016 at 2:53 PM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

> Hi Nicolas,
>
>     also...
>
> On Sun, Nov 13, 2016 at 1:27 AM, <commits at source.squeak.org> wrote:
>
>>
>> Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
>> http://source.squeak.org/VMMaker/VMMaker.oscog-nice.1988.mcz
>>
>> ==================== Summary ====================
>>
>> Name: VMMaker.oscog-nice.1988
>> Author: nice
>> Time: 13 November 2016, 10:26:14.021969 am
>> UUID: 01ed55f2-205d-441f-b4f6-4a8607b3327d
>> Ancestors: VMMaker.oscog-nice.1987
>>
>> Fix inlining problem of shortPrintContext: - a side effect was eliminated
>> on stack flavour.
>>
>> Fix prototype of unlockSurfaceFn after recent platforms source file
>> revision.
>>
> ...
>
>
>> Item was changed:
>>   ----- Method: BitBltSimulation>>unlockSurfaces (in category 'surface
>> support') -----
>>   unlockSurfaces
>>         "Unlock the bits of any OS surfaces."
>>         "See the comment in lockSurfaces. Similar rules apply. That is,
>> the area provided in ioUnlockSurface can be used to determine the dirty
>> region after drawing. If a source is unlocked, then the area will be
>> (0,0,0,0) to indicate that no portion is dirty."
>>         | sourceHandle destHandle destLocked fn |
>> +       <var: #fn declareC:'int (*fn)(int, int, int, int, int)'>
>> -       <var: #fn declareC:'sqInt (*fn)(sqInt, sqInt, sqInt, sqInt,
>> sqInt)'>
>>         hasSurfaceLock ifTrue:[
>>                 unlockSurfaceFn = 0 ifTrue:[self loadSurfacePlugin
>> ifFalse:[^nil]].
>> +               fn := self cCoerce: unlockSurfaceFn to: 'int (*)(int,
>> int, int, int, int)'.
>> -               fn := self cCoerce: unlockSurfaceFn to: 'sqInt (*)(sqInt,
>> sqInt, sqInt, sqInt, sqInt)'.
>>                 destLocked := false.
>>                 destHandle := interpreterProxy fetchPointer:
>> FormBitsIndex ofObject: destForm.
>>                 (interpreterProxy isIntegerObject: destHandle) ifTrue:[
>>                         destHandle := interpreterProxy integerValueOf:
>> destHandle.
>>                         "The destBits are always assumed to be dirty"
>>                         self cCode:'fn(destHandle, affectedL, affectedT,
>> affectedR-affectedL, affectedB-affectedT)'.
>>                         destBits := destPitch := 0.
>>                         destLocked := true.
>>                 ].
>>                 noSource ifFalse:[
>>                         sourceHandle := interpreterProxy fetchPointer:
>> FormBitsIndex ofObject: sourceForm.
>>                         (interpreterProxy isIntegerObject: sourceHandle)
>> ifTrue:[
>>                                 sourceHandle := interpreterProxy
>> integerValueOf: sourceHandle.
>>                                 "Only unlock sourceHandle if different
>> from destHandle"
>>                                 (destLocked and:[sourceHandle =
>> destHandle])
>>                                         ifFalse:[self cCode:
>> 'fn(sourceHandle, 0, 0, 0, 0)'].
>>                                 sourceBits := sourcePitch := 0.
>>                         ].
>>                 ].
>>                 hasSurfaceLock := false.
>>                 self cCode: [] inSmalltalk:
>>                         [self touch: fn.
>>                          interpreterProxy displayObject = destForm ifTrue:
>>                                 [interpreterProxy getDeferDisplayUpdates
>> "for some reason this is true..."
>>                                         ifTrue:
>>                                                 [interpreterProxy
>> fullDisplayUpdate]
>>                                         ifFalse:
>>                                                 [interpreterProxy
>> fullDisplayUpdate]]].
>>         ].!
>>
>
> why are you making the first argument int instead of usqIntptr_t?  The
> first argument is an arbitrary handle and that means it could be a pointer,
> right? And so could be 64-bits, right?
>
> _,,,^..^,,,_
> best, Eliot
>



-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20161114/6c920778/attachment.html>


More information about the Vm-dev mailing list