< prev index next > test/hotspot/jtreg/compiler/ciReplay/TestInliningProtectionDomain.java
Print this page
/*
- * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
public static void test() {
bar();
}
- // Integer should be resolved for the protection domain of this class because the separate compilation of bar() in
+ // Thread should be resolved for the protection domain of this class because the separate compilation of bar() in
// the normal run will resolve all classes in the signature. Inlining succeeds.
- private static Integer bar() {
+ private static Thread bar() {
InliningFoo.foo();
return null;
}
}
public static void test() {
bar(); // Not compiled before separately
}
- // Integer should be resolved for the protection domain of this class because getDeclaredMethods is called in normal run
+ // Thread should be resolved for the protection domain of this class because getDeclaredMethods is called in normal run
// when validating main() method. In this process, all public methods of this class are visited and its signature classes
// are resolved. Inlining of bar() succeeds.
- public static Integer bar() {
+ public static Thread bar() {
InliningFoo.foo();
return null;
}
}
public static void test() {
bar(); // Not compiled before separately
}
- // Integer should be unresolved for the protection domain of this class even though getDeclaredMethods is called in normal
+ // Thread should be unresolved for the protection domain of this class even though getDeclaredMethods is called in normal
// run when validating main() method. In this process, only public methods of this class are visited and its signature
// classes are resolved. Since this method is private, the signature classes are not resolved for this protection domain.
// Inlining of bar() should fail in normal run with "unresolved signature classes". Therefore, replay compilation should
// also not inline bar().
- private static Integer bar() {
+ private static Thread bar() {
InliningFoo.foo();
return null;
}
}
public static void test() {
bar(); // Not compiled before separately
}
- // Integer should be resovled for the protection domain of this class because getDeclaredMethods is called in normal run
+ // String should be resolved for the protection domain of this class because getDeclaredMethods is called in normal run
// when validating main() method. In this process, public methods of this class are visited and its signature classes
// are resolved. bar() is private and not visited in this process (i.e. no resolution of String). But since main()
// has String[] as parameter, the String class will be resolved for this protection domain. Inlining of bar() succeeds.
private static String bar() {
InliningFoo.foo();
< prev index next >