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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 int num_stack_slots_; | 481 int num_stack_slots_; |
482 int num_heap_slots_; | 482 int num_heap_slots_; |
483 int num_global_slots_; | 483 int num_global_slots_; |
484 | 484 |
485 // The scope type. | 485 // The scope type. |
486 const ScopeType scope_type_; | 486 const ScopeType scope_type_; |
487 | 487 |
488 // Scope-specific information computed during parsing. | 488 // Scope-specific information computed during parsing. |
489 // | 489 // |
490 // The language mode of this scope. | 490 // The language mode of this scope. |
491 STATIC_ASSERT(LANGUAGE_END == 3); | 491 STATIC_ASSERT(LANGUAGE_END == 2); |
492 LanguageMode language_mode_ : 2; | 492 LanguageMode language_mode_ : 1; |
493 // This scope is inside a 'with' of some outer scope. | 493 // This scope is inside a 'with' of some outer scope. |
494 bool scope_inside_with_ : 1; | 494 bool scope_inside_with_ : 1; |
495 // This scope or a nested catch scope or with scope contain an 'eval' call. At | 495 // This scope or a nested catch scope or with scope contain an 'eval' call. At |
496 // the 'eval' call site this scope is the declaration scope. | 496 // the 'eval' call site this scope is the declaration scope. |
497 bool scope_calls_eval_ : 1; | 497 bool scope_calls_eval_ : 1; |
498 // This scope uses "super" property ('super.foo'). | 498 // This scope uses "super" property ('super.foo'). |
499 bool scope_uses_super_property_ : 1; | 499 bool scope_uses_super_property_ : 1; |
500 // This scope has a parameter called "arguments". | 500 // This scope has a parameter called "arguments". |
501 bool has_arguments_parameter_ : 1; | 501 bool has_arguments_parameter_ : 1; |
502 // This scope contains an "use asm" annotation. | 502 // This scope contains an "use asm" annotation. |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 // Convenience variable; Subclass constructor only | 883 // Convenience variable; Subclass constructor only |
884 Variable* this_function_; | 884 Variable* this_function_; |
885 // Module descriptor; module scopes only. | 885 // Module descriptor; module scopes only. |
886 ModuleDescriptor* module_descriptor_; | 886 ModuleDescriptor* module_descriptor_; |
887 }; | 887 }; |
888 | 888 |
889 } // namespace internal | 889 } // namespace internal |
890 } // namespace v8 | 890 } // namespace v8 |
891 | 891 |
892 #endif // V8_AST_SCOPES_H_ | 892 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |