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/graph-inl.h" | 5 #include "src/compiler/graph-inl.h" |
6 #include "src/compiler/js-operator.h" | 6 #include "src/compiler/js-operator.h" |
7 #include "src/compiler/node.h" | 7 #include "src/compiler/node.h" |
8 #include "src/compiler/node-properties-inl.h" | 8 #include "src/compiler/node-properties-inl.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 }; | 111 }; |
112 | 112 |
113 | 113 |
114 class Typer::RunVisitor : public Typer::Visitor { | 114 class Typer::RunVisitor : public Typer::Visitor { |
115 public: | 115 public: |
116 RunVisitor(Typer* typer, MaybeHandle<Context> context) | 116 RunVisitor(Typer* typer, MaybeHandle<Context> context) |
117 : Visitor(typer, context), | 117 : Visitor(typer, context), |
118 phis(NodeSet::key_compare(), NodeSet::allocator_type(typer->zone())) {} | 118 phis(NodeSet::key_compare(), NodeSet::allocator_type(typer->zone())) {} |
119 | 119 |
120 GenericGraphVisit::Control Pre(Node* node) { | 120 GenericGraphVisit::Control Pre(Node* node) { |
121 return NodeProperties::IsControl(node) | 121 return NodeProperties::IsControl(node) && |
122 && node->opcode() != IrOpcode::kEnd | 122 node->opcode() != IrOpcode::kEnd && |
123 && node->opcode() != IrOpcode::kMerge | 123 node->opcode() != IrOpcode::kMerge && |
124 && node->opcode() != IrOpcode::kReturn | 124 node->opcode() != IrOpcode::kBranch && |
125 ? GenericGraphVisit::SKIP : GenericGraphVisit::CONTINUE; | 125 node->opcode() != IrOpcode::kIfTrue && |
126 node->opcode() != IrOpcode::kIfFalse && | |
127 node->opcode() != IrOpcode::kReturn | |
128 ? GenericGraphVisit::SKIP | |
129 : GenericGraphVisit::CONTINUE; | |
titzer
2014/09/05 13:54:46
Just delete this method; I think the default will
Michael Starzinger
2014/09/05 14:58:13
Done.
| |
126 } | 130 } |
127 | 131 |
128 GenericGraphVisit::Control Post(Node* node) { | 132 GenericGraphVisit::Control Post(Node* node) { |
129 Bounds bounds = TypeNode(node); | 133 Bounds bounds = TypeNode(node); |
130 if (node->opcode() == IrOpcode::kPhi) { | 134 if (node->opcode() == IrOpcode::kPhi) { |
131 // Remember phis for least fixpoint iteration. | 135 // Remember phis for least fixpoint iteration. |
132 phis.insert(node); | 136 phis.insert(node); |
133 } else { | 137 } else { |
134 NodeProperties::SetBounds(node, bounds); | 138 NodeProperties::SetBounds(node, bounds); |
135 } | 139 } |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
849 } | 853 } |
850 | 854 |
851 | 855 |
852 void Typer::DecorateGraph(Graph* graph) { | 856 void Typer::DecorateGraph(Graph* graph) { |
853 graph->AddDecorator(new (zone()) TyperDecorator(this)); | 857 graph->AddDecorator(new (zone()) TyperDecorator(this)); |
854 } | 858 } |
855 | 859 |
856 } | 860 } |
857 } | 861 } |
858 } // namespace v8::internal::compiler | 862 } // namespace v8::internal::compiler |
OLD | NEW |