This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157264 - Java language support for JSR 292
Summary: Java language support for JSR 292
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Dusan Balek
URL: http://hg.openjdk.java.net/mlvm/mlvm/...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-21 18:46 UTC by jrose
Modified: 2013-09-02 14:23 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jrose 2009-01-21 18:46:54 UTC
The Da Vinci Machine Project is developing the reference implementation of JSR 292, new JVM features for multi-language support.

Part of the project has a proposed changes to "javac" to allow Java code to access the new JVM features.  Here are the relevant URLS describing the Java 
language changes (they accompany javac patches):

6754038: writing libraries in Java for non-Java languages requires method handle invocation
http://hg.openjdk.java.net/mlvm/mlvm/langtools/file/tip/meth.txt

6746458: writing libraries in Java for non-Java languages requires support for exotic identifiers
http://hg.openjdk.java.net/mlvm/mlvm/langtools/file/tip/quid.txt

In order to use NetBeans to develop code with the new features, error highlighting needs to be suppressed on the new features.

It might be helpful (but is probably not necessary) to teach NetBeans about the relaxed typing of MethodHandle.invoke and Dynamic.* sites; it is 
sufficient for the present to simply treat those as a kind of wildcard call, by suppressing overload resolution and (in the case of Dynamic) name 
resolution.

Ideally, the lexer could recognize the #"new identifier syntax" for exotic identifiers, but it would be sufficient to skip over it as a sort of "unknown node", 
since the exotic identifiers would be used only to call out to non-Java languages, or to a metaobject protocol.  Supporting such things (which aren't fully 
invented yet) is not in the scope of this bug.

I'm hoping to recruit someone from the mlvm or jdk-languages communities to do this work (or show me how to do it).  This RFE will track progress of 
the work.  Thanks.
Comment 1 jrose 2009-01-21 23:18:43 UTC
RFEs like this should eventually be addressed by referring language questions to javac itself.

Now, I put my special javac.jar on the bootclasspath of the javac command which ant uses to build the project which uses the extended language 
features.  I can do this easily by adding a line like this to nbproject/project.properties :

javac.compilerargs=-Xlint:unchecked -J-Xbootclasspath/p:${reference.langtools-javac.jar} -XDinvokedynamic

Ideally, these special options, along with the special jar, should (somehow) be absorbed into the NetBeans editor, and used to perform all sorts of 
textual analysis of the Java code which will be compiled by that special javac.

I think the javac guys are eager to work on this; it's certainly better than writing half of your own compiler (or forking the code).

For the moment, since the new features are used infrequently so far, I'd be happy with the partial solutions outlined in the previous comment.