| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 // Scope-specific information computed during parsing. | 497 // Scope-specific information computed during parsing. |
| 498 // | 498 // |
| 499 // The language mode of this scope. | 499 // The language mode of this scope. |
| 500 STATIC_ASSERT(LANGUAGE_END == 2); | 500 STATIC_ASSERT(LANGUAGE_END == 2); |
| 501 bool is_strict_ : 1; | 501 bool is_strict_ : 1; |
| 502 // This scope or a nested catch scope or with scope contain an 'eval' call. At | 502 // This scope or a nested catch scope or with scope contain an 'eval' call. At |
| 503 // the 'eval' call site this scope is the declaration scope. | 503 // the 'eval' call site this scope is the declaration scope. |
| 504 bool scope_calls_eval_ : 1; | 504 bool scope_calls_eval_ : 1; |
| 505 // This scope uses "super" property ('super.foo'). | 505 // This scope uses "super" property ('super.foo'). |
| 506 bool scope_uses_super_property_ : 1; | 506 bool scope_uses_super_property_ : 1; |
| 507 // This scope has a parameter called "arguments". | |
| 508 bool has_arguments_parameter_ : 1; | |
| 509 // This scope's declarations might not be executed in order (e.g., switch). | 507 // This scope's declarations might not be executed in order (e.g., switch). |
| 510 bool scope_nonlinear_ : 1; | 508 bool scope_nonlinear_ : 1; |
| 511 bool is_hidden_ : 1; | 509 bool is_hidden_ : 1; |
| 512 // Temporary workaround that allows masking of 'this' in debug-evalute scopes. | 510 // Temporary workaround that allows masking of 'this' in debug-evalute scopes. |
| 513 bool is_debug_evaluate_scope_ : 1; | 511 bool is_debug_evaluate_scope_ : 1; |
| 514 | 512 |
| 515 // Computed via PropagateScopeInfo. | 513 // Computed via PropagateScopeInfo. |
| 516 bool inner_scope_calls_eval_ : 1; | 514 bool inner_scope_calls_eval_ : 1; |
| 517 bool force_eager_compilation_ : 1; | 515 bool force_eager_compilation_ : 1; |
| 518 bool force_context_allocation_ : 1; | 516 bool force_context_allocation_ : 1; |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 void SetDefaults(); | 846 void SetDefaults(); |
| 849 | 847 |
| 850 // If the scope is a function scope, this is the function kind. | 848 // If the scope is a function scope, this is the function kind. |
| 851 const FunctionKind function_kind_; | 849 const FunctionKind function_kind_; |
| 852 | 850 |
| 853 bool has_simple_parameters_ : 1; | 851 bool has_simple_parameters_ : 1; |
| 854 // This scope contains an "use asm" annotation. | 852 // This scope contains an "use asm" annotation. |
| 855 bool asm_module_ : 1; | 853 bool asm_module_ : 1; |
| 856 // This scope's outer context is an asm module. | 854 // This scope's outer context is an asm module. |
| 857 bool asm_function_ : 1; | 855 bool asm_function_ : 1; |
| 856 // This scope has a parameter called "arguments". |
| 857 bool has_arguments_parameter_ : 1; |
| 858 | 858 |
| 859 // Info about the parameter list of a function. | 859 // Info about the parameter list of a function. |
| 860 int arity_; | 860 int arity_; |
| 861 int rest_index_; | 861 int rest_index_; |
| 862 Variable* rest_parameter_; | 862 Variable* rest_parameter_; |
| 863 // Compiler-allocated (user-invisible) temporaries. | 863 // Compiler-allocated (user-invisible) temporaries. |
| 864 ZoneList<Variable*> temps_; | 864 ZoneList<Variable*> temps_; |
| 865 // Parameter list in source order. | 865 // Parameter list in source order. |
| 866 ZoneList<Variable*> params_; | 866 ZoneList<Variable*> params_; |
| 867 // Map of function names to lists of functions defined in sloppy blocks | 867 // Map of function names to lists of functions defined in sloppy blocks |
| (...skipping 25 matching lines...) Expand all Loading... |
| 893 void AllocateModuleVariables(); | 893 void AllocateModuleVariables(); |
| 894 | 894 |
| 895 private: | 895 private: |
| 896 ModuleDescriptor* module_descriptor_; | 896 ModuleDescriptor* module_descriptor_; |
| 897 }; | 897 }; |
| 898 | 898 |
| 899 } // namespace internal | 899 } // namespace internal |
| 900 } // namespace v8 | 900 } // namespace v8 |
| 901 | 901 |
| 902 #endif // V8_AST_SCOPES_H_ | 902 #endif // V8_AST_SCOPES_H_ |
| OLD | NEW |