OLD | NEW |
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 Loading... |
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 |
116 // Inserts outer_scope into this scope's scope chain (and removes this | 121 // Inserts outer_scope into this scope's scope chain (and removes this |
117 // from the current outer_scope_'s inner scope list). | 122 // from the current outer_scope_'s inner scope list). |
118 // Assumes outer_scope_ is non-null. | 123 // Assumes outer_scope_ is non-null. |
119 void ReplaceOuterScope(Scope* outer_scope); | 124 void ReplaceOuterScope(Scope* outer_scope); |
120 | 125 |
121 // Propagates any eagerly-gathered scope usage flags (such as calls_eval()) | 126 // Propagates any eagerly-gathered scope usage flags (such as calls_eval()) |
122 // to the passed-in scope. | 127 // to the passed-in scope. |
123 void PropagateUsageFlagsToScope(Scope* other); | 128 void PropagateUsageFlagsToScope(Scope* other); |
124 | 129 |
125 Zone* zone() const { return zone_; } | 130 Zone* zone() const { return zone_; } |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 void AllocateModuleVariables(); | 859 void AllocateModuleVariables(); |
855 | 860 |
856 private: | 861 private: |
857 ModuleDescriptor* module_descriptor_; | 862 ModuleDescriptor* module_descriptor_; |
858 }; | 863 }; |
859 | 864 |
860 } // namespace internal | 865 } // namespace internal |
861 } // namespace v8 | 866 } // namespace v8 |
862 | 867 |
863 #endif // V8_AST_SCOPES_H_ | 868 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |