[squeak-dev] Re: Strange primitives doing nothing

Igor Stasenko siguctua at gmail.com
Fri Nov 7 17:29:50 UTC 2008


2008/11/7 Andreas Raab <andreas.raab at gmx.de>:
> Igor Stasenko wrote:
>>
>> Any ideas, why they still in use? Can there be something in between,
>> when interpreter enters the method? Or, if nothing, then why they
>> still there? :)
>
> As the comments say:
>
> primitiveMarkUnwindMethod - Mark the method for exception unwinding.
> primitiveMarkHandlerMethod - Mark the method for exception handling.
>
> In other words these primitives are used to mark the frames containing
> BlockContext>>on:do: and BlockContext>>ensure: so that the VM can find these
> methods during unwind and exception handling. If you look at non-local
> returns in the VM (returnValue:to:) you'll see this being used.
>

Ah, now i get it. Its testing a method's primitive index to detect if
method needs special marking.
So, behavior based on primitive index, not on actual primitive
implementation... Tricky.

> Cheers,
>  - Andreas

-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list