The next steo of this has been merged: we now evaluate DoIt methods in a way that we do not - need a method header - need to transfrom the AST for adding a return See the (now merged) PR of Denis here: https://github.com/pharo-project/pharo/pull/11463 This means that DoiT evaluation does not rely on the parse tree rewriter and does not need to be pretty-printed anymore. (which dies speed up #evaluate:, too). The screenshot shows code from a Playground, setting a playground binding a to 1, then a temp b to 2, then it enters the debugger due to the #halt. In the debugger we can read a and b, and we can eval âb haltâ to see that what used to be a âDoItIn:â accessing b via the context now looks just like the code that we executed from the first debugger:
On 24 Jun 2022, at 13:51, Marcus Denker <marcus.denker@inria.fr> wrote:
Hi,
We finally merged a PR form Denis (Sorry for taking too longâ¦) that enables the use of DoitVariable in DoItIn: methods:
<Dionisiydk_2022-Jun-23.jpeg> Denis: #pharo has finally transparent variables in the debugger doIts. No ThisContext readVariable trick
And we could even get rid of #DoItIn:, after merging another small cleanup, both methods now is just #DoIt as a selector.
How does it work?
Denis: It is the power of first class variables. There is DoItVariable fully integrated now which represents variables from different context
Marcus: DoitVariable has the original Variable instance and the context (what used to the ThisContext parameter of DoItIn:). It can be read reflectively by sending #read, compiler delegates code generation to the Variables (#emitValue:)
<DoItVariable.png>