Draft JEP on enhanced volatiles
alex.buckley at oracle.com
Tue Feb 11 12:53:55 PST 2014
On 2/11/2014 12:37 PM, Doug Lea wrote:
> On 02/10/2014 11:12 PM, Alex Buckley wrote:
>> I presume the term before '.volatile' is not limited to an expression
>> ('count', 'this.count', 'x.f.count'); it could also be a field access
>> ('new Outer().new Usage().count').
> Yes, the intent is any field (or array) access expression.
> I haven't checked against Java8 BNF (because I haven't seen
> Java8 BNF), but in older versions, it seems that adding this
> to the rhs of "Selector" production should work?
Per JDK-8020782, I reworked the grammar chapter in JLS8, so Selector is
no more. See the JSR 337 Spec, Annex 3, JLS8, ch.19:
I recommend modifying MethodInvocation to allow:
ExpressionName . volatile . [TypeArguments] Identifier ( ... )
FieldAccess . volatile . [TypeArguments] Identifier ( ... )
ArrayAccess . volatile . [TypeArguments] Identifier ( ... )
More information about the compiler-dev