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

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

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: fix build Created 3 years, 9 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/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 539
540 class PreParserFactory { 540 class PreParserFactory {
541 public: 541 public:
542 explicit PreParserFactory(AstValueFactory* ast_value_factory) 542 explicit PreParserFactory(AstValueFactory* ast_value_factory)
543 : ast_value_factory_(ast_value_factory), 543 : ast_value_factory_(ast_value_factory),
544 zone_(ast_value_factory->zone()) {} 544 zone_(ast_value_factory->zone()) {}
545 545
546 void set_zone(Zone* zone) { zone_ = zone; } 546 void set_zone(Zone* zone) { zone_ = zone; }
547 547
548 PreParserExpression NewStringLiteral(const AstRawString* identifier,
adamk 2017/03/15 21:36:44 Don't think you need this now, do you?
gsathya 2017/03/16 00:59:25 Done.
549 int pos) {
550 return PreParserExpression::Default();
551 }
552
548 PreParserExpression NewStringLiteral(PreParserIdentifier identifier, 553 PreParserExpression NewStringLiteral(PreParserIdentifier identifier,
549 int pos) { 554 int pos) {
550 // This is needed for object literal property names. Property names are 555 // This is needed for object literal property names. Property names are
551 // normalized to string literals during object literal parsing. 556 // normalized to string literals during object literal parsing.
552 PreParserExpression expression = PreParserExpression::Default(); 557 PreParserExpression expression = PreParserExpression::Default();
553 if (identifier.string_ != nullptr) { 558 if (identifier.string_ != nullptr) {
554 DCHECK(FLAG_lazy_inner_functions); 559 DCHECK(FLAG_lazy_inner_functions);
555 AstNodeFactory factory(ast_value_factory_); 560 AstNodeFactory factory(ast_value_factory_);
556 factory.set_zone(zone_); 561 factory.set_zone(zone_);
557 VariableProxy* variable = 562 VariableProxy* variable =
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 int pos) { 773 int pos) {
769 return PreParserStatement::Default(); 774 return PreParserStatement::Default();
770 } 775 }
771 776
772 PreParserExpression NewCallRuntime(Runtime::FunctionId id, 777 PreParserExpression NewCallRuntime(Runtime::FunctionId id,
773 ZoneList<PreParserExpression>* arguments, 778 ZoneList<PreParserExpression>* arguments,
774 int pos) { 779 int pos) {
775 return PreParserExpression::Default(); 780 return PreParserExpression::Default();
776 } 781 }
777 782
783 PreParserExpression NewImportCallExpression(PreParserExpression args,
784 int pos) {
785 return PreParserExpression::Default();
786 }
787
778 // Return the object itself as AstVisitor and implement the needed 788 // Return the object itself as AstVisitor and implement the needed
779 // dummy method right in this class. 789 // dummy method right in this class.
780 PreParserFactory* visitor() { return this; } 790 PreParserFactory* visitor() { return this; }
781 int* ast_properties() { 791 int* ast_properties() {
782 static int dummy = 42; 792 static int dummy = 42;
783 return &dummy; 793 return &dummy;
784 } 794 }
785 795
786 private: 796 private:
787 AstValueFactory* ast_value_factory_; 797 AstValueFactory* ast_value_factory_;
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, 1687 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state,
1678 int start, 1688 int start,
1679 PreParserExpression tag) { 1689 PreParserExpression tag) {
1680 return EmptyExpression(); 1690 return EmptyExpression();
1681 } 1691 }
1682 1692
1683 } // namespace internal 1693 } // namespace internal
1684 } // namespace v8 1694 } // namespace v8
1685 1695
1686 #endif // V8_PARSING_PREPARSER_H 1696 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698