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

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

Issue 2445993002: Drop unused end-position from VariableProxy (Closed)
Patch Set: Addressed comment Created 4 years, 1 month 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/ast.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/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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // Declarations list. 155 // Declarations list.
156 ZoneList<Declaration*>* declarations() { return &decls_; } 156 ZoneList<Declaration*>* declarations() { return &decls_; }
157 157
158 ZoneList<Variable*>* locals() { return &locals_; } 158 ZoneList<Variable*>* locals() { return &locals_; }
159 159
160 // Create a new unresolved variable. 160 // Create a new unresolved variable.
161 VariableProxy* NewUnresolved(AstNodeFactory* factory, 161 VariableProxy* NewUnresolved(AstNodeFactory* factory,
162 const AstRawString* name, 162 const AstRawString* name,
163 int start_position = kNoSourcePosition, 163 int start_position = kNoSourcePosition,
164 int end_position = kNoSourcePosition,
165 VariableKind kind = NORMAL_VARIABLE); 164 VariableKind kind = NORMAL_VARIABLE);
166 165
167 void AddUnresolved(VariableProxy* proxy); 166 void AddUnresolved(VariableProxy* proxy);
168 167
169 // Remove a unresolved variable. During parsing, an unresolved variable 168 // Remove a unresolved variable. During parsing, an unresolved variable
170 // may have been added optimistically, but then only the variable name 169 // may have been added optimistically, but then only the variable name
171 // was used (typically for labels). If the variable was not declared, the 170 // was used (typically for labels). If the variable was not declared, the
172 // addition introduced a new unresolved variable which may end up being 171 // addition introduced a new unresolved variable which may end up being
173 // allocated globally as a "ghost" variable. RemoveUnresolved removes 172 // allocated globally as a "ghost" variable. RemoveUnresolved removes
174 // such a variable again if it was added; otherwise this is a no-op. 173 // such a variable again if it was added; otherwise this is a no-op.
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 void AllocateModuleExports(); 867 void AllocateModuleExports();
869 868
870 private: 869 private:
871 ModuleDescriptor* module_descriptor_; 870 ModuleDescriptor* module_descriptor_;
872 }; 871 };
873 872
874 } // namespace internal 873 } // namespace internal
875 } // namespace v8 874 } // namespace v8
876 875
877 #endif // V8_AST_SCOPES_H_ 876 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698