[Newcompiler] How to decompile temporaries

Klaus D. Witzel klaus.witzel at cobss.com
Fri Jun 22 15:47:33 UTC 2007


+1

On Fri, 22 Jun 2007 16:54:02 +0200, Marcus Denker wrote:

>
> On 15.06.2007, at 16:06, Mathieu Suen wrote:
>
>> Hi
>>
>> In this mail I am only talking about old style block.
>>
>> When you decompile a block with temporaries you don't know where to
>> add them (to the method or the block).
>> Because temporaries in a block are inside the MethodContext we
>> can't distinguish were they were originally define.
>>
>>
>> The old compiler don't care and add them to the method temporaries
>> So
>>
>> A>>block
>>
>> 	^[| a | a]
>>
>> Is decompile in
>>
>> A>>block
>>
>> 	| a |
>> 	^[a]
>>
>> I think the best should be looking if the variable where use in an
>> other place then the block and if is it not the case the temp var
>> should be inside the block.
>>
>> BTW in the both implementation the decompile code may not be the
>> original one
>>
>> What do you think?
>
>
> Hi,
>
> I don't thin that the decompiler should be too clever. Compiling
> throws away information, and we should not be too clever to guess
> this lost information, as this guess will be wrong in most cases anyway.
>
> Bytecode just sucks as an intermediate format, and all tries to force
> it to be used as a losless intermediate just will be hacks...
>
> So fo the temps, the decompiler should do what the old decompiler
> does: just add temps for the method.
>
>
> 	Marcus
> --
> Marcus Denker  --  denker at iam.unibe.ch
> http://www.iam.unibe.ch/~denker
>
>
>




More information about the Newcompiler mailing list