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

Side by Side Diff: src/ast/scopes.h

Issue 2298743002: Make the condition for when this is predeclared easier to understand. (Closed)
Patch Set: updates 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 | « no previous file | src/ast/scopes.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_AST_SCOPES_H_ 5 #ifndef V8_AST_SCOPES_H_
6 #define V8_AST_SCOPES_H_ 6 #define V8_AST_SCOPES_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/base/hashmap.h" 9 #include "src/base/hashmap.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 friend class DeclarationScope; 580 friend class DeclarationScope;
581 }; 581 };
582 582
583 class DeclarationScope : public Scope { 583 class DeclarationScope : public Scope {
584 public: 584 public:
585 DeclarationScope(Zone* zone, Scope* outer_scope, ScopeType scope_type, 585 DeclarationScope(Zone* zone, Scope* outer_scope, ScopeType scope_type,
586 FunctionKind function_kind = kNormalFunction); 586 FunctionKind function_kind = kNormalFunction);
587 DeclarationScope(Zone* zone, ScopeType scope_type, 587 DeclarationScope(Zone* zone, ScopeType scope_type,
588 Handle<ScopeInfo> scope_info); 588 Handle<ScopeInfo> scope_info);
589 // Creates a script scope. 589 // Creates a script scope.
590 explicit DeclarationScope(Zone* zone); 590 DeclarationScope(Zone* zone, AstValueFactory* ast_value_factory);
591 591
592 bool IsDeclaredParameter(const AstRawString* name) { 592 bool IsDeclaredParameter(const AstRawString* name) {
593 // If IsSimpleParameterList is false, duplicate parameters are not allowed, 593 // If IsSimpleParameterList is false, duplicate parameters are not allowed,
594 // however `arguments` may be allowed if function is not strict code. Thus, 594 // however `arguments` may be allowed if function is not strict code. Thus,
595 // the assumptions explained above do not hold. 595 // the assumptions explained above do not hold.
596 return params_.Contains(variables_.Lookup(name)); 596 return params_.Contains(variables_.Lookup(name));
597 } 597 }
598 598
599 FunctionKind function_kind() const { return function_kind_; } 599 FunctionKind function_kind() const { return function_kind_; }
600 600
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 void AllocateModuleVariables(); 850 void AllocateModuleVariables();
851 851
852 private: 852 private:
853 ModuleDescriptor* module_descriptor_; 853 ModuleDescriptor* module_descriptor_;
854 }; 854 };
855 855
856 } // namespace internal 856 } // namespace internal
857 } // namespace v8 857 } // namespace v8
858 858
859 #endif // V8_AST_SCOPES_H_ 859 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698