OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 200 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
201 } else { | 201 } else { |
202 __ Ldr(data, | 202 __ Ldr(data, |
203 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 203 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
204 __ Ldr(data, | 204 __ Ldr(data, |
205 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 205 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
206 __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 206 __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
207 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); | 207 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); |
208 } | 208 } |
209 | 209 |
| 210 if (api_call_info->fast_handler()->IsCode()) { |
| 211 // Just tail call into the fast handler if present. |
| 212 __ Jump(handle(Code::cast(api_call_info->fast_handler())), |
| 213 RelocInfo::CODE_TARGET); |
| 214 return; |
| 215 } |
| 216 |
210 // Put api_function_address in place. | 217 // Put api_function_address in place. |
211 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 218 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
212 ApiFunction fun(function_address); | 219 ApiFunction fun(function_address); |
213 ExternalReference ref = ExternalReference( | 220 ExternalReference ref = ExternalReference( |
214 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate()); | 221 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate()); |
215 __ Mov(api_function_address, ref); | 222 __ Mov(api_function_address, ref); |
216 | 223 |
217 // Jump to stub. | 224 // Jump to stub. |
218 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); | 225 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); |
219 __ TailCallStub(&stub); | 226 __ TailCallStub(&stub); |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 // Return the generated code. | 802 // Return the generated code. |
796 return GetCode(kind(), Code::FAST, name); | 803 return GetCode(kind(), Code::FAST, name); |
797 } | 804 } |
798 | 805 |
799 | 806 |
800 #undef __ | 807 #undef __ |
801 } // namespace internal | 808 } // namespace internal |
802 } // namespace v8 | 809 } // namespace v8 |
803 | 810 |
804 #endif // V8_TARGET_ARCH_IA32 | 811 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |