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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 286 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
287 } else { | 287 } else { |
288 __ ldr(data, | 288 __ ldr(data, |
289 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 289 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
290 __ ldr(data, | 290 __ ldr(data, |
291 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 291 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
292 __ ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 292 __ ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
293 __ ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); | 293 __ ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); |
294 } | 294 } |
295 | 295 |
| 296 if (api_call_info->fast_handler()->IsCode()) { |
| 297 // Just tail call into the fast handler if present. |
| 298 __ Jump(handle(Code::cast(api_call_info->fast_handler())), |
| 299 RelocInfo::CODE_TARGET); |
| 300 return; |
| 301 } |
| 302 |
296 // Put api_function_address in place. | 303 // Put api_function_address in place. |
297 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 304 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
298 ApiFunction fun(function_address); | 305 ApiFunction fun(function_address); |
299 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 306 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
300 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 307 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
301 __ mov(api_function_address, Operand(ref)); | 308 __ mov(api_function_address, Operand(ref)); |
302 | 309 |
303 // Jump to stub. | 310 // Jump to stub. |
304 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); | 311 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); |
305 __ TailCallStub(&stub); | 312 __ TailCallStub(&stub); |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 // Return the generated code. | 791 // Return the generated code. |
785 return GetCode(kind(), Code::NORMAL, name); | 792 return GetCode(kind(), Code::NORMAL, name); |
786 } | 793 } |
787 | 794 |
788 | 795 |
789 #undef __ | 796 #undef __ |
790 } // namespace internal | 797 } // namespace internal |
791 } // namespace v8 | 798 } // namespace v8 |
792 | 799 |
793 #endif // V8_TARGET_ARCH_ARM | 800 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |