< prev index next > test/hotspot/jtreg/runtime/cds/appcds/resolvedConstants/ResolvedConstants.java
Print this page
.shouldMatch(ALWAYS("klass.* ResolvedConstantsBar app => ResolvedConstantsFoo app"))
// Always resolve reference when a class references a super interface
.shouldMatch(ALWAYS("klass.* ResolvedConstantsApp app => java/lang/Runnable boot"))
// Without -XX:+AOTClassLinking:
// java/lang/System is in the boot loader but ResolvedConstantsApp is loaded by the app loader.
// Even though System is in the vmClasses list, when ResolvedConstantsApp looks up
// "java/lang/System" in its ConstantPool, the app loader may not have resolved the System
// class yet (i.e., there's no initiaited class entry for System in the app loader's dictionary)
.shouldMatch(AOTLINK_ONLY("klass.* ResolvedConstantsApp .*java/lang/System"))
!
// Field References ---
// Always resolve references to fields in the current class or super class(es)
.shouldMatch(ALWAYS("field.* ResolvedConstantsBar => ResolvedConstantsBar.b:I"))
.shouldMatch(ALWAYS("field.* ResolvedConstantsBar => ResolvedConstantsBar.a:I"))
.shouldMatch(ALWAYS("klass.* ResolvedConstantsBar app => ResolvedConstantsFoo app"))
// Always resolve reference when a class references a super interface
.shouldMatch(ALWAYS("klass.* ResolvedConstantsApp app => java/lang/Runnable boot"))
+ /** premain allows static method pre-resolution
// Without -XX:+AOTClassLinking:
// java/lang/System is in the boot loader but ResolvedConstantsApp is loaded by the app loader.
// Even though System is in the vmClasses list, when ResolvedConstantsApp looks up
// "java/lang/System" in its ConstantPool, the app loader may not have resolved the System
// class yet (i.e., there's no initiaited class entry for System in the app loader's dictionary)
.shouldMatch(AOTLINK_ONLY("klass.* ResolvedConstantsApp .*java/lang/System"))
! **/
// Field References ---
// Always resolve references to fields in the current class or super class(es)
.shouldMatch(ALWAYS("field.* ResolvedConstantsBar => ResolvedConstantsBar.b:I"))
.shouldMatch(ALWAYS("field.* ResolvedConstantsBar => ResolvedConstantsBar.a:I"))
// Should resolve references to own non-static method (private or public)
.shouldMatch(ALWAYS("method.*: ResolvedConstantsBar ResolvedConstantsBar.doBar:"))
.shouldMatch(ALWAYS("method.*: ResolvedConstantsApp ResolvedConstantsApp.privateInstanceCall:"))
.shouldMatch(ALWAYS("method.*: ResolvedConstantsApp ResolvedConstantsApp.publicInstanceCall:"))
!
// Should not resolve references to static method
.shouldNotMatch(ALWAYS("method.*: ResolvedConstantsApp ResolvedConstantsApp.staticCall:"))
// Should resolve references to method in super type
.shouldMatch(ALWAYS("method.*: ResolvedConstantsBar ResolvedConstantsFoo.doBar:"))
// Without -XX:+AOTClassLinking App class cannot resolve references to methods in boot classes:
// Should resolve references to own non-static method (private or public)
.shouldMatch(ALWAYS("method.*: ResolvedConstantsBar ResolvedConstantsBar.doBar:"))
.shouldMatch(ALWAYS("method.*: ResolvedConstantsApp ResolvedConstantsApp.privateInstanceCall:"))
.shouldMatch(ALWAYS("method.*: ResolvedConstantsApp ResolvedConstantsApp.publicInstanceCall:"))
! /** premain allows static method pre-resolution
// Should not resolve references to static method
.shouldNotMatch(ALWAYS("method.*: ResolvedConstantsApp ResolvedConstantsApp.staticCall:"))
+ **/
// Should resolve references to method in super type
.shouldMatch(ALWAYS("method.*: ResolvedConstantsBar ResolvedConstantsFoo.doBar:"))
// Without -XX:+AOTClassLinking App class cannot resolve references to methods in boot classes:
;
// Indy References ---
if (aotClassLinking) {
+ /** premain allows Old classes to be linked
out.shouldContain("Cannot aot-resolve Lambda proxy because OldConsumer is excluded")
.shouldContain("Cannot aot-resolve Lambda proxy because OldProvider is excluded")
.shouldContain("Cannot aot-resolve Lambda proxy because OldClass is excluded")
.shouldContain("Cannot aot-resolve Lambda proxy of interface type InterfaceWithClinit")
.shouldMatch("klasses.* app *NormalClass[$][$]Lambda/.* hidden aot-linked inited")
.shouldNotMatch("klasses.* app *SubOfOldClass[$][$]Lambda/")
.shouldMatch("archived indy *CP entry.*StringConcatTest .* => java/lang/invoke/StringConcatFactory.makeConcatWithConstants")
.shouldNotMatch("archived indy *CP entry.*StringConcatTestOld .* => java/lang/invoke/StringConcatFactory.makeConcatWithConstants");
+ **/
}
}
static String ALWAYS(String s) {
return "cds,resolve.*archived " + s;
< prev index next >