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

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

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 years, 3 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
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/parsing/parser.cc » ('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_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 InitializationFlag init, int pos, bool* ok); 485 InitializationFlag init, int pos, bool* ok);
486 486
487 bool TargetStackContainsLabel(const AstRawString* label); 487 bool TargetStackContainsLabel(const AstRawString* label);
488 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); 488 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok);
489 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); 489 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok);
490 490
491 Statement* BuildAssertIsCoercible(Variable* var); 491 Statement* BuildAssertIsCoercible(Variable* var);
492 492
493 // Factory methods. 493 // Factory methods.
494 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super, 494 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super,
495 int pos, int end_pos, 495 bool requires_class_field_init, int pos,
496 LanguageMode language_mode); 496 int end_pos, LanguageMode language_mode);
497 497
498 // Skip over a lazy function, either using cached data if we have it, or 498 // Skip over a lazy function, either using cached data if we have it, or
499 // by parsing the function with PreParser. Consumes the ending }. 499 // by parsing the function with PreParser. Consumes the ending }.
500 // If may_abort == true, the (pre-)parser may decide to abort skipping 500 // If may_abort == true, the (pre-)parser may decide to abort skipping
501 // in order to force the function to be eagerly parsed, after all. 501 // in order to force the function to be eagerly parsed, after all.
502 LazyParsingResult SkipLazyFunctionBody(int* materialized_literal_count, 502 LazyParsingResult SkipLazyFunctionBody(int* materialized_literal_count,
503 int* expected_property_count, 503 int* expected_property_count,
504 bool may_abort, bool* ok); 504 bool may_abort, bool* ok);
505 505
506 PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser( 506 PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser(
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 DesugarAsyncFunctionBody( 563 DesugarAsyncFunctionBody(
564 ast_value_factory()->empty_string(), scope(), body, kAsyncArrowFunction, 564 ast_value_factory()->empty_string(), scope(), body, kAsyncArrowFunction,
565 FunctionBodyType::kSingleExpression, accept_IN, pos, ok); 565 FunctionBodyType::kSingleExpression, accept_IN, pos, ok);
566 } 566 }
567 567
568 ZoneList<Expression*>* PrepareSpreadArguments(ZoneList<Expression*>* list); 568 ZoneList<Expression*>* PrepareSpreadArguments(ZoneList<Expression*>* list);
569 Expression* SpreadCall(Expression* function, ZoneList<Expression*>* args, 569 Expression* SpreadCall(Expression* function, ZoneList<Expression*>* args,
570 int pos); 570 int pos);
571 Expression* SpreadCallNew(Expression* function, ZoneList<Expression*>* args, 571 Expression* SpreadCallNew(Expression* function, ZoneList<Expression*>* args,
572 int pos); 572 int pos);
573 Expression* CallClassFieldInitializer(Scope* scope, Expression* this_expr);
574 Expression* RewriteSuperCall(Expression* call_expression);
573 575
574 void SetLanguageMode(Scope* scope, LanguageMode mode); 576 void SetLanguageMode(Scope* scope, LanguageMode mode);
575 void SetAsmModule(); 577 void SetAsmModule();
576 578
577 V8_INLINE void MarkCollectedTailCallExpressions(); 579 V8_INLINE void MarkCollectedTailCallExpressions();
578 V8_INLINE void MarkTailPosition(Expression* expression); 580 V8_INLINE void MarkTailPosition(Expression* expression);
579 581
580 // Rewrite all DestructuringAssignments in the current FunctionState. 582 // Rewrite all DestructuringAssignments in the current FunctionState.
581 V8_INLINE void RewriteDestructuringAssignments(); 583 V8_INLINE void RewriteDestructuringAssignments();
582 584
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 1062
1061 #ifdef DEBUG 1063 #ifdef DEBUG
1062 void Print(AstNode* node); 1064 void Print(AstNode* node);
1063 #endif // DEBUG 1065 #endif // DEBUG
1064 }; 1066 };
1065 1067
1066 } // namespace internal 1068 } // namespace internal
1067 } // namespace v8 1069 } // namespace v8
1068 1070
1069 #endif // V8_PARSING_PARSER_H_ 1071 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698