8207202: [Graal] compiler/graalunit/CoreTest.java fails

Reviewed-by: kvn
This commit is contained in:
Tom Rodriguez 2018-07-19 12:55:24 -07:00
parent 602a497270
commit 5226a6a2bb

View file

@ -435,6 +435,7 @@ IRT_END
IRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, char* name, oopDesc* obj))
// Produce the error message first because note_trap can safepoint
ResourceMark rm(thread);
const char* klass_name = obj->klass()->external_name();
// lookup exception klass
@ -448,20 +449,22 @@ IRT_ENTRY(void, InterpreterRuntime::create_klass_exception(JavaThread* thread, c
IRT_END
IRT_ENTRY(void, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException(JavaThread* thread, arrayOopDesc* a, jint index))
if (ProfileTraps) {
note_trap(thread, Deoptimization::Reason_range_check, CHECK);
}
// Produce the error message first because note_trap can safepoint
ResourceMark rm(thread);
stringStream ss;
ss.print("Index %d out of bounds for length %d", index, a->length());
if (ProfileTraps) {
note_trap(thread, Deoptimization::Reason_range_check, CHECK);
}
THROW_MSG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), ss.as_string());
IRT_END
IRT_ENTRY(void, InterpreterRuntime::throw_ClassCastException(
JavaThread* thread, oopDesc* obj))
// Produce the error message first because note_trap can safepoint
ResourceMark rm(thread);
char* message = SharedRuntime::generate_class_cast_message(
thread, obj->klass());