[Vm-dev] [Pharo-project] is there a way to avoid all the
#tryNamedPrimitive:with: * in ProtoObject
Andreas Raab
andreas.raab at gmx.de
Sat Jan 28 22:23:45 UTC 2012
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.
Cheers,
- Andreas
More information about the Vm-dev
mailing list