112 #endif //ASSERT |
112 #endif //ASSERT |
113 |
113 |
114 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp, |
114 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp, |
115 bool for_compiler_entry) { |
115 bool for_compiler_entry) { |
116 assert(method == rbx, "interpreter calling convention"); |
116 assert(method == rbx, "interpreter calling convention"); |
|
117 |
|
118 Label L_no_such_method; |
|
119 __ testptr(rbx, rbx); |
|
120 __ jcc(Assembler::zero, L_no_such_method); |
|
121 |
117 __ verify_method_ptr(method); |
122 __ verify_method_ptr(method); |
118 |
123 |
119 if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) { |
124 if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) { |
120 Label run_compiled_code; |
125 Label run_compiled_code; |
121 // JVMTI events, such as single-stepping, are implemented partly by avoiding running |
126 // JVMTI events, such as single-stepping, are implemented partly by avoiding running |
136 } |
141 } |
137 |
142 |
138 const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() : |
143 const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() : |
139 Method::from_interpreted_offset(); |
144 Method::from_interpreted_offset(); |
140 __ jmp(Address(method, entry_offset)); |
145 __ jmp(Address(method, entry_offset)); |
|
146 |
|
147 __ bind(L_no_such_method); |
|
148 __ jump(RuntimeAddress(StubRoutines::throw_AbstractMethodError_entry())); |
141 } |
149 } |
142 |
150 |
143 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm, |
151 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm, |
144 Register recv, Register method_temp, |
152 Register recv, Register method_temp, |
145 Register temp2, |
153 Register temp2, |