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

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

Issue 2294913006: [Interpreter] Enable allocation site mementos in CreateArrayLiterals. (Closed)
Patch Set: Rebase. Created 4 years, 3 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/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index f7cb78f488384cabc9285849d6e70767863c4be0..221d6b904ae99b17d0fa3d3f06482887ba15d5de 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -4,6 +4,7 @@
#include "src/compiler/bytecode-graph-builder.h"
+#include "src/ast/ast.h"
#include "src/compilation-info.h"
#include "src/compiler/bytecode-branch-analysis.h"
#include "src/compiler/linkage.h"
@@ -1010,6 +1011,11 @@ void BytecodeGraphBuilder::VisitCreateArrayLiteral() {
bytecode_iterator().GetConstantForIndexOperand(0));
int literal_index = bytecode_iterator().GetIndexOperand(1);
int literal_flags = bytecode_iterator().GetFlagOperand(2);
+ // Disable allocation site mementos. Only unoptimized code will collect
+ // feedback about allocation site. Once the code is optimized we expect the
+ // data to converge. So, we disable allocation site mementos in optimized
+ // code. We can revisit this when we have data to the contrary.
+ literal_flags |= ArrayLiteral::kDisableMementos;
int number_of_elements = constant_elements->length();
const Operator* op = javascript()->CreateLiteralArray(
constant_elements, literal_flags, literal_index, number_of_elements);
« no previous file with comments | « no previous file | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698