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

Unified Diff: src/ast/ast.cc

Issue 2587393006: [runtime] Collect IC feedback in DefineDataPropertyInLiteral. (Closed)
Patch Set: Minor clean ups, implement print and clear methods. Created 3 years, 11 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 | « no previous file | src/compiler/bytecode-graph-builder.cc » ('j') | src/interpreter/bytecode-generator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 18abd5a756a44f04eb58dde88e41a9373e7fa488..751e706d8f5f91a48cff48890d726c209ac3534c 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -376,9 +376,12 @@ void ClassLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
for (int i = 0; i < properties()->length(); i++) {
ClassLiteral::Property* property = properties()->at(i);
Expression* value = property->value();
+ int slot_offset = 0;
if (FunctionLiteral::NeedsHomeObject(value)) {
property->SetSlot(spec->AddStoreICSlot());
+ slot_offset++;
}
+ property->SetSlot(spec->AddStoreDataPropertyInLiteralICSlot(), slot_offset);
}
}
@@ -447,12 +450,15 @@ void ObjectLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
for (; property_index < properties()->length(); property_index++) {
ObjectLiteral::Property* property = properties()->at(property_index);
+ int slot_offset = 0;
Expression* value = property->value();
if (property->kind() != ObjectLiteral::Property::PROTOTYPE) {
if (FunctionLiteral::NeedsHomeObject(value)) {
property->SetSlot(spec->AddStoreICSlot());
+ slot_offset++;
}
}
+ property->SetSlot(spec->AddStoreDataPropertyInLiteralICSlot(), slot_offset);
}
}
« no previous file with comments | « no previous file | src/compiler/bytecode-graph-builder.cc » ('j') | src/interpreter/bytecode-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698