< prev index next >

src/hotspot/share/c1/c1_Runtime1.cpp

Print this page

 682 JRT_END
 683 
 684 
 685 JRT_ENTRY(void, Runtime1::throw_class_cast_exception(JavaThread* current, oopDesc* object))
 686   NOT_PRODUCT(_throw_class_cast_exception_count++;)
 687   ResourceMark rm(current);
 688   char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
 689   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
 690 JRT_END
 691 
 692 
 693 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
 694   NOT_PRODUCT(_throw_incompatible_class_change_error_count++;)
 695   ResourceMark rm(current);
 696   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
 697 JRT_END
 698 
 699 
 700 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
 701   NOT_PRODUCT(_monitorenter_slowcase_cnt++;)
 702   if (!UseFastLocking) {
 703     lock->set_obj(obj);
 704   }
 705   assert(obj == lock->obj(), "must match");
 706   SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
 707 JRT_END
 708 
 709 
 710 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
 711   NOT_PRODUCT(_monitorexit_slowcase_cnt++;)
 712   assert(current->last_Java_sp(), "last_Java_sp must be set");
 713   oop obj = lock->obj();
 714   assert(oopDesc::is_oop(obj), "must be NULL or an object");
 715   SharedRuntime::monitor_exit_helper(obj, lock->lock(), current);
 716 JRT_END
 717 
 718 // Cf. OptoRuntime::deoptimize_caller_frame
 719 JRT_ENTRY(void, Runtime1::deoptimize(JavaThread* current, jint trap_request))
 720   // Called from within the owner thread, so no need for safepoint
 721   RegisterMap reg_map(current, false);
 722   frame stub_frame = current->last_frame();
 723   assert(stub_frame.is_runtime_frame(), "Sanity check");
 724   frame caller_frame = stub_frame.sender(&reg_map);
 725   nmethod* nm = caller_frame.cb()->as_nmethod_or_null();
 726   assert(nm != NULL, "Sanity check");

 682 JRT_END
 683 
 684 
 685 JRT_ENTRY(void, Runtime1::throw_class_cast_exception(JavaThread* current, oopDesc* object))
 686   NOT_PRODUCT(_throw_class_cast_exception_count++;)
 687   ResourceMark rm(current);
 688   char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
 689   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
 690 JRT_END
 691 
 692 
 693 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
 694   NOT_PRODUCT(_throw_incompatible_class_change_error_count++;)
 695   ResourceMark rm(current);
 696   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
 697 JRT_END
 698 
 699 
 700 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
 701   NOT_PRODUCT(_monitorenter_slowcase_cnt++;)
 702   if (LockingMode == LM_MONITOR) {
 703     lock->set_obj(obj);
 704   }
 705   assert(LockingMode == LM_LIGHTWEIGHT || obj == lock->obj(), "must match");
 706   SharedRuntime::monitor_enter_helper(obj, LockingMode == LM_LIGHTWEIGHT ? NULL : lock->lock(), current);
 707 JRT_END
 708 
 709 
 710 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
 711   NOT_PRODUCT(_monitorexit_slowcase_cnt++;)
 712   assert(current->last_Java_sp(), "last_Java_sp must be set");
 713   oop obj = lock->obj();
 714   assert(oopDesc::is_oop(obj), "must be NULL or an object");
 715   SharedRuntime::monitor_exit_helper(obj, lock->lock(), current);
 716 JRT_END
 717 
 718 // Cf. OptoRuntime::deoptimize_caller_frame
 719 JRT_ENTRY(void, Runtime1::deoptimize(JavaThread* current, jint trap_request))
 720   // Called from within the owner thread, so no need for safepoint
 721   RegisterMap reg_map(current, false);
 722   frame stub_frame = current->last_frame();
 723   assert(stub_frame.is_runtime_frame(), "Sanity check");
 724   frame caller_frame = stub_frame.sender(&reg_map);
 725   nmethod* nm = caller_frame.cb()->as_nmethod_or_null();
 726   assert(nm != NULL, "Sanity check");
< prev index next >