mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8173584: Add unit test for 8173309
Reviewed-by: kvn
This commit is contained in:
parent
f02b7dfba7
commit
3f2d357f28
1 changed files with 15 additions and 2 deletions
|
@ -44,6 +44,8 @@
|
|||
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
|
||||
* -XX:CompileCommand=exclude,*::check
|
||||
* -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
|
||||
* -XX:CompileCommand=dontinline,compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest,testFrame
|
||||
* -XX:CompileCommand=inline,compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest,recurse
|
||||
* -Xbatch
|
||||
* -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false
|
||||
* compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
|
||||
|
@ -119,14 +121,25 @@ public class MaterializeVirtualObjectTest {
|
|||
}
|
||||
Asserts.assertTrue(WB.isMethodCompiled(METHOD), getName()
|
||||
+ "Method unexpectedly not compiled");
|
||||
Asserts.assertTrue(WB.getMethodCompilationLevel(METHOD) == 4, getName()
|
||||
+ "Method not compiled at level 4");
|
||||
testFrame("someString", COMPILE_THRESHOLD);
|
||||
}
|
||||
|
||||
private void testFrame(String str, int iteration) {
|
||||
Helper helper = new Helper(str);
|
||||
check(iteration);
|
||||
recurse(2, iteration);
|
||||
Asserts.assertTrue((helper.string != null) && (this != null)
|
||||
&& (helper != null), getName() + " : some locals are null");
|
||||
&& (helper != null), String.format("%s : some locals are null", getName()));
|
||||
}
|
||||
private void recurse(int depth, int iteration) {
|
||||
if (depth == 0) {
|
||||
check(iteration);
|
||||
} else {
|
||||
Integer s = new Integer(depth);
|
||||
recurse(depth - 1, iteration);
|
||||
Asserts.assertEQ(s.intValue(), depth, String.format("different values: %s != %s", s.intValue(), depth));
|
||||
}
|
||||
}
|
||||
|
||||
private void check(int iteration) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue