[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: Draft JEP on enhanced volatiles
From:       Alex Buckley <alex.buckley () oracle ! com>
Date:       2014-02-11 20:53:55
Message-ID: 52FA8DE3.3000002 () oracle ! com
[Download RAW message or body]

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
>> name
>> ('count', 'this.count', 'x.f.count'); it could also be a field access
>> expression
>> ('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:

http://mail.openjdk.java.net/pipermail/java-se-8-spec-experts/2014-January/000049.html

I recommend modifying MethodInvocation to allow:

ExpressionName . volatile . [TypeArguments] Identifier ( ... )
FieldAccess . volatile . [TypeArguments] Identifier ( ... )
ArrayAccess . volatile . [TypeArguments] Identifier ( ... )

Alex
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic