[Vm-dev] Register allocation and debugging in Squeak

Jecel Assumpcao Jr. jecel at merlintec.com
Wed Aug 14 17:26:59 UTC 2013


Igor Stasenko wrote:
> yes, but you need to know how to map existing activations (which
> optimized stack frames),
> back to smalltalk contexts. if you can do it, the rest is trivial..
> but that's the question: imagine you interrupting machine code at random point:
>   - now, how to match it with smalltalk piece of code/AST node?

A popular solution is to not allow the machine code to be interrupted at
random points. In the Self VM, for example, you have two defined "safe
points": at message sends and at the backwards jump at the end of a loop
without any message sends. The mapping of the optimized stack frames to
the language level contexts only has to be possible at these points and
can be arbitrarily complicated between them.

-- Jecel



More information about the Vm-dev mailing list