Mercurial > hg > graal-compiler
comparison src/share/vm/oops/klass.hpp @ 1941:79d04223b8a5
Added caching for resolved types and resolved fields.
This is crucial, because the local load elimination will lead to wrong results, if field equality (of two RiField objects with the same object and the same RiType) is not given. The caching makes sure that the default equals implementation is sufficient.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 28 Dec 2010 18:33:26 +0100 |
parents | 126ea7725993 |
children | 06f017f7daa7 |
comparison
equal
deleted
inserted
replaced
1940:e92a9a73324e | 1941:79d04223b8a5 |
---|---|
213 objArrayOop _secondary_supers; | 213 objArrayOop _secondary_supers; |
214 // Ordered list of all primary supertypes | 214 // Ordered list of all primary supertypes |
215 klassOop _primary_supers[_primary_super_limit]; | 215 klassOop _primary_supers[_primary_super_limit]; |
216 // java/lang/Class instance mirroring this class | 216 // java/lang/Class instance mirroring this class |
217 oop _java_mirror; | 217 oop _java_mirror; |
218 // com/sun/hotspot/c1x/HotSpotTypeResolved mirroring this class | |
219 oop _c1x_mirror; | |
218 // Superclass | 220 // Superclass |
219 klassOop _super; | 221 klassOop _super; |
220 // Class name. Instance classes: java/lang/String, etc. Array classes: [I, | 222 // Class name. Instance classes: java/lang/String, etc. Array classes: [I, |
221 // [Ljava/lang/String;, etc. Set to zero for all other kinds of classes. | 223 // [Ljava/lang/String;, etc. Set to zero for all other kinds of classes. |
222 symbolOop _name; | 224 symbolOop _name; |
312 } | 314 } |
313 | 315 |
314 // java mirror | 316 // java mirror |
315 oop java_mirror() const { return _java_mirror; } | 317 oop java_mirror() const { return _java_mirror; } |
316 void set_java_mirror(oop m) { oop_store((oop*) &_java_mirror, m); } | 318 void set_java_mirror(oop m) { oop_store((oop*) &_java_mirror, m); } |
319 | |
320 // c1x mirror | |
321 oop c1x_mirror() const { return _c1x_mirror; } | |
322 void set_c1x_mirror(oop m) { oop_store((oop*) &_c1x_mirror, m); } | |
317 | 323 |
318 // modifier flags | 324 // modifier flags |
319 jint modifier_flags() const { return _modifier_flags; } | 325 jint modifier_flags() const { return _modifier_flags; } |
320 void set_modifier_flags(jint flags) { _modifier_flags = flags; } | 326 void set_modifier_flags(jint flags) { _modifier_flags = flags; } |
321 | 327 |
341 oop* adr_super() const { return (oop*)&_super; } | 347 oop* adr_super() const { return (oop*)&_super; } |
342 oop* adr_primary_supers() const { return (oop*)&_primary_supers[0]; } | 348 oop* adr_primary_supers() const { return (oop*)&_primary_supers[0]; } |
343 oop* adr_secondary_super_cache() const { return (oop*)&_secondary_super_cache; } | 349 oop* adr_secondary_super_cache() const { return (oop*)&_secondary_super_cache; } |
344 oop* adr_secondary_supers()const { return (oop*)&_secondary_supers; } | 350 oop* adr_secondary_supers()const { return (oop*)&_secondary_supers; } |
345 oop* adr_java_mirror() const { return (oop*)&_java_mirror; } | 351 oop* adr_java_mirror() const { return (oop*)&_java_mirror; } |
352 oop* adr_c1x_mirror() const { return (oop*)&_c1x_mirror; } | |
346 oop* adr_name() const { return (oop*)&_name; } | 353 oop* adr_name() const { return (oop*)&_name; } |
347 oop* adr_subklass() const { return (oop*)&_subklass; } | 354 oop* adr_subklass() const { return (oop*)&_subklass; } |
348 oop* adr_next_sibling() const { return (oop*)&_next_sibling; } | 355 oop* adr_next_sibling() const { return (oop*)&_next_sibling; } |
349 | 356 |
350 public: | 357 public: |