| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 MaybeHandle<Context> context_; | 110 MaybeHandle<Context> context_; |
| 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) { | |
| 121 return NodeProperties::IsControl(node) | |
| 122 && node->opcode() != IrOpcode::kEnd | |
| 123 && node->opcode() != IrOpcode::kMerge | |
| 124 && node->opcode() != IrOpcode::kReturn | |
| 125 ? GenericGraphVisit::SKIP : GenericGraphVisit::CONTINUE; | |
| 126 } | |
| 127 | |
| 128 GenericGraphVisit::Control Post(Node* node) { | 120 GenericGraphVisit::Control Post(Node* node) { |
| 129 Bounds bounds = TypeNode(node); | 121 Bounds bounds = TypeNode(node); |
| 130 if (node->opcode() == IrOpcode::kPhi) { | 122 if (node->opcode() == IrOpcode::kPhi) { |
| 131 // Remember phis for least fixpoint iteration. | 123 // Remember phis for least fixpoint iteration. |
| 132 phis.insert(node); | 124 phis.insert(node); |
| 133 } else { | 125 } else { |
| 134 NodeProperties::SetBounds(node, bounds); | 126 NodeProperties::SetBounds(node, bounds); |
| 135 } | 127 } |
| 136 return GenericGraphVisit::CONTINUE; | 128 return GenericGraphVisit::CONTINUE; |
| 137 } | 129 } |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 } | 841 } |
| 850 | 842 |
| 851 | 843 |
| 852 void Typer::DecorateGraph(Graph* graph) { | 844 void Typer::DecorateGraph(Graph* graph) { |
| 853 graph->AddDecorator(new (zone()) TyperDecorator(this)); | 845 graph->AddDecorator(new (zone()) TyperDecorator(this)); |
| 854 } | 846 } |
| 855 | 847 |
| 856 } | 848 } |
| 857 } | 849 } |
| 858 } // namespace v8::internal::compiler | 850 } // namespace v8::internal::compiler |
| OLD | NEW |