841 switch (bytecode) {
842 case Bytecodes::_getstatic:
843 case Bytecodes::_putstatic:
844 case Bytecodes::_getfield:
845 case Bytecodes::_putfield:
846 resolve_get_put(thread, bytecode);
847 break;
848 case Bytecodes::_invokevirtual:
849 case Bytecodes::_invokespecial:
850 case Bytecodes::_invokestatic:
851 case Bytecodes::_invokeinterface:
852 resolve_invoke(thread, bytecode);
853 break;
854 case Bytecodes::_invokehandle:
855 resolve_invokehandle(thread);
856 break;
857 case Bytecodes::_invokedynamic:
858 resolve_invokedynamic(thread);
859 break;
860 default:
861 fatal(err_msg("unexpected bytecode: %s", Bytecodes::name(bytecode)));
862 break;
863 }
864 }
865 IRT_END
866
867 //------------------------------------------------------------------------------------------------------------------------
868 // Miscellaneous
869
870
871 nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, address branch_bcp) {
872 nmethod* nm = frequency_counter_overflow_inner(thread, branch_bcp);
873 assert(branch_bcp != NULL || nm == NULL, "always returns null for non OSR requests");
874 if (branch_bcp != NULL && nm != NULL) {
875 // This was a successful request for an OSR nmethod. Because
876 // frequency_counter_overflow_inner ends with a safepoint check,
877 // nm could have been unloaded so look it up again. It's unsafe
878 // to examine nm directly since it might have been freed and used
879 // for something else.
880 frame fr = thread->last_frame();
881 Method* method = fr.interpreter_frame_method();
|
841 switch (bytecode) {
842 case Bytecodes::_getstatic:
843 case Bytecodes::_putstatic:
844 case Bytecodes::_getfield:
845 case Bytecodes::_putfield:
846 resolve_get_put(thread, bytecode);
847 break;
848 case Bytecodes::_invokevirtual:
849 case Bytecodes::_invokespecial:
850 case Bytecodes::_invokestatic:
851 case Bytecodes::_invokeinterface:
852 resolve_invoke(thread, bytecode);
853 break;
854 case Bytecodes::_invokehandle:
855 resolve_invokehandle(thread);
856 break;
857 case Bytecodes::_invokedynamic:
858 resolve_invokedynamic(thread);
859 break;
860 default:
861 fatal("unexpected bytecode: %s", Bytecodes::name(bytecode));
862 break;
863 }
864 }
865 IRT_END
866
867 //------------------------------------------------------------------------------------------------------------------------
868 // Miscellaneous
869
870
871 nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, address branch_bcp) {
872 nmethod* nm = frequency_counter_overflow_inner(thread, branch_bcp);
873 assert(branch_bcp != NULL || nm == NULL, "always returns null for non OSR requests");
874 if (branch_bcp != NULL && nm != NULL) {
875 // This was a successful request for an OSR nmethod. Because
876 // frequency_counter_overflow_inner ends with a safepoint check,
877 // nm could have been unloaded so look it up again. It's unsafe
878 // to examine nm directly since it might have been freed and used
879 // for something else.
880 frame fr = thread->last_frame();
881 Method* method = fr.interpreter_frame_method();
|