equal
deleted
inserted
replaced
27 #include "classfile/systemDictionary.hpp" |
27 #include "classfile/systemDictionary.hpp" |
28 #include "oops/instanceMirrorKlass.hpp" |
28 #include "oops/instanceMirrorKlass.hpp" |
29 |
29 |
30 class JVMCIJavaClasses : AllStatic { |
30 class JVMCIJavaClasses : AllStatic { |
31 public: |
31 public: |
32 static void compute_offsets(); |
32 static void compute_offsets(TRAPS); |
33 }; |
33 }; |
34 |
34 |
35 /* This macro defines the structure of the CompilationResult - classes. |
35 /* This macro defines the structure of the CompilationResult - classes. |
36 * It will generate classes with accessors similar to javaClasses.hpp, but with specializations for oops, Handles and jni handles. |
36 * It will generate classes with accessors similar to javaClasses.hpp, but with specializations for oops, Handles and jni handles. |
37 * |
37 * |
304 static void check(oop obj, const char* field_name, int offset) { \ |
304 static void check(oop obj, const char* field_name, int offset) { \ |
305 assert(obj != NULL, "NULL field access of %s.%s", #name, field_name); \ |
305 assert(obj != NULL, "NULL field access of %s.%s", #name, field_name); \ |
306 assert(obj->is_a(SystemDictionary::name##_klass()), "wrong class, " #name " expected, found %s", obj->klass()->external_name()); \ |
306 assert(obj->is_a(SystemDictionary::name##_klass()), "wrong class, " #name " expected, found %s", obj->klass()->external_name()); \ |
307 assert(offset != 0, "must be valid offset"); \ |
307 assert(offset != 0, "must be valid offset"); \ |
308 } \ |
308 } \ |
309 static void compute_offsets(); \ |
309 static void compute_offsets(TRAPS); \ |
310 public: \ |
310 public: \ |
311 static InstanceKlass* klass() { return SystemDictionary::name##_klass(); } |
311 static InstanceKlass* klass() { return SystemDictionary::name##_klass(); } |
312 |
312 |
313 #define END_CLASS }; |
313 #define END_CLASS }; |
314 |
314 |
390 #undef STATIC_OBJARRAYOOP_FIELD |
390 #undef STATIC_OBJARRAYOOP_FIELD |
391 #undef STATIC_INT_FIELD |
391 #undef STATIC_INT_FIELD |
392 #undef STATIC_BOOLEAN_FIELD |
392 #undef STATIC_BOOLEAN_FIELD |
393 #undef EMPTY_CAST |
393 #undef EMPTY_CAST |
394 |
394 |
395 void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field); |
395 void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field, TRAPS); |
396 |
396 |
397 #endif // SHARE_VM_JVMCI_JVMCIJAVACLASSES_HPP |
397 #endif // SHARE_VM_JVMCI_JVMCIJAVACLASSES_HPP |