| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 436 |
| 437 // Check that all Scopes in the scope tree use the same Zone. | 437 // Check that all Scopes in the scope tree use the same Zone. |
| 438 void CheckZones(); | 438 void CheckZones(); |
| 439 #endif | 439 #endif |
| 440 | 440 |
| 441 // Retrieve `IsSimpleParameterList` of current or outer function. | 441 // Retrieve `IsSimpleParameterList` of current or outer function. |
| 442 bool HasSimpleParameters(); | 442 bool HasSimpleParameters(); |
| 443 void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; } | 443 void set_is_debug_evaluate_scope() { is_debug_evaluate_scope_ = true; } |
| 444 | 444 |
| 445 protected: | 445 protected: |
| 446 // Creates a script scope. | 446 explicit Scope(Zone* zone, ScopeType scope_type = SCRIPT_SCOPE); |
| 447 explicit Scope(Zone* zone); | |
| 448 | 447 |
| 449 void set_language_mode(LanguageMode language_mode) { | 448 void set_language_mode(LanguageMode language_mode) { |
| 450 is_strict_ = is_strict(language_mode); | 449 is_strict_ = is_strict(language_mode); |
| 451 } | 450 } |
| 452 | 451 |
| 453 private: | 452 private: |
| 454 Variable* Declare(Zone* zone, Scope* scope, const AstRawString* name, | 453 Variable* Declare(Zone* zone, Scope* scope, const AstRawString* name, |
| 455 VariableMode mode, Variable::Kind kind, | 454 VariableMode mode, Variable::Kind kind, |
| 456 InitializationFlag initialization_flag, | 455 InitializationFlag initialization_flag, |
| 457 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned) { | 456 MaybeAssignedFlag maybe_assigned_flag = kNotAssigned) { |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 void AllocateModuleVariables(); | 923 void AllocateModuleVariables(); |
| 925 | 924 |
| 926 private: | 925 private: |
| 927 ModuleDescriptor* module_descriptor_; | 926 ModuleDescriptor* module_descriptor_; |
| 928 }; | 927 }; |
| 929 | 928 |
| 930 } // namespace internal | 929 } // namespace internal |
| 931 } // namespace v8 | 930 } // namespace v8 |
| 932 | 931 |
| 933 #endif // V8_AST_SCOPES_H_ | 932 #endif // V8_AST_SCOPES_H_ |
| OLD | NEW |