--- a/hotspot/src/share/vm/oops/constantPool.hpp Thu Dec 17 23:36:28 2015 +0000
+++ b/hotspot/src/share/vm/oops/constantPool.hpp Fri Dec 18 12:39:02 2015 -0800
@@ -117,7 +117,7 @@
private:
intptr_t* base() const { return (intptr_t*) (((char*) this) + sizeof(ConstantPool)); }
- CPSlot slot_at(int which) {
+ CPSlot slot_at(int which) const {
assert(is_within_bounds(which), "index out of bounds");
// Uses volatile because the klass slot changes without a lock.
volatile intptr_t adr = (intptr_t)OrderAccess::load_ptr_acquire(obj_at_addr_raw(which));
@@ -350,7 +350,7 @@
return klass_at_impl(h_this, which, false, THREAD);
}
- Symbol* klass_name_at(int which); // Returns the name, w/o resolving.
+ Symbol* klass_name_at(int which) const; // Returns the name, w/o resolving.
Klass* resolved_klass_at(int which) const { // Used by Compiler
guarantee(tag_at(which).is_klass(), "Corrupted constant pool");
@@ -385,7 +385,7 @@
return *((jdouble*)&tmp);
}
- Symbol* symbol_at(int which) {
+ Symbol* symbol_at(int which) const {
assert(tag_at(which).is_utf8(), "Corrupted constant pool");
return *symbol_at_addr(which);
}
@@ -669,7 +669,7 @@
int name_ref_index_at(int which_nt); // == low-order jshort of name_and_type_at(which_nt)
int signature_ref_index_at(int which_nt); // == high-order jshort of name_and_type_at(which_nt)
- BasicType basic_type_for_signature_at(int which);
+ BasicType basic_type_for_signature_at(int which) const;
// Resolve string constants (to prevent allocation during compilation)
void resolve_string_constants(TRAPS) {