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/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/base/hashmap.h" | 9 #include "src/base/hashmap.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 405 |
406 // Check that all Scopes in the scope tree use the same Zone. | 406 // Check that all Scopes in the scope tree use the same Zone. |
407 void CheckZones(); | 407 void CheckZones(); |
408 #endif | 408 #endif |
409 | 409 |
410 // Retrieve `IsSimpleParameterList` of current or outer function. | 410 // Retrieve `IsSimpleParameterList` of current or outer function. |
411 bool HasSimpleParameters(); | 411 bool HasSimpleParameters(); |
412 void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; } | 412 void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; } |
413 | 413 |
414 protected: | 414 protected: |
415 explicit Scope(Zone* zone, ScopeType scope_type = SCRIPT_SCOPE); | 415 explicit Scope(Zone* zone); |
416 | 416 |
417 void set_language_mode(LanguageMode language_mode) { | 417 void set_language_mode(LanguageMode language_mode) { |
418 is_strict_ = is_strict(language_mode); | 418 is_strict_ = is_strict(language_mode); |
419 } | 419 } |
420 | 420 |
421 private: | 421 private: |
422 Variable* Declare(Zone* zone, Scope* scope, const AstRawString* name, | 422 Variable* Declare(Zone* zone, Scope* scope, const AstRawString* name, |
423 VariableMode mode, Variable::Kind kind, | 423 VariableMode mode, Variable::Kind kind, |
424 InitializationFlag initialization_flag, | 424 InitializationFlag initialization_flag, |
425 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned) { | 425 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned) { |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 void AllocateModuleVariables(); | 853 void AllocateModuleVariables(); |
854 | 854 |
855 private: | 855 private: |
856 ModuleDescriptor* module_descriptor_; | 856 ModuleDescriptor* module_descriptor_; |
857 }; | 857 }; |
858 | 858 |
859 } // namespace internal | 859 } // namespace internal |
860 } // namespace v8 | 860 } // namespace v8 |
861 | 861 |
862 #endif // V8_AST_SCOPES_H_ | 862 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |