OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/js-type-feedback.h" | 5 #include "src/compiler/js-type-feedback.h" |
6 | 6 |
7 #include "src/property-details.h" | 7 #include "src/property-details.h" |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // TODO(turbofan): handle out of object properties. | 134 // TODO(turbofan): handle out of object properties. |
135 return false; | 135 return false; |
136 } | 136 } |
137 | 137 |
138 | 138 |
139 Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) { | 139 Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) { |
140 DCHECK(node->opcode() == IrOpcode::kJSLoadNamed); | 140 DCHECK(node->opcode() == IrOpcode::kJSLoadNamed); |
141 // TODO(turbofan): type feedback currently requires deoptimization. | 141 // TODO(turbofan): type feedback currently requires deoptimization. |
142 if (!FLAG_turbo_deoptimization) return NoChange(); | 142 if (!FLAG_turbo_deoptimization) return NoChange(); |
143 | 143 |
| 144 // TODO(turbofan): handle vector-based type feedback. |
144 TypeFeedbackId id = js_type_feedback_->find(node); | 145 TypeFeedbackId id = js_type_feedback_->find(node); |
145 if (id.IsNone() || oracle()->LoadIsUninitialized(id)) return NoChange(); | 146 if (id.IsNone() || oracle()->LoadInlineCacheState(id) == UNINITIALIZED) { |
| 147 return NoChange(); |
| 148 } |
146 | 149 |
147 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 150 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
148 SmallMapList maps; | 151 SmallMapList maps; |
149 Handle<Name> name = p.name().handle(); | 152 Handle<Name> name = p.name().handle(); |
150 Node* receiver = node->InputAt(0); | 153 Node* receiver = node->InputAt(0); |
151 Node* effect = NodeProperties::GetEffectInput(node); | 154 Node* effect = NodeProperties::GetEffectInput(node); |
152 GatherReceiverTypes(receiver, effect, id, name, &maps); | 155 GatherReceiverTypes(receiver, effect, id, name, &maps); |
153 | 156 |
154 if (maps.length() != 1) return NoChange(); // TODO(turbofan): polymorphism | 157 if (maps.length() != 1) return NoChange(); // TODO(turbofan): polymorphism |
155 | 158 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // TODO(turbofan): filter maps by initial receiver map if known | 276 // TODO(turbofan): filter maps by initial receiver map if known |
274 // TODO(turbofan): filter maps by native context (if specializing) | 277 // TODO(turbofan): filter maps by native context (if specializing) |
275 // TODO(turbofan): filter maps by effect chain | 278 // TODO(turbofan): filter maps by effect chain |
276 oracle()->PropertyReceiverTypes(id, name, maps); | 279 oracle()->PropertyReceiverTypes(id, name, maps); |
277 } | 280 } |
278 | 281 |
279 | 282 |
280 } // namespace compiler | 283 } // namespace compiler |
281 } // namespace internal | 284 } // namespace internal |
282 } // namespace v8 | 285 } // namespace v8 |
OLD | NEW |