comparison src/share/vm/interpreter/interpreterRuntime.cpp @ 2144:633a44a9fc45

Merge
author dcubed
date Wed, 19 Jan 2011 07:15:09 -0800
parents dd031b2226de 8012aa3ccede
children 3582bf76420e
comparison
equal deleted inserted replaced
2139:75efcee5ac47 2144:633a44a9fc45
130 IRT_ENTRY(void, InterpreterRuntime::resolve_ldc(JavaThread* thread, Bytecodes::Code bytecode)) { 130 IRT_ENTRY(void, InterpreterRuntime::resolve_ldc(JavaThread* thread, Bytecodes::Code bytecode)) {
131 assert(bytecode == Bytecodes::_fast_aldc || 131 assert(bytecode == Bytecodes::_fast_aldc ||
132 bytecode == Bytecodes::_fast_aldc_w, "wrong bc"); 132 bytecode == Bytecodes::_fast_aldc_w, "wrong bc");
133 ResourceMark rm(thread); 133 ResourceMark rm(thread);
134 methodHandle m (thread, method(thread)); 134 methodHandle m (thread, method(thread));
135 Bytecode_loadconstant* ldc = Bytecode_loadconstant_at(m, bci(thread)); 135 Bytecode_loadconstant ldc(m, bci(thread));
136 oop result = ldc->resolve_constant(THREAD); 136 oop result = ldc.resolve_constant(THREAD);
137 DEBUG_ONLY(ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc->cache_index())); 137 DEBUG_ONLY(ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc.cache_index()));
138 assert(result == cpce->f1(), "expected result for assembly code"); 138 assert(result == cpce->f1(), "expected result for assembly code");
139 } 139 }
140 IRT_END 140 IRT_END
141 141
142 142
670 // extract receiver from the outgoing argument list if necessary 670 // extract receiver from the outgoing argument list if necessary
671 Handle receiver(thread, NULL); 671 Handle receiver(thread, NULL);
672 if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface) { 672 if (bytecode == Bytecodes::_invokevirtual || bytecode == Bytecodes::_invokeinterface) {
673 ResourceMark rm(thread); 673 ResourceMark rm(thread);
674 methodHandle m (thread, method(thread)); 674 methodHandle m (thread, method(thread));
675 Bytecode_invoke* call = Bytecode_invoke_at(m, bci(thread)); 675 Bytecode_invoke call(m, bci(thread));
676 symbolHandle signature (thread, call->signature()); 676 symbolHandle signature (thread, call.signature());
677 receiver = Handle(thread, 677 receiver = Handle(thread,
678 thread->last_frame().interpreter_callee_receiver(signature)); 678 thread->last_frame().interpreter_callee_receiver(signature));
679 assert(Universe::heap()->is_in_reserved_or_null(receiver()), 679 assert(Universe::heap()->is_in_reserved_or_null(receiver()),
680 "sanity check"); 680 "sanity check");
681 assert(receiver.is_null() || 681 assert(receiver.is_null() ||
754 int site_index = 0; 754 int site_index = 0;
755 { address caller_bcp = bcp(thread); 755 { address caller_bcp = bcp(thread);
756 caller_bci = caller_method->bci_from(caller_bcp); 756 caller_bci = caller_method->bci_from(caller_bcp);
757 site_index = Bytes::get_native_u4(caller_bcp+1); 757 site_index = Bytes::get_native_u4(caller_bcp+1);
758 } 758 }
759 assert(site_index == InterpreterRuntime::bytecode(thread)->get_index_u4(bytecode), ""); 759 assert(site_index == InterpreterRuntime::bytecode(thread).get_index_u4(bytecode), "");
760 assert(constantPoolCacheOopDesc::is_secondary_index(site_index), "proper format"); 760 assert(constantPoolCacheOopDesc::is_secondary_index(site_index), "proper format");
761 // there is a second CPC entries that is of interest; it caches signature info: 761 // there is a second CPC entries that is of interest; it caches signature info:
762 int main_index = pool->cache()->secondary_entry_at(site_index)->main_entry_index(); 762 int main_index = pool->cache()->secondary_entry_at(site_index)->main_entry_index();
763 int pool_index = pool->cache()->entry_at(main_index)->constant_pool_index(); 763 int pool_index = pool->cache()->entry_at(main_index)->constant_pool_index();
764 764
1239 ResourceMark rm; 1239 ResourceMark rm;
1240 frame fr = thread->last_frame(); 1240 frame fr = thread->last_frame();
1241 assert(fr.is_interpreted_frame(), ""); 1241 assert(fr.is_interpreted_frame(), "");
1242 jint bci = fr.interpreter_frame_bci(); 1242 jint bci = fr.interpreter_frame_bci();
1243 methodHandle mh(thread, fr.interpreter_frame_method()); 1243 methodHandle mh(thread, fr.interpreter_frame_method());
1244 Bytecode_invoke* invoke = Bytecode_invoke_at(mh, bci); 1244 Bytecode_invoke invoke(mh, bci);
1245 ArgumentSizeComputer asc(invoke->signature()); 1245 ArgumentSizeComputer asc(invoke.signature());
1246 int size_of_arguments = (asc.size() + (invoke->has_receiver() ? 1 : 0)); // receiver 1246 int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver
1247 Copy::conjoint_jbytes(src_address, dest_address, 1247 Copy::conjoint_jbytes(src_address, dest_address,
1248 size_of_arguments * Interpreter::stackElementSize); 1248 size_of_arguments * Interpreter::stackElementSize);
1249 IRT_END 1249 IRT_END
1250 #endif 1250 #endif