367 if (ProfileTraps) { |
367 if (ProfileTraps) { |
368 note_trap(thread, Deoptimization::Reason_constraint, CHECK); |
368 note_trap(thread, Deoptimization::Reason_constraint, CHECK); |
369 } |
369 } |
370 |
370 |
371 // create exception |
371 // create exception |
372 THROW_MSG(vmSymbols::java_dyn_WrongMethodTypeException(), message); |
372 Symbol* java_lang_invoke_WrongMethodTypeException = vmSymbols::java_lang_invoke_WrongMethodTypeException(); |
|
373 if (AllowTransitionalJSR292) |
|
374 java_lang_invoke_WrongMethodTypeException = SystemDictionaryHandles::WrongMethodTypeException_klass()->name(); |
|
375 THROW_MSG(java_lang_invoke_WrongMethodTypeException, message); |
373 } |
376 } |
374 IRT_END |
377 IRT_END |
375 |
378 |
376 |
379 |
377 |
380 |
792 "correct result from LinkResolver::resolve_invokedynamic"); |
795 "correct result from LinkResolver::resolve_invokedynamic"); |
793 |
796 |
794 Handle info; // optional argument(s) in JVM_CONSTANT_InvokeDynamic |
797 Handle info; // optional argument(s) in JVM_CONSTANT_InvokeDynamic |
795 Handle bootm = SystemDictionary::find_bootstrap_method(caller_method, caller_bci, |
798 Handle bootm = SystemDictionary::find_bootstrap_method(caller_method, caller_bci, |
796 main_index, info, CHECK); |
799 main_index, info, CHECK); |
797 if (!java_dyn_MethodHandle::is_instance(bootm())) { |
800 if (!java_lang_invoke_MethodHandle::is_instance(bootm())) { |
798 THROW_MSG(vmSymbols::java_lang_IllegalStateException(), |
801 THROW_MSG(vmSymbols::java_lang_IllegalStateException(), |
799 "no bootstrap method found for invokedynamic"); |
802 "no bootstrap method found for invokedynamic"); |
800 } |
803 } |
801 |
804 |
802 // Short circuit if CallSite has been bound already: |
805 // Short circuit if CallSite has been bound already: |