[foreign-memaccess] RFR 8226526: Add extra static checks to MemoryAccessVarHandles

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Jun 21 08:58:41 UTC 2019


I realized that there is an issue in the way we construct indexed access 
VH with the combinator - that is, we should _prepend_ the new stride to 
the existing list, not append it.

In other words, you want the access coordinates of the final var handle 
to affect the outermost sequence first, then the next enclosed sequence, 
and so forth.

I've also added a test that checks this.

http://cr.openjdk.java.net/~mcimadamore/panama/8226526_v2/

(the patch has been rebased on top of 8226519, so it might not apply 
cleanly on a vanilla repo)

Maurizio

On 20/06/2019 17:50, Maurizio Cimadamore wrote:
> Hi,
> as discussed in [1], here's a patch which adds extra checks to the 
> combinator methods in MemoryAccessVarHandles.
>
> This also consolidates the combinators API, by removing the alignment 
> and byte order combinators (which are now part of the leaf combinator 
> method).
>
> I also moved MemoryAccessVarHandle from j.l.invoke to java.foreign - 
> we want to keep the foreign classes close together in preparation for 
> when we'll need to push them onto a different (incubating) module.
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/panama/8226526/
>
> Cheers
> Maurizio
>


More information about the panama-dev mailing list