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

Clément Bera bera.clement at gmail.com
Tue Jan 31 14:14:50 UTC 2017

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,
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>

> 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/a1a2e6e2/attachment.html>

More information about the Vm-dev mailing list