[lworld] RFR: 8266466: [lworld] Enhance javac to consume unified primitive class files generated under the option -XDunifiedValRefClass [v3]
sadayapalam at openjdk.java.net
Mon May 24 06:27:08 UTC 2021
> 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.
Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision:
Per Maurizio's review comment add a method to ClassType.Flavor to manage flavor evolution
- all: https://git.openjdk.java.net/valhalla/pull/421/files
- new: https://git.openjdk.java.net/valhalla/pull/421/files/1df1b722..6716cd3b
- full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=421&range=02
- incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=421&range=01-02
Stats: 51 lines in 4 files changed: 24 ins; 16 del; 11 mod
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/421/head:pull/421
More information about the valhalla-dev