< prev index next >
test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConventionC1.java
Print this page
*** 277,287 ****
this.y = new Number(y);
}
@DontInline
@ForceCompile(compLevel = C1)
! public final int test76_helper(RefPoint rp2) { // opt_virtual_call
return this.x.n + this.y.n + rp2.x.n + rp2.y.n;
}
@DontInline
@ForceCompile(compLevel = C1)
--- 277,287 ----
this.y = new Number(y);
}
@DontInline
@ForceCompile(compLevel = C1)
! public final int final_func(RefPoint rp2) { // opt_virtual_call
return this.x.n + this.y.n + rp2.x.n + rp2.y.n;
}
@DontInline
@ForceCompile(compLevel = C1)
*** 1412,1452 ****
Asserts.assertEQ(result, n);
}
}
/**/
- /*
-
-
- // FIXME: when C1 makes opt_virtual_call to RefPoint::test76_helper, method resolution fails with an assert
-
// C2->C1 invokevirtual via VVEP(RO) (opt_virtual_call)
@Test(compLevel = C2)
public int test76(RefPoint rp1, RefPoint rp2) {
! return rp1.test76_helper(rp2);
}
@DontCompile
public void test76_verifier(boolean warmup) {
int count = warmup ? 1 : 5;
for (int i=0; i<count; i++) { // need a loop to test inline cache
RefPoint rp1 = refPointField1;
RefPoint rp2 = refPointField2;
int result = test76(rp1, rp2);
! int n = rp1.test76_helper(rp2);
Asserts.assertEQ(result, n);
}
}
- /**/
-
- /*
// C2->C1 invokevirtual, force GC for every allocation when entering a C1 VEP (RefPoint)
// Same as test56, except we call the VVEP(RO) instead of VEP.
@Test(compLevel = C2)
public int test77(RefPoint rp1, RefPoint rp2) {
! return rp1.test76_helper(rp2);
}
@DontCompile
public void test77_verifier(boolean warmup) {
int count = warmup ? 1 : 5;
--- 1412,1444 ----
Asserts.assertEQ(result, n);
}
}
/**/
// C2->C1 invokevirtual via VVEP(RO) (opt_virtual_call)
@Test(compLevel = C2)
public int test76(RefPoint rp1, RefPoint rp2) {
! return rp1.final_func(rp2);
}
@DontCompile
public void test76_verifier(boolean warmup) {
int count = warmup ? 1 : 5;
for (int i=0; i<count; i++) { // need a loop to test inline cache
RefPoint rp1 = refPointField1;
RefPoint rp2 = refPointField2;
int result = test76(rp1, rp2);
! int n = rp1.final_func(rp2);
Asserts.assertEQ(result, n);
}
}
// C2->C1 invokevirtual, force GC for every allocation when entering a C1 VEP (RefPoint)
// Same as test56, except we call the VVEP(RO) instead of VEP.
@Test(compLevel = C2)
public int test77(RefPoint rp1, RefPoint rp2) {
! return rp1.final_func(rp2);
}
@DontCompile
public void test77_verifier(boolean warmup) {
int count = warmup ? 1 : 5;
*** 1458,1468 ****
System.out.println("Hello: " + i);
}
try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
result = test77(rp1, rp2);
}
! int n = rp1.test77_helper(rp2);
Asserts.assertEQ(result, n);
}
}
- /**/
}
--- 1450,1459 ----
System.out.println("Hello: " + i);
}
try (ForceGCMarker m = ForceGCMarker.mark(warmup)) {
result = test77(rp1, rp2);
}
! int n = rp1.final_func(rp2);
Asserts.assertEQ(result, n);
}
}
}
< prev index next >