58 //, "-XX:CompileCommand=print,*::func_c1"
59 };
60 // Only C1. Tierd compilation disabled.
61 case 1: return new String[] {"-XX:+EnableValhallaC1", "-XX:TieredStopAtLevel=1"
62 // , "-XX:-CheckCompressedOops", "-XX:CompileCommand=print,*::test76*"
63 };
64 }
65 return null;
66 }
67
68 public static void main(String[] args) throws Throwable {
69 System.gc(); // Resolve this call, to avoid C1 code patching in the test cases.
70 TestCallingConventionC1 test = new TestCallingConventionC1();
71 test.run(args,
72 Point.class,
73 Functor.class,
74 Functor1.class,
75 Functor2.class,
76 Functor3.class,
77 Functor4.class,
78 MyImplPojo1.class,
79 MyImplPojo2.class,
80 MyImplVal.class,
81 FixedPoints.class,
82 FloatPoint.class,
83 RefPoint.class);
84 }
85
86 static inline class Point {
87 final int x;
88 final int y;
89 public Point(int x, int y) {
90 this.x = x;
91 this.y = y;
92 }
93
94 @DontCompile
95 @DontInline
96 public int func() {
97 return x + y;
98 }
99
100 @ForceCompile(compLevel = C1)
149 new Functor1(),
150 new Functor2(),
151 new Functor3(),
152 new Functor4()
153 };
154 static int functorCounter = 0;
155 static Functor getFunctor() {
156 int n = (++ functorCounter) % functors.length;
157 return functors[n];
158 }
159
160 static Point pointField = new Point(123, 456);
161 static Point pointField1 = new Point(1123, 1456);
162 static Point pointField2 = new Point(2123, 2456);
163
164 static interface Intf {
165 public int func1(int a, int b);
166 public int func2(int a, int b, Point p);
167 }
168
169 static class MyImplPojo1 implements Intf {
170 int field = 1000;
171 @DontInline @DontCompile
172 public int func1(int a, int b) { return field + a + b + 1; }
173 @DontInline @DontCompile
174 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 1; }
175 }
176
177 static class MyImplPojo2 implements Intf {
178 int field = 2000;
179
180 @DontInline @ForceCompile(compLevel = C1)
181 public int func1(int a, int b) { return field + a + b + 20; }
182 @DontInline @ForceCompile(compLevel = C1)
183 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 20; }
184 }
185
186 static inline class MyImplVal implements Intf {
187 final int field;
188 MyImplVal(int f) {
189 field = f;
190 }
191 MyImplVal() {
192 field = 3000;
193 }
194
195 @DontInline @ForceCompile(compLevel = C1)
196 public int func1(int a, int b) { return field + a + b + 300; }
197
198 @DontInline @ForceCompile(compLevel = C1)
199 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 300; }
200 }
201
202 static Intf intfs[] = {
203 new MyImplPojo1(),
204 new MyImplPojo2(),
205 new MyImplVal()
206 };
207 static int intfCounter = 0;
208 static Intf getIntf() {
209 int n = (++ intfCounter) % intfs.length;
210 return intfs[n];
211 }
212
213 static inline class FixedPoints {
214 final boolean Z0 = false;
215 final boolean Z1 = true;
216 final byte B = (byte)2;
217 final char C = (char)34;
218 final short S = (short)456;
219 final int I = 5678;
220 final long J = 0x1234567800abcdefL;
221 }
222 static FixedPoints fixedPointsField = new FixedPoints();
223
224 static inline class FloatPoint {
225 final float x;
226 final float y;
227 public FloatPoint(float x, float y) {
228 this.x = x;
229 this.y = y;
564 @DontCompile
565 public void test32_verifier(boolean warmup) {
566 int count = warmup ? 1 : 2;
567 for (int i=0; i<count; i++) { // need a loop to test inline cache
568 int result = test32();
569 int n = pointField1.x + pointField2.y + 0 + 1;
570 Asserts.assertEQ(result, n);
571 }
572 }
573
574 // C2->C1 invokeinterface -- no verified_ro_entry (no value args except for receiver)
575 @Test(compLevel = C2)
576 public int test33(Intf intf, int a, int b) {
577 return intf.func1(a, b);
578 }
579
580 @DontCompile
581 public void test33_verifier(boolean warmup) {
582 int count = warmup ? 1 : 20;
583 for (int i=0; i<count; i++) {
584 Intf intf = warmup ? intfs[0] : getIntf();
585 int result = test33(intf, 123, 456) + i;
586 Asserts.assertEQ(result, intf.func1(123, 456) + i);
587 }
588 }
589
590 // C2->C1 invokeinterface -- use verified_ro_entry (has value args other than receiver)
591 @Test(compLevel = C2)
592 public int test34(Intf intf, int a, int b) {
593 return intf.func2(a, b, pointField);
594 }
595
596 @DontCompile
597 public void test34_verifier(boolean warmup) {
598 int count = warmup ? 1 : 20;
599 for (int i=0; i<count; i++) {
600 Intf intf = warmup ? intfs[0] : getIntf();
601 int result = test34(intf, 123, 456) + i;
602 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
603 }
604 }
605
606 // C2->C1 invokestatic, Point.y is on stack (x64)
607 @Test(compLevel = C2)
608 public int test35() {
609 return test35_helper(1, 2, 3, 4, 5, pointField);
610 }
611
612 @DontInline
613 @ForceCompile(compLevel = C1)
614 private static int test35_helper(int a1, int a2, int a3, int a4, int a5, Point p) {
615 return a1 + a2 + a3 + a4 + a5 + p.x + p.y;
616 }
617
618 @DontCompile
619 public void test35_verifier(boolean warmup) {
620 int count = warmup ? 1 : 2;
1383 @Test(compLevel = C2)
1384 public int test62(RefPoint_Access rpa, RefPoint rp2) {
1385 return rpa.func1(rp2);
1386 }
1387
1388 @DontCompile
1389 public void test62_verifier(boolean warmup) {
1390 int count = warmup ? 1 : 20;
1391 for (int i=0; i<count; i++) { // need a loop to test inline cache
1392 RefPoint_Access rpa = get_RefPoint_Access();
1393 RefPoint rp2 = new RefPoint(111, 2222);
1394 int result;
1395 try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
1396 result = test62(rpa, rp2);
1397 }
1398 int n = rpa.func1(rp2);
1399 Asserts.assertEQ(result, n);
1400 }
1401 }
1402
1403 // C2->C1 invokeinterface via VVEP(RO) -- force GC for every allocation when entering a C1 VVEP(RO) (a bunch of RefPoints and Numbers)
1404 @Test(compLevel = C2)
1405 public int test63(RefPoint_Access rpa, RefPoint rp1, RefPoint rp2, Number n1, RefPoint rp3, RefPoint rp4, Number n2) {
1406 return rpa.func2(rp1, rp2, n1, rp3, rp4, n2);
1407 }
1408
1409 @DontCompile
1410 public void test63_verifier(boolean warmup) {
1411 int count = warmup ? 1 : 20;
1412 for (int i=0; i<count; i++) { // need a loop to test inline cache
1413 RefPoint_Access rpa = get_RefPoint_Access();
1414 RefPoint rp1 = new RefPoint(1, 2);
1415 RefPoint rp2 = refPointField1;
1416 RefPoint rp3 = new RefPoint(222, 777);
1417 RefPoint rp4 = refPointField2;
1418 Number n1 = new Number(5878);
1419 Number n2 = new Number(1234);
1420 int result;
1421 try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
1422 result = test63(rpa, rp1, rp2, n1, rp3, rp4, n2);
1423 }
1424 int n = rpa.func2(rp1, rp2, n1, rp3, rp4, n2);
1425 Asserts.assertEQ(result, n);
1426 }
1427 }
1428
1429 // C2->C1 invokevirtual via VVEP(RO) (opt_virtual_call)
1430 @Test(compLevel = C2)
1431 public int test76(RefPoint rp1, RefPoint rp2) {
1432 return rp1.final_func(rp2);
1433 }
1434
1435 @DontCompile
1436 public void test76_verifier(boolean warmup) {
1437 int count = warmup ? 1 : 5;
1438 for (int i=0; i<count; i++) { // need a loop to test inline cache
1439 RefPoint rp1 = refPointField1;
1440 RefPoint rp2 = refPointField2;
1441 int result = test76(rp1, rp2);
1442 int n = rp1.final_func(rp2);
1443 Asserts.assertEQ(result, n);
1444 }
1445 }
1446
1447 // C2->C1 invokevirtual, force GC for every allocation when entering a C1 VEP (RefPoint)
1681 }
1682
1683 // C1->C2 invokestatic with ValueTypeReturnedAsFields (RefPoint?)
1684 @Test(compLevel = C1)
1685 public RefPoint? test89(RefPoint? p) {
1686 return test89_helper(p);
1687 }
1688
1689 @DontInline
1690 @ForceCompile(compLevel = C2)
1691 private static RefPoint? test89_helper(RefPoint? p) {
1692 return p;
1693 }
1694
1695 @DontCompile
1696 public void test89_verifier(boolean warmup) {
1697 Object result = test89(null);
1698 Asserts.assertEQ(result, null);
1699 }
1700
1701 }
|
58 //, "-XX:CompileCommand=print,*::func_c1"
59 };
60 // Only C1. Tierd compilation disabled.
61 case 1: return new String[] {"-XX:+EnableValhallaC1", "-XX:TieredStopAtLevel=1"
62 // , "-XX:-CheckCompressedOops", "-XX:CompileCommand=print,*::test76*"
63 };
64 }
65 return null;
66 }
67
68 public static void main(String[] args) throws Throwable {
69 System.gc(); // Resolve this call, to avoid C1 code patching in the test cases.
70 TestCallingConventionC1 test = new TestCallingConventionC1();
71 test.run(args,
72 Point.class,
73 Functor.class,
74 Functor1.class,
75 Functor2.class,
76 Functor3.class,
77 Functor4.class,
78 MyImplPojo0.class,
79 MyImplPojo1.class,
80 MyImplPojo2.class,
81 MyImplVal1.class,
82 MyImplVal2.class,
83 FixedPoints.class,
84 FloatPoint.class,
85 RefPoint.class);
86 }
87
88 static inline class Point {
89 final int x;
90 final int y;
91 public Point(int x, int y) {
92 this.x = x;
93 this.y = y;
94 }
95
96 @DontCompile
97 @DontInline
98 public int func() {
99 return x + y;
100 }
101
102 @ForceCompile(compLevel = C1)
151 new Functor1(),
152 new Functor2(),
153 new Functor3(),
154 new Functor4()
155 };
156 static int functorCounter = 0;
157 static Functor getFunctor() {
158 int n = (++ functorCounter) % functors.length;
159 return functors[n];
160 }
161
162 static Point pointField = new Point(123, 456);
163 static Point pointField1 = new Point(1123, 1456);
164 static Point pointField2 = new Point(2123, 2456);
165
166 static interface Intf {
167 public int func1(int a, int b);
168 public int func2(int a, int b, Point p);
169 }
170
171 static class MyImplPojo0 implements Intf {
172 int field = 0;
173 @DontInline @DontCompile
174 public int func1(int a, int b) { return field + a + b + 1; }
175 @DontInline @DontCompile
176 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 1; }
177 }
178
179 static class MyImplPojo1 implements Intf {
180 int field = 1000;
181
182 @DontInline @ForceCompile(compLevel = C1)
183 public int func1(int a, int b) { return field + a + b + 20; }
184 @DontInline @ForceCompile(compLevel = C1)
185 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 20; }
186 }
187
188 static class MyImplPojo2 implements Intf {
189 int field = 2000;
190
191 @DontInline @ForceCompile(compLevel = C2)
192 public int func1(int a, int b) { return field + a + b + 20; }
193 @DontInline @ForceCompile(compLevel = C2)
194 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 20; }
195 }
196
197 static inline class MyImplVal1 implements Intf {
198 final int field;
199 MyImplVal1() {
200 field = 11000;
201 }
202
203 @DontInline @ForceCompile(compLevel = C1)
204 public int func1(int a, int b) { return field + a + b + 300; }
205
206 @DontInline @ForceCompile(compLevel = C1)
207 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 300; }
208 }
209
210 static inline class MyImplVal2 implements Intf {
211 final int field;
212 MyImplVal2() {
213 field = 12000;
214 }
215
216 @DontInline @ForceCompile(compLevel = C2)
217 public int func1(int a, int b) { return field + a + b + 300; }
218
219 @DontInline @ForceCompile(compLevel = C2)
220 public int func2(int a, int b, Point p) { return field + a + b + p.x + p.y + 300; }
221 }
222
223 static Intf intfs[] = {
224 new MyImplPojo0(), // methods not compiled
225 new MyImplPojo1(), // methods compiled by C1
226 new MyImplPojo2(), // methods compiled by C2
227 new MyImplVal1(), // methods compiled by C1
228 new MyImplVal2() // methods compiled by C2
229 };
230 static Intf getIntf(int i) {
231 int n = i % intfs.length;
232 return intfs[n];
233 }
234
235 static inline class FixedPoints {
236 final boolean Z0 = false;
237 final boolean Z1 = true;
238 final byte B = (byte)2;
239 final char C = (char)34;
240 final short S = (short)456;
241 final int I = 5678;
242 final long J = 0x1234567800abcdefL;
243 }
244 static FixedPoints fixedPointsField = new FixedPoints();
245
246 static inline class FloatPoint {
247 final float x;
248 final float y;
249 public FloatPoint(float x, float y) {
250 this.x = x;
251 this.y = y;
586 @DontCompile
587 public void test32_verifier(boolean warmup) {
588 int count = warmup ? 1 : 2;
589 for (int i=0; i<count; i++) { // need a loop to test inline cache
590 int result = test32();
591 int n = pointField1.x + pointField2.y + 0 + 1;
592 Asserts.assertEQ(result, n);
593 }
594 }
595
596 // C2->C1 invokeinterface -- no verified_ro_entry (no value args except for receiver)
597 @Test(compLevel = C2)
598 public int test33(Intf intf, int a, int b) {
599 return intf.func1(a, b);
600 }
601
602 @DontCompile
603 public void test33_verifier(boolean warmup) {
604 int count = warmup ? 1 : 20;
605 for (int i=0; i<count; i++) {
606 Intf intf = warmup ? intfs[0] : getIntf(i+1);
607 int result = test33(intf, 123, 456) + i;
608 Asserts.assertEQ(result, intf.func1(123, 456) + i);
609 }
610 }
611
612 // C2->C1 invokeinterface -- use verified_ro_entry (has value args other than receiver)
613 @Test(compLevel = C2)
614 public int test34(Intf intf, int a, int b) {
615 return intf.func2(a, b, pointField);
616 }
617
618 @DontCompile
619 public void test34_verifier(boolean warmup) {
620 int count = warmup ? 1 : 20;
621 for (int i=0; i<count; i++) {
622 Intf intf = warmup ? intfs[0] : getIntf(i+1);
623 int result = test34(intf, 123, 456) + i;
624 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
625 }
626 }
627
628 // C2->C1 invokestatic, Point.y is on stack (x64)
629 @Test(compLevel = C2)
630 public int test35() {
631 return test35_helper(1, 2, 3, 4, 5, pointField);
632 }
633
634 @DontInline
635 @ForceCompile(compLevel = C1)
636 private static int test35_helper(int a1, int a2, int a3, int a4, int a5, Point p) {
637 return a1 + a2 + a3 + a4 + a5 + p.x + p.y;
638 }
639
640 @DontCompile
641 public void test35_verifier(boolean warmup) {
642 int count = warmup ? 1 : 2;
1405 @Test(compLevel = C2)
1406 public int test62(RefPoint_Access rpa, RefPoint rp2) {
1407 return rpa.func1(rp2);
1408 }
1409
1410 @DontCompile
1411 public void test62_verifier(boolean warmup) {
1412 int count = warmup ? 1 : 20;
1413 for (int i=0; i<count; i++) { // need a loop to test inline cache
1414 RefPoint_Access rpa = get_RefPoint_Access();
1415 RefPoint rp2 = new RefPoint(111, 2222);
1416 int result;
1417 try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
1418 result = test62(rpa, rp2);
1419 }
1420 int n = rpa.func1(rp2);
1421 Asserts.assertEQ(result, n);
1422 }
1423 }
1424
1425 /* disabled due to bug JDK-8224944
1426
1427
1428 // C2->C1 invokeinterface via VVEP(RO) -- force GC for every allocation when entering a C1 VVEP(RO) (a bunch of RefPoints and Numbers)
1429 @Test(compLevel = C2)
1430 public int test63(RefPoint_Access rpa, RefPoint rp1, RefPoint rp2, Number n1, RefPoint rp3, RefPoint rp4, Number n2) {
1431 return rpa.func2(rp1, rp2, n1, rp3, rp4, n2);
1432 }
1433
1434 @DontCompile
1435 public void test63_verifier(boolean warmup) {
1436 int count = warmup ? 1 : 20;
1437 for (int i=0; i<count; i++) { // need a loop to test inline cache
1438 RefPoint_Access rpa = get_RefPoint_Access();
1439 RefPoint rp1 = new RefPoint(1, 2);
1440 RefPoint rp2 = refPointField1;
1441 RefPoint rp3 = new RefPoint(222, 777);
1442 RefPoint rp4 = refPointField2;
1443 Number n1 = new Number(5878);
1444 Number n2 = new Number(1234);
1445 int result;
1446 try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
1447 result = test63(rpa, rp1, rp2, n1, rp3, rp4, n2);
1448 }
1449 int n = rpa.func2(rp1, rp2, n1, rp3, rp4, n2);
1450 Asserts.assertEQ(result, n);
1451 }
1452 }
1453 /**/
1454
1455 // C2->C1 invokevirtual via VVEP(RO) (opt_virtual_call)
1456 @Test(compLevel = C2)
1457 public int test76(RefPoint rp1, RefPoint rp2) {
1458 return rp1.final_func(rp2);
1459 }
1460
1461 @DontCompile
1462 public void test76_verifier(boolean warmup) {
1463 int count = warmup ? 1 : 5;
1464 for (int i=0; i<count; i++) { // need a loop to test inline cache
1465 RefPoint rp1 = refPointField1;
1466 RefPoint rp2 = refPointField2;
1467 int result = test76(rp1, rp2);
1468 int n = rp1.final_func(rp2);
1469 Asserts.assertEQ(result, n);
1470 }
1471 }
1472
1473 // C2->C1 invokevirtual, force GC for every allocation when entering a C1 VEP (RefPoint)
1707 }
1708
1709 // C1->C2 invokestatic with ValueTypeReturnedAsFields (RefPoint?)
1710 @Test(compLevel = C1)
1711 public RefPoint? test89(RefPoint? p) {
1712 return test89_helper(p);
1713 }
1714
1715 @DontInline
1716 @ForceCompile(compLevel = C2)
1717 private static RefPoint? test89_helper(RefPoint? p) {
1718 return p;
1719 }
1720
1721 @DontCompile
1722 public void test89_verifier(boolean warmup) {
1723 Object result = test89(null);
1724 Asserts.assertEQ(result, null);
1725 }
1726
1727 //----------------------------------------------------------------------------------
1728 // Tests for unverified entries: there are 6 cases:
1729 // C1 -> Unverified Value Entry compiled by C1
1730 // C1 -> Unverified Value Entry compiled by C2
1731 // C2 -> Unverified Entry compiled by C1 (target is NOT a value type)
1732 // C2 -> Unverified Entry compiled by C2 (target is NOT a value type)
1733 // C2 -> Unverified Entry compiled by C1 (target IS a value type, i.e., has VVEP_RO)
1734 // C2 -> Unverified Entry compiled by C2 (target IS a value type, i.e., has VVEP_RO)
1735 //----------------------------------------------------------------------------------
1736
1737 // C1->C1 invokeinterface -- call Unverified Value Entry of MyImplPojo1.func2 (compiled by C1)
1738 @Test(compLevel = C1)
1739 public int test90(Intf intf, int a, int b) {
1740 return intf.func2(a, b, pointField);
1741 }
1742
1743 static Intf test90_intfs[] = {
1744 new MyImplPojo1(),
1745 new MyImplPojo2(),
1746 };
1747
1748 @DontCompile
1749 public void test90_verifier(boolean warmup) {
1750 int count = warmup ? 1 : 20;
1751 for (int i=0; i<count; i++) {
1752 Intf intf = test90_intfs[i % test90_intfs.length];
1753 int result = test90(intf, 123, 456) + i;
1754 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
1755 }
1756 }
1757
1758 // C1->C2 invokeinterface -- call Unverified Value Entry of MyImplPojo2.func2 (compiled by C2)
1759 @Test(compLevel = C1)
1760 public int test91(Intf intf, int a, int b) {
1761 return intf.func2(a, b, pointField);
1762 }
1763
1764 static Intf test91_intfs[] = {
1765 new MyImplPojo2(),
1766 new MyImplPojo1(),
1767 };
1768
1769 @DontCompile
1770 public void test91_verifier(boolean warmup) {
1771 int count = warmup ? 1 : 20;
1772 for (int i=0; i<count; i++) {
1773 Intf intf = test91_intfs[i % test91_intfs.length];
1774 int result = test91(intf, 123, 456) + i;
1775 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
1776 }
1777 }
1778
1779 // C2->C1 invokeinterface -- call Unverified Entry of MyImplPojo1.func2 (compiled by C1)
1780 @Test(compLevel = C2)
1781 public int test92(Intf intf, int a, int b) {
1782 return intf.func2(a, b, pointField);
1783 }
1784
1785 static Intf test92_intfs[] = {
1786 new MyImplPojo1(),
1787 new MyImplPojo2(),
1788 };
1789
1790 @DontCompile
1791 public void test92_verifier(boolean warmup) {
1792 int count = warmup ? 1 : 20;
1793 for (int i=0; i<count; i++) {
1794 Intf intf = test92_intfs[i % test92_intfs.length];
1795 int result = test92(intf, 123, 456) + i;
1796 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
1797 }
1798 }
1799
1800 // C2->C2 invokeinterface -- call Unverified Entry of MyImplPojo2.func2 (compiled by C2)
1801 @Test(compLevel = C2)
1802 public int test93(Intf intf, int a, int b) {
1803 return intf.func2(a, b, pointField);
1804 }
1805
1806 static Intf test93_intfs[] = {
1807 new MyImplPojo2(),
1808 new MyImplPojo1(),
1809 };
1810
1811 @DontCompile
1812 public void test93_verifier(boolean warmup) {
1813 int count = warmup ? 1 : 20;
1814 for (int i=0; i<count; i++) {
1815 Intf intf = test93_intfs[i % test93_intfs.length];
1816 int result = test93(intf, 123, 456) + i;
1817 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
1818 }
1819 }
1820
1821 // C2->C1 invokeinterface -- call Unverified Entry of MyImplVal1.func2 (compiled by C1 - has VVEP_RO)
1822 @Test(compLevel = C2)
1823 public int test94(Intf intf, int a, int b) {
1824 return intf.func2(a, b, pointField);
1825 }
1826
1827 static Intf test94_intfs[] = {
1828 new MyImplVal1(),
1829 new MyImplVal2(),
1830 };
1831
1832 @DontCompile
1833 public void test94_verifier(boolean warmup) {
1834 int count = warmup ? 1 : 20;
1835 for (int i=0; i<count; i++) {
1836 Intf intf = test94_intfs[i % test94_intfs.length];
1837 int result = test94(intf, 123, 456) + i;
1838 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
1839 }
1840 }
1841
1842 // C2->C2 invokeinterface -- call Unverified Entry of MyImplVal2.func2 (compiled by C2 - has VVEP_RO)
1843 @Test(compLevel = C2)
1844 public int test95(Intf intf, int a, int b) {
1845 return intf.func2(a, b, pointField);
1846 }
1847
1848 static Intf test95_intfs[] = {
1849 new MyImplVal2(),
1850 new MyImplVal1(),
1851 };
1852
1853 @DontCompile
1854 public void test95_verifier(boolean warmup) {
1855 int count = warmup ? 1 : 20;
1856 for (int i=0; i<count; i++) {
1857 Intf intf = test95_intfs[i % test95_intfs.length];
1858 int result = test95(intf, 123, 456) + i;
1859 Asserts.assertEQ(result, intf.func2(123, 456, pointField) + i);
1860 }
1861 }
1862 }
|