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

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

Issue 2359513002: Remove synthetic unresolved variables from async/await desugaring (Closed)
Patch Set: Fix bug number 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/ast/ast-value-factory.h ('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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 int Arity() const { return params.length(); } 137 int Arity() const { return params.length(); }
138 const Parameter& at(int i) const { return params[i]; } 138 const Parameter& at(int i) const { return params[i]; }
139 }; 139 };
140 140
141 template <> 141 template <>
142 struct ParserTypes<Parser> { 142 struct ParserTypes<Parser> {
143 typedef ParserBase<Parser> Base; 143 typedef ParserBase<Parser> Base;
144 typedef Parser Impl; 144 typedef Parser Impl;
145 145
146 typedef Variable GeneratorVariable; 146 typedef v8::internal::Variable Variable;
147 147
148 // Return types for traversing functions. 148 // Return types for traversing functions.
149 typedef const AstRawString* Identifier; 149 typedef const AstRawString* Identifier;
150 typedef v8::internal::Expression* Expression; 150 typedef v8::internal::Expression* Expression;
151 typedef v8::internal::FunctionLiteral* FunctionLiteral; 151 typedef v8::internal::FunctionLiteral* FunctionLiteral;
152 typedef ObjectLiteral::Property* ObjectLiteralProperty; 152 typedef ObjectLiteral::Property* ObjectLiteralProperty;
153 typedef ClassLiteral::Property* ClassLiteralProperty; 153 typedef ClassLiteral::Property* ClassLiteralProperty;
154 typedef ZoneList<v8::internal::Expression*>* ExpressionList; 154 typedef ZoneList<v8::internal::Expression*>* ExpressionList;
155 typedef ZoneList<ObjectLiteral::Property*>* PropertyList; 155 typedef ZoneList<ObjectLiteral::Property*>* PropertyList;
156 typedef ParserFormalParameters FormalParameters; 156 typedef ParserFormalParameters FormalParameters;
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 V8_INLINE void QueueDestructuringAssignmentForRewriting( 576 V8_INLINE void QueueDestructuringAssignmentForRewriting(
577 Expression* assignment); 577 Expression* assignment);
578 V8_INLINE void QueueNonPatternForRewriting(Expression* expr, bool* ok); 578 V8_INLINE void QueueNonPatternForRewriting(Expression* expr, bool* ok);
579 579
580 friend class InitializerRewriter; 580 friend class InitializerRewriter;
581 void RewriteParameterInitializer(Expression* expr, Scope* scope); 581 void RewriteParameterInitializer(Expression* expr, Scope* scope);
582 582
583 Expression* BuildCreateJSGeneratorObject(int pos, FunctionKind kind); 583 Expression* BuildCreateJSGeneratorObject(int pos, FunctionKind kind);
584 Expression* BuildResolvePromise(Expression* value, int pos); 584 Expression* BuildResolvePromise(Expression* value, int pos);
585 Expression* BuildRejectPromise(Expression* value, int pos); 585 Expression* BuildRejectPromise(Expression* value, int pos);
586 VariableProxy* BuildDotPromise(); 586 Variable* PromiseVariable();
587 VariableProxy* BuildDotDebugIsActive();
588 587
589 // Generic AST generator for throwing errors from compiled code. 588 // Generic AST generator for throwing errors from compiled code.
590 Expression* NewThrowError(Runtime::FunctionId function_id, 589 Expression* NewThrowError(Runtime::FunctionId function_id,
591 MessageTemplate::Template message, 590 MessageTemplate::Template message,
592 const AstRawString* arg, int pos); 591 const AstRawString* arg, int pos);
593 592
594 void FinalizeIteratorUse(Variable* completion, Expression* condition, 593 void FinalizeIteratorUse(Variable* completion, Expression* condition,
595 Variable* iter, Block* iterator_use, Block* result); 594 Variable* iter, Block* iterator_use, Block* result);
596 595
597 Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion, 596 Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion,
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 int total_preparse_skipped_; 1080 int total_preparse_skipped_;
1082 HistogramTimer* pre_parse_timer_; 1081 HistogramTimer* pre_parse_timer_;
1083 1082
1084 bool parsing_on_main_thread_; 1083 bool parsing_on_main_thread_;
1085 }; 1084 };
1086 1085
1087 } // namespace internal 1086 } // namespace internal
1088 } // namespace v8 1087 } // namespace v8
1089 1088
1090 #endif // V8_PARSING_PARSER_H_ 1089 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/ast/ast-value-factory.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698