RFR: 8230482: Initial support for empty inline classes

Frederic Parain frederic.parain at oracle.com
Wed Sep 4 16:28:41 UTC 2019


Remi, Ioi,

Here’s a new webrev with the new tests added:

http://cr.openjdk.java.net/~fparain/emptyvalue/webrev.01/

On a 64bits platform with compressed oops, the layout of
the WithEmptyField class is:

Layout of class runtime/valhalla/valuetypes/EmptyValueTest$WithEmptyField
| offset | kind | size | alignment | signature | name |
Instance fields:
  0 RESERVED 12
  12 INHERITED 4
  16 FLATTENED 1 1 Qruntime/valhalla/valuetypes/EmptyValueTest$EmptyValue; empty
  17 EMPTY 3
  20 REGULAR 4 4 Ljava/lang/Object; o

The inherited field at offset 12 being the int field from the super class.

Thank you,

Fred


> On Sep 3, 2019, at 11:41, Ioi Lam <ioi.lam at oracle.com> wrote:
> 
> Maybe we should also have some System.arraycopy() tests?
> 
> Thanks
> - Ioi
> 
> On 9/3/19 8:29 AM, Remi Forax wrote:
>> Hi Frederic,
>> i think you can add a test where an empty inline object is used as field in the middle of several fields
>> (perhaps using inheritance to be sure of the layout ?).
>> 
>> Rémi
>> 
>> ----- Mail original -----
>>> De: "Frederic Parain" <frederic.parain at oracle.com>
>>> À: "valhalla-dev" <valhalla-dev at openjdk.java.net>
>>> Envoyé: Mardi 3 Septembre 2019 16:24:08
>>> Objet: RFR: 8230482: Initial support for empty inline classes
>>> Greetings,
>>> 
>>> Please review this code that adds initial support for empty inline classes.
>>> 
>>> CR: https://bugs.openjdk.java.net/browse/JDK-8230482
>>> Webrev: http://cr.openjdk.java.net/~fparain/emptyvalue/webrev.00/index.html
>>> 
>>> Thank you,
>>> 
>>> Fred
> 




More information about the valhalla-dev mailing list