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 #include "src/compiler/raw-machine-assembler.h" | 5 #include "src/compiler/raw-machine-assembler.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/compiler/scheduler.h" | 10 #include "src/compiler/scheduler.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 | 130 |
131 void RawMachineAssembler::Return(Node* v1, Node* v2, Node* v3) { | 131 void RawMachineAssembler::Return(Node* v1, Node* v2, Node* v3) { |
132 Node* values[] = {v1, v2, v3}; | 132 Node* values[] = {v1, v2, v3}; |
133 Node* ret = MakeNode(common()->Return(3), 3, values); | 133 Node* ret = MakeNode(common()->Return(3), 3, values); |
134 schedule()->AddReturn(CurrentBlock(), ret); | 134 schedule()->AddReturn(CurrentBlock(), ret); |
135 current_block_ = nullptr; | 135 current_block_ = nullptr; |
136 } | 136 } |
137 | 137 |
| 138 void RawMachineAssembler::DebugBreak() { AddNode(machine()->DebugBreak()); } |
138 | 139 |
139 Node* RawMachineAssembler::CallN(CallDescriptor* desc, Node* function, | 140 Node* RawMachineAssembler::CallN(CallDescriptor* desc, Node* function, |
140 Node** args) { | 141 Node** args) { |
141 int param_count = | 142 int param_count = |
142 static_cast<int>(desc->GetMachineSignature()->parameter_count()); | 143 static_cast<int>(desc->GetMachineSignature()->parameter_count()); |
143 int input_count = param_count + 1; | 144 int input_count = param_count + 1; |
144 Node** buffer = zone()->NewArray<Node*>(input_count); | 145 Node** buffer = zone()->NewArray<Node*>(input_count); |
145 int index = 0; | 146 int index = 0; |
146 buffer[index++] = function; | 147 buffer[index++] = function; |
147 for (int i = 0; i < param_count; i++) { | 148 for (int i = 0; i < param_count; i++) { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 // The raw machine assembler nodes do not have effect and control inputs, | 490 // The raw machine assembler nodes do not have effect and control inputs, |
490 // so we disable checking input counts here. | 491 // so we disable checking input counts here. |
491 return graph()->NewNodeUnchecked(op, input_count, inputs); | 492 return graph()->NewNodeUnchecked(op, input_count, inputs); |
492 } | 493 } |
493 | 494 |
494 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 495 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } |
495 | 496 |
496 } // namespace compiler | 497 } // namespace compiler |
497 } // namespace internal | 498 } // namespace internal |
498 } // namespace v8 | 499 } // namespace v8 |
OLD | NEW |