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_SCOPES_H_ | 5 #ifndef V8_SCOPES_H_ |
6 #define V8_SCOPES_H_ | 6 #define V8_SCOPES_H_ |
7 | 7 |
8 #include "src/ast.h" | 8 #include "src/ast.h" |
9 #include "src/pending-compilation-error-handler.h" | 9 #include "src/pending-compilation-error-handler.h" |
10 #include "src/zone.h" | 10 #include "src/zone.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 546 |
547 // Debugging support. | 547 // Debugging support. |
548 const AstRawString* scope_name_; | 548 const AstRawString* scope_name_; |
549 | 549 |
550 // The variables declared in this scope: | 550 // The variables declared in this scope: |
551 // | 551 // |
552 // All user-declared variables (incl. parameters). For script scopes | 552 // All user-declared variables (incl. parameters). For script scopes |
553 // variables may be implicitly 'declared' by being used (possibly in | 553 // variables may be implicitly 'declared' by being used (possibly in |
554 // an inner scope) with no intervening with statements or eval calls. | 554 // an inner scope) with no intervening with statements or eval calls. |
555 VariableMap variables_; | 555 VariableMap variables_; |
556 // Compiler-allocated (user-invisible) internals. | |
557 ZoneList<Variable*> internals_; | |
558 // Compiler-allocated (user-invisible) temporaries. | 556 // Compiler-allocated (user-invisible) temporaries. |
559 ZoneList<Variable*> temps_; | 557 ZoneList<Variable*> temps_; |
560 // Parameter list in source order. | 558 // Parameter list in source order. |
561 ZoneList<Variable*> params_; | 559 ZoneList<Variable*> params_; |
562 // Variables that must be looked up dynamically. | 560 // Variables that must be looked up dynamically. |
563 DynamicScopePart* dynamics_; | 561 DynamicScopePart* dynamics_; |
564 // Unresolved variables referred to from this scope. | 562 // Unresolved variables referred to from this scope. |
565 ZoneList<VariableProxy*> unresolved_; | 563 ZoneList<VariableProxy*> unresolved_; |
566 // Declarations. | 564 // Declarations. |
567 ZoneList<Declaration*> decls_; | 565 ZoneList<Declaration*> decls_; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 int num_var_or_const_; | 620 int num_var_or_const_; |
623 | 621 |
624 // Computed via AllocateVariables; function, block and catch scopes only. | 622 // Computed via AllocateVariables; function, block and catch scopes only. |
625 int num_stack_slots_; | 623 int num_stack_slots_; |
626 int num_heap_slots_; | 624 int num_heap_slots_; |
627 int num_global_slots_; | 625 int num_global_slots_; |
628 | 626 |
629 // The number of modules (including nested ones). | 627 // The number of modules (including nested ones). |
630 int num_modules_; | 628 int num_modules_; |
631 | 629 |
632 // For module scopes, the host scope's internal variable binding this module. | 630 // For module scopes, the host scope's temporary variable binding this module. |
633 Variable* module_var_; | 631 Variable* module_var_; |
634 | 632 |
635 // Rest parameter | 633 // Rest parameter |
636 Variable* rest_parameter_; | 634 Variable* rest_parameter_; |
637 int rest_index_; | 635 int rest_index_; |
638 | 636 |
639 // Serialized scope info support. | 637 // Serialized scope info support. |
640 Handle<ScopeInfo> scope_info_; | 638 Handle<ScopeInfo> scope_info_; |
641 bool already_resolved() { return already_resolved_; } | 639 bool already_resolved() { return already_resolved_; } |
642 | 640 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 PendingCompilationErrorHandler pending_error_handler_; | 763 PendingCompilationErrorHandler pending_error_handler_; |
766 | 764 |
767 // For tracking which classes are declared consecutively. Needed for strong | 765 // For tracking which classes are declared consecutively. Needed for strong |
768 // mode. | 766 // mode. |
769 int class_declaration_group_start_; | 767 int class_declaration_group_start_; |
770 }; | 768 }; |
771 | 769 |
772 } } // namespace v8::internal | 770 } } // namespace v8::internal |
773 | 771 |
774 #endif // V8_SCOPES_H_ | 772 #endif // V8_SCOPES_H_ |
OLD | NEW |