RFR: JDK-8282798 java.lang.runtime.Carrier [v16]

ExE Boss duke at openjdk.java.net
Mon Mar 28 20:38:43 UTC 2022


On Mon, 28 Mar 2022 18:09:29 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:

>> We propose to provide a runtime anonymous carrier class object generator; java.lang.runtime.Carrier. This generator class is designed to share anonymous classes when shapes are similar. For example, if several clients require objects containing two integer fields, then Carrier will ensure that each client generates carrier objects using the same underlying anonymous class. 
>> 
>> See JBS for details.
>
> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Clean up @return

src/java.base/share/classes/java/lang/runtime/Carrier.java line 330:

> 328:              * Constructor.
> 329:              *
> 330:              * @param primitiveCount  slot count required for primitives

This isn’t the slot count, but the `long[]` array length, which is half the slot count for `long`s.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7744


More information about the core-libs-dev mailing list