[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: Re: a bug in soot (coffi)]
Ondrej Lhotak wrote:
Before we implement this fix, I'd like to consider/discuss an
alternative, which doesn't require adding bytecode instructions to
<clinit> or adding a <clinit> method if none exists. Specifically, we
could keep around the ConstantValue with each SootField, and then write
it out to a ConstantValue attribute when we write out bytecode.
Explicit assignments in <clinit> may give constant propagation some
opportunities.
VM spec doesn't say a static field with a constant value has to be final
(but javac generates ConstantValue for *final* fields only).
Cheers
Feng