Mercurial > hg > truffle
comparison src/share/vm/oops/constantPool.hpp @ 10265:92ef81e2f571
8003557: NPG: Klass* const k should be const Klass* k.
Summary: With NPG, const KlassOop klass which is in fact a definition converted to Klass* const, which is not the original intention. The right usage is converting them to const Klass*.
Reviewed-by: coleenp, kvn
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Fri, 10 May 2013 08:27:30 -0700 |
parents | c115fac239eb |
children | 836a62f43af9 b2e698d2276c 7c29904fdfa2 |
comparison
equal
deleted
inserted
replaced
10262:c272092594bd | 10265:92ef81e2f571 |
---|---|
352 return klass_at_impl(h_this, which, CHECK_NULL); | 352 return klass_at_impl(h_this, which, CHECK_NULL); |
353 } | 353 } |
354 | 354 |
355 Symbol* klass_name_at(int which); // Returns the name, w/o resolving. | 355 Symbol* klass_name_at(int which); // Returns the name, w/o resolving. |
356 | 356 |
357 Klass* resolved_klass_at(int which) { // Used by Compiler | 357 Klass* resolved_klass_at(int which) const { // Used by Compiler |
358 guarantee(tag_at(which).is_klass(), "Corrupted constant pool"); | 358 guarantee(tag_at(which).is_klass(), "Corrupted constant pool"); |
359 // Must do an acquire here in case another thread resolved the klass | 359 // Must do an acquire here in case another thread resolved the klass |
360 // behind our back, lest we later load stale values thru the oop. | 360 // behind our back, lest we later load stale values thru the oop. |
361 return CPSlot((Klass*)OrderAccess::load_ptr_acquire(obj_at_addr_raw(which))).get_klass(); | 361 return CPSlot((Klass*)OrderAccess::load_ptr_acquire(obj_at_addr_raw(which))).get_klass(); |
362 } | 362 } |