[lworld] RFR: 8282512: Remove usages of __WithField in compiler tests

Dan Smith dlsmith at openjdk.java.net
Wed Mar 2 21:30:09 UTC 2022


On Wed, 2 Mar 2022 21:20:35 GMT, Dan Smith <dlsmith at openjdk.org> wrote:

> Rewrote 2 compiler tests to perform 'withfield' operations in jasm code rather than using the '__WithField' javac hack.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestDeoptimizationWhenBuffering.java line 105:

> 103:     }
> 104: }
> 105: 

Pretty directly lifted MyValue1 and MyValue2 into jasm code.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestWithfieldC1.java line 101:

> 99:     @Test(compLevel = CompLevel.C1_SIMPLE)
> 100:     public FooValue test2() {
> 101:         return FooValue.test2(this);

Moved this test into FooValue, with a parameter pointing back to 'this'.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestWithfieldC1.java line 199:

> 197:     public FooValue test9() {
> 198:         return FooValue.test9(this);
> 199:     }

Same—moved the code into FooValue, passed along a reference to 'this'.

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

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



More information about the valhalla-dev mailing list