equal
deleted
inserted
replaced
31 #include "oops/symbol.hpp" |
31 #include "oops/symbol.hpp" |
32 #include "runtime/java.hpp" |
32 #include "runtime/java.hpp" |
33 #include "runtime/reflectionUtils.hpp" |
33 #include "runtime/reflectionUtils.hpp" |
34 #include "utilities/hashtable.hpp" |
34 #include "utilities/hashtable.hpp" |
35 #include "utilities/hashtable.inline.hpp" |
35 #include "utilities/hashtable.inline.hpp" |
|
36 #include "jvmci/systemDictionary_jvmci.hpp" |
36 |
37 |
37 |
38 |
38 // The system dictionary stores all loaded classes and maps: |
39 // The system dictionary stores all loaded classes and maps: |
39 // |
40 // |
40 // [class name,class loader] -> class i.e. [Symbol*,oop] -> Klass* |
41 // [class name,class loader] -> class i.e. [Symbol*,oop] -> Klass* |
190 do_klass(Double_klass, java_lang_Double, Pre ) \ |
191 do_klass(Double_klass, java_lang_Double, Pre ) \ |
191 do_klass(Byte_klass, java_lang_Byte, Pre ) \ |
192 do_klass(Byte_klass, java_lang_Byte, Pre ) \ |
192 do_klass(Short_klass, java_lang_Short, Pre ) \ |
193 do_klass(Short_klass, java_lang_Short, Pre ) \ |
193 do_klass(Integer_klass, java_lang_Integer, Pre ) \ |
194 do_klass(Integer_klass, java_lang_Integer, Pre ) \ |
194 do_klass(Long_klass, java_lang_Long, Pre ) \ |
195 do_klass(Long_klass, java_lang_Long, Pre ) \ |
|
196 \ |
|
197 /* JVMCI classes. These are loaded on-demand. */ \ |
|
198 JVMCI_WK_KLASSES_DO(do_klass) \ |
|
199 |
195 /*end*/ |
200 /*end*/ |
196 |
201 |
197 |
202 |
198 class SystemDictionary : AllStatic { |
203 class SystemDictionary : AllStatic { |
199 friend class VMStructs; |
204 friend class VMStructs; |
207 WK_KLASSES_DO(WK_KLASS_ENUM) |
212 WK_KLASSES_DO(WK_KLASS_ENUM) |
208 #undef WK_KLASS_ENUM |
213 #undef WK_KLASS_ENUM |
209 |
214 |
210 WKID_LIMIT, |
215 WKID_LIMIT, |
211 |
216 |
|
217 #if INCLUDE_JVMCI |
|
218 FIRST_JVMCI_WKID = WK_KLASS_ENUM_NAME(HotSpotCompiledCode_klass), |
|
219 LAST_JVMCI_WKID = WK_KLASS_ENUM_NAME(Value_klass), |
|
220 #endif |
|
221 |
212 FIRST_WKID = NO_WKID + 1 |
222 FIRST_WKID = NO_WKID + 1 |
213 }; |
223 }; |
214 |
224 |
215 enum InitOption { |
225 enum InitOption { |
216 Pre, // preloaded; error if not present |
226 Pre, // preloaded; error if not present |
217 |
227 |
218 // Order is significant. Options before this point require resolve_or_fail. |
228 // Order is significant. Options before this point require resolve_or_fail. |
219 // Options after this point will use resolve_or_null instead. |
229 // Options after this point will use resolve_or_null instead. |
220 |
230 |
221 Opt, // preload tried; NULL if not present |
231 Opt, // preload tried; NULL if not present |
|
232 #if INCLUDE_JVMCI |
|
233 Jvmci, // preload tried; error if not present, use only with JVMCI |
|
234 #endif |
222 OPTION_LIMIT, |
235 OPTION_LIMIT, |
223 CEIL_LG_OPTION_LIMIT = 2 // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT) |
236 CEIL_LG_OPTION_LIMIT = 2 // OPTION_LIMIT <= (1<<CEIL_LG_OPTION_LIMIT) |
224 }; |
237 }; |
225 |
238 |
226 |
239 |
396 } |
409 } |
397 |
410 |
398 static Klass* check_klass_Pre( Klass* k) { return check_klass(k); } |
411 static Klass* check_klass_Pre( Klass* k) { return check_klass(k); } |
399 static Klass* check_klass_Opt( Klass* k) { return k; } |
412 static Klass* check_klass_Opt( Klass* k) { return k; } |
400 |
413 |
|
414 JVMCI_ONLY(static Klass* check_klass_Jvmci(Klass* k) { return k; }) |
|
415 |
401 static bool initialize_wk_klass(WKID id, int init_opt, TRAPS); |
416 static bool initialize_wk_klass(WKID id, int init_opt, TRAPS); |
402 static void initialize_wk_klasses_until(WKID limit_id, WKID &start_id, TRAPS); |
417 static void initialize_wk_klasses_until(WKID limit_id, WKID &start_id, TRAPS); |
403 static void initialize_wk_klasses_through(WKID end_id, WKID &start_id, TRAPS) { |
418 static void initialize_wk_klasses_through(WKID end_id, WKID &start_id, TRAPS) { |
404 int limit = (int)end_id + 1; |
419 int limit = (int)end_id + 1; |
405 initialize_wk_klasses_until((WKID) limit, start_id, THREAD); |
420 initialize_wk_klasses_until((WKID) limit, start_id, THREAD); |