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

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

Issue 2686663002: Reland of [parsing] Fix maybe-assigned for loop variables. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | src/parsing/parser-base.h » ('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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 InitializationFlag init_flag = kCreatedInitialized, 174 InitializationFlag init_flag = kCreatedInitialized,
175 VariableKind kind = NORMAL_VARIABLE, 175 VariableKind kind = NORMAL_VARIABLE,
176 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned); 176 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned);
177 177
178 Variable* DeclareVariable(Declaration* declaration, VariableMode mode, 178 Variable* DeclareVariable(Declaration* declaration, VariableMode mode,
179 InitializationFlag init, 179 InitializationFlag init,
180 bool allow_harmony_restrictive_generators, 180 bool allow_harmony_restrictive_generators,
181 bool* sloppy_mode_block_scope_function_redefinition, 181 bool* sloppy_mode_block_scope_function_redefinition,
182 bool* ok); 182 bool* ok);
183 183
184 // The return value is meaningful only if FLAG_preparser_scope_analysis is on.
184 Variable* DeclareVariableName(const AstRawString* name, VariableMode mode); 185 Variable* DeclareVariableName(const AstRawString* name, VariableMode mode);
185 186
186 // Declarations list. 187 // Declarations list.
187 ThreadedList<Declaration>* declarations() { return &decls_; } 188 ThreadedList<Declaration>* declarations() { return &decls_; }
188 189
189 ThreadedList<Variable>* locals() { return &locals_; } 190 ThreadedList<Variable>* locals() { return &locals_; }
190 191
191 // Create a new unresolved variable. 192 // Create a new unresolved variable.
192 VariableProxy* NewUnresolved(AstNodeFactory* factory, 193 VariableProxy* NewUnresolved(AstNodeFactory* factory,
193 const AstRawString* name, 194 const AstRawString* name,
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 void AllocateModuleVariables(); 898 void AllocateModuleVariables();
898 899
899 private: 900 private:
900 ModuleDescriptor* module_descriptor_; 901 ModuleDescriptor* module_descriptor_;
901 }; 902 };
902 903
903 } // namespace internal 904 } // namespace internal
904 } // namespace v8 905 } // namespace v8
905 906
906 #endif // V8_AST_SCOPES_H_ 907 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698