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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1779 } | 1779 } |
1780 } | 1780 } |
1781 VisitWord64Compare(this, node, &cont); | 1781 VisitWord64Compare(this, node, &cont); |
1782 } | 1782 } |
1783 | 1783 |
1784 | 1784 |
1785 void InstructionSelector::VisitInt32AddWithOverflow(Node* node) { | 1785 void InstructionSelector::VisitInt32AddWithOverflow(Node* node) { |
1786 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { | 1786 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { |
1787 FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); | 1787 FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); |
1788 VisitBinop(this, node, kX64Add32, &cont); | 1788 VisitBinop(this, node, kX64Add32, &cont); |
1789 } else { | |
Benedikt Meurer
2016/03/03 17:48:09
Please leave the version w/o the else, and instead
| |
1790 FlagsContinuation cont; | |
1791 VisitBinop(this, node, kX64Add32, &cont); | |
1789 } | 1792 } |
1790 FlagsContinuation cont; | |
1791 VisitBinop(this, node, kX64Add32, &cont); | |
1792 } | 1793 } |
1793 | 1794 |
1794 | 1795 |
1795 void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { | 1796 void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { |
1796 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { | 1797 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { |
1797 FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); | 1798 FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); |
1798 return VisitBinop(this, node, kX64Sub32, &cont); | 1799 return VisitBinop(this, node, kX64Sub32, &cont); |
1799 } | 1800 } |
1800 FlagsContinuation cont; | 1801 FlagsContinuation cont; |
1801 VisitBinop(this, node, kX64Sub32, &cont); | 1802 VisitBinop(this, node, kX64Sub32, &cont); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1928 MachineOperatorBuilder::kFloat64RoundTruncate | | 1929 MachineOperatorBuilder::kFloat64RoundTruncate | |
1929 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1930 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1930 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1931 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1931 } | 1932 } |
1932 return flags; | 1933 return flags; |
1933 } | 1934 } |
1934 | 1935 |
1935 } // namespace compiler | 1936 } // namespace compiler |
1936 } // namespace internal | 1937 } // namespace internal |
1937 } // namespace v8 | 1938 } // namespace v8 |
OLD | NEW |