On May 4, 2012, at 11:03 AM, Mariano Martinez Peck wrote:
> | trailer materializedCompiledMethod method |
>
> trailer := CompiledMethodTrailer new tempNames: 'param1 param2 temp1
> temp2'.
> self assert: trailer kind = #TempsNamesQCompress.
> self assert: trailer kindAsByte = 8.
> method := (self class >> #fooWith:and:) copyWithTrailerBytes: trailer.
> self assert: (method getSource includesSubString: 'param1').
>
>
> this last assert fails.
>
> Problem is that #getSource is broken and somehow it looks like if the part of
> tempNames was removed. I propose to put back its original verison or just add
> at the beginning:
>
> trailer tempNames ifNotNil: [:namesString |
> "Magic sources -- decompile with temp names"
> ^ ((class decompilerClass new withTempNames: namesString)
> decompile: selector in: class method: self)
> decompileString].
>
>
> agree? if true I open an issue.
No, the idea was to remove temp name embedding because it is not needed.
Why do you need it?
Marcus
--
Marcus Denker -- http://marcusdenker.de