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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 | 1078 |
1079 void PrintInfo(MachineTypeUnion info) { | 1079 void PrintInfo(MachineTypeUnion info) { |
1080 if (FLAG_trace_representation) { | 1080 if (FLAG_trace_representation) { |
1081 OFStream os(stdout); | 1081 OFStream os(stdout); |
1082 os << static_cast<MachineType>(info); | 1082 os << static_cast<MachineType>(info); |
1083 } | 1083 } |
1084 } | 1084 } |
1085 | 1085 |
1086 private: | 1086 private: |
1087 JSGraph* jsgraph_; | 1087 JSGraph* jsgraph_; |
1088 int count_; // number of nodes in the graph | 1088 size_t const count_; // number of nodes in the graph |
1089 NodeInfo* info_; // node id -> usage information | 1089 NodeInfo* info_; // node id -> usage information |
1090 NodeVector nodes_; // collected nodes | 1090 NodeVector nodes_; // collected nodes |
1091 NodeVector replacements_; // replacements to be done after lowering | 1091 NodeVector replacements_; // replacements to be done after lowering |
1092 Phase phase_; // current phase of algorithm | 1092 Phase phase_; // current phase of algorithm |
1093 RepresentationChanger* changer_; // for inserting representation changes | 1093 RepresentationChanger* changer_; // for inserting representation changes |
1094 ZoneQueue<Node*> queue_; // queue for traversing the graph | 1094 ZoneQueue<Node*> queue_; // queue for traversing the graph |
1095 // TODO(danno): RepresentationSelector shouldn't know anything about the | 1095 // TODO(danno): RepresentationSelector shouldn't know anything about the |
1096 // source positions table, but must for now since there currently is no other | 1096 // source positions table, but must for now since there currently is no other |
1097 // way to pass down source position information to nodes created during | 1097 // way to pass down source position information to nodes created during |
1098 // lowering. Once this phase becomes a vanilla reducer, it should get source | 1098 // lowering. Once this phase becomes a vanilla reducer, it should get source |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 | 1592 |
1593 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1593 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
1594 node->set_op(machine()->IntLessThanOrEqual()); | 1594 node->set_op(machine()->IntLessThanOrEqual()); |
1595 node->ReplaceInput(0, StringComparison(node, true)); | 1595 node->ReplaceInput(0, StringComparison(node, true)); |
1596 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1596 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1597 } | 1597 } |
1598 | 1598 |
1599 } // namespace compiler | 1599 } // namespace compiler |
1600 } // namespace internal | 1600 } // namespace internal |
1601 } // namespace v8 | 1601 } // namespace v8 |
OLD | NEW |