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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1252303002: VectorICs: VisitClassLiteral needs adjustment for IC slot usage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: The wrong IC was chosen without vector stores on. 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 | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 0476aed3144084a7d309289bc55fbe261fca618d..1efb0f9ef031eccb03866d9253116005d481de5f 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1663,9 +1663,10 @@ void AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
DCHECK_NOT_NULL(expr->class_variable_proxy());
Variable* var = expr->class_variable_proxy()->var();
FrameStateBeforeAndAfter states(this, BailoutId::None());
- VectorSlotPair feedback = CreateVectorSlotPair(
- FLAG_vector_stores ? expr->GetNthSlot(store_slot_index++)
- : FeedbackVectorICSlot::Invalid());
+ VectorSlotPair feedback =
+ CreateVectorSlotPair(FLAG_vector_stores && var->IsUnallocated()
+ ? expr->GetNthSlot(store_slot_index++)
+ : FeedbackVectorICSlot::Invalid());
BuildVariableAssignment(var, literal, Token::INIT_CONST, feedback,
BailoutId::None(), states);
}
@@ -1972,6 +1973,9 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
FrameStateBeforeAndAfter states(this, subexpr->id());
Node* value = environment()->Pop();
Node* index = jsgraph()->Constant(array_index);
+ // TODO(turbofan): More efficient code could be generated here. Consider
+ // that the store will be generic because we don't have a feedback vector
+ // slot.
Node* store = BuildKeyedStore(literal, index, value, VectorSlotPair(),
TypeFeedbackId::None());
states.AddToNode(store, expr->GetIdForElement(array_index),
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698