1.1 --- a/src/share/vm/oops/constantPoolOop.hpp Thu Oct 28 00:48:18 2010 -0700 1.2 +++ b/src/share/vm/oops/constantPoolOop.hpp Sat Oct 30 11:45:35 2010 -0700 1.3 @@ -414,14 +414,19 @@ 1.4 1.5 // The following methods (name/signature/klass_ref_at, klass_ref_at_noresolve, 1.6 // name_and_type_ref_index_at) all expect to be passed indices obtained 1.7 - // directly from the bytecode, and extracted according to java byte order. 1.8 + // directly from the bytecode. 1.9 // If the indices are meant to refer to fields or methods, they are 1.10 - // actually potentially byte-swapped, rewritten constant pool cache indices. 1.11 + // actually rewritten constant pool cache indices. 1.12 // The routine remap_instruction_operand_from_cache manages the adjustment 1.13 // of these values back to constant pool indices. 1.14 1.15 // There are also "uncached" versions which do not adjust the operand index; see below. 1.16 1.17 + // FIXME: Consider renaming these with a prefix "cached_" to make the distinction clear. 1.18 + // In a few cases (the verifier) there are uses before a cpcache has been built, 1.19 + // which are handled by a dynamic check in remap_instruction_operand_from_cache. 1.20 + // FIXME: Remove the dynamic check, and adjust all callers to specify the correct mode. 1.21 + 1.22 // Lookup for entries consisting of (klass_index, name_and_type index) 1.23 klassOop klass_ref_at(int which, TRAPS); 1.24 symbolOop klass_ref_at_noresolve(int which); 1.25 @@ -484,7 +489,7 @@ 1.26 static klassOop klass_ref_at_if_loaded_check(constantPoolHandle this_oop, int which, TRAPS); 1.27 1.28 // Routines currently used for annotations (only called by jvm.cpp) but which might be used in the 1.29 - // future by other Java code. These take constant pool indices rather than possibly-byte-swapped 1.30 + // future by other Java code. These take constant pool indices rather than 1.31 // constant pool cache indices as do the peer methods above. 1.32 symbolOop uncached_klass_ref_at_noresolve(int which); 1.33 symbolOop uncached_name_ref_at(int which) { return impl_name_ref_at(which, true); }