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

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

Issue 1647213002: Remove unnecessary ClassLiteral name member and simplify Function.name handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Slightly shorter Created 4 years, 10 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/full-codegen/full-codegen.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/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 Expression* ThisExpression(Scope* scope, AstNodeFactory* factory, 508 Expression* ThisExpression(Scope* scope, AstNodeFactory* factory,
509 int pos = RelocInfo::kNoPosition); 509 int pos = RelocInfo::kNoPosition);
510 Expression* SuperPropertyReference(Scope* scope, AstNodeFactory* factory, 510 Expression* SuperPropertyReference(Scope* scope, AstNodeFactory* factory,
511 int pos); 511 int pos);
512 Expression* SuperCallReference(Scope* scope, AstNodeFactory* factory, 512 Expression* SuperCallReference(Scope* scope, AstNodeFactory* factory,
513 int pos); 513 int pos);
514 Expression* NewTargetExpression(Scope* scope, AstNodeFactory* factory, 514 Expression* NewTargetExpression(Scope* scope, AstNodeFactory* factory,
515 int pos); 515 int pos);
516 Expression* FunctionSentExpression(Scope* scope, AstNodeFactory* factory, 516 Expression* FunctionSentExpression(Scope* scope, AstNodeFactory* factory,
517 int pos); 517 int pos);
518 Expression* DefaultConstructor(bool call_super, Scope* scope, int pos,
519 int end_pos, LanguageMode language_mode);
520 Literal* ExpressionFromLiteral(Token::Value token, int pos, Scanner* scanner, 518 Literal* ExpressionFromLiteral(Token::Value token, int pos, Scanner* scanner,
521 AstNodeFactory* factory); 519 AstNodeFactory* factory);
522 Expression* ExpressionFromIdentifier(const AstRawString* name, 520 Expression* ExpressionFromIdentifier(const AstRawString* name,
523 int start_position, int end_position, 521 int start_position, int end_position,
524 Scope* scope, AstNodeFactory* factory); 522 Scope* scope, AstNodeFactory* factory);
525 Expression* ExpressionFromString(int pos, Scanner* scanner, 523 Expression* ExpressionFromString(int pos, Scanner* scanner,
526 AstNodeFactory* factory); 524 AstNodeFactory* factory);
527 Expression* GetIterator(Expression* iterable, AstNodeFactory* factory, 525 Expression* GetIterator(Expression* iterable, AstNodeFactory* factory,
528 int pos); 526 int pos);
529 ZoneList<v8::internal::Expression*>* NewExpressionList(int size, Zone* zone) { 527 ZoneList<v8::internal::Expression*>* NewExpressionList(int size, Zone* zone) {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 DeclarationDescriptor::Kind declaration_kind, bool resolve, 959 DeclarationDescriptor::Kind declaration_kind, bool resolve,
962 bool* ok, Scope* declaration_scope = nullptr); 960 bool* ok, Scope* declaration_scope = nullptr);
963 961
964 bool TargetStackContainsLabel(const AstRawString* label); 962 bool TargetStackContainsLabel(const AstRawString* label);
965 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); 963 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok);
966 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); 964 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok);
967 965
968 Statement* BuildAssertIsCoercible(Variable* var); 966 Statement* BuildAssertIsCoercible(Variable* var);
969 967
970 // Factory methods. 968 // Factory methods.
971 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, 969 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super,
972 int end_pos, LanguageMode language_mode); 970 Scope* scope, int pos, int end_pos,
971 LanguageMode language_mode);
973 972
974 // Skip over a lazy function, either using cached data if we have it, or 973 // Skip over a lazy function, either using cached data if we have it, or
975 // by parsing the function with PreParser. Consumes the ending }. 974 // by parsing the function with PreParser. Consumes the ending }.
976 // 975 //
977 // If bookmark is set, the (pre-)parser may decide to abort skipping 976 // If bookmark is set, the (pre-)parser may decide to abort skipping
978 // in order to force the function to be eagerly parsed, after all. 977 // in order to force the function to be eagerly parsed, after all.
979 // In this case, it'll reset the scanner using the bookmark. 978 // In this case, it'll reset the scanner using the bookmark.
980 void SkipLazyFunctionBody(int* materialized_literal_count, 979 void SkipLazyFunctionBody(int* materialized_literal_count,
981 int* expected_property_count, bool* ok, 980 int* expected_property_count, bool* ok,
982 Scanner::BookmarkScope* bookmark = nullptr); 981 Scanner::BookmarkScope* bookmark = nullptr);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 1212
1214 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1213 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1215 return parser_->ParseDoExpression(ok); 1214 return parser_->ParseDoExpression(ok);
1216 } 1215 }
1217 1216
1218 1217
1219 } // namespace internal 1218 } // namespace internal
1220 } // namespace v8 1219 } // namespace v8
1221 1220
1222 #endif // V8_PARSING_PARSER_H_ 1221 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698