[lworld] RFR: 8265423: [lworld] Provide experimental support for generating a single class file per primitive class

Srikanth Adayapalam sadayapalam at openjdk.java.net
Tue Apr 27 12:46:49 UTC 2021

On Tue, 27 Apr 2021 12:40:27 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java line 2690:
>>> 2688:             if (referenceProjection != null) {
>>> 2689:                 if (referenceProjection.name != names.ref && referenceProjection.owner.kind == PCK) {
>>> 2690:                     referenceProjection.complete();
>> This change seems sneaky - what caused it?
> Indeed. I should push this as a separate change set. I discovered this bug while working on the now aborted attempt to evolve the code generation scheme to match SoV4. The right way to internalize the class is by calling complete() on the symbol and not by directly calling readClassFileInternal(). Doing the latter, could result in com.sun.tools.javac.code.ClassFinder#fillIn(com.sun.tools.javac.code.Symbol.ClassSymbol) from being re-entered resulting in an assertion failure.
> This change is not required for the present feature, but is a crucial fix that should be made independently.

(As I was studying the code that merges the projections back to see what changes I should make for the unified class model, I remembered that bug fix from that aborted work)


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

More information about the valhalla-dev mailing list