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

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

Issue 2342443004: Only pass the outer scope info with ParseInfo (Closed)
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/api.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/base/hashmap.h" 8 #include "src/base/hashmap.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 Scope* outer_scope_; 94 Scope* outer_scope_;
95 Scope* top_inner_scope_; 95 Scope* top_inner_scope_;
96 VariableProxy* top_unresolved_; 96 VariableProxy* top_unresolved_;
97 int top_local_; 97 int top_local_;
98 int top_decl_; 98 int top_decl_;
99 }; 99 };
100 100
101 enum class DeserializationMode { kIncludingVariables, kScopesOnly }; 101 enum class DeserializationMode { kIncludingVariables, kScopesOnly };
102 102
103 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone, 103 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone,
104 Context* context, 104 ScopeInfo* scope_info,
105 DeclarationScope* script_scope, 105 DeclarationScope* script_scope,
106 AstValueFactory* ast_value_factory, 106 AstValueFactory* ast_value_factory,
107 DeserializationMode deserialization_mode); 107 DeserializationMode deserialization_mode);
108 108
109 // Checks if the block scope is redundant, i.e. it does not contain any 109 // Checks if the block scope is redundant, i.e. it does not contain any
110 // block scoped declarations. In that case it is removed from the scope 110 // block scoped declarations. In that case it is removed from the scope
111 // tree and its children are reparented. 111 // tree and its children are reparented.
112 Scope* FinalizeBlockScope(); 112 Scope* FinalizeBlockScope();
113 113
114 // Inserts outer_scope into this scope's scope chain (and removes this 114 // Inserts outer_scope into this scope's scope chain (and removes this
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 void AllocateModuleVariables(); 856 void AllocateModuleVariables();
857 857
858 private: 858 private:
859 ModuleDescriptor* module_descriptor_; 859 ModuleDescriptor* module_descriptor_;
860 }; 860 };
861 861
862 } // namespace internal 862 } // namespace internal
863 } // namespace v8 863 } // namespace v8
864 864
865 #endif // V8_AST_SCOPES_H_ 865 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698