1.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp Fri May 21 02:59:24 2010 -0700 1.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp Sun May 23 01:38:26 2010 -0700 1.3 @@ -63,7 +63,7 @@ 1.4 IRT_ENTRY(void, InterpreterRuntime::ldc(JavaThread* thread, bool wide)) 1.5 // access constant pool 1.6 constantPoolOop pool = method(thread)->constants(); 1.7 - int index = wide ? two_byte_index(thread) : one_byte_index(thread); 1.8 + int index = wide ? get_index_u2(thread, Bytecodes::_ldc_w) : get_index_u1(thread, Bytecodes::_ldc); 1.9 constantTag tag = pool->tag_at(index); 1.10 1.11 if (tag.is_unresolved_klass() || tag.is_klass()) { 1.12 @@ -135,7 +135,7 @@ 1.13 IRT_ENTRY(void, InterpreterRuntime::multianewarray(JavaThread* thread, jint* first_size_address)) 1.14 // We may want to pass in more arguments - could make this slightly faster 1.15 constantPoolOop constants = method(thread)->constants(); 1.16 - int i = two_byte_index(thread); 1.17 + int i = get_index_u2(thread, Bytecodes::_multianewarray); 1.18 klassOop klass = constants->klass_at(i, CHECK); 1.19 int nof_dims = number_of_dimensions(thread); 1.20 assert(oop(klass)->is_klass(), "not a class"); 1.21 @@ -169,7 +169,7 @@ 1.22 // Quicken instance-of and check-cast bytecodes 1.23 IRT_ENTRY(void, InterpreterRuntime::quicken_io_cc(JavaThread* thread)) 1.24 // Force resolving; quicken the bytecode 1.25 - int which = two_byte_index(thread); 1.26 + int which = get_index_u2(thread, Bytecodes::_checkcast); 1.27 constantPoolOop cpool = method(thread)->constants(); 1.28 // We'd expect to assert that we're only here to quicken bytecodes, but in a multithreaded 1.29 // program we might have seen an unquick'd bytecode in the interpreter but have another 1.30 @@ -463,7 +463,7 @@ 1.31 1.32 { 1.33 JvmtiHideSingleStepping jhss(thread); 1.34 - LinkResolver::resolve_field(info, pool, two_byte_index(thread), 1.35 + LinkResolver::resolve_field(info, pool, get_index_u2_cpcache(thread, bytecode), 1.36 bytecode, false, CHECK); 1.37 } // end JvmtiHideSingleStepping 1.38 1.39 @@ -634,7 +634,7 @@ 1.40 { 1.41 JvmtiHideSingleStepping jhss(thread); 1.42 LinkResolver::resolve_invoke(info, receiver, pool, 1.43 - two_byte_index(thread), bytecode, CHECK); 1.44 + get_index_u2_cpcache(thread, bytecode), bytecode, CHECK); 1.45 if (JvmtiExport::can_hotswap_or_post_breakpoint()) { 1.46 int retry_count = 0; 1.47 while (info.resolved_method()->is_old()) { 1.48 @@ -645,7 +645,7 @@ 1.49 "Could not resolve to latest version of redefined method"); 1.50 // method is redefined in the middle of resolve so re-try. 1.51 LinkResolver::resolve_invoke(info, receiver, pool, 1.52 - two_byte_index(thread), bytecode, CHECK); 1.53 + get_index_u2_cpcache(thread, bytecode), bytecode, CHECK); 1.54 } 1.55 } 1.56 } // end JvmtiHideSingleStepping 1.57 @@ -704,7 +704,7 @@ 1.58 caller_bci = caller_method->bci_from(caller_bcp); 1.59 site_index = Bytes::get_native_u4(caller_bcp+1); 1.60 } 1.61 - assert(site_index == four_byte_index(thread), ""); 1.62 + assert(site_index == InterpreterRuntime::bytecode(thread)->get_index_u4(bytecode), ""); 1.63 assert(constantPoolCacheOopDesc::is_secondary_index(site_index), "proper format"); 1.64 // there is a second CPC entries that is of interest; it caches signature info: 1.65 int main_index = pool->cache()->secondary_entry_at(site_index)->main_entry_index();