[Newcompiler] Compiling the decompilable

Mathieu Suen mathieusuen at yahoo.fr
Fri Oct 13 14:42:03 UTC 2006


Klaus D. Witzel a écrit :
> List,
> 
> I have begun to writing tests for the cases which the new decompiler is
> "expected" to handle. The tests contain a piece of source code, a
> request for compiling that into bytecode and an assertion that the
> expected bytecode was indeed generated (as observed by
> InstructionStream>>#nextInstruction).
> 
> By reverting the testcases (from bytecode to source code) I plan to
> arrive at a specification which covers "all possible" cases for the
> decompiler.
> 

Cool thanks

> Attached is a first cut (incomplete). The cases where the i-th object is
> referenced (i-th tempVar, i-th instVar, i-th literal) could be extended
> to not only test a fixed index per bytecode, but all possible indices,
> if you'd know of a good reason why this would be necessary.
> 
> In order to keep me busy I'd like you to email hints on where I should
> look for macro transforms (macros as in the terminology of the old
> compiler, see MessageNode>>#initialize). I will also write bytecode
> assertion tests for the transforms.

you mean MessageNode class>>#initialize.

All is done in the visitor see in Semantics category

> 
> I'm furthermore interested in suggestions for a shortcut for the
> following sequence. The shortcut *must* be compatible with the old and
> the new compiler and what I want is that the whole implicit & seemingly
> inevitable message organization stuff be eliminated.
> 
>  selector := self class compile:classified: nil withStamp: nil
> notifying: nil logSource: false.
>  method := self class compiledMethodAt: selector.
>  self class removeSelectorSilently: selector.
> 
> Thank you in advance, also for any comments/suggestions on my approach.
> 
> /Klaus


	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Demandez à ceux qui savent sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com


More information about the Newcompiler mailing list