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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2655853010: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: more comments. 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 | « src/ia32/macro-assembler-ia32.cc ('k') | src/interpreter/interpreter-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index f543e8c6e5fd7f3414bd93ad9adcfdefffecd417..cef7d2753596d410f5b34ea0d54502f4520716dd 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1640,8 +1640,8 @@ void BytecodeGenerator::VisitLiteral(Literal* expr) {
void BytecodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
// Materialize a regular expression literal.
- builder()->CreateRegExpLiteral(expr->pattern(), expr->literal_index(),
- expr->flags());
+ builder()->CreateRegExpLiteral(
+ expr->pattern(), feedback_index(expr->literal_slot()), expr->flags());
}
void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
@@ -1662,7 +1662,8 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
entry = builder()->AllocateConstantPoolEntry();
object_literals_.push_back(std::make_pair(expr, entry));
}
- builder()->CreateObjectLiteral(entry, expr->literal_index(), flags, literal);
+ builder()->CreateObjectLiteral(entry, feedback_index(expr->literal_slot()),
+ flags, literal);
// Store computed values into the literal.
int property_index = 0;
@@ -1846,7 +1847,8 @@ void BytecodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
expr->IsFastCloningSupported(), expr->ComputeFlags());
size_t entry = builder()->AllocateConstantPoolEntry();
- builder()->CreateArrayLiteral(entry, expr->literal_index(), flags);
+ builder()->CreateArrayLiteral(entry, feedback_index(expr->literal_slot()),
+ flags);
array_literals_.push_back(std::make_pair(expr, entry));
Register index, literal;
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/interpreter/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698