RFR: 8324873: [lworld] implementation of value classes construction [v2]

Archie Cobbs acobbs at openjdk.org
Wed Feb 7 17:17:19 UTC 2024


On Wed, 7 Feb 2024 00:02:29 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> implementing value classes construction approach as per JEP-401. There is also a bit of an off-road incursion into jdeps removing references to Q-descriptors, probably should have gone in another patch but the changes are kind of small anyways
>
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
> 
>   regression tests

src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 535:

> 533:         for (var accessFlag : LocationToFlags.locationToFlags.get(location)) {
> 534:             int accessMask = accessFlag.mask();
> 535:             if ((mask &  accessMask) != 0) {

Extra whitespace glitch here.

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 4171:

> 4169: 
> 4170:                 // If super()/this() isn't first, require "statements before super()" feature
> 4171:                 if (!firstStatement && !classSym.isValueClass()) // let's wave value classes for now

wave → waive

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 1518:

> 1516:                     if (env1.info.ctorPrologue && (sym.flags_field & SYNTHETIC) == 0) {
> 1517:                         if (sym.owner.isValueClass()) {
> 1518:                             if (!env.tree.hasTag(ASSIGN) || !TreeInfo.isIdentOrThisDotIdent(((JCAssign)env.tree).lhs)) {

Wondering if this would catch an unqualified assignment to a superclass field? (Apologies if this doesn't make sense as I'm not completely familiar with value classes).

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/990#discussion_r1481823461
PR Review Comment: https://git.openjdk.org/valhalla/pull/990#discussion_r1481823368
PR Review Comment: https://git.openjdk.org/valhalla/pull/990#discussion_r1481823230



More information about the valhalla-dev mailing list