| 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 "src/compiler/load-elimination.h" | 5 #include "src/compiler/load-elimination.h" |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 Zone* zone) const { | 209 Zone* zone) const { |
| 210 for (Element const element : this->elements_) { | 210 for (Element const element : this->elements_) { |
| 211 if (element.object == nullptr) continue; | 211 if (element.object == nullptr) continue; |
| 212 if (MayAlias(object, element.object)) { | 212 if (MayAlias(object, element.object)) { |
| 213 AbstractElements* that = new (zone) AbstractElements(zone); | 213 AbstractElements* that = new (zone) AbstractElements(zone); |
| 214 for (Element const element : this->elements_) { | 214 for (Element const element : this->elements_) { |
| 215 if (element.object == nullptr) continue; | 215 if (element.object == nullptr) continue; |
| 216 DCHECK_NOT_NULL(element.index); | 216 DCHECK_NOT_NULL(element.index); |
| 217 DCHECK_NOT_NULL(element.value); | 217 DCHECK_NOT_NULL(element.value); |
| 218 if (!MayAlias(object, element.object) || | 218 if (!MayAlias(object, element.object) || |
| 219 !MayAlias(index, element.index)) { | 219 !NodeProperties::GetType(index)->Maybe( |
| 220 NodeProperties::GetType(element.index))) { |
| 220 that->elements_[that->next_index_++] = element; | 221 that->elements_[that->next_index_++] = element; |
| 221 } | 222 } |
| 222 } | 223 } |
| 223 that->next_index_ %= arraysize(elements_); | 224 that->next_index_ %= arraysize(elements_); |
| 224 return that; | 225 return that; |
| 225 } | 226 } |
| 226 } | 227 } |
| 227 return this; | 228 return this; |
| 228 } | 229 } |
| 229 | 230 |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 899 |
| 899 CommonOperatorBuilder* LoadElimination::common() const { | 900 CommonOperatorBuilder* LoadElimination::common() const { |
| 900 return jsgraph()->common(); | 901 return jsgraph()->common(); |
| 901 } | 902 } |
| 902 | 903 |
| 903 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } | 904 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } |
| 904 | 905 |
| 905 } // namespace compiler | 906 } // namespace compiler |
| 906 } // namespace internal | 907 } // namespace internal |
| 907 } // namespace v8 | 908 } // namespace v8 |
| OLD | NEW |