JEP 190: Pluggable Static Analyzers
Eric McCorkle
eric.mccorkle at oracle.com
Fri Jan 31 08:29:25 PST 2014
On 01/28/14 14:31, Jonathan Gibbons wrote:
> On 01/28/2014 11:11 AM, Eric McCorkle wrote:
>> On 01/28/14 03:49, Florian Weimer wrote:
>>> On 01/28/2014 01:52 AM, Jonathan Gibbons wrote:
>>>> Why is JEP 190 different from the support already in javac for
>>>> pluggable
>>>> static analyzers, such as provided by -Xplugin?
>>> The JSR 269 interface does not provide access to expressions and method
>>> bodies. It happens that through this interface, javac internals which
>>> provide this information are available after casting to internal javac
>>> classes. However, this is not a supported interface, and the internal
>>> javac data structures are not directly suited to implementing analysis
>>> passes.
>>>
>> An eventual goal of the system envisioned by JEP 190 is to allow
>> analysis tools to operate on javac's trees as opposed to source or
>> bytecode (as is common now). Of course, there are quite a few
>> intermediate steps that have to be taken to realize that goal.
>
> You can easily do this in JDK 8 with -Xplugin, using the com.sun.source
> API. com.sun.source is a public supported API. Are you suggesting that
> is not enough, and that you want to start investigating a standard
> javax.* AST API?
>
> The one piece that is missing in the -Xplugin world is easy access to
> the proto-bytecodes from a plugin.
>
> -- Jon
Standardizing a javax AST API is a definite possibility. Obviously,
there needs to be a great deal of care taken in the design of such an API.
However, I stress that this is a *research* JEP, not a feature JEP;
therefore, its purpose is solely to investigate questions like "would it
be useful to add a javax AST, or a proto-bytecode API". It is *not* a
goal of this JEP to produce such an API.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric_mccorkle.vcf
Type: text/x-vcard
Size: 314 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20140131/1d7184dc/eric_mccorkle.vcf
More information about the compiler-dev
mailing list