|bytecode -> ssa -> bytecode firstname.lastname@example.org (Jason Selby) (2000-07-23)|
|Re: bytecode -> ssa -> bytecode email@example.com (Jim White) (2000-07-27)|
|From:||Jason Selby <firstname.lastname@example.org>|
|Date:||23 Jul 2000 17:04:47 -0400|
|Organization:||The University of Western Ontario, London, Ont. Canada|
|Keywords:||Java, tools, optimize|
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
Return to the
Search the comp.compilers archives again.