Yeah this is really cool. Especially now BlockClosure and optimized BlockClosure (to:do:, ifTrue:ifFalse:, ifNil:ifNotNil:, and:, or:) have the same behavior for debugger byte code to source code mapping, for decompilation, ...
2013/4/17 Marcus Denker <marcus.den...@inria.fr> > Hi, > > We implemented this today: > > #sourceNode for MethodContext. It returns the AST node of context, as part > of the whole AST of the method. > > thisContext sourceNode > > Returns: > > DoIt > ^ thisContext sourceNode > > > ------------ > > [ thisContext sourceNode ] value > > ==> > > RBBlockNode([ thisContext sourceNode ]) > > --------------- > But even for optimized blocks it works: > > > [ true ifTrue:[thisContext sourceNode ]] value > > RBBlockNode([ thisContext sourceNode ]) > > The AST is the one used for code generation, with all information of > Semantic Analysis *and* the possibility to > get the IR with all information, too. > > So: > > [ true ifTrue:[|a|thisContext sourceNode ]] value scope > > ===> an OCOptimizedBlockScope 4 > > > Marcus > > > -- Clément Béra Mate Virtual Machine Engineer Bâtiment B 40, avenue Halley 59650 *Villeneuve d'Ascq*