88 BLOCK_COMMENT("} verify_klass");
89 }
90
91 void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Register member_reg, Register temp) { }
92
93 #endif //ASSERT
94
95 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
96 bool for_compiler_entry) {
97 assert(method == rmethod, "interpreter calling convention");
98 Label L_no_such_method;
99 __ cbz(rmethod, L_no_such_method);
100 __ verify_method_ptr(method);
101
102 if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
103 Label run_compiled_code;
104 // JVMTI events, such as single-stepping, are implemented partly by avoiding running
105 // compiled code in threads for which the event is enabled. Check here for
106 // interp_only_mode if these events CAN be enabled.
107
108 __ ldrb(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
109 __ cbnz(rscratch1, run_compiled_code);
110 __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
111 __ br(rscratch1);
112 __ BIND(run_compiled_code);
113 }
114
115 const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :
116 Method::from_interpreted_offset();
117 __ ldr(rscratch1,Address(method, entry_offset));
118 __ br(rscratch1);
119 __ bind(L_no_such_method);
120 __ far_jump(RuntimeAddress(StubRoutines::throw_AbstractMethodError_entry()));
121 }
122
123 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
124 Register recv, Register method_temp,
125 Register temp2,
126 bool for_compiler_entry) {
127 BLOCK_COMMENT("jump_to_lambda_form {");
128 // This is the initial entry point of a lazy method handle.
129 // After type checking, it picks up the invoker from the LambdaForm.
|
88 BLOCK_COMMENT("} verify_klass");
89 }
90
91 void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Register member_reg, Register temp) { }
92
93 #endif //ASSERT
94
95 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp,
96 bool for_compiler_entry) {
97 assert(method == rmethod, "interpreter calling convention");
98 Label L_no_such_method;
99 __ cbz(rmethod, L_no_such_method);
100 __ verify_method_ptr(method);
101
102 if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
103 Label run_compiled_code;
104 // JVMTI events, such as single-stepping, are implemented partly by avoiding running
105 // compiled code in threads for which the event is enabled. Check here for
106 // interp_only_mode if these events CAN be enabled.
107
108 __ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
109 __ cbzw(rscratch1, run_compiled_code);
110 __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
111 __ br(rscratch1);
112 __ BIND(run_compiled_code);
113 }
114
115 const ByteSize entry_offset = for_compiler_entry ? Method::from_compiled_offset() :
116 Method::from_interpreted_offset();
117 __ ldr(rscratch1,Address(method, entry_offset));
118 __ br(rscratch1);
119 __ bind(L_no_such_method);
120 __ far_jump(RuntimeAddress(StubRoutines::throw_AbstractMethodError_entry()));
121 }
122
123 void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
124 Register recv, Register method_temp,
125 Register temp2,
126 bool for_compiler_entry) {
127 BLOCK_COMMENT("jump_to_lambda_form {");
128 // This is the initial entry point of a lazy method handle.
129 // After type checking, it picks up the invoker from the LambdaForm.
|