comparison src/share/vm/classfile/systemDictionary.cpp @ 6847:65d07d9ee446

8000263: JSR 292: signature types may appear to be unloaded Reviewed-by: kvn, jrose
author twisti
date Mon, 08 Oct 2012 17:04:00 -0700
parents f6b0eb4e44cf
children 19eb999cb72c
comparison
equal deleted inserted replaced
6846:377508648226 6847:65d07d9ee446
971 NOT_PRODUCT(find_wkk_probes++); 971 NOT_PRODUCT(find_wkk_probes++);
972 vmSymbols::SID sid = vmSymbols::find_sid(class_name); 972 vmSymbols::SID sid = vmSymbols::find_sid(class_name);
973 if (sid != vmSymbols::NO_SID) { 973 if (sid != vmSymbols::NO_SID) {
974 Klass* k = NULL; 974 Klass* k = NULL;
975 switch (sid) { 975 switch (sid) {
976 #define WK_KLASS_CASE(name, symbol, ignore_option) \ 976 #define WK_KLASS_CASE(name, symbol, option) \
977 case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \ 977 case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \
978 k = WK_KLASS(name); break; 978 if (option == Pre_Link) { \
979 k = WK_KLASS(name); \
980 } \
981 break;
979 WK_KLASSES_DO(WK_KLASS_CASE) 982 WK_KLASSES_DO(WK_KLASS_CASE)
980 #undef WK_KLASS_CASE 983 #undef WK_KLASS_CASE
981 } 984 }
982 NOT_PRODUCT(if (k != NULL) find_wkk_wins++); 985 NOT_PRODUCT(if (k != NULL) find_wkk_wins++);
983 return k; 986 return k;
1953 1956
1954 // move the starting value forward to the limit: 1957 // move the starting value forward to the limit:
1955 start_id = limit_id; 1958 start_id = limit_id;
1956 } 1959 }
1957 1960
1961 #ifdef ASSERT
1962 void SystemDictionary::check_wk_pre_link_klasses() {
1963 #define WK_KLASS_CHECK(name, symbol, option) \
1964 if (option == Pre_Link) { \
1965 assert(name()->is_public(), ""); \
1966 }
1967 WK_KLASSES_DO(WK_KLASS_CHECK);
1968 #undef WK_KLASS_CHECK
1969 }
1970 #endif
1958 1971
1959 void SystemDictionary::initialize_preloaded_classes(TRAPS) { 1972 void SystemDictionary::initialize_preloaded_classes(TRAPS) {
1960 assert(WK_KLASS(Object_klass) == NULL, "preloaded classes should only be initialized once"); 1973 assert(WK_KLASS(Object_klass) == NULL, "preloaded classes should only be initialized once");
1961 // Preload commonly used klasses 1974 // Preload commonly used klasses
1962 WKID scan = FIRST_WKID; 1975 WKID scan = FIRST_WKID;
2007 // Skip the JSR 292 classes, if not enabled. 2020 // Skip the JSR 292 classes, if not enabled.
2008 scan = WKID(jsr292_group_end + 1); 2021 scan = WKID(jsr292_group_end + 1);
2009 } 2022 }
2010 2023
2011 initialize_wk_klasses_until(WKID_LIMIT, scan, CHECK); 2024 initialize_wk_klasses_until(WKID_LIMIT, scan, CHECK);
2025
2026 check_wk_pre_link_klasses();
2012 2027
2013 _box_klasses[T_BOOLEAN] = WK_KLASS(Boolean_klass); 2028 _box_klasses[T_BOOLEAN] = WK_KLASS(Boolean_klass);
2014 _box_klasses[T_CHAR] = WK_KLASS(Character_klass); 2029 _box_klasses[T_CHAR] = WK_KLASS(Character_klass);
2015 _box_klasses[T_FLOAT] = WK_KLASS(Float_klass); 2030 _box_klasses[T_FLOAT] = WK_KLASS(Float_klass);
2016 _box_klasses[T_DOUBLE] = WK_KLASS(Double_klass); 2031 _box_klasses[T_DOUBLE] = WK_KLASS(Double_klass);