Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalRuntime.cpp @ 12668:e27f3169460e
notify JVMTI about exception throws from runtime
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 04 Nov 2013 21:45:23 -0800 |
parents | 43e004461248 |
children | d8143c431d63 |
comparison
equal
deleted
inserted
replaced
12667:bee224687003 | 12668:e27f3169460e |
---|---|
297 assert(continuation != NULL, "no handler found"); | 297 assert(continuation != NULL, "no handler found"); |
298 return continuation; | 298 return continuation; |
299 } | 299 } |
300 | 300 |
301 JRT_ENTRY(void, GraalRuntime::create_null_exception(JavaThread* thread)) | 301 JRT_ENTRY(void, GraalRuntime::create_null_exception(JavaThread* thread)) |
302 thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_NullPointerException(), NULL)()); | 302 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException()); |
303 thread->set_vm_result(PENDING_EXCEPTION); | |
304 CLEAR_PENDING_EXCEPTION; | |
303 JRT_END | 305 JRT_END |
304 | 306 |
305 JRT_ENTRY(void, GraalRuntime::create_out_of_bounds_exception(JavaThread* thread, jint index)) | 307 JRT_ENTRY(void, GraalRuntime::create_out_of_bounds_exception(JavaThread* thread, jint index)) |
306 char message[jintAsStringSize]; | 308 char message[jintAsStringSize]; |
307 sprintf(message, "%d", index); | 309 sprintf(message, "%d", index); |
308 thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message)()); | 310 SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message); |
311 thread->set_vm_result(PENDING_EXCEPTION); | |
312 CLEAR_PENDING_EXCEPTION; | |
309 JRT_END | 313 JRT_END |
310 | 314 |
311 JRT_ENTRY_NO_ASYNC(void, GraalRuntime::monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock)) | 315 JRT_ENTRY_NO_ASYNC(void, GraalRuntime::monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock)) |
312 if (TraceGraal >= 3) { | 316 if (TraceGraal >= 3) { |
313 char type[O_BUFLEN]; | 317 char type[O_BUFLEN]; |