[Vm-dev] Can we make prim 118 support mirror logic?

Bert Freudenberg bert at freudenbergs.de
Tue Jan 31 14:59:26 UTC 2017


On Tue, Jan 31, 2017 at 3:57 PM, Bert Freudenberg <bert at freudenbergs.de>
wrote:

> It used to work. In the Spur VM we shipped with Squeak 5.0 it works. The
> VM sources are from Feb 5 2015.
>

That was VMMaker.oscog-eem.1039, if someone wants to bisect :)

- Bert -



> With a recent VM, the primitive fails, indeed.
>
> - Bert -
>
> On Tue, Jan 31, 2017 at 3:14 PM, Clément Bera <bera.clement at gmail.com>
> wrote:
>
>>
>> Hi Denis,
>>
>> In the VM the comment for primitive 118 is the following:
>>
>> "Implement either ProtoObject>>tryPrimitive: primIndex withArgs: argArray
>> or Context>>receiver: anObject tryPrimitive: primIndex withArgs: argArray.
>> If this primitive fails, arrange that its error code is a negative
>> integer, to
>> distinguish between this failing and the primitive it invokes failing."
>>
>> So mirror logic for primitive 118 should already be supported.
>>
>> However when I try it...
>>
>> Mirror new receiver: 20 tryPrimitive: 1 withArgs: { 22 } => primitive
>> failed
>>
>> 20 tryPrimitive: 1 withArgs: { 22 } => 42
>>
>> So I think it's a bug that should be fixed.
>>
>> Thanks for reporting.
>>
>>
>> On Tue, Jan 31, 2017 at 1:40 PM, Denis Kudriashov <dionisiydk at gmail.com>
>> wrote:
>>
>>>
>>> Hi.
>>>
>>> Right now prim 118 is probably only reflective call which not support
>>> mirror logic.
>>> It named #tryPrimitive:withArguments:. And it fails when it is called
>>> with receiver as first argument.
>>> Can we add support for it?
>>>
>>> The reason why I ask is because now any proxy should define this method
>>> to support debugger.
>>>
>>> Best regards,
>>> Denis
>>>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170131/c1771658/attachment.html>


More information about the Vm-dev mailing list