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

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

Issue 2271993002: Chain ScopeInfos together (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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 | « src/ast/scopeinfo.cc ('k') | 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/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
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
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_
OLDNEW
« no previous file with comments | « src/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698