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

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

Issue 2519333005: Revert of [parser] Fix scopes in rewriting of for-of and destructuring assignments. (Closed)
Patch Set: Created 4 years 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/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/hashmap.h" 9 #include "src/base/hashmap.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 ScopeInfo* scope_info, 106 ScopeInfo* scope_info,
107 DeclarationScope* script_scope, 107 DeclarationScope* script_scope,
108 AstValueFactory* ast_value_factory, 108 AstValueFactory* ast_value_factory,
109 DeserializationMode deserialization_mode); 109 DeserializationMode deserialization_mode);
110 110
111 // Checks if the block scope is redundant, i.e. it does not contain any 111 // Checks if the block scope is redundant, i.e. it does not contain any
112 // block scoped declarations. In that case it is removed from the scope 112 // block scoped declarations. In that case it is removed from the scope
113 // tree and its children are reparented. 113 // tree and its children are reparented.
114 Scope* FinalizeBlockScope(); 114 Scope* FinalizeBlockScope();
115 115
116 bool HasBeenRemoved() const;
117
118 // Find the first scope that hasn't been removed.
119 Scope* GetUnremovedScope();
120
121 // Inserts outer_scope into this scope's scope chain (and removes this 116 // Inserts outer_scope into this scope's scope chain (and removes this
122 // from the current outer_scope_'s inner scope list). 117 // from the current outer_scope_'s inner scope list).
123 // Assumes outer_scope_ is non-null. 118 // Assumes outer_scope_ is non-null.
124 void ReplaceOuterScope(Scope* outer_scope); 119 void ReplaceOuterScope(Scope* outer_scope);
125 120
126 // Propagates any eagerly-gathered scope usage flags (such as calls_eval()) 121 // Propagates any eagerly-gathered scope usage flags (such as calls_eval())
127 // to the passed-in scope. 122 // to the passed-in scope.
128 void PropagateUsageFlagsToScope(Scope* other); 123 void PropagateUsageFlagsToScope(Scope* other);
129 124
130 Zone* zone() const { return zone_; } 125 Zone* zone() const { return zone_; }
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 void AllocateModuleVariables(); 854 void AllocateModuleVariables();
860 855
861 private: 856 private:
862 ModuleDescriptor* module_descriptor_; 857 ModuleDescriptor* module_descriptor_;
863 }; 858 };
864 859
865 } // namespace internal 860 } // namespace internal
866 } // namespace v8 861 } // namespace v8
867 862
868 #endif // V8_AST_SCOPES_H_ 863 #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