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->InputCount()); | 269 DCHECK_EQ(2, node->op()->ValueInputCount()); |
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 } |
272 SetOutput(node, output); | 275 SetOutput(node, output); |
273 } | 276 } |
274 | 277 |
275 // Helper for binops of the I x I -> O variety. | 278 // Helper for binops of the I x I -> O variety. |
276 void VisitBinop(Node* node, MachineTypeUnion input_use, | 279 void VisitBinop(Node* node, MachineTypeUnion input_use, |
277 MachineTypeUnion output) { | 280 MachineTypeUnion output) { |
278 VisitBinop(node, input_use, input_use, output); | 281 VisitBinop(node, input_use, input_use, output); |
279 } | 282 } |
280 | 283 |
281 // Helper for unops of the I -> O variety. | 284 // Helper for unops of the I -> O variety. |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 | 1636 |
1634 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1637 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
1635 node->set_op(machine()->IntLessThanOrEqual()); | 1638 node->set_op(machine()->IntLessThanOrEqual()); |
1636 node->ReplaceInput(0, StringComparison(node)); | 1639 node->ReplaceInput(0, StringComparison(node)); |
1637 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1640 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1638 } | 1641 } |
1639 | 1642 |
1640 } // namespace compiler | 1643 } // namespace compiler |
1641 } // namespace internal | 1644 } // namespace internal |
1642 } // namespace v8 | 1645 } // namespace v8 |
OLD | NEW |