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

Unified Diff: src/parser.cc

Issue 1143813002: Reland "[strong] Object literals create strong objects" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix handlification bug Created 5 years, 7 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/objects.cc ('k') | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 374b59c7a7e9b4e78707bd57d0ce94ad266e6bdf..d70e386564c576d1e9c107cb725f0be78dde2b60 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -5621,11 +5621,12 @@ Expression* Parser::CloseTemplateLiteral(TemplateLiteralState* state, int start,
ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(4, zone());
args->Add(factory()->NewArrayLiteral(
const_cast<ZoneList<Expression*>*>(cooked_strings),
- cooked_idx, pos),
+ cooked_idx, is_strong(language_mode()), pos),
zone());
args->Add(
factory()->NewArrayLiteral(
- const_cast<ZoneList<Expression*>*>(raw_strings), raw_idx, pos),
+ const_cast<ZoneList<Expression*>*>(raw_strings), raw_idx,
+ is_strong(language_mode()), pos),
zone());
// Ensure hash is suitable as a Smi value
@@ -5716,6 +5717,7 @@ ZoneList<v8::internal::Expression*>* Parser::PrepareSpreadArguments(
}
int literal_index = function_state_->NextMaterializedLiteralIndex();
args->Add(factory()->NewArrayLiteral(unspread, literal_index,
+ is_strong(language_mode()),
RelocInfo::kNoPosition),
zone());
« no previous file with comments | « src/objects.cc ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698