| 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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
| 8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.h" |
| 9 #include "src/compiler/js-operator.h" | 9 #include "src/compiler/js-operator.h" |
| 10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 op = common()->IfFalse(); | 1572 op = common()->IfFalse(); |
| 1573 Node* n18 = graph()->NewNode(op, nil); | 1573 Node* n18 = graph()->NewNode(op, nil); |
| 1574 USE(n18); | 1574 USE(n18); |
| 1575 n18->ReplaceInput(0, n16); | 1575 n18->ReplaceInput(0, n16); |
| 1576 n21->ReplaceInput(2, n18); | 1576 n21->ReplaceInput(2, n18); |
| 1577 n22->ReplaceInput(0, n21); | 1577 n22->ReplaceInput(0, n21); |
| 1578 | 1578 |
| 1579 graph()->SetStart(n0); | 1579 graph()->SetStart(n0); |
| 1580 graph()->SetEnd(n22); | 1580 graph()->SetEnd(n22); |
| 1581 | 1581 |
| 1582 Schedule* schedule = ComputeAndVerifySchedule(19); | 1582 ComputeAndVerifySchedule(19); |
| 1583 // Make sure the integer-only add gets hoisted to a different block that the | |
| 1584 // JSAdd. | |
| 1585 EXPECT_NE(schedule->block(n19), schedule->block(n20)); | |
| 1586 } | 1583 } |
| 1587 | 1584 |
| 1588 | 1585 |
| 1589 namespace { | 1586 namespace { |
| 1590 | 1587 |
| 1591 Node* CreateDiamond(Graph* graph, CommonOperatorBuilder* common, Node* cond) { | 1588 Node* CreateDiamond(Graph* graph, CommonOperatorBuilder* common, Node* cond) { |
| 1592 Node* tv = graph->NewNode(common->Int32Constant(6)); | 1589 Node* tv = graph->NewNode(common->Int32Constant(6)); |
| 1593 Node* fv = graph->NewNode(common->Int32Constant(7)); | 1590 Node* fv = graph->NewNode(common->Int32Constant(7)); |
| 1594 Node* br = graph->NewNode(common->Branch(), cond, graph->start()); | 1591 Node* br = graph->NewNode(common->Branch(), cond, graph->start()); |
| 1595 Node* t = graph->NewNode(common->IfTrue(), br); | 1592 Node* t = graph->NewNode(common->IfTrue(), br); |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2033 Node* end = graph()->NewNode(common()->End(), ret); | 2030 Node* end = graph()->NewNode(common()->End(), ret); |
| 2034 | 2031 |
| 2035 graph()->SetEnd(end); | 2032 graph()->SetEnd(end); |
| 2036 | 2033 |
| 2037 ComputeAndVerifySchedule(16); | 2034 ComputeAndVerifySchedule(16); |
| 2038 } | 2035 } |
| 2039 | 2036 |
| 2040 } // namespace compiler | 2037 } // namespace compiler |
| 2041 } // namespace internal | 2038 } // namespace internal |
| 2042 } // namespace v8 | 2039 } // namespace v8 |
| OLD | NEW |