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

Side by Side Diff: src/parsing/parser.h

Issue 2123953002: [parser] Fix bug in destructuring binding for catch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | test/mjsunit/regress/regress-5178.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PARSING_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 ZoneList<const AstRawString*>* names, bool* ok); 847 ZoneList<const AstRawString*>* names, bool* ok);
848 848
849 static void RewriteDestructuringAssignment(Parser* parser, 849 static void RewriteDestructuringAssignment(Parser* parser,
850 RewritableExpression* expr, 850 RewritableExpression* expr,
851 Scope* Scope); 851 Scope* Scope);
852 852
853 static Expression* RewriteDestructuringAssignment(Parser* parser, 853 static Expression* RewriteDestructuringAssignment(Parser* parser,
854 Assignment* assignment, 854 Assignment* assignment,
855 Scope* scope); 855 Scope* scope);
856 856
857 void set_initializer_position(int pos) { initializer_position_ = pos; }
858
859 private: 857 private:
860 PatternRewriter() {} 858 PatternRewriter() {}
861 859
862 #define DECLARE_VISIT(type) void Visit##type(v8::internal::type* node) override; 860 #define DECLARE_VISIT(type) void Visit##type(v8::internal::type* node) override;
863 // Visiting functions for AST nodes make this an AstVisitor. 861 // Visiting functions for AST nodes make this an AstVisitor.
864 AST_NODE_LIST(DECLARE_VISIT) 862 AST_NODE_LIST(DECLARE_VISIT)
865 #undef DECLARE_VISIT 863 #undef DECLARE_VISIT
866 void Visit(AstNode* node) override; 864 void Visit(AstNode* node) override;
867 865
868 enum PatternContext { 866 enum PatternContext {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 1292
1295 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1293 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1296 return parser_->ParseDoExpression(ok); 1294 return parser_->ParseDoExpression(ok);
1297 } 1295 }
1298 1296
1299 1297
1300 } // namespace internal 1298 } // namespace internal
1301 } // namespace v8 1299 } // namespace v8
1302 1300
1303 #endif // V8_PARSING_PARSER_H_ 1301 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | test/mjsunit/regress/regress-5178.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698