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

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

Issue 2679263002: Revert 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.
185 Variable* DeclareVariableName(const AstRawString* name, VariableMode mode); 184 Variable* DeclareVariableName(const AstRawString* name, VariableMode mode);
186 185
187 // Declarations list. 186 // Declarations list.
188 ThreadedList<Declaration>* declarations() { return &decls_; } 187 ThreadedList<Declaration>* declarations() { return &decls_; }
189 188
190 ThreadedList<Variable>* locals() { return &locals_; } 189 ThreadedList<Variable>* locals() { return &locals_; }
191 190
192 // Create a new unresolved variable. 191 // Create a new unresolved variable.
193 VariableProxy* NewUnresolved(AstNodeFactory* factory, 192 VariableProxy* NewUnresolved(AstNodeFactory* factory,
194 const AstRawString* name, 193 const AstRawString* name,
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 void AllocateModuleVariables(); 897 void AllocateModuleVariables();
899 898
900 private: 899 private:
901 ModuleDescriptor* module_descriptor_; 900 ModuleDescriptor* module_descriptor_;
902 }; 901 };
903 902
904 } // namespace internal 903 } // namespace internal
905 } // namespace v8 904 } // namespace v8
906 905
907 #endif // V8_AST_SCOPES_H_ 906 #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