347 at_poll_return ? "return" : "loop",
348 (intptr_t)pc, (intptr_t)stub);
349 tty->print_raw_cr(buf);
350 }
351 #endif // PRODUCT
352 return stub;
353 }
354
355
356 oop SharedRuntime::retrieve_receiver( symbolHandle sig, frame caller ) {
357 assert(caller.is_interpreted_frame(), "");
358 int args_size = ArgumentSizeComputer(sig).size() + 1;
359 assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
360 oop result = (oop) *caller.interpreter_frame_tos_at(args_size - 1);
361 assert(Universe::heap()->is_in(result) && result->is_oop(), "receiver must be an oop");
362 return result;
363 }
364
365
366 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
367 if (JvmtiExport::can_post_exceptions()) {
368 vframeStream vfst(thread, true);
369 methodHandle method = methodHandle(thread, vfst.method());
370 address bcp = method()->bcp_from(vfst.bci());
371 JvmtiExport::post_exception_throw(thread, method(), bcp, h_exception());
372 }
373 Exceptions::_throw(thread, __FILE__, __LINE__, h_exception);
374 }
375
376 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, symbolOop name, const char *message) {
377 Handle h_exception = Exceptions::new_exception(thread, name, message);
378 throw_and_post_jvmti_exception(thread, h_exception);
379 }
380
381 // The interpreter code to call this tracing function is only
382 // called/generated when TraceRedefineClasses has the right bits
383 // set. Since obsolete methods are never compiled, we don't have
384 // to modify the compilers to generate calls to this function.
385 //
386 JRT_LEAF(int, SharedRuntime::rc_trace_method_entry(
387 JavaThread* thread, methodOopDesc* method))
|
347 at_poll_return ? "return" : "loop",
348 (intptr_t)pc, (intptr_t)stub);
349 tty->print_raw_cr(buf);
350 }
351 #endif // PRODUCT
352 return stub;
353 }
354
355
356 oop SharedRuntime::retrieve_receiver( symbolHandle sig, frame caller ) {
357 assert(caller.is_interpreted_frame(), "");
358 int args_size = ArgumentSizeComputer(sig).size() + 1;
359 assert(args_size <= caller.interpreter_frame_expression_stack_size(), "receiver must be on interpreter stack");
360 oop result = (oop) *caller.interpreter_frame_tos_at(args_size - 1);
361 assert(Universe::heap()->is_in(result) && result->is_oop(), "receiver must be an oop");
362 return result;
363 }
364
365
366 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, Handle h_exception) {
367 if (JvmtiExport::can_post_on_exceptions()) {
368 vframeStream vfst(thread, true);
369 methodHandle method = methodHandle(thread, vfst.method());
370 address bcp = method()->bcp_from(vfst.bci());
371 JvmtiExport::post_exception_throw(thread, method(), bcp, h_exception());
372 }
373 Exceptions::_throw(thread, __FILE__, __LINE__, h_exception);
374 }
375
376 void SharedRuntime::throw_and_post_jvmti_exception(JavaThread *thread, symbolOop name, const char *message) {
377 Handle h_exception = Exceptions::new_exception(thread, name, message);
378 throw_and_post_jvmti_exception(thread, h_exception);
379 }
380
381 // The interpreter code to call this tracing function is only
382 // called/generated when TraceRedefineClasses has the right bits
383 // set. Since obsolete methods are never compiled, we don't have
384 // to modify the compilers to generate calls to this function.
385 //
386 JRT_LEAF(int, SharedRuntime::rc_trace_method_entry(
387 JavaThread* thread, methodOopDesc* method))
|