| 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/variables.h" | 8 #include "src/ast/variables.h" |
| 9 #include "src/base/hashmap.h" | 9 #include "src/base/hashmap.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 bool MustAllocateInContext(Variable* var); | 526 bool MustAllocateInContext(Variable* var); |
| 527 | 527 |
| 528 // Variable allocation. | 528 // Variable allocation. |
| 529 void AllocateStackSlot(Variable* var); | 529 void AllocateStackSlot(Variable* var); |
| 530 void AllocateHeapSlot(Variable* var); | 530 void AllocateHeapSlot(Variable* var); |
| 531 void AllocateNonParameterLocal(Variable* var); | 531 void AllocateNonParameterLocal(Variable* var); |
| 532 void AllocateDeclaredGlobal(Variable* var); | 532 void AllocateDeclaredGlobal(Variable* var); |
| 533 void AllocateNonParameterLocalsAndDeclaredGlobals(); | 533 void AllocateNonParameterLocalsAndDeclaredGlobals(); |
| 534 void AllocateVariablesRecursively(); | 534 void AllocateVariablesRecursively(); |
| 535 | 535 |
| 536 void AllocateScopeInfosRecursively(Isolate* isolate, AnalyzeMode mode); | 536 void AllocateScopeInfosRecursively(Isolate* isolate, AnalyzeMode mode, |
| 537 MaybeHandle<ScopeInfo> outer_scope); |
| 537 | 538 |
| 538 // Construct a scope based on the scope info. | 539 // Construct a scope based on the scope info. |
| 539 Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info); | 540 Scope(Zone* zone, ScopeType type, Handle<ScopeInfo> scope_info); |
| 540 | 541 |
| 541 // Construct a catch scope with a binding for the name. | 542 // Construct a catch scope with a binding for the name. |
| 542 Scope(Zone* zone, const AstRawString* catch_variable_name, | 543 Scope(Zone* zone, const AstRawString* catch_variable_name, |
| 543 Handle<ScopeInfo> scope_info); | 544 Handle<ScopeInfo> scope_info); |
| 544 | 545 |
| 545 void AddInnerScope(Scope* inner_scope) { | 546 void AddInnerScope(Scope* inner_scope) { |
| 546 inner_scope->sibling_ = inner_scope_; | 547 inner_scope->sibling_ = inner_scope_; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 void AllocateModuleVariables(); | 844 void AllocateModuleVariables(); |
| 844 | 845 |
| 845 private: | 846 private: |
| 846 ModuleDescriptor* module_descriptor_; | 847 ModuleDescriptor* module_descriptor_; |
| 847 }; | 848 }; |
| 848 | 849 |
| 849 } // namespace internal | 850 } // namespace internal |
| 850 } // namespace v8 | 851 } // namespace v8 |
| 851 | 852 |
| 852 #endif // V8_AST_SCOPES_H_ | 853 #endif // V8_AST_SCOPES_H_ |
| OLD | NEW |