| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // Put call data in place. | 277 // Put call data in place. |
| 278 if (api_call_info->data()->IsUndefined()) { | 278 if (api_call_info->data()->IsUndefined()) { |
| 279 call_data_undefined = true; | 279 call_data_undefined = true; |
| 280 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 280 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
| 281 } else { | 281 } else { |
| 282 __ ld(data, FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 282 __ ld(data, FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
| 283 __ ld(data, FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 283 __ ld(data, FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
| 284 __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 284 __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
| 285 __ ld(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); | 285 __ ld(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); |
| 286 } | 286 } |
| 287 |
| 288 if (api_call_info->fast_handler()->IsCode()) { |
| 289 // Just tail call into the fast handler if present. |
| 290 __ Jump(handle(Code::cast(api_call_info->fast_handler())), |
| 291 RelocInfo::CODE_TARGET); |
| 292 return; |
| 293 } |
| 287 // Put api_function_address in place. | 294 // Put api_function_address in place. |
| 288 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 295 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
| 289 ApiFunction fun(function_address); | 296 ApiFunction fun(function_address); |
| 290 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 297 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
| 291 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 298 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
| 292 __ li(api_function_address, Operand(ref)); | 299 __ li(api_function_address, Operand(ref)); |
| 293 | 300 |
| 294 // Jump to stub. | 301 // Jump to stub. |
| 295 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); | 302 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); |
| 296 __ TailCallStub(&stub); | 303 __ TailCallStub(&stub); |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 // Return the generated code. | 782 // Return the generated code. |
| 776 return GetCode(kind(), Code::NORMAL, name); | 783 return GetCode(kind(), Code::NORMAL, name); |
| 777 } | 784 } |
| 778 | 785 |
| 779 | 786 |
| 780 #undef __ | 787 #undef __ |
| 781 } // namespace internal | 788 } // namespace internal |
| 782 } // namespace v8 | 789 } // namespace v8 |
| 783 | 790 |
| 784 #endif // V8_TARGET_ARCH_MIPS64 | 791 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |