< prev index next >
test/compiler/jvmci/compilerToVM/IsCompilableTest.java
Print this page
rev 12631 : 8174961: [JVMCI] incorrect implementation of isCompilable
*** 40,50 ****
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler
* compiler.jvmci.compilerToVM.IsCompilableTest
* @run main/othervm -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
! * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
* compiler.jvmci.compilerToVM.IsCompilableTest
*/
package compiler.jvmci.compilerToVM;
--- 40,50 ----
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler
* compiler.jvmci.compilerToVM.IsCompilableTest
* @run main/othervm -Xbootclasspath/a:.
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
! * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler
* compiler.jvmci.compilerToVM.IsCompilableTest
*/
package compiler.jvmci.compilerToVM;
*** 67,91 ****
List<Executable> testCases = createTestCases();
testCases.forEach(IsCompilableTest::runSanityTest);
}
private static void runSanityTest(Executable aMethod) {
- boolean UseJVMCICompiler = (Boolean) WB.getVMFlag("UseJVMCICompiler");
HotSpotResolvedJavaMethod method = CTVMUtilities
.getResolvedMethod(aMethod);
boolean isCompilable = CompilerToVMHelper.isCompilable(method);
! boolean expected = UseJVMCICompiler || WB.isMethodCompilable(aMethod);
Asserts.assertEQ(isCompilable, expected, "Unexpected initial " +
"value of property 'compilable'");
- if (!UseJVMCICompiler) {
WB.makeMethodNotCompilable(aMethod);
isCompilable = CompilerToVMHelper.isCompilable(method);
Asserts.assertFalse(isCompilable, aMethod + "Unexpected value of " +
"property 'isCompilable' after setting 'compilable' to false");
}
- }
private static List<Executable> createTestCases() {
List<Executable> testCases = new ArrayList<>();
Class<?> aClass = DummyClass.class;
--- 67,88 ----
List<Executable> testCases = createTestCases();
testCases.forEach(IsCompilableTest::runSanityTest);
}
private static void runSanityTest(Executable aMethod) {
HotSpotResolvedJavaMethod method = CTVMUtilities
.getResolvedMethod(aMethod);
boolean isCompilable = CompilerToVMHelper.isCompilable(method);
! boolean expected = WB.isMethodCompilable(aMethod);
Asserts.assertEQ(isCompilable, expected, "Unexpected initial " +
"value of property 'compilable'");
WB.makeMethodNotCompilable(aMethod);
isCompilable = CompilerToVMHelper.isCompilable(method);
Asserts.assertFalse(isCompilable, aMethod + "Unexpected value of " +
"property 'isCompilable' after setting 'compilable' to false");
}
private static List<Executable> createTestCases() {
List<Executable> testCases = new ArrayList<>();
Class<?> aClass = DummyClass.class;
< prev index next >