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

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

Issue 1900033003: Disallow generator declarations in certain locations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
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_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 // By making the 'exception handling' explicit, we are forced to check 1021 // By making the 'exception handling' explicit, we are forced to check
1022 // for failure at the call sites. 1022 // for failure at the call sites.
1023 Statement ParseStatementListItem(bool* ok); 1023 Statement ParseStatementListItem(bool* ok);
1024 void ParseStatementList(int end_token, bool* ok, 1024 void ParseStatementList(int end_token, bool* ok,
1025 Scanner::BookmarkScope* bookmark = nullptr); 1025 Scanner::BookmarkScope* bookmark = nullptr);
1026 Statement ParseStatement(AllowLabelledFunctionStatement allow_function, 1026 Statement ParseStatement(AllowLabelledFunctionStatement allow_function,
1027 bool* ok); 1027 bool* ok);
1028 Statement ParseSubStatement(AllowLabelledFunctionStatement allow_function, 1028 Statement ParseSubStatement(AllowLabelledFunctionStatement allow_function,
1029 bool* ok); 1029 bool* ok);
1030 Statement ParseScopedStatement(bool legacy, bool* ok); 1030 Statement ParseScopedStatement(bool legacy, bool* ok);
1031 Statement ParseHoistableDeclaration(bool* ok);
1032 Statement ParseHoistableDeclaration(int pos, bool is_generator, bool* ok);
1031 Statement ParseFunctionDeclaration(bool* ok); 1033 Statement ParseFunctionDeclaration(bool* ok);
1032 Statement ParseClassDeclaration(bool* ok); 1034 Statement ParseClassDeclaration(bool* ok);
1033 Statement ParseBlock(bool* ok); 1035 Statement ParseBlock(bool* ok);
1034 Statement ParseVariableStatement(VariableDeclarationContext var_context, 1036 Statement ParseVariableStatement(VariableDeclarationContext var_context,
1035 bool* ok); 1037 bool* ok);
1036 Statement ParseVariableDeclarations(VariableDeclarationContext var_context, 1038 Statement ParseVariableDeclarations(VariableDeclarationContext var_context,
1037 int* num_decl, bool* is_lexical, 1039 int* num_decl, bool* is_lexical,
1038 bool* is_binding_pattern, 1040 bool* is_binding_pattern,
1039 Scanner::Location* first_initializer_loc, 1041 Scanner::Location* first_initializer_loc,
1040 Scanner::Location* bindings_loc, 1042 Scanner::Location* bindings_loc,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 const PreParserFormalParameters& parameters, FunctionKind kind, 1176 const PreParserFormalParameters& parameters, FunctionKind kind,
1175 FunctionLiteral::FunctionType function_type, bool* ok) { 1177 FunctionLiteral::FunctionType function_type, bool* ok) {
1176 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1178 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1177 kind, function_type, ok); 1179 kind, function_type, ok);
1178 } 1180 }
1179 1181
1180 } // namespace internal 1182 } // namespace internal
1181 } // namespace v8 1183 } // namespace v8
1182 1184
1183 #endif // V8_PARSING_PREPARSER_H 1185 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698