| 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/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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 542   void AllocateDeclaredGlobal(Variable* var); | 542   void AllocateDeclaredGlobal(Variable* var); | 
| 543   void AllocateNonParameterLocalsAndDeclaredGlobals(); | 543   void AllocateNonParameterLocalsAndDeclaredGlobals(); | 
| 544   void AllocateVariablesRecursively(); | 544   void AllocateVariablesRecursively(); | 
| 545 | 545 | 
| 546   void AllocateScopeInfosRecursively(Isolate* isolate, AnalyzeMode mode); | 546   void AllocateScopeInfosRecursively(Isolate* isolate, AnalyzeMode mode); | 
| 547 | 547 | 
| 548   // Construct a scope based on the scope info. | 548   // Construct a scope based on the scope info. | 
| 549   Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info); | 549   Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info); | 
| 550 | 550 | 
| 551   // Construct a catch scope with a binding for the name. | 551   // Construct a catch scope with a binding for the name. | 
| 552   Scope(Zone* zone, const AstRawString* catch_variable_name); | 552   Scope(Zone* zone, const AstRawString* catch_variable_name, | 
|  | 553         Handle<ScopeInfo> scope_info); | 
| 553 | 554 | 
| 554   void AddInnerScope(Scope* inner_scope) { | 555   void AddInnerScope(Scope* inner_scope) { | 
| 555     inner_scope->sibling_ = inner_scope_; | 556     inner_scope->sibling_ = inner_scope_; | 
| 556     inner_scope_ = inner_scope; | 557     inner_scope_ = inner_scope; | 
| 557     inner_scope->outer_scope_ = this; | 558     inner_scope->outer_scope_ = this; | 
| 558   } | 559   } | 
| 559 | 560 | 
| 560   void RemoveInnerScope(Scope* inner_scope) { | 561   void RemoveInnerScope(Scope* inner_scope) { | 
| 561     DCHECK_NOT_NULL(inner_scope); | 562     DCHECK_NOT_NULL(inner_scope); | 
| 562     if (inner_scope == inner_scope_) { | 563     if (inner_scope == inner_scope_) { | 
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 852   void AllocateModuleVariables(); | 853   void AllocateModuleVariables(); | 
| 853 | 854 | 
| 854  private: | 855  private: | 
| 855   ModuleDescriptor* module_descriptor_; | 856   ModuleDescriptor* module_descriptor_; | 
| 856 }; | 857 }; | 
| 857 | 858 | 
| 858 }  // namespace internal | 859 }  // namespace internal | 
| 859 }  // namespace v8 | 860 }  // namespace v8 | 
| 860 | 861 | 
| 861 #endif  // V8_AST_SCOPES_H_ | 862 #endif  // V8_AST_SCOPES_H_ | 
| OLD | NEW | 
|---|