On Tue, May 1, 2012 at 1:53 PM, Mariano Martinez Peck <[email protected] > wrote:
> > >>> >>>> But tempNames is fundamentally broken for closures. >>>> >>> >>> Just to avoid confusing, #tempNames itself looks correct: >>> >>> tempNames >>> "Answer a SequenceableCollection of the names of the receiver's >>> temporary >>> variables, which are strings." >>> >>> ^ self debuggerMap tempNamesForContext: self >>> >> >> Yes. That's for ContextPart. But it doesn't work for CompiledMethod, >> since temps may differ between a method and its blocks. >> >> > > Right, but weren't we always talking about Contexts? Because #tempNames > of CompiledMethod is different than the thing of contexts, isn't it? It is > related to the method trailer. In fact, I have just checked Squeak 4.3 and > CompiledMethod does not even implement #tempNames. The implementation in > Pharo is: > > CompiledMethod >> #tempNames > self holdsTempNames ifFalse: [^#()]. > ^self tempNamesString subStrings: ' ' > > how would it be the correct implementation then? > I don't think there is one. Perhaps answering a set of all temp names, but that's not very useful. > > Thanks > > -- > Mariano > http://marianopeck.wordpress.com > > > > > -- best, Eliot
