[BUG]Parser(Object)>>doesNotUnderstand: #bindTemp:in:

Marcus Denker denker at iam.unibe.ch
Fri Jul 8 12:03:22 UTC 2005


Am 06.07.2005 um 12:03 schrieb Damien Cassou:


> I'm trying to extract temp variables from a method. I've found
> Parser>>parseArgsAndTemps:notifying: but it does not work.
>
> | aMethod sourceString |
> aMethod := String methodDict at: #alike: .
> sourceString := aMethod   getSourceFromFile.
> Parser new parseArgsAndTemps: sourceString notifying: nil.
>


You can do it like that:

There is tempNames in CompiledMethod, but this does only return made- 
up strings
for the decompiler (or correct names if the image was configured to  
decompile from
bytecode with tempnames preserved instead of reading from sources/ 
changes)

So this is not useful. But you can get to the names via the methodNode:

(String>>#alike:) methodNode tempNames

      Marcus





More information about the Squeak-dev mailing list