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
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@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
It used to work. In the Spur VM we shipped with Squeak 5.0 it works. The VM sources are from Feb 5 2015. With a recent VM, the primitive fails, indeed.
- Bert -
On Tue, Jan 31, 2017 at 3:14 PM, Clément Bera bera.clement@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@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
On Tue, Jan 31, 2017 at 3:57 PM, Bert Freudenberg bert@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@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@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
vm-dev@lists.squeakfoundation.org