[lworld] RFR: 8271583: [lworld] primitive records can't be reference favoring

Srikanth Adayapalam sadayapalam at openjdk.java.net
Mon Aug 23 08:44:00 UTC 2021

On Tue, 17 Aug 2021 23:49:41 GMT, Jesper Steen Møller <jespersm at openjdk.org> wrote:

> This patch lets the compiler pick up a record which can be primitive records and reference favoring, such as
> primitive record Point.val(int x, int y) {}
> The lowering had to be adjusted so that the correct receiver type is generated.
> See https://bugs.openjdk.java.net/browse/JDK-8271583

Other than the test changes requested, this looks good.

test/langtools/tools/javac/valhalla/lworld-values/records/RefFlavoredRecord.java line 30:

> 28:  * @compile -XDallowWithFieldOperator RefFlavoredRecord.java
> 29:  * @run main/othervm RefFlavoredRecord
> 30:  */

I think this test should not require XDallowWithFieldOperator and also likely "othervm" in the run tag.

And you should also be able to condense the @compile and @run into just @run ??


Marked as reviewed by sadayapalam (Committer).

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

More information about the valhalla-dev mailing list