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

Unified Diff: src/preparser.h

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/parser.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index c870c9bf5e55851371d2649599b9c3b887b2408a..b08888834eb9ba4a42c557f8cd2d3dfa849c9520 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1372,11 +1372,13 @@ class PreParserFactory {
PreParserExpression NewRegExpLiteral(PreParserIdentifier js_pattern,
PreParserIdentifier js_flags,
int literal_index,
+ bool is_strong,
int pos) {
return PreParserExpression::Default();
}
PreParserExpression NewArrayLiteral(PreParserExpressionList values,
int literal_index,
+ bool is_strong,
int pos) {
return PreParserExpression::Default();
}
@@ -1397,6 +1399,7 @@ class PreParserFactory {
int literal_index,
int boilerplate_properties,
bool has_function,
+ bool is_strong,
int pos) {
return PreParserExpression::Default();
}
@@ -2250,7 +2253,8 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseRegExpLiteral(
}
IdentifierT js_flags = this->GetNextSymbol(scanner());
Next();
- return factory()->NewRegExpLiteral(js_pattern, js_flags, literal_index, pos);
+ return factory()->NewRegExpLiteral(js_pattern, js_flags, literal_index,
+ is_strong(language_mode()), pos);
}
@@ -2515,7 +2519,8 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseArrayLiteral(
// Update the scope information before the pre-parsing bailout.
int literal_index = function_state_->NextMaterializedLiteralIndex();
- return factory()->NewArrayLiteral(values, literal_index, pos);
+ return factory()->NewArrayLiteral(values, literal_index,
+ is_strong(language_mode()), pos);
}
@@ -2784,6 +2789,7 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseObjectLiteral(
literal_index,
number_of_boilerplate_properties,
has_function,
+ is_strong(language_mode()),
pos);
}
« no previous file with comments | « src/parser.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698