| 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 replacement = graph()->NewNode(common()->TypeGuard(node_type), | 737 replacement = graph()->NewNode(common()->TypeGuard(node_type), |
| 738 replacement, control); | 738 replacement, control); |
| 739 } | 739 } |
| 740 ReplaceWithValue(node, replacement, effect); | 740 ReplaceWithValue(node, replacement, effect); |
| 741 return Replace(replacement); | 741 return Replace(replacement); |
| 742 } | 742 } |
| 743 } | 743 } |
| 744 state = state->AddField(object, field_index, node, zone()); | 744 state = state->AddField(object, field_index, node, zone()); |
| 745 } | 745 } |
| 746 } | 746 } |
| 747 Handle<Map> field_map; |
| 748 if (access.map.ToHandle(&field_map)) { |
| 749 state = state->AddMaps(node, ZoneHandleSet<Map>(field_map), zone()); |
| 750 } |
| 747 return UpdateState(node, state); | 751 return UpdateState(node, state); |
| 748 } | 752 } |
| 749 | 753 |
| 750 Reduction LoadElimination::ReduceStoreField(Node* node) { | 754 Reduction LoadElimination::ReduceStoreField(Node* node) { |
| 751 FieldAccess const& access = FieldAccessOf(node->op()); | 755 FieldAccess const& access = FieldAccessOf(node->op()); |
| 752 Node* const object = NodeProperties::GetValueInput(node, 0); | 756 Node* const object = NodeProperties::GetValueInput(node, 0); |
| 753 Node* const new_value = NodeProperties::GetValueInput(node, 1); | 757 Node* const new_value = NodeProperties::GetValueInput(node, 1); |
| 754 Node* const effect = NodeProperties::GetEffectInput(node); | 758 Node* const effect = NodeProperties::GetEffectInput(node); |
| 755 AbstractState const* state = node_states_.Get(effect); | 759 AbstractState const* state = node_states_.Get(effect); |
| 756 if (state == nullptr) return NoChange(); | 760 if (state == nullptr) return NoChange(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 return jsgraph()->common(); | 1068 return jsgraph()->common(); |
| 1065 } | 1069 } |
| 1066 | 1070 |
| 1067 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } | 1071 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } |
| 1068 | 1072 |
| 1069 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } | 1073 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } |
| 1070 | 1074 |
| 1071 } // namespace compiler | 1075 } // namespace compiler |
| 1072 } // namespace internal | 1076 } // namespace internal |
| 1073 } // namespace v8 | 1077 } // namespace v8 |
| OLD | NEW |