Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: src/compiler/js-type-feedback.cc

Issue 1083933002: Pass load ic state through the Oracle. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adjust defaults. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast.h ('k') | src/type-info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698