[Vm-dev] Doubly weird

Eliot Miranda eliot.miranda at gmail.com
Tue Feb 26 22:35:25 UTC 2019


On Tue, Feb 26, 2019 at 2:06 PM <ken.dickey at whidbey.com> wrote:

> On 2019-02-26 13:05, Eliot Miranda wrote:
>
> Hi Ken,
>
> On Tue, Feb 26, 2019 at 11:52 AM <ken.dickey at whidbey.com> wrote:
>
>> Oh,  I should point out that the CLI prints:
>>
>> The 9 doubles are 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000
>> 7.000000 8.000000 9.000000
>>
>> when running the FFI unit tests and:
>>
>> The 9 doubles are 1.000000 1.000000 1.000000 4.000000 5.000000 6.000000
>> 7.000000 8.000000 9.000000
>
>
> This looks like the marshaller is accessing the wrong initial arguments.
> It looks like the object accessed for args 1 & 2 is the same as for arg 0,
> right?  The question is why.  I have no clue.
>
> Is there a compiler/runtime/parser change?
>

No.  In the Workspace there is invocation via withArgs:executeMethod:,
primitive 188.  But I find it hard to believe this is the issue.  This code
is correct and I don't see there can be any issue with it and have as much
of tech system work as you do.  In all cases there is only one source to
bytecode compiler doing the compiler, best doits, method compilation, image
segment load evaluation, etc, etc.

Calling
>
> ========================
>
> FFIPluginTests>>testGenericDoubleCall2
> "Test using generic FFI spec"
> | result |
> result := FFITestLibrary ffiTestDoubles9: 1.0 d: 2.0 d: 3.0 d: 4.0 d: 5.0
> d: 6.0 d: 7.0 d: 8.0 d: 9.0.
> self assert: result = 45.0
>
> =========================
>
> works fine, but in a workspace,
>
> FFITestLibrary ffiTestDoubles9: 1.0 d: 2.0 d: 3.0 d: 4.0 d: 5.0 d: 6.0 d:
> 7.0 d: 8.0 d: 9.0. --> 42.0
>
> =========================
>
> Typed space in FFIPluginTests>>testGenericDoubleCall2, accept (s), and
> source text now shows:
>
> ============
>
> FFIPluginTests>>testGenericDoubleCall2
> "Test using generic FFI spec"
> | result |
> result := FFITestLibrary ffiTestDoubles9: 1.0 d: 1.0 d: 1.0 d: 4.0 d: 5.0
> d: 6.0 d: 7.0 d: 8.0 d: 9.0.
> self assert: result = 1.0
>
> ===============
>
> !?!?!WTF!?!?!
>

I don't understand.  How can typing a space produce a totally different
version of the method?  Have you checked the bytecode in the

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


More information about the Vm-dev mailing list