hotspot/src/share/vm/runtime/sharedRuntime.cpp
changeset 46998 efb404beeefb
parent 46968 9119841280f4
equal deleted inserted replaced
46995:9e3267ffe6ec 46998:efb404beeefb
   636     ExceptionHandlerTable table(cm);
   636     ExceptionHandlerTable table(cm);
   637     HandlerTableEntry *t = table.entry_for(catch_pco, -1, 0);
   637     HandlerTableEntry *t = table.entry_for(catch_pco, -1, 0);
   638     if (t != NULL) {
   638     if (t != NULL) {
   639       return cm->code_begin() + t->pco();
   639       return cm->code_begin() + t->pco();
   640     } else {
   640     } else {
   641       // there is no exception handler for this pc => deoptimize
   641       return Deoptimization::deoptimize_for_missing_exception_handler(cm);
   642       cm->make_not_entrant();
       
   643 
       
   644       // Use Deoptimization::deoptimize for all of its side-effects:
       
   645       // revoking biases of monitors, gathering traps statistics, logging...
       
   646       // it also patches the return pc but we do not care about that
       
   647       // since we return a continuation to the deopt_blob below.
       
   648       JavaThread* thread = JavaThread::current();
       
   649       RegisterMap reg_map(thread, UseBiasedLocking);
       
   650       frame runtime_frame = thread->last_frame();
       
   651       frame caller_frame = runtime_frame.sender(&reg_map);
       
   652       Deoptimization::deoptimize(thread, caller_frame, &reg_map, Deoptimization::Reason_not_compiled_exception_handler);
       
   653 
       
   654       return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
       
   655     }
   642     }
   656   }
   643   }
   657 #endif // INCLUDE_JVMCI
   644 #endif // INCLUDE_JVMCI
   658 
   645 
   659   nmethod* nm = cm->as_nmethod();
   646   nmethod* nm = cm->as_nmethod();