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

Unified Diff: src/parsing/preparser.h

Issue 1522693002: [es6] strict eval/arguments and strong undefined in AssignmentPattern (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 6b39bd987900b5f926792a7c82b78fb70a4f0dcc..ab8c4b947baac59107520386f3b8b3cb6b334da7 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -125,9 +125,9 @@ class PreParserExpression {
right->IsSpreadExpression()));
}
- static PreParserExpression AssignmentPattern() {
+ static PreParserExpression Assignment() {
return PreParserExpression(TypeField::encode(kExpression) |
- ExpressionTypeField::encode(kAssignmentPattern));
+ ExpressionTypeField::encode(kAssignment));
}
static PreParserExpression ObjectLiteral() {
@@ -195,9 +195,9 @@ class PreParserExpression {
return PreParserIdentifier(IdentifierTypeField::decode(code_));
}
- bool IsAssignmentPattern() const {
+ bool IsAssignment() const {
return TypeField::decode(code_) == kExpression &&
- ExpressionTypeField::decode(code_) == kAssignmentPattern;
+ ExpressionTypeField::decode(code_) == kAssignment;
}
bool IsObjectLiteral() const {
@@ -308,7 +308,7 @@ class PreParserExpression {
kCallExpression,
kSuperCallReference,
kNoTemplateTagExpression,
- kAssignmentPattern
+ kAssignment
};
explicit PreParserExpression(uint32_t expression_code)
@@ -498,12 +498,7 @@ class PreParserFactory {
PreParserExpression left,
PreParserExpression right,
int pos) {
- return PreParserExpression::Default();
- }
- PreParserExpression NewAssignmentPattern(PreParserExpression pattern,
- int pos) {
- DCHECK(pattern->IsObjectLiteral() || pattern->IsArrayLiteral());
- return PreParserExpression::AssignmentPattern();
+ return PreParserExpression::Assignment();
}
PreParserExpression NewYield(PreParserExpression generator_object,
PreParserExpression expression,

Powered by Google App Engine
This is Rietveld 408576698