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

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 1252303002: VectorICs: VisitClassLiteral needs adjustment for IC slot usage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 17b1597edbe0f3af9d0bf514849fbee45dac55af..ad783c1cbaa2851c7f9aee63415e2bde8a8ddd01 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -359,11 +359,22 @@ void JSGenericLowering::LowerJSStoreProperty(Node* node) {
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
const StorePropertyParameters& p = StorePropertyParametersOf(node->op());
LanguageMode language_mode = OpParameter<LanguageMode>(node);
- Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
- isolate(), language_mode, UNINITIALIZED);
+ InlineCacheState state = FLAG_vector_stores && p.feedback().index() == -1
Michael Starzinger 2015/07/24 11:51:30 Can we restructure this a little to be more readab
mvstanton 2015/07/24 12:24:58 Most wise, thanks!
+ ? MEGAMORPHIC
+ : UNINITIALIZED;
+ Callable callable =
+ CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode, state);
if (FLAG_vector_stores) {
- DCHECK(p.feedback().index() != -1);
- node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index()));
+ if (state == MEGAMORPHIC) {
+ // We have a special case where we do keyed stores but don't have a type
+ // feedback vector slot allocated to support it. In this case, install
+ // the megamorphic keyed store stub which needs neither vector nor slot.
+ node->RemoveInput(3);
+ } else {
+ DCHECK(p.feedback().index() != -1);
+ node->InsertInput(zone(), 3,
+ jsgraph()->SmiConstant(p.feedback().index()));
+ }
} else {
node->RemoveInput(3);
}
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698