8172733: [JVMCI] add ResolvedJavaMethod.hasNeverInlineDirective

Reviewed-by: kvn
This commit is contained in:
Doug Simon 2017-01-22 21:40:59 +01:00
parent f3fcb0ec76
commit 1cd0ad5c34
10 changed files with 158 additions and 53 deletions

View file

@ -67,13 +67,13 @@ public class DoNotInlineOrCompileTest {
private static void runSanityTest(Executable aMethod) {
HotSpotResolvedJavaMethod method = CTVMUtilities
.getResolvedMethod(aMethod);
boolean canInline = CompilerToVMHelper.canInlineMethod(method);
Asserts.assertTrue(canInline, "Unexpected initial " +
"value of property 'can inline'");
boolean hasNeverInlineDirective = CompilerToVMHelper.hasNeverInlineDirective(method);
Asserts.assertFalse(hasNeverInlineDirective, "Unexpected initial " +
"value of property 'hasNeverInlineDirective'");
CompilerToVMHelper.doNotInlineOrCompile(method);
canInline = CompilerToVMHelper.canInlineMethod(method);
Asserts.assertFalse(canInline, aMethod
+ " : can be inlined even after doNotInlineOrCompile'");
hasNeverInlineDirective = CompilerToVMHelper.hasNeverInlineDirective(method);
Asserts.assertTrue(hasNeverInlineDirective, aMethod
+ " : hasNeverInlineDirective is false even after doNotInlineOrCompile'");
}
private static List<Executable> createTestCases() {