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/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 for (int i = tagged_count; i < node->InputCount(); i++) { | 259 for (int i = tagged_count; i < node->InputCount(); i++) { |
260 Enqueue(node->InputAt(i)); | 260 Enqueue(node->InputAt(i)); |
261 } | 261 } |
262 // Assume the output is tagged. | 262 // Assume the output is tagged. |
263 SetOutput(node, kMachAnyTagged); | 263 SetOutput(node, kMachAnyTagged); |
264 } | 264 } |
265 | 265 |
266 // Helper for binops of the R x L -> O variety. | 266 // Helper for binops of the R x L -> O variety. |
267 void VisitBinop(Node* node, MachineTypeUnion left_use, | 267 void VisitBinop(Node* node, MachineTypeUnion left_use, |
268 MachineTypeUnion right_use, MachineTypeUnion output) { | 268 MachineTypeUnion right_use, MachineTypeUnion output) { |
269 DCHECK_EQ(2, node->op()->ValueInputCount()); | 269 DCHECK_EQ(2, node->InputCount()); |
270 ProcessInput(node, 0, left_use); | 270 ProcessInput(node, 0, left_use); |
271 ProcessInput(node, 1, right_use); | 271 ProcessInput(node, 1, right_use); |
272 for (int i = 2; i < node->InputCount(); i++) { | |
273 Enqueue(node->InputAt(i)); | |
274 } | |
275 SetOutput(node, output); | 272 SetOutput(node, output); |
276 } | 273 } |
277 | 274 |
278 // Helper for binops of the I x I -> O variety. | 275 // Helper for binops of the I x I -> O variety. |
279 void VisitBinop(Node* node, MachineTypeUnion input_use, | 276 void VisitBinop(Node* node, MachineTypeUnion input_use, |
280 MachineTypeUnion output) { | 277 MachineTypeUnion output) { |
281 VisitBinop(node, input_use, input_use, output); | 278 VisitBinop(node, input_use, input_use, output); |
282 } | 279 } |
283 | 280 |
284 // Helper for unops of the I -> O variety. | 281 // Helper for unops of the I -> O variety. |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 | 1633 |
1637 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1634 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
1638 node->set_op(machine()->IntLessThanOrEqual()); | 1635 node->set_op(machine()->IntLessThanOrEqual()); |
1639 node->ReplaceInput(0, StringComparison(node)); | 1636 node->ReplaceInput(0, StringComparison(node)); |
1640 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1637 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1641 } | 1638 } |
1642 | 1639 |
1643 } // namespace compiler | 1640 } // namespace compiler |
1644 } // namespace internal | 1641 } // namespace internal |
1645 } // namespace v8 | 1642 } // namespace v8 |
OLD | NEW |