[Vm-dev] [Pharo-project] is there a way to avoid all the
#tryNamedPrimitive:with: * in ProtoObject
Eliot Miranda
eliot.miranda at gmail.com
Mon Jan 30 23:48:40 UTC 2012
On Sat, Jan 28, 2012 at 2:23 PM, Andreas Raab <andreas.raab at gmx.de> wrote:
>
> On 1/28/2012 23:09, Igor Stasenko wrote:
>
>>
>> Another reason why we need such prim: have you tried to debug a debugger?
>> You can't , because there is a simulation guard:
>>
>> <primitive: 19> "Simulation guard"
>> "If successful, push result and return resuming context,
>> else ^ PrimitiveFailToken"
>> (primitiveIndex = 19) ifTrue:
>> [Smalltalk tools
>> debugContext: self
>> label:'Code simulation error'
>> contents: nil].
>>
>> This is because you cannot instruct VM that the code you stepping over
>> should not escape out of your control.
>>
>
> Sorry, but that's not what the simulation guard is for. Historically the
> VM would just crash when trying to simulate certain methods (like the
> above). So I put in simulation guards to prevent VM crashes. If the VM can
> simulate these methods, then you can just take them out.
>
Quite right. I ripped it out of the Qwaq/Teleplace codebase without
ill-effect. I need to do that for Squeak. Thanks for the reminder.
Simply remove the <primitive: 19> nonsense from doPrimitive:.
> Cheers,
> - Andreas
>
>
--
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120130/188f147b/attachment.htm
More information about the Vm-dev
mailing list