[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'equivTo' and locals
On Thu, 26 Jul 2001, Stephen Andrew Neuendorffer wrote:
>
> It is fairly easy, and in fact, relatively benign to create local
> variables that have the same name and the same type. The code
> creates valid class files, and runs fine, since the name and type
> of locals doesn't really have any semantic meaning when it comes
> to the bytecode.
Well, that's not completely true. If you create jimple code and then you
parse the jimple code, you're out of luck.
> However, The CommonSubexpressionEliminator creates incorrect code
> when this happens, because it uses equivTo and thinks the locals
> are the same, even if they are distinct.
I've developed a patch for the CommonSubexpressionEliminator to eliminate
this behaviour. I thought I'd mailed it to the list, but I can certainly
mail it privately to you if required.
pat