| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 <iterator> | 5 #include <iterator> |
| 6 | 6 |
| 7 #include "src/compiler/store-store-elimination.h" | 7 #include "src/compiler/store-store-elimination.h" |
| 8 | 8 |
| 9 #include "src/compiler/all-nodes.h" | 9 #include "src/compiler/all-nodes.h" |
| 10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 namespace { | 132 namespace { |
| 133 | 133 |
| 134 class RedundantStoreFinder final { | 134 class RedundantStoreFinder final { |
| 135 public: | 135 public: |
| 136 RedundantStoreFinder(JSGraph* js_graph, Zone* temp_zone); | 136 RedundantStoreFinder(JSGraph* js_graph, Zone* temp_zone); |
| 137 | 137 |
| 138 void Find(); | 138 void Find(); |
| 139 | 139 |
| 140 const ZoneSet<Node*>& to_remove_const() { return to_remove_; } | 140 const ZoneSet<Node*>& to_remove_const() { return to_remove_; } |
| 141 | 141 |
| 142 virtual void Visit(Node* node); | 142 void Visit(Node* node); |
| 143 | 143 |
| 144 private: | 144 private: |
| 145 static bool IsEffectful(Node* node); | 145 static bool IsEffectful(Node* node); |
| 146 void VisitEffectfulNode(Node* node); | 146 void VisitEffectfulNode(Node* node); |
| 147 UnobservablesSet RecomputeUseIntersection(Node* node); | 147 UnobservablesSet RecomputeUseIntersection(Node* node); |
| 148 UnobservablesSet RecomputeSet(Node* node, UnobservablesSet uses); | 148 UnobservablesSet RecomputeSet(Node* node, UnobservablesSet uses); |
| 149 static bool CannotObserveStoreField(Node* node); | 149 static bool CannotObserveStoreField(Node* node); |
| 150 static bool CanObserveAnything(Node* node); | 150 static bool CanObserveAnything(Node* node); |
| 151 | 151 |
| 152 void MarkForRevisit(Node* node); | 152 void MarkForRevisit(Node* node); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 return !(*this == other); | 577 return !(*this == other); |
| 578 } | 578 } |
| 579 | 579 |
| 580 bool UnobservableStore::operator<(const UnobservableStore other) const { | 580 bool UnobservableStore::operator<(const UnobservableStore other) const { |
| 581 return (id_ < other.id_) || (id_ == other.id_ && offset_ < other.offset_); | 581 return (id_ < other.id_) || (id_ == other.id_ && offset_ < other.offset_); |
| 582 } | 582 } |
| 583 | 583 |
| 584 } // namespace compiler | 584 } // namespace compiler |
| 585 } // namespace internal | 585 } // namespace internal |
| 586 } // namespace v8 | 586 } // namespace v8 |
| OLD | NEW |