1 package runtime.valhalla.valuetypes;
2
3 import jdk.test.lib.Asserts;
4
5 /*
6 * @test ValueTypeGetField
7 * @summary Value Type get field test
8 * @library /testlibrary /
9 * @run main/othervm -noverify -Xint runtime.valhalla.valuetypes.ValueTypeGetField
10 */
11 public class ValueTypeGetField {
12
13 static Point staticPoint;
14 Point myPoint;
15
16 public static void main(String[] args) {
17 ValueTypeGetField valueTypeGetField = new ValueTypeGetField();
18 valueTypeGetField.run();
19 }
20
21 public void run() {
22 Point p = Point.createPoint(1, 2);
23 fieldTest(p);
24 System.gc(); // check that VTs survive GC
25 fieldTest(p);
26 System.gc(); // check that VTs survive GC
27 }
28
29 static void fieldTest(Point p) {
|
1 package runtime.valhalla.valuetypes;
2
3 import jdk.test.lib.Asserts;
4
5 /*
6 * @test ValueTypeGetField
7 * @summary Value Type get field test
8 * @library /testlibrary /
9 * @run main/othervm -noverify runtime.valhalla.valuetypes.ValueTypeGetField
10 */
11 public class ValueTypeGetField {
12
13 static Point staticPoint;
14 Point myPoint;
15
16 public static void main(String[] args) {
17 ValueTypeGetField valueTypeGetField = new ValueTypeGetField();
18 valueTypeGetField.run();
19 }
20
21 public void run() {
22 Point p = Point.createPoint(1, 2);
23 fieldTest(p);
24 System.gc(); // check that VTs survive GC
25 fieldTest(p);
26 System.gc(); // check that VTs survive GC
27 }
28
29 static void fieldTest(Point p) {
|