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

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

Issue 2539123002: Preparsing inner funcs: be less pessimistic about maybe_assigned. (Closed)
Patch Set: moar Created 4 years 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 | « no previous file | 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/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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 void AddUnresolved(VariableProxy* proxy); 177 void AddUnresolved(VariableProxy* proxy);
178 178
179 // Remove a unresolved variable. During parsing, an unresolved variable 179 // Remove a unresolved variable. During parsing, an unresolved variable
180 // may have been added optimistically, but then only the variable name 180 // may have been added optimistically, but then only the variable name
181 // was used (typically for labels). If the variable was not declared, the 181 // was used (typically for labels). If the variable was not declared, the
182 // addition introduced a new unresolved variable which may end up being 182 // addition introduced a new unresolved variable which may end up being
183 // allocated globally as a "ghost" variable. RemoveUnresolved removes 183 // allocated globally as a "ghost" variable. RemoveUnresolved removes
184 // such a variable again if it was added; otherwise this is a no-op. 184 // such a variable again if it was added; otherwise this is a no-op.
185 bool RemoveUnresolved(VariableProxy* var); 185 bool RemoveUnresolved(VariableProxy* var);
186 bool RemoveUnresolved(const AstRawString* name);
187 186
188 // Creates a new temporary variable in this scope's TemporaryScope. The 187 // Creates a new temporary variable in this scope's TemporaryScope. The
189 // name is only used for printing and cannot be used to find the variable. 188 // name is only used for printing and cannot be used to find the variable.
190 // In particular, the only way to get hold of the temporary is by keeping the 189 // In particular, the only way to get hold of the temporary is by keeping the
191 // Variable* around. The name should not clash with a legitimate variable 190 // Variable* around. The name should not clash with a legitimate variable
192 // names. 191 // names.
193 // TODO(verwaest): Move to DeclarationScope? 192 // TODO(verwaest): Move to DeclarationScope?
194 Variable* NewTemporary(const AstRawString* name); 193 Variable* NewTemporary(const AstRawString* name);
195 194
196 // --------------------------------------------------------------------------- 195 // ---------------------------------------------------------------------------
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 void AllocateModuleVariables(); 873 void AllocateModuleVariables();
875 874
876 private: 875 private:
877 ModuleDescriptor* module_descriptor_; 876 ModuleDescriptor* module_descriptor_;
878 }; 877 };
879 878
880 } // namespace internal 879 } // namespace internal
881 } // namespace v8 880 } // namespace v8
882 881
883 #endif // V8_AST_SCOPES_H_ 882 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698