Re: Re: Re: Re: Fwd: Re: More precise values in Analyzer

Rémi Forax <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Le 16/07/2010 16:01, Joshua Warner a écrit :

[...]


> Why not tracking store ? i.e each store create a new variable.
>
>     This is the usual algorithm to convert into SSA form.
>
>
> This works fine in most cases, but this still wont work for parameters 
> because there is no "load_param" bytecode instruction in Java - all of 
> the parameters are implicitly loaded into the low local variable 
> indices before the bytecode for a method begins executing.

I don't see why it's a problem.
You just start your algorithm by creating one SSA variable by local 
variable.
I think this algorithm is described in Appel's book Modern Compiler 
Implementation in Java.


>
>
>>
>>     Even if this would work, I don't see a way to get the specific
>>     local variables index that a certain value originated in
>>     (particularly in the case of Values allocated with
>>     Interpreter.newValue(...).  Am I missing something?
>>
>>     I've read significant portions of "ASM 3.0 A Java bytecode
>>     engineering library
>>     <http://download.forge.objectweb.org/asm/asm-guide.pdf>", and I
>>     didn't see anything that could help me with this particular
>>     problem.  Do you have a certain section that you are thinking of?
>>
>>     Thanks,
>>
>>     Joshua
>
>     There is also already a llvm project that implement a basic
>     bytecode frontend:
>     https://llvm.org/svn/llvm-project/java/trunk/docs/java-frontend.txt
>
>     cheers,
>     Rémi
>
>
> Thanks, that's definitely something to look into some more; however, 
> as the generated code has to work closely with the internals of a 
> specific JVM, I expect I would have to make numerous changes to how it 
> lowers operations like virtual method calls and interface calls, as 
> well as what format it expects its objects in.  This may or may not be 
> easy.
>
> Sincerely,
>
> Joshua

cheers,
Rémi
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.