# HG changeset patch # User rschatz # Date 1462269423 -7200 # Node ID 7d3bad8f8ec851553e637610fa027c5d0b8b338a # Parent 2ad0ebc407abede4ea5544949da0f03fe6a7fd7f 8155735: use strings instead of Symbol* in JVMCI exception stubs Reviewed-by: never, twisti diff -r 2ad0ebc407ab -r 7d3bad8f8ec8 hotspot/src/share/vm/jvmci/jvmciRuntime.cpp --- a/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp Mon May 02 03:24:02 2016 +0300 +++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp Tue May 03 11:57:03 2016 +0200 @@ -425,19 +425,22 @@ } 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_ENTRY(void, JVMCIRuntime::throw_and_post_jvmti_exception(JavaThread* thread, const char* exception, const char* message)) + TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK); + SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, message); JRT_END -JRT_ENTRY(void, JVMCIRuntime::throw_klass_external_name_exception(JavaThread* thread, Symbol* exception, Klass* klass)) +JRT_ENTRY(void, JVMCIRuntime::throw_klass_external_name_exception(JavaThread* thread, const char* exception, Klass* klass)) ResourceMark rm(thread); - SharedRuntime::throw_and_post_jvmti_exception(thread, exception, klass->external_name()); + TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK); + SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, klass->external_name()); JRT_END -JRT_ENTRY(void, JVMCIRuntime::throw_class_cast_exception(JavaThread* thread, Symbol* exception, Klass* caster_klass, Klass* target_klass)) +JRT_ENTRY(void, JVMCIRuntime::throw_class_cast_exception(JavaThread* thread, const char* 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); + TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK); + SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, message); JRT_END JRT_LEAF(void, JVMCIRuntime::log_object(JavaThread* thread, oopDesc* obj, bool as_string, bool newline)) diff -r 2ad0ebc407ab -r 7d3bad8f8ec8 hotspot/src/share/vm/jvmci/jvmciRuntime.hpp --- a/hotspot/src/share/vm/jvmci/jvmciRuntime.hpp Mon May 02 03:24:02 2016 +0300 +++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.hpp Tue May 03 11:57:03 2016 +0200 @@ -156,10 +156,10 @@ static void new_store_pre_barrier(JavaThread* thread); // used to throw exceptions from compiled JVMCI code - static void throw_and_post_jvmti_exception(JavaThread* thread, Symbol* exception, const char* message); + static void throw_and_post_jvmti_exception(JavaThread* thread, const char* exception, const char* message); // helper methods to throw exception with complex messages - static void throw_klass_external_name_exception(JavaThread* thread, Symbol* exception, Klass* klass); - static void throw_class_cast_exception(JavaThread* thread, Symbol* exception, Klass* caster_klass, Klass* target_klass); + static void throw_klass_external_name_exception(JavaThread* thread, const char* exception, Klass* klass); + static void throw_class_cast_exception(JavaThread* thread, const char* exception, Klass* caster_klass, Klass* target_klass); // Test only function static int test_deoptimize_call_int(JavaThread* thread, int value);