< prev index next >

src/share/vm/runtime/sharedRuntime.cpp

Print this page

        

*** 673,683 **** int bci = sd->bci(); bool recursive_exception = false; do { bool skip_scope_increment = false; // exception handler lookup ! KlassHandle ek (THREAD, exception->klass()); methodHandle mh(THREAD, sd->method()); handler_bci = Method::fast_exception_handler_bci_for(mh, ek, bci, THREAD); if (HAS_PENDING_EXCEPTION) { recursive_exception = true; // We threw an exception while trying to find the exception handler. --- 673,683 ---- int bci = sd->bci(); bool recursive_exception = false; do { bool skip_scope_increment = false; // exception handler lookup ! Klass* ek = exception->klass(); methodHandle mh(THREAD, sd->method()); handler_bci = Method::fast_exception_handler_bci_for(mh, ek, bci, THREAD); if (HAS_PENDING_EXCEPTION) { recursive_exception = true; // We threw an exception while trying to find the exception handler.
*** 1183,1212 **** #ifdef ASSERT // Check that the receiver klass is of the right subtype and that it is initialized for virtual calls if (has_receiver) { assert(receiver.not_null(), "should have thrown exception"); ! KlassHandle receiver_klass(THREAD, receiver->klass()); Klass* rk = NULL; if (attached_method.not_null()) { // In case there's resolved method attached, use its holder during the check. rk = attached_method->method_holder(); } else { // Klass is already loaded. constantPoolHandle constants(THREAD, caller->constants()); rk = constants->klass_ref_at(bytecode_index, CHECK_NH); } ! KlassHandle static_receiver_klass(THREAD, rk); methodHandle callee = callinfo.selected_method(); ! assert(receiver_klass->is_subtype_of(static_receiver_klass()), "actual receiver must be subclass of static receiver klass"); if (receiver_klass->is_instance_klass()) { ! if (InstanceKlass::cast(receiver_klass())->is_not_initialized()) { tty->print_cr("ERROR: Klass not yet initialized!!"); ! receiver_klass()->print(); } ! assert(!InstanceKlass::cast(receiver_klass())->is_not_initialized(), "receiver_klass must be initialized"); } } #endif return receiver; --- 1183,1212 ---- #ifdef ASSERT // Check that the receiver klass is of the right subtype and that it is initialized for virtual calls if (has_receiver) { assert(receiver.not_null(), "should have thrown exception"); ! Klass* receiver_klass = receiver->klass(); Klass* rk = NULL; if (attached_method.not_null()) { // In case there's resolved method attached, use its holder during the check. rk = attached_method->method_holder(); } else { // Klass is already loaded. constantPoolHandle constants(THREAD, caller->constants()); rk = constants->klass_ref_at(bytecode_index, CHECK_NH); } ! Klass* static_receiver_klass = rk; methodHandle callee = callinfo.selected_method(); ! assert(receiver_klass->is_subtype_of(static_receiver_klass), "actual receiver must be subclass of static receiver klass"); if (receiver_klass->is_instance_klass()) { ! if (InstanceKlass::cast(receiver_klass)->is_not_initialized()) { tty->print_cr("ERROR: Klass not yet initialized!!"); ! receiver_klass->print(); } ! assert(!InstanceKlass::cast(receiver_klass)->is_not_initialized(), "receiver_klass must be initialized"); } } #endif return receiver;
*** 1361,1372 **** bool is_nmethod = caller_nm->is_nmethod(); if (is_virtual) { assert(receiver.not_null() || invoke_code == Bytecodes::_invokehandle, "sanity check"); bool static_bound = call_info.resolved_method()->can_be_statically_bound(); ! KlassHandle h_klass(THREAD, invoke_code == Bytecodes::_invokehandle ? NULL : receiver->klass()); ! CompiledIC::compute_monomorphic_entry(callee_method, h_klass, is_optimized, static_bound, is_nmethod, virtual_call_info, CHECK_(methodHandle())); } else { // static call CompiledStaticCall::compute_entry(callee_method, is_nmethod, static_call_info); --- 1361,1372 ---- bool is_nmethod = caller_nm->is_nmethod(); if (is_virtual) { assert(receiver.not_null() || invoke_code == Bytecodes::_invokehandle, "sanity check"); bool static_bound = call_info.resolved_method()->can_be_statically_bound(); ! Klass* klass = invoke_code == Bytecodes::_invokehandle ? NULL : receiver->klass(); ! CompiledIC::compute_monomorphic_entry(callee_method, klass, is_optimized, static_bound, is_nmethod, virtual_call_info, CHECK_(methodHandle())); } else { // static call CompiledStaticCall::compute_entry(callee_method, is_nmethod, static_call_info);
*** 1623,1633 **** // We have a path that was monomorphic but was going interpreted // and now we have (or had) a compiled entry. We correct the IC // by using a new icBuffer. CompiledICInfo info; ! KlassHandle receiver_klass(THREAD, receiver()->klass()); inline_cache->compute_monomorphic_entry(callee_method, receiver_klass, inline_cache->is_optimized(), false, caller_nm->is_nmethod(), info, CHECK_(methodHandle())); --- 1623,1633 ---- // We have a path that was monomorphic but was going interpreted // and now we have (or had) a compiled entry. We correct the IC // by using a new icBuffer. CompiledICInfo info; ! Klass* receiver_klass = receiver()->klass(); inline_cache->compute_monomorphic_entry(callee_method, receiver_klass, inline_cache->is_optimized(), false, caller_nm->is_nmethod(), info, CHECK_(methodHandle()));
< prev index next >