comparison src/share/vm/jvmci/jvmciJavaAccess.hpp @ 22464:3fb432661d59

make JVMCIRuntime::metadata_do return immediately if HotSpotJVMCIMetaAccessContext has not yet been loaded
author Doug Simon <doug.simon@oracle.com>
date Tue, 25 Aug 2015 13:56:32 +0200
parents 76af33d4d504
children 822922922f3c
comparison
equal deleted inserted replaced
22463:d9f5c93a83d3 22464:3fb432661d59
302 #define STATIC_OOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, oop, signature) 302 #define STATIC_OOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, oop, signature)
303 #define STATIC_OBJARRAYOOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, objArrayOop, signature) 303 #define STATIC_OBJARRAYOOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, objArrayOop, signature)
304 #define STATIC_OOPISH_FIELD(klassName, name, type, signature) \ 304 #define STATIC_OOPISH_FIELD(klassName, name, type, signature) \
305 static int _##name##_offset; \ 305 static int _##name##_offset; \
306 static type name() { \ 306 static type name() { \
307 assert(klassName::klass() != NULL, "Class not yet loaded: " #klassName); \
307 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \ 308 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \
308 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \ 309 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
309 if (UseCompressedOops) { \ 310 if (UseCompressedOops) { \
310 return (type) oopDesc::load_decode_heap_oop((narrowOop *)addr); \ 311 return (type) oopDesc::load_decode_heap_oop((narrowOop *)addr); \
311 } else { \ 312 } else { \
312 return (type) oopDesc::load_decode_heap_oop((oop*)addr); \ 313 return (type) oopDesc::load_decode_heap_oop((oop*)addr); \
313 } \ 314 } \
314 } \ 315 } \
315 static void set_##name(type x) { \ 316 static void set_##name(type x) { \
317 assert(klassName::klass() != NULL, "Class not yet loaded: " #klassName); \
316 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \ 318 InstanceKlass* ik = InstanceKlass::cast(klassName::klass()); \
317 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \ 319 address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
318 if (UseCompressedOops) { \ 320 if (UseCompressedOops) { \
319 oop_store((narrowOop *)addr, x); \ 321 oop_store((narrowOop *)addr, x); \
320 } else { \ 322 } else { \