[concurrency-interest] Here's why Atomic*FieldReference access checking is broken
peter.levart at gmail.com
Wed Oct 8 10:16:09 EDT 2014
On 10/08/2014 01:19 PM, Doug Lea wrote:
> On 10/08/2014 05:38 AM, Peter Levart wrote:
> Paul Sandoz has been working on VarHandles (like MethodHandles)
> for similar purposes. Possibly even the same purposes.
> See his JavaOne talk slides at
> It seems worth waiting for more progress on this front before
> contemplating changes along these lines.
Thanks Doug for pointing me to Paul's slides. I can see that Paul's
VarHandles are based around the idea of methods with polymorphic
signature akin to MethodHandles.invoke* with the benefit that they don't
declare Throwable as thrown exception and he's adding some type
inference changes on top of that.
Paul is exploring alternative approaches to JEP 193 which don't require
language changes although he has already stepped beyond that line as I
can see that his patch contains a few lines of javac changes.
I'm trying to see if there is an alternative to Paul's approach which
doesn't require JVM changes either. I think it all boils down to how
types involved are encoded and how type-checks can be optimized at
runtime. As my preliminary hacking shows, there might be a solution in
the existing virtual machinery.
More information about the Concurrency-interest