| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 } | 528 } |
| 529 | 529 |
| 530 LoadElimination::AbstractState const* | 530 LoadElimination::AbstractState const* |
| 531 LoadElimination::AbstractState::KillFields(Node* object, Zone* zone) const { | 531 LoadElimination::AbstractState::KillFields(Node* object, Zone* zone) const { |
| 532 for (size_t i = 0;; ++i) { | 532 for (size_t i = 0;; ++i) { |
| 533 if (i == arraysize(fields_)) return this; | 533 if (i == arraysize(fields_)) return this; |
| 534 if (AbstractField const* this_field = this->fields_[i]) { | 534 if (AbstractField const* this_field = this->fields_[i]) { |
| 535 AbstractField const* that_field = this_field->Kill(object, zone); | 535 AbstractField const* that_field = this_field->Kill(object, zone); |
| 536 if (that_field != this_field) { | 536 if (that_field != this_field) { |
| 537 AbstractState* that = new (zone) AbstractState(*this); | 537 AbstractState* that = new (zone) AbstractState(*this); |
| 538 that->fields_[i] = this_field; | 538 that->fields_[i] = that_field; |
| 539 while (++i < arraysize(fields_)) { | 539 while (++i < arraysize(fields_)) { |
| 540 if (this->fields_[i] != nullptr) { | 540 if (this->fields_[i] != nullptr) { |
| 541 that->fields_[i] = this->fields_[i]->Kill(object, zone); | 541 that->fields_[i] = this->fields_[i]->Kill(object, zone); |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 return that; | 544 return that; |
| 545 } | 545 } |
| 546 } | 546 } |
| 547 } | 547 } |
| 548 } | 548 } |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 return jsgraph()->common(); | 1071 return jsgraph()->common(); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } | 1074 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } |
| 1075 | 1075 |
| 1076 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } | 1076 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } |
| 1077 | 1077 |
| 1078 } // namespace compiler | 1078 } // namespace compiler |
| 1079 } // namespace internal | 1079 } // namespace internal |
| 1080 } // namespace v8 | 1080 } // namespace v8 |
| OLD | NEW |