[Vm-dev] Register allocation and debugging in Squeak

Igor Stasenko siguctua at gmail.com
Wed Aug 14 02:48:30 UTC 2013


On 13 August 2013 14:48, Stefan Marr <smalltalk at stefan-marr.de> wrote:
>
> Hi Clement:
>
> On 13 Aug 2013, at 14:28, Clément Bera <bera.clement at gmail.com> wrote:
>
>> Now I know that Eliot wouldn't have planned an optimization that will destroy the debugging power of Squeak. How did you guys plan to add the register allocation without destroying the debugging power of Squeak ?
>>
>> Did you plan to add something similar to the scope descriptor that they have in the Self VM to allow aggressive optimizations with regular debugging ? Did you plan to annotate the stack frames with meta data and if so, how would you have implemented it ?
>
> Might this be what you're looking for? http://selflanguage.org/documentation/published/dynamic-deoptimization.html
>
> I haven't looked into the Self details, but I thought they just don't do it. More specifically, as soon as you want to debug, you are going to execute 'slow' code that does make it simple to map back to Smalltalk/Self.
>

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?

if machine code is well structured, it is doable quite easily,
but if you applying aggressive optimizations which shuffling things
around, then it can be
quite tricky (and increases amounts of extra information per machine
instruction you need to store).

> Best regards
> Stefan
>

-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list