Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/javaClasses.hpp @ 10408:836a62f43af9
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 10:45:56 +0200 |
parents | b9a918201d47 6bd680e9ea35 |
children | 6b0fd0964b87 |
comparison
equal
deleted
inserted
replaced
10086:e0fb8a213650 | 10408:836a62f43af9 |
---|---|
151 // String converters | 151 // String converters |
152 static char* as_utf8_string(oop java_string); | 152 static char* as_utf8_string(oop java_string); |
153 static char* as_utf8_string(oop java_string, char* buf, int buflen); | 153 static char* as_utf8_string(oop java_string, char* buf, int buflen); |
154 static char* as_utf8_string(oop java_string, int start, int len); | 154 static char* as_utf8_string(oop java_string, int start, int len); |
155 static char* as_platform_dependent_str(Handle java_string, TRAPS); | 155 static char* as_platform_dependent_str(Handle java_string, TRAPS); |
156 static jchar* as_unicode_string(oop java_string, int& length); | 156 static jchar* as_unicode_string(oop java_string, int& length, TRAPS); |
157 // produce an ascii string with all other values quoted using \u#### | 157 // produce an ascii string with all other values quoted using \u#### |
158 static char* as_quoted_ascii(oop java_string); | 158 static char* as_quoted_ascii(oop java_string); |
159 | 159 |
160 // Compute the hash value for a java.lang.String object which would | 160 // Compute the hash value for a java.lang.String object which would |
161 // contain the characters passed in. | 161 // contain the characters passed in. |
207 #define CLASS_INJECTED_FIELDS(macro) \ | 207 #define CLASS_INJECTED_FIELDS(macro) \ |
208 macro(java_lang_Class, klass, intptr_signature, false) \ | 208 macro(java_lang_Class, klass, intptr_signature, false) \ |
209 GRAAL_ONLY(macro(java_lang_Class, graal_mirror, object_signature, false))\ | 209 GRAAL_ONLY(macro(java_lang_Class, graal_mirror, object_signature, false))\ |
210 macro(java_lang_Class, array_klass, intptr_signature, false) \ | 210 macro(java_lang_Class, array_klass, intptr_signature, false) \ |
211 macro(java_lang_Class, oop_size, int_signature, false) \ | 211 macro(java_lang_Class, oop_size, int_signature, false) \ |
212 macro(java_lang_Class, static_oop_field_count, int_signature, false) | 212 macro(java_lang_Class, static_oop_field_count, int_signature, false) \ |
213 macro(java_lang_Class, protection_domain, object_signature, false) \ | |
214 macro(java_lang_Class, init_lock, object_signature, false) \ | |
215 macro(java_lang_Class, signers, object_signature, false) | |
213 | 216 |
214 class java_lang_Class : AllStatic { | 217 class java_lang_Class : AllStatic { |
215 friend class VMStructs; | 218 friend class VMStructs; |
216 | 219 |
217 private: | 220 private: |
224 static int _static_oop_field_count_offset; | 227 static int _static_oop_field_count_offset; |
225 #ifdef GRAAL | 228 #ifdef GRAAL |
226 static int _graal_mirror_offset; | 229 static int _graal_mirror_offset; |
227 #endif | 230 #endif |
228 | 231 |
232 static int _protection_domain_offset; | |
233 static int _init_lock_offset; | |
234 static int _signers_offset; | |
235 | |
229 static bool offsets_computed; | 236 static bool offsets_computed; |
230 static int classRedefinedCount_offset; | 237 static int classRedefinedCount_offset; |
231 static GrowableArray<Klass*>* _fixup_mirror_list; | 238 static GrowableArray<Klass*>* _fixup_mirror_list; |
232 | 239 |
240 static void set_init_lock(oop java_class, oop init_lock); | |
233 public: | 241 public: |
234 static void compute_offsets(); | 242 static void compute_offsets(); |
235 | 243 |
236 // Instance creation | 244 // Instance creation |
237 static oop create_mirror(KlassHandle k, TRAPS); | 245 static oop create_mirror(KlassHandle k, Handle protection_domain, TRAPS); |
238 static void fixup_mirror(KlassHandle k, TRAPS); | 246 static void fixup_mirror(KlassHandle k, TRAPS); |
239 static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS); | 247 static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS); |
240 // Conversion | 248 // Conversion |
241 static Klass* as_Klass(oop java_class); | 249 static Klass* as_Klass(oop java_class); |
242 static void set_klass(oop java_class, Klass* klass); | 250 static void set_klass(oop java_class, Klass* klass); |
263 static int klass_offset_in_bytes() { return _klass_offset; } | 271 static int klass_offset_in_bytes() { return _klass_offset; } |
264 static int array_klass_offset_in_bytes() { return _array_klass_offset; } | 272 static int array_klass_offset_in_bytes() { return _array_klass_offset; } |
265 // Support for classRedefinedCount field | 273 // Support for classRedefinedCount field |
266 static int classRedefinedCount(oop the_class_mirror); | 274 static int classRedefinedCount(oop the_class_mirror); |
267 static void set_classRedefinedCount(oop the_class_mirror, int value); | 275 static void set_classRedefinedCount(oop the_class_mirror, int value); |
276 | |
277 // Support for embedded per-class oops | |
278 static oop protection_domain(oop java_class); | |
279 static void set_protection_domain(oop java_class, oop protection_domain); | |
280 static oop init_lock(oop java_class); | |
281 static objArrayOop signers(oop java_class); | |
282 static void set_signers(oop java_class, objArrayOop signers); | |
268 | 283 |
269 static int oop_size(oop java_class); | 284 static int oop_size(oop java_class); |
270 static void set_oop_size(oop java_class, int size); | 285 static void set_oop_size(oop java_class, int size); |
271 static int static_oop_field_count(oop java_class); | 286 static int static_oop_field_count(oop java_class); |
272 static void set_static_oop_field_count(oop java_class, int size); | 287 static void set_static_oop_field_count(oop java_class, int size); |
1044 static int flags(oop mname); | 1059 static int flags(oop mname); |
1045 static void set_flags(oop mname, int flags); | 1060 static void set_flags(oop mname, int flags); |
1046 | 1061 |
1047 static Metadata* vmtarget(oop mname); | 1062 static Metadata* vmtarget(oop mname); |
1048 static void set_vmtarget(oop mname, Metadata* target); | 1063 static void set_vmtarget(oop mname, Metadata* target); |
1064 #if INCLUDE_JVMTI | |
1065 static void adjust_vmtarget(oop mname, Metadata* target); | |
1066 #endif // INCLUDE_JVMTI | |
1049 | 1067 |
1050 static intptr_t vmindex(oop mname); | 1068 static intptr_t vmindex(oop mname); |
1051 static void set_vmindex(oop mname, intptr_t index); | 1069 static void set_vmindex(oop mname, intptr_t index); |
1052 | 1070 |
1053 // Testers | 1071 // Testers |