[Newcompiler] How to decompile temporaries

Klaus D. Witzel klaus.witzel at cobss.com
Fri Jun 15 14:48:50 UTC 2007


Hi Mth,

I think that there is no solution possible which fits all. Some methods  
declare all their temp vars at the beginning just because browser+compiler  
insert them there in case they where missing.

What could help is the temp var index: if a temp is used only in a block  
and has a "higher" index but, unfortunately that is still guessing (stab  
in the dark).

Anyways a decompiled then recompiled and from there decompiled again  
method must match at the decompiled source code level, regardless of which  
compiler was used initially. Some time ago Bert posted a nice patch

-  
http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-July/106382.html

But of course Squeak is broken at many "independent" levels. As an  
example, do ($ halt; storeString) and try to debug the >>DoIt method with  
1) through then 2) into then 3) through then 4) into :)

Cheers
Klaus

On Fri, 15 Jun 2007 16:06:52 +0200, Mth 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?
>
> 	Mth
>
>
>
>
> 	
>
> 	
> 		
> ___________________________________________________________________________ 
> Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son  
> interface révolutionnaire.
> http://fr.mail.yahoo.com




More information about the Newcompiler mailing list