Mercurial > hg > truffle
comparison src/share/vm/interpreter/interpreterRuntime.cpp @ 3451:38fa55e5e792
7055355: JSR 292: crash while throwing WrongMethodTypeException
Reviewed-by: jrose, twisti, bdelsart
author | never |
---|---|
date | Thu, 16 Jun 2011 13:46:55 -0700 |
parents | 7db2b9499c36 |
children | be4ca325525a 2c359f27615c |
comparison
equal
deleted
inserted
replaced
3450:3275a6560cf7 | 3451:38fa55e5e792 |
---|---|
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). |