bytecode -> ssa -> bytecode

Jason Selby <selby@ptibonum.scl.csd.uwo.ca>
23 Jul 2000 17:04:47 -0400

          From comp.compilers

Related articles
bytecode -> ssa -> bytecode selby@ptibonum.scl.csd.uwo.ca (Jason Selby) (2000-07-23)
Re: bytecode -> ssa -> bytecode jim@pagesmiths.com (Jim White) (2000-07-27)
| List of all articles for this month |
From: Jason Selby <selby@ptibonum.scl.csd.uwo.ca>
Newsgroups: comp.lang.java.machine,comp.compilers
Date: 23 Jul 2000 17:04:47 -0400
Organization: The University of Western Ontario, London, Ont. Canada
Keywords: Java, tools, optimize

Hi,
I am implementing a Java bytecode to bytecode optimizer in which I
translate the bytecode into three-address code that is in SSA form,
perform some optimizations and then restore the bytecode.


The problem that I am having is in the destruction of phi-nodes, my
implementation works for primitive types but when it comes to objects
I do not have an idea of how to get around the "lost-copy" and "swap"
problems for objects.


Is there a general solution for these problems for objects? For
instance, to deal with the swap problem I have to make a deep copy of
the object but what if the class does not implement cloneable (I am
trying to keep the amount of changes made to the definition of a class
to a minimum)?


My only thought is to ensure the class implements Cloneable and insert
calls to the clone method to create the temps. Is this the only
solution??


thanks,
Jason Selby


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.