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

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

Issue 2166023002: Rescope arrow-function parameter lists by moving the delta to the parameter scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove unresolved() again 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
« src/ast/scopes.cc ('K') | « src/parsing/parser-base.h ('k') | no next file » | 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/base/hashmap.h" 10 #include "src/base/hashmap.h"
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 int* expected_property_count, bool* ok) { 869 int* expected_property_count, bool* ok) {
870 UNREACHABLE(); 870 UNREACHABLE();
871 } 871 }
872 872
873 V8_INLINE PreParserStatementList ParseEagerFunctionBody( 873 V8_INLINE PreParserStatementList ParseEagerFunctionBody(
874 PreParserIdentifier function_name, int pos, 874 PreParserIdentifier function_name, int pos,
875 const PreParserFormalParameters& parameters, FunctionKind kind, 875 const PreParserFormalParameters& parameters, FunctionKind kind,
876 FunctionLiteral::FunctionType function_type, bool* ok); 876 FunctionLiteral::FunctionType function_type, bool* ok);
877 877
878 V8_INLINE void ParseArrowFunctionFormalParameterList( 878 V8_INLINE void ParseArrowFunctionFormalParameterList(
879 PreParserFormalParameters* parameters, 879 PreParserFormalParameters* parameters, PreParserExpression expression,
880 PreParserExpression expression, const Scanner::Location& params_loc, 880 const Scanner::Location& params_loc, Scanner::Location* duplicate_loc,
881 Scanner::Location* duplicate_loc, bool* ok); 881 Scope::Snapshot& scope_snapshot, bool* ok);
882 882
883 void ParseAsyncArrowSingleExpressionBody( 883 void ParseAsyncArrowSingleExpressionBody(
884 PreParserStatementList body, bool accept_IN, 884 PreParserStatementList body, bool accept_IN,
885 Type::ExpressionClassifier* classifier, int pos, bool* ok); 885 Type::ExpressionClassifier* classifier, int pos, bool* ok);
886 886
887 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); 887 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok);
888 888
889 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} 889 void ReindexLiterals(const PreParserFormalParameters& paramaters) {}
890 890
891 struct TemplateLiteralState {}; 891 struct TemplateLiteralState {};
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 int pos) { 1184 int pos) {
1185 return pre_parser_->factory()->NewCall(function, args, pos); 1185 return pre_parser_->factory()->NewCall(function, args, pos);
1186 } 1186 }
1187 1187
1188 PreParserExpression PreParserTraits::SpreadCallNew(PreParserExpression function, 1188 PreParserExpression PreParserTraits::SpreadCallNew(PreParserExpression function,
1189 PreParserExpressionList args, 1189 PreParserExpressionList args,
1190 int pos) { 1190 int pos) {
1191 return pre_parser_->factory()->NewCallNew(function, args, pos); 1191 return pre_parser_->factory()->NewCallNew(function, args, pos);
1192 } 1192 }
1193 1193
1194
1195 void PreParserTraits::ParseArrowFunctionFormalParameterList( 1194 void PreParserTraits::ParseArrowFunctionFormalParameterList(
1196 PreParserFormalParameters* parameters, 1195 PreParserFormalParameters* parameters, PreParserExpression params,
1197 PreParserExpression params, const Scanner::Location& params_loc, 1196 const Scanner::Location& params_loc, Scanner::Location* duplicate_loc,
1198 Scanner::Location* duplicate_loc, bool* ok) { 1197 Scope::Snapshot& scope_snapshot, bool* ok) {
1199 // TODO(wingo): Detect duplicated identifiers in paramlists. Detect parameter 1198 // TODO(wingo): Detect duplicated identifiers in paramlists. Detect parameter
1200 // lists that are too long. 1199 // lists that are too long.
1201 } 1200 }
1202 1201
1203 PreParserExpression PreParserTraits::ParseAsyncFunctionExpression(bool* ok) { 1202 PreParserExpression PreParserTraits::ParseAsyncFunctionExpression(bool* ok) {
1204 return pre_parser_->ParseAsyncFunctionExpression(ok); 1203 return pre_parser_->ParseAsyncFunctionExpression(ok);
1205 } 1204 }
1206 1205
1207 PreParserExpression PreParserTraits::ParseDoExpression(bool* ok) { 1206 PreParserExpression PreParserTraits::ParseDoExpression(bool* ok) {
1208 return pre_parser_->ParseDoExpression(ok); 1207 return pre_parser_->ParseDoExpression(ok);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 const PreParserFormalParameters& parameters, FunctionKind kind, 1264 const PreParserFormalParameters& parameters, FunctionKind kind,
1266 FunctionLiteral::FunctionType function_type, bool* ok) { 1265 FunctionLiteral::FunctionType function_type, bool* ok) {
1267 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1266 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1268 kind, function_type, ok); 1267 kind, function_type, ok);
1269 } 1268 }
1270 1269
1271 } // namespace internal 1270 } // namespace internal
1272 } // namespace v8 1271 } // namespace v8
1273 1272
1274 #endif // V8_PARSING_PREPARSER_H 1273 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« src/ast/scopes.cc ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698