mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8172733: [JVMCI] add ResolvedJavaMethod.hasNeverInlineDirective
Reviewed-by: kvn
This commit is contained in:
parent
f3fcb0ec76
commit
1cd0ad5c34
10 changed files with 158 additions and 53 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue