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

Side by Side Diff: src/parsing/preparser.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-base.h ('k') | src/utils.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_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/parsing/parser-base.h" 9 #include "src/parsing/parser-base.h"
10 10
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 } 745 }
746 746
747 private: 747 private:
748 Zone* zone_; 748 Zone* zone_;
749 }; 749 };
750 750
751 751
752 struct PreParserFormalParameters : FormalParametersBase { 752 struct PreParserFormalParameters : FormalParametersBase {
753 explicit PreParserFormalParameters(DeclarationScope* scope) 753 explicit PreParserFormalParameters(DeclarationScope* scope)
754 : FormalParametersBase(scope) {} 754 : FormalParametersBase(scope) {}
755 PreParserIdentifier at(int i) { return PreParserIdentifier(); } // Dummy 755
756 void* params = nullptr; // Dummy
756 }; 757 };
757 758
758 759
759 class PreParser; 760 class PreParser;
760 761
761 class PreParserTarget { 762 class PreParserTarget {
762 public: 763 public:
763 PreParserTarget(ParserBase<PreParser>* preparser, 764 PreParserTarget(ParserBase<PreParser>* preparser,
764 PreParserStatement statement) {} 765 PreParserStatement statement) {}
765 }; 766 };
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 bool is_async, bool* ok) {} 1434 bool is_async, bool* ok) {}
1434 1435
1435 V8_INLINE void AddFormalParameter(PreParserFormalParameters* parameters, 1436 V8_INLINE void AddFormalParameter(PreParserFormalParameters* parameters,
1436 PreParserExpression pattern, 1437 PreParserExpression pattern,
1437 PreParserExpression initializer, 1438 PreParserExpression initializer,
1438 int initializer_end_position, 1439 int initializer_end_position,
1439 bool is_rest) { 1440 bool is_rest) {
1440 parameters->UpdateArityAndFunctionLength(!initializer.IsEmpty(), is_rest); 1441 parameters->UpdateArityAndFunctionLength(!initializer.IsEmpty(), is_rest);
1441 } 1442 }
1442 1443
1443 V8_INLINE void DeclareFormalParameter(DeclarationScope* scope, 1444 V8_INLINE void DeclareFormalParameters(DeclarationScope* scope,
1444 PreParserIdentifier parameter) { 1445 void* parameters) {
1445 if (!classifier()->is_simple_parameter_list()) { 1446 if (!classifier()->is_simple_parameter_list()) {
1446 scope->SetHasNonSimpleParameters(); 1447 scope->SetHasNonSimpleParameters();
1447 } 1448 }
1448 } 1449 }
1449 1450
1450 V8_INLINE void DeclareArrowFunctionFormalParameters( 1451 V8_INLINE void DeclareArrowFunctionFormalParameters(
1451 PreParserFormalParameters* parameters, PreParserExpression params, 1452 PreParserFormalParameters* parameters, PreParserExpression params,
1452 const Scanner::Location& params_loc, Scanner::Location* duplicate_loc, 1453 const Scanner::Location& params_loc, Scanner::Location* duplicate_loc,
1453 bool* ok) { 1454 bool* ok) {
1454 // TODO(wingo): Detect duplicated identifiers in paramlists. Detect 1455 // TODO(wingo): Detect duplicated identifiers in paramlists. Detect
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 function_state_->NextMaterializedLiteralIndex(); 1546 function_state_->NextMaterializedLiteralIndex();
1546 function_state_->NextMaterializedLiteralIndex(); 1547 function_state_->NextMaterializedLiteralIndex();
1547 } 1548 }
1548 return EmptyExpression(); 1549 return EmptyExpression();
1549 } 1550 }
1550 1551
1551 } // namespace internal 1552 } // namespace internal
1552 } // namespace v8 1553 } // namespace v8
1553 1554
1554 #endif // V8_PARSING_PREPARSER_H 1555 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698