equal
deleted
inserted
replaced
359 } |
359 } |
360 |
360 |
361 // create exception |
361 // create exception |
362 THROW_MSG(vmSymbols::java_lang_ClassCastException(), message); |
362 THROW_MSG(vmSymbols::java_lang_ClassCastException(), message); |
363 IRT_END |
363 IRT_END |
364 |
|
365 // required can be either a MethodType, or a Class (for a single argument) |
|
366 // actual (if not null) can be either a MethodHandle, or an arbitrary value (for a single argument) |
|
367 IRT_ENTRY(void, InterpreterRuntime::throw_WrongMethodTypeException(JavaThread* thread, |
|
368 oopDesc* required, |
|
369 oopDesc* actual)) { |
|
370 ResourceMark rm(thread); |
|
371 char* message = SharedRuntime::generate_wrong_method_type_message(thread, required, actual); |
|
372 |
|
373 if (ProfileTraps) { |
|
374 note_trap(thread, Deoptimization::Reason_constraint, CHECK); |
|
375 } |
|
376 |
|
377 // create exception |
|
378 THROW_MSG(vmSymbols::java_lang_invoke_WrongMethodTypeException(), message); |
|
379 } |
|
380 IRT_END |
|
381 |
|
382 |
|
383 |
364 |
384 // exception_handler_for_exception(...) returns the continuation address, |
365 // exception_handler_for_exception(...) returns the continuation address, |
385 // the exception oop (via TLS) and sets the bci/bcp for the continuation. |
366 // the exception oop (via TLS) and sets the bci/bcp for the continuation. |
386 // The exception oop is returned to make sure it is preserved over GC (it |
367 // The exception oop is returned to make sure it is preserved over GC (it |
387 // is only on the stack if the exception was thrown explicitly via athrow). |
368 // is only on the stack if the exception was thrown explicitly via athrow). |