RFR JDK-8207197: [lworld] VarHandle array support for value types
David Simms
david.simms at oracle.com
Tue Jul 17 11:18:14 UTC 2018
Looks good, some minor suggestions (don't need follow up RFR)...
unsafe.cpp:315 :324 :360 :369
Suggest moving the "index" calculation into a new method in
valueArrayKlass.hpp so any size related calculations are encapsulated in
the same place. ("jint ValueArrayKlass::index_at_offset(jlong)" ?)
unsafe.cpp:319 :364
Add a final condition "else { ShouldNotReachHere(); }" in the
ASSERT block, just in case
ArrayElementVarHandleTest.java
Run this tests with array flattening explicitly disabled via
"-XX:-ValueArrayFlatten", and explicitly enabled
"-XX:+ValueArrayFlatten" (i.e. 2 jteg @run lines)
Good work, cheers
/D
On 14/07/18 07:40, mandy chung wrote:
> This adds the VarHandle support for array value element and extends
> Unsafe::arrayBaseOffset and arrayIndexScale to return the base
> and scale for a value type array. I add some basic test for value
> array access via VarHandle but will need to add more tests to
> verify as a follow-up.
>
> http://cr.openjdk.java.net/~mchung/valhalla/webrevs/8207197/webrev.00/index.html
>
>
> Mandy
More information about the valhalla-dev
mailing list