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

Unified Diff: src/pattern-rewriter.cc

Issue 1376633005: Two minor cleanups in pattern rewriter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pattern-rewriter.cc
diff --git a/src/pattern-rewriter.cc b/src/pattern-rewriter.cc
index e4c602aa4888b814238f5dbb17e1e1db58937b84..b70001eb55ae8d774018ecbbdc4e554f2a4e3458 100644
--- a/src/pattern-rewriter.cc
+++ b/src/pattern-rewriter.cc
@@ -30,7 +30,7 @@ void Parser::PatternRewriter::DeclareAndInitializeVariables(
void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
Expression* value = current_value_;
- descriptor_->scope->RemoveUnresolved(pattern->AsVariableProxy());
+ descriptor_->scope->RemoveUnresolved(pattern);
// Declare variable.
// Note that we *always* must treat the initial value via a separate init
@@ -361,16 +361,6 @@ void Parser::PatternRewriter::VisitAssignment(Assignment* node) {
}
-void Parser::PatternRewriter::VisitSpread(Spread* node) {
- UNREACHABLE();
-}
-
-
-void Parser::PatternRewriter::VisitEmptyParentheses(EmptyParentheses* node) {
- UNREACHABLE();
-}
-
-
// =============== UNREACHABLE =============================
void Parser::PatternRewriter::Visit(AstNode* node) { UNREACHABLE(); }
@@ -395,7 +385,7 @@ NOT_A_PATTERN(CountOperation)
NOT_A_PATTERN(DebuggerStatement)
NOT_A_PATTERN(DoWhileStatement)
NOT_A_PATTERN(EmptyStatement)
-NOT_A_PATTERN(SloppyBlockFunctionStatement)
+NOT_A_PATTERN(EmptyParentheses)
NOT_A_PATTERN(ExportDeclaration)
NOT_A_PATTERN(ExpressionStatement)
NOT_A_PATTERN(ForInStatement)
@@ -410,6 +400,8 @@ NOT_A_PATTERN(NativeFunctionLiteral)
NOT_A_PATTERN(Property)
NOT_A_PATTERN(RegExpLiteral)
NOT_A_PATTERN(ReturnStatement)
+NOT_A_PATTERN(SloppyBlockFunctionStatement)
+NOT_A_PATTERN(Spread)
NOT_A_PATTERN(SuperPropertyReference)
NOT_A_PATTERN(SuperCallReference)
NOT_A_PATTERN(SwitchStatement)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698