Conditional Compilation Though Compile time variable / parameters/ fields / functions Annotation

Suminda Dharmasena sirinath at sakrio.com
Tue Apr 16 01:24:54 PDT 2013


A lto can be determined by static analysis if final fields are used. Need
not be static as as myObj.fun(10) or myObj.fun2(myEnum.myParam) is
determinable.

There are packages which does this elemination:
http://proguard.sourceforge.net/#alternatives.html

What I am asking is some for of optimisation in javac similar to these
packages.

In java we do not want to eliminate. Using annotation if we mark a class
with that static elimination should be done an hidden class can be created
with the literal or static parameter paths are traced to eliminate the
field or function. Exact semantics need more thought. A particular class
can be a derived class for type preservation, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20130416/d9f4a472/attachment.html 


More information about the compiler-dev mailing list