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

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

Issue 2662183002: [parser] Remove hoist_scope from DeclarationDescriptor (Closed)
Patch Set: Factored out helper function Created 3 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 | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/pattern-rewriter.cc » ('J')
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/base/compiler-specific.h" 10 #include "src/base/compiler-specific.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 return context_ == BINDING || context_ == INITIALIZER; 422 return context_ == BINDING || context_ == INITIALIZER;
423 } 423 }
424 bool IsInitializerContext() const { return context_ != ASSIGNMENT; } 424 bool IsInitializerContext() const { return context_ != ASSIGNMENT; }
425 bool IsAssignmentContext() const { 425 bool IsAssignmentContext() const {
426 return context_ == ASSIGNMENT || context_ == ASSIGNMENT_INITIALIZER; 426 return context_ == ASSIGNMENT || context_ == ASSIGNMENT_INITIALIZER;
427 } 427 }
428 bool IsSubPattern() const { return recursion_level_ > 1; } 428 bool IsSubPattern() const { return recursion_level_ > 1; }
429 PatternContext SetAssignmentContextIfNeeded(Expression* node); 429 PatternContext SetAssignmentContextIfNeeded(Expression* node);
430 PatternContext SetInitializerContextIfNeeded(Expression* node); 430 PatternContext SetInitializerContextIfNeeded(Expression* node);
431 431
432 bool DeclaresParameterContainingSloppyEval() const;
432 void RewriteParameterScopes(Expression* expr); 433 void RewriteParameterScopes(Expression* expr);
433 434
434 Variable* CreateTempVar(Expression* value = nullptr); 435 Variable* CreateTempVar(Expression* value = nullptr);
435 436
436 AstNodeFactory* factory() const { return parser_->factory(); } 437 AstNodeFactory* factory() const { return parser_->factory(); }
437 AstValueFactory* ast_value_factory() const { 438 AstValueFactory* ast_value_factory() const {
438 return parser_->ast_value_factory(); 439 return parser_->ast_value_factory();
439 } 440 }
440 Zone* zone() const { return parser_->zone(); } 441 Zone* zone() const { return parser_->zone(); }
441 Scope* scope() const { return scope_; } 442 Scope* scope() const { return scope_; }
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 1178
1178 private: 1179 private:
1179 ParserTarget** variable_; 1180 ParserTarget** variable_;
1180 ParserTarget* previous_; 1181 ParserTarget* previous_;
1181 }; 1182 };
1182 1183
1183 } // namespace internal 1184 } // namespace internal
1184 } // namespace v8 1185 } // namespace v8
1185 1186
1186 #endif // V8_PARSING_PARSER_H_ 1187 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/pattern-rewriter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698