Syncup call: review contribution proposals and technical issues

Alex Buckley alex.buckley at oracle.com
Wed Nov 14 10:53:55 PST 2012


Ryan,

On 11/13/2012 9:25 PM, LaMothe, Ryan R wrote:
> In other words, why not allow developers to add @Parallel (or
> similar) to basic for-loops and loop blocks and have the JIT compiler
> be smart enough to parallelize the code to CPUs and GPUs
> automatically? This certainly works in OpenMP and OpenACC using
> pragmas and directives, respectively. I was also informed recently
> that JSR 308 is not going to make it into JDK 8? That is a real shame
> if that is true.

As co-spec lead for JSR 308, let me clarify two points:

- JSR 308 is part of Java SE 8. This is stated in JSR 337, the umbrella 
JSR for Java SE 8 [1]. JDK 8 milestone 6 in January will include JEP 
104, the reference implementation of JSR 308 [2]. Please see the OpenJDK 
Type Annotations project for further details [3].

- JSR 308 is about annotations on _types_, not statements or 
expressions. Type annotations are the foundation for pluggable type 
checking whose primary goal is giving additional safety guarantees to 
the programmer. In contrast, statement and expression annotations tend 
to have as their primary goal a new semantics for the annotated 
statement or expression, different from the semantics in the JLS. Our 
mantra has always been "one language, the same everywhere", so new 
semantics for statements and expressions have not been welcome. Also, 
annotating statements and expressions may not be ideal because a source 
compiler may transform a statement or expression into whatever bytecode 
it likes, provided it respects the semantics in the JLS; moreover there 
is no support in the java.lang.reflect or javax.lang.model APIs for 
reflection over statements and expressions.

Alex

[1] http://jcp.org/en/jsr/detail?id=337
[2] http://openjdk.java.net/projects/jdk8/milestones
[3] http://openjdk.java.net/projects/type-annotations/


More information about the sumatra-dev mailing list