|Re: Data flow analysis in JDT compiler [message #1015377 is a reply to message #1015282]
||Thu, 28 February 2013 12:22
| Stephan Herrmann
Registered: July 2009
What analysis is performed, can best be seen from this list of warning options:|
Some of these operate at the level of type resolution but some do involve flow analysis. Some flow analysis is mandatory as per the JLS, other is specific to ECJ. Aside from the mandatory definite-assignment analysis the most sophisticated flow analysis is for detecting null dereferences, but, e.g., also the detection of (potential) resource leaks involves flow analysis.
Only few of these analyses are geared towards optimization (e.g., elimination of unused local variables), most relate in fact to the detection of potential programming problems.
If you want to learn how this analysis works, the point of reference is the source code.
The central infra structure for this can be found in
The details are implemented in analyseCode methods throughout all classes of the AST.
Powered by FUDForum
. Page generated in 0.25394 seconds