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

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: Fix from review comments Created 4 years, 8 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
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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 // By making the 'exception handling' explicit, we are forced to check 1017 // By making the 'exception handling' explicit, we are forced to check
1018 // for failure at the call sites. 1018 // for failure at the call sites.
1019 Statement ParseStatementListItem(bool* ok); 1019 Statement ParseStatementListItem(bool* ok);
1020 void ParseStatementList(int end_token, bool* ok, 1020 void ParseStatementList(int end_token, bool* ok,
1021 Scanner::BookmarkScope* bookmark = nullptr); 1021 Scanner::BookmarkScope* bookmark = nullptr);
1022 Statement ParseStatement(AllowLabelledFunctionStatement allow_function, 1022 Statement ParseStatement(AllowLabelledFunctionStatement allow_function,
1023 bool* ok); 1023 bool* ok);
1024 Statement ParseSubStatement(AllowLabelledFunctionStatement allow_function, 1024 Statement ParseSubStatement(AllowLabelledFunctionStatement allow_function,
1025 bool* ok); 1025 bool* ok);
1026 Statement ParseScopedStatement(bool legacy, bool* ok); 1026 Statement ParseScopedStatement(bool legacy, bool* ok);
1027 Statement ParseHoistableDeclaration(bool* ok);
1028 Statement ParseHoistableDeclaration(int pos, bool is_generator, bool* ok);
1027 Statement ParseFunctionDeclaration(bool* ok); 1029 Statement ParseFunctionDeclaration(bool* ok);
1028 Statement ParseClassDeclaration(bool* ok); 1030 Statement ParseClassDeclaration(bool* ok);
1029 Statement ParseBlock(bool* ok); 1031 Statement ParseBlock(bool* ok);
1030 Statement ParseVariableStatement(VariableDeclarationContext var_context, 1032 Statement ParseVariableStatement(VariableDeclarationContext var_context,
1031 bool* ok); 1033 bool* ok);
1032 Statement ParseVariableDeclarations(VariableDeclarationContext var_context, 1034 Statement ParseVariableDeclarations(VariableDeclarationContext var_context,
1033 int* num_decl, bool* is_lexical, 1035 int* num_decl, bool* is_lexical,
1034 bool* is_binding_pattern, 1036 bool* is_binding_pattern,
1035 Scanner::Location* first_initializer_loc, 1037 Scanner::Location* first_initializer_loc,
1036 Scanner::Location* bindings_loc, 1038 Scanner::Location* bindings_loc,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 const PreParserFormalParameters& parameters, FunctionKind kind, 1164 const PreParserFormalParameters& parameters, FunctionKind kind,
1163 FunctionLiteral::FunctionType function_type, bool* ok) { 1165 FunctionLiteral::FunctionType function_type, bool* ok) {
1164 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1166 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1165 kind, function_type, ok); 1167 kind, function_type, ok);
1166 } 1168 }
1167 1169
1168 } // namespace internal 1170 } // namespace internal
1169 } // namespace v8 1171 } // namespace v8
1170 1172
1171 #endif // V8_PARSING_PREPARSER_H 1173 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« src/parsing/parser.cc ('K') | « src/parsing/parser.cc ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698