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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void RawMachineAssembler::DebugBreak() { AddNode(machine()->DebugBreak()); } |
139 | 139 |
| 140 void RawMachineAssembler::Comment(const char* msg) { |
| 141 AddNode(machine()->Comment(msg)); |
| 142 } |
| 143 |
140 Node* RawMachineAssembler::CallN(CallDescriptor* desc, Node* function, | 144 Node* RawMachineAssembler::CallN(CallDescriptor* desc, Node* function, |
141 Node** args) { | 145 Node** args) { |
142 int param_count = | 146 int param_count = |
143 static_cast<int>(desc->GetMachineSignature()->parameter_count()); | 147 static_cast<int>(desc->GetMachineSignature()->parameter_count()); |
144 int input_count = param_count + 1; | 148 int input_count = param_count + 1; |
145 Node** buffer = zone()->NewArray<Node*>(input_count); | 149 Node** buffer = zone()->NewArray<Node*>(input_count); |
146 int index = 0; | 150 int index = 0; |
147 buffer[index++] = function; | 151 buffer[index++] = function; |
148 for (int i = 0; i < param_count; i++) { | 152 for (int i = 0; i < param_count; i++) { |
149 buffer[index++] = args[i]; | 153 buffer[index++] = args[i]; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 // The raw machine assembler nodes do not have effect and control inputs, | 494 // The raw machine assembler nodes do not have effect and control inputs, |
491 // so we disable checking input counts here. | 495 // so we disable checking input counts here. |
492 return graph()->NewNodeUnchecked(op, input_count, inputs); | 496 return graph()->NewNodeUnchecked(op, input_count, inputs); |
493 } | 497 } |
494 | 498 |
495 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 499 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } |
496 | 500 |
497 } // namespace compiler | 501 } // namespace compiler |
498 } // namespace internal | 502 } // namespace internal |
499 } // namespace v8 | 503 } // namespace v8 |
OLD | NEW |