hotspot/src/share/vm/jvmci/jvmciRuntime.cpp
changeset 36842 8f0d0faa51e2
parent 36805 626399e1ebf2
child 37267 ad8c0e8de29f
--- a/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp	Tue Mar 29 21:33:26 2016 +0300
+++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp	Fri Mar 25 12:43:23 2016 +0100
@@ -363,20 +363,6 @@
   return continuation;
 }
 
-JRT_ENTRY(void, JVMCIRuntime::create_null_exception(JavaThread* thread))
-  SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException());
-  thread->set_vm_result(PENDING_EXCEPTION);
-  CLEAR_PENDING_EXCEPTION;
-JRT_END
-
-JRT_ENTRY(void, JVMCIRuntime::create_out_of_bounds_exception(JavaThread* thread, jint index))
-  char message[jintAsStringSize];
-  sprintf(message, "%d", index);
-  SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message);
-  thread->set_vm_result(PENDING_EXCEPTION);
-  CLEAR_PENDING_EXCEPTION;
-JRT_END
-
 JRT_ENTRY_NO_ASYNC(void, JVMCIRuntime::monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock))
   IF_TRACE_jvmci_3 {
     char type[O_BUFLEN];
@@ -438,6 +424,21 @@
   }
 JRT_END
 
+JRT_ENTRY(void, JVMCIRuntime::throw_and_post_jvmti_exception(JavaThread* thread, Symbol* name, const char* message))
+  SharedRuntime::throw_and_post_jvmti_exception(thread, name, message);
+JRT_END
+
+JRT_ENTRY(void, JVMCIRuntime::throw_klass_external_name_exception(JavaThread* thread, Symbol* exception, Klass* klass))
+  ResourceMark rm(thread);
+  SharedRuntime::throw_and_post_jvmti_exception(thread, exception, klass->external_name());
+JRT_END
+
+JRT_ENTRY(void, JVMCIRuntime::throw_class_cast_exception(JavaThread* thread, Symbol* exception, Klass* caster_klass, Klass* target_klass))
+  ResourceMark rm(thread);
+  const char* message = SharedRuntime::generate_class_cast_message(caster_klass, target_klass);
+  SharedRuntime::throw_and_post_jvmti_exception(thread, exception, message);
+JRT_END
+
 JRT_LEAF(void, JVMCIRuntime::log_object(JavaThread* thread, oopDesc* obj, bool as_string, bool newline))
   ttyLocker ttyl;