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

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

Issue 2531593002: Parser: store parameters in a ThreadedList instead of ZoneList. (Closed)
Patch Set: oops Created 4 years 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.h » ('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_PARSER_BASE_H 5 #ifndef V8_PARSING_PARSER_BASE_H
6 #define V8_PARSING_PARSER_BASE_H 6 #define V8_PARSING_PARSER_BASE_H
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after
3493 break; 3493 break;
3494 } 3494 }
3495 if (!Check(Token::COMMA)) break; 3495 if (!Check(Token::COMMA)) break;
3496 if (allow_harmony_trailing_commas() && peek() == Token::RPAREN) { 3496 if (allow_harmony_trailing_commas() && peek() == Token::RPAREN) {
3497 // allow the trailing comma 3497 // allow the trailing comma
3498 break; 3498 break;
3499 } 3499 }
3500 } 3500 }
3501 } 3501 }
3502 3502
3503 for (int i = 0; i < parameters->arity; ++i) { 3503 impl()->DeclareFormalParameters(parameters->scope, parameters->params);
3504 auto parameter = parameters->at(i);
3505 impl()->DeclareFormalParameter(parameters->scope, parameter);
3506 }
3507 } 3504 }
3508 3505
3509 template <typename Impl> 3506 template <typename Impl>
3510 typename ParserBase<Impl>::BlockT ParserBase<Impl>::ParseVariableDeclarations( 3507 typename ParserBase<Impl>::BlockT ParserBase<Impl>::ParseVariableDeclarations(
3511 VariableDeclarationContext var_context, 3508 VariableDeclarationContext var_context,
3512 DeclarationParsingResult* parsing_result, 3509 DeclarationParsingResult* parsing_result,
3513 ZoneList<const AstRawString*>* names, bool* ok) { 3510 ZoneList<const AstRawString*>* names, bool* ok) {
3514 // VariableDeclarations :: 3511 // VariableDeclarations ::
3515 // ('var' | 'const' | 'let') (Identifier ('=' AssignmentExpression)?)+[','] 3512 // ('var' | 'const' | 'let') (Identifier ('=' AssignmentExpression)?)+[',']
3516 // 3513 //
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
5457 has_seen_constructor_ = true; 5454 has_seen_constructor_ = true;
5458 return; 5455 return;
5459 } 5456 }
5460 } 5457 }
5461 5458
5462 5459
5463 } // namespace internal 5460 } // namespace internal
5464 } // namespace v8 5461 } // namespace v8
5465 5462
5466 #endif // V8_PARSING_PARSER_BASE_H 5463 #endif // V8_PARSING_PARSER_BASE_H
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698