[lworld] Integrated: 8266466: [lworld] Enhance javac to consume unified primitive class files generated under the option -XDunifiedValRefClass

Srikanth Adayapalam sadayapalam at openjdk.java.net
Mon May 24 08:26:38 UTC 2021

On Fri, 21 May 2021 11:28:55 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

> Post the integration of https://bugs.openjdk.java.net/browse/JDK-8244227,
> the constructor of ClassType, takes a boolean isReferenceProjection as an additional
> parameter. Till now, it was feasible to upfront decide at the time of constructing
> a class type whether the proposed type is supposed to be a reference projection or not.
> This is no longer possible under the unified class file generation scheme we are
> moving to. When we see LFoo; in field/method signatures/descriptors, we don't know
> whether the type is Foo.ref of a primitive class Foo or a plain old reference type.
> Likewise when we see QFoo; we have an ambiguity whether this is the primitive class
> type Foo or is Foo.val type of a ref-default primitive class Foo. Till a class is
> fully built ("completed"), we don't know whether it is a primitive class and if so,
> what its ref-val defaultness is.
> Completing class Foo every time we see a type descriptor LFoo; or QFoo; is wasteful
> of resources. Nor is it possible as it is, since it would call for the ClassReader's
> code to be reentered even as some other class is being read in: So the proposed patch
> implements an incremental piece meal augmentation of attributes.
> I suggest the review be started with Type.java in ClassType#Flavor enumeration to gather
> a high level picture of the abstractions put in place to characterize a class type in
> an incremental basis. After Type.java, Attr.java, ClassReader.java and Symbol.java in
> that order provide a good order for review.
> Please note, while this patch puts together the infrastructure and layes the groundwork
> for modelling ref-default classes and thereby enable VBC migration work, such work will
> arrive separately at a later time.
> As of now javac knows only about primitive class and their reference projections and
> plain old reference types. There is no notion of ref-val defaultness yet, Nor a way
> to declare them.

This pull request has now been integrated.

Changeset: f9806a41
Author:    Srikanth Adayapalam <sadayapalam at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/f9806a412e9440e3bf025f6421049dcdfb39e64d
Stats:     318 lines in 15 files changed: 255 ins; 8 del; 55 mod

8266466: [lworld] Enhance javac to consume unified primitive class files generated under the option -XDunifiedValRefClass


PR: https://git.openjdk.java.net/valhalla/pull/421

More information about the valhalla-dev mailing list