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

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

Issue 1405503002: VectorICs: use a vector slot to aid in array literal processing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips issues. Created 5 years, 2 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index f2e10ecfe5354e71c159f151c40dd48fccfb48a7..8f825fbc01515bcf8fad2d6edb783c3060e89fba 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1911,7 +1911,6 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
Node* closure = GetFunctionClosure();
// Create node to deep-copy the literal boilerplate.
- expr->BuildConstantElements(isolate());
Node* literals_array =
BuildLoadObjectField(closure, JSFunction::kLiteralsOffset);
Node* literal_index = jsgraph()->Constant(expr->literal_index());
@@ -1929,6 +1928,7 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
// Create nodes to evaluate all the non-constant subexpressions and to store
// them into the newly cloned array.
+ VectorSlotPair pair = CreateVectorSlotPair(expr->LiteralFeedbackSlot());
Michael Starzinger 2015/10/13 11:59:18 nit: Can we move this into the loop (ideally yo li
mvstanton 2015/10/13 12:56:10 Done.
int array_index = 0;
for (; array_index < expr->values()->length(); array_index++) {
Expression* subexpr = expr->values()->at(array_index);
@@ -1940,11 +1940,8 @@ 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());
+ Node* store =
+ BuildKeyedStore(literal, index, value, pair, TypeFeedbackId::None());
states.AddToNode(store, expr->GetIdForElement(array_index),
OutputFrameStateCombine::Ignore());
}

Powered by Google App Engine
This is Rietveld 408576698