| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/compiler/code-assembler.h" | 5 #include "src/compiler/code-assembler.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 size_t result_size, Node* target, Node* context, | 632 size_t result_size, Node* target, Node* context, |
| 633 TArgs... args) { | 633 TArgs... args) { |
| 634 Node* nodes[] = {target, args..., context}; | 634 Node* nodes[] = {target, args..., context}; |
| 635 return CallStubN(descriptor, result_size, arraysize(nodes), nodes); | 635 return CallStubN(descriptor, result_size, arraysize(nodes), nodes); |
| 636 } | 636 } |
| 637 | 637 |
| 638 // Instantiate CallStubR() for argument counts used by CSA-generated code. | 638 // Instantiate CallStubR() for argument counts used by CSA-generated code. |
| 639 #define INSTANTIATE(...) \ | 639 #define INSTANTIATE(...) \ |
| 640 template V8_EXPORT_PRIVATE Node* CodeAssembler::CallStubR( \ | 640 template V8_EXPORT_PRIVATE Node* CodeAssembler::CallStubR( \ |
| 641 const CallInterfaceDescriptor& descriptor, size_t, Node*, __VA_ARGS__); | 641 const CallInterfaceDescriptor& descriptor, size_t, Node*, __VA_ARGS__); |
| 642 REPEAT_1_TO_11(INSTANTIATE, Node*) | 642 REPEAT_1_TO_8(INSTANTIATE, Node*) |
| 643 #undef INSTANTIATE | 643 #undef INSTANTIATE |
| 644 | 644 |
| 645 Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor, | 645 Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor, |
| 646 size_t result_size, int input_count, | 646 size_t result_size, int input_count, |
| 647 Node* const* inputs) { | 647 Node* const* inputs) { |
| 648 // 2 is for target and context. | 648 // 2 is for target and context. |
| 649 DCHECK_LE(2, input_count); | 649 DCHECK_LE(2, input_count); |
| 650 int argc = input_count - 2; | 650 int argc = input_count - 2; |
| 651 DCHECK_LE(descriptor.GetParameterCount(), argc); | 651 DCHECK_LE(descriptor.GetParameterCount(), argc); |
| 652 // Extra arguments not mentioned in the descriptor are passed on the stack. | 652 // Extra arguments not mentioned in the descriptor are passed on the stack. |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } | 1058 } |
| 1059 } | 1059 } |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 bound_ = true; | 1062 bound_ = true; |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 } // namespace compiler | 1065 } // namespace compiler |
| 1066 } // namespace internal | 1066 } // namespace internal |
| 1067 } // namespace v8 | 1067 } // namespace v8 |
| OLD | NEW |