| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |