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

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

Issue 2167713004: Always finalize blocks after parsing, also for do-expressions (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') | src/parsing/rewriter.h » ('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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 Statement* ParseHoistableDeclaration(int pos, ParseFunctionFlags flags, 800 Statement* ParseHoistableDeclaration(int pos, ParseFunctionFlags flags,
801 ZoneList<const AstRawString*>* names, 801 ZoneList<const AstRawString*>* names,
802 bool default_export, bool* ok); 802 bool default_export, bool* ok);
803 Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names, 803 Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names,
804 bool default_export, bool* ok); 804 bool default_export, bool* ok);
805 Expression* ParseAsyncFunctionExpression(bool* ok); 805 Expression* ParseAsyncFunctionExpression(bool* ok);
806 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, 806 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names,
807 bool default_export, bool* ok); 807 bool default_export, bool* ok);
808 Statement* ParseNativeDeclaration(bool* ok); 808 Statement* ParseNativeDeclaration(bool* ok);
809 Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok); 809 Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok);
810 Block* ParseBlock(ZoneList<const AstRawString*>* labels,
811 bool finalize_block_scope, bool* ok);
812 Block* ParseVariableStatement(VariableDeclarationContext var_context, 810 Block* ParseVariableStatement(VariableDeclarationContext var_context,
813 ZoneList<const AstRawString*>* names, 811 ZoneList<const AstRawString*>* names,
814 bool* ok); 812 bool* ok);
815 DoExpression* ParseDoExpression(bool* ok); 813 DoExpression* ParseDoExpression(bool* ok);
816 Expression* ParseYieldStarExpression(bool* ok); 814 Expression* ParseYieldStarExpression(bool* ok);
817 815
818 struct DeclarationDescriptor { 816 struct DeclarationDescriptor {
819 enum Kind { NORMAL, PARAMETER }; 817 enum Kind { NORMAL, PARAMETER };
820 Parser* parser; 818 Parser* parser;
821 Scope* scope; 819 Scope* scope;
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 1317
1320 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1318 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1321 return parser_->ParseDoExpression(ok); 1319 return parser_->ParseDoExpression(ok);
1322 } 1320 }
1323 1321
1324 1322
1325 } // namespace internal 1323 } // namespace internal
1326 } // namespace v8 1324 } // namespace v8
1327 1325
1328 #endif // V8_PARSING_PARSER_H_ 1326 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/rewriter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698