hotspot/src/share/vm/c1/c1_Runtime1.cpp
changeset 46968 9119841280f4
parent 46727 6e4a84748e2c
equal deleted inserted replaced
46953:39063b484ec2 46968:9119841280f4
   489     assert(exception_frame.is_deoptimized_frame(), "must be deopted");
   489     assert(exception_frame.is_deoptimized_frame(), "must be deopted");
   490     pc = exception_frame.pc();
   490     pc = exception_frame.pc();
   491   }
   491   }
   492 #ifdef ASSERT
   492 #ifdef ASSERT
   493   assert(exception.not_null(), "NULL exceptions should be handled by throw_exception");
   493   assert(exception.not_null(), "NULL exceptions should be handled by throw_exception");
   494   assert(exception->is_oop(), "just checking");
       
   495   // Check that exception is a subclass of Throwable, otherwise we have a VerifyError
   494   // Check that exception is a subclass of Throwable, otherwise we have a VerifyError
   496   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
   495   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
   497     if (ExitVMOnVerifyError) vm_exit(-1);
   496     if (ExitVMOnVerifyError) vm_exit(-1);
   498     ShouldNotReachHere();
   497     ShouldNotReachHere();
   499   }
   498   }
   674   NOT_PRODUCT(_monitorenter_slowcase_cnt++;)
   673   NOT_PRODUCT(_monitorenter_slowcase_cnt++;)
   675   if (PrintBiasedLockingStatistics) {
   674   if (PrintBiasedLockingStatistics) {
   676     Atomic::inc(BiasedLocking::slow_path_entry_count_addr());
   675     Atomic::inc(BiasedLocking::slow_path_entry_count_addr());
   677   }
   676   }
   678   Handle h_obj(thread, obj);
   677   Handle h_obj(thread, obj);
   679   assert(h_obj()->is_oop(), "must be NULL or an object");
       
   680   if (UseBiasedLocking) {
   678   if (UseBiasedLocking) {
   681     // Retry fast entry if bias is revoked to avoid unnecessary inflation
   679     // Retry fast entry if bias is revoked to avoid unnecessary inflation
   682     ObjectSynchronizer::fast_enter(h_obj, lock->lock(), true, CHECK);
   680     ObjectSynchronizer::fast_enter(h_obj, lock->lock(), true, CHECK);
   683   } else {
   681   } else {
   684     if (UseFastLocking) {
   682     if (UseFastLocking) {
   699   assert(thread->last_Java_sp(), "last_Java_sp must be set");
   697   assert(thread->last_Java_sp(), "last_Java_sp must be set");
   700   // monitorexit is non-blocking (leaf routine) => no exceptions can be thrown
   698   // monitorexit is non-blocking (leaf routine) => no exceptions can be thrown
   701   EXCEPTION_MARK;
   699   EXCEPTION_MARK;
   702 
   700 
   703   oop obj = lock->obj();
   701   oop obj = lock->obj();
   704   assert(obj->is_oop(), "must be NULL or an object");
   702   assert(oopDesc::is_oop(obj), "must be NULL or an object");
   705   if (UseFastLocking) {
   703   if (UseFastLocking) {
   706     // When using fast locking, the compiled code has already tried the fast case
   704     // When using fast locking, the compiled code has already tried the fast case
   707     ObjectSynchronizer::slow_exit(obj, lock->lock(), THREAD);
   705     ObjectSynchronizer::slow_exit(obj, lock->lock(), THREAD);
   708   } else {
   706   } else {
   709     ObjectSynchronizer::fast_exit(obj, lock->lock(), THREAD);
   707     ObjectSynchronizer::fast_exit(obj, lock->lock(), THREAD);