< prev index next >

src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp

Print this page

 98 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
 99                                             bool for_compiler_entry) {
100   assert(method == rmethod, "interpreter calling convention");
101   Label L_no_such_method;
102   __ cbz(rmethod, L_no_such_method);
103   __ verify_method_ptr(method);
104 
105   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
106     Label run_compiled_code;
107     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
108     // compiled code in threads for which the event is enabled.  Check here for
109     // interp_only_mode if these events CAN be enabled.
110 
111     __ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
112     __ cbzw(rscratch1, run_compiled_code);
113     __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
114     __ br(rscratch1);
115     __ BIND(run_compiled_code);
116   }
117 
118   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :




119                                                      Method::from_interpreted_offset();
120   __ ldr(rscratch1,Address(method, entry_offset));
121   __ br(rscratch1);
122   __ bind(L_no_such_method);
123   __ far_jump(RuntimeAddress(StubRoutines::throw_AbstractMethodError_entry()));
124 }
125 
126 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
127                                         Register recv, Register method_temp,
128                                         Register temp2,
129                                         bool for_compiler_entry) {
130   BLOCK_COMMENT("jump_to_lambda_form {");
131   // This is the initial entry point of a lazy method handle.
132   // After type checking, it picks up the invoker from the LambdaForm.
133   assert_different_registers(recv, method_temp, temp2);
134   assert(recv != noreg, "required register");
135   assert(method_temp == rmethod, "required register for loading method");
136 
137   // Load the invoker, as MH -> MH.form -> LF.vmentry
138   __ verify_oop(recv);

 98 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
 99                                             bool for_compiler_entry) {
100   assert(method == rmethod, "interpreter calling convention");
101   Label L_no_such_method;
102   __ cbz(rmethod, L_no_such_method);
103   __ verify_method_ptr(method);
104 
105   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
106     Label run_compiled_code;
107     // JVMTI events, such as single-stepping, are implemented partly by avoiding running
108     // compiled code in threads for which the event is enabled.  Check here for
109     // interp_only_mode if these events CAN be enabled.
110 
111     __ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
112     __ cbzw(rscratch1, run_compiled_code);
113     __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
114     __ br(rscratch1);
115     __ BIND(run_compiled_code);
116   }
117 
118   // The following jump might pass an inline type argument that was erased to Object as oop to a
119   // callee that expects inline type arguments to be passed as fields. We need to call the compiled
120   // value entry (_code->inline_entry_point() or _adapter->c2i_inline_entry()) which will take care
121   // of translating between the calling conventions.
122   const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_inline_offset() :
123                                                      Method::from_interpreted_offset();
124   __ ldr(rscratch1,Address(method, entry_offset));
125   __ br(rscratch1);
126   __ bind(L_no_such_method);
127   __ far_jump(RuntimeAddress(StubRoutines::throw_AbstractMethodError_entry()));
128 }
129 
130 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
131                                         Register recv, Register method_temp,
132                                         Register temp2,
133                                         bool for_compiler_entry) {
134   BLOCK_COMMENT("jump_to_lambda_form {");
135   // This is the initial entry point of a lazy method handle.
136   // After type checking, it picks up the invoker from the LambdaForm.
137   assert_different_registers(recv, method_temp, temp2);
138   assert(recv != noreg, "required register");
139   assert(method_temp == rmethod, "required register for loading method");
140 
141   // Load the invoker, as MH -> MH.form -> LF.vmentry
142   __ verify_oop(recv);
< prev index next >