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/zone.h" | 9 #include "src/zone.h" |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 static bool Analyze(CompilationInfo* info); | 81 static bool Analyze(CompilationInfo* info); |
82 | 82 |
83 static Scope* DeserializeScopeChain(Context* context, Scope* script_scope, | 83 static Scope* DeserializeScopeChain(Context* context, Scope* script_scope, |
84 Zone* zone); | 84 Zone* zone); |
85 | 85 |
86 // The scope name is only used for printing/debugging. | 86 // The scope name is only used for printing/debugging. |
87 void SetScopeName(const AstRawString* scope_name) { | 87 void SetScopeName(const AstRawString* scope_name) { |
88 scope_name_ = scope_name; | 88 scope_name_ = scope_name; |
89 } | 89 } |
90 | 90 |
91 void Initialize(); | 91 void Initialize(bool uninitialized_this); |
92 | 92 |
93 // Checks if the block scope is redundant, i.e. it does not contain any | 93 // Checks if the block scope is redundant, i.e. it does not contain any |
94 // block scoped declarations. In that case it is removed from the scope | 94 // block scoped declarations. In that case it is removed from the scope |
95 // tree and its children are reparented. | 95 // tree and its children are reparented. |
96 Scope* FinalizeBlockScope(); | 96 Scope* FinalizeBlockScope(); |
97 | 97 |
98 Zone* zone() const { return zone_; } | 98 Zone* zone() const { return zone_; } |
99 | 99 |
100 // --------------------------------------------------------------------------- | 100 // --------------------------------------------------------------------------- |
101 // Declarations | 101 // Declarations |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 Scope* outer_scope, | 670 Scope* outer_scope, |
671 Handle<ScopeInfo> scope_info); | 671 Handle<ScopeInfo> scope_info); |
672 | 672 |
673 AstValueFactory* ast_value_factory_; | 673 AstValueFactory* ast_value_factory_; |
674 Zone* zone_; | 674 Zone* zone_; |
675 }; | 675 }; |
676 | 676 |
677 } } // namespace v8::internal | 677 } } // namespace v8::internal |
678 | 678 |
679 #endif // V8_SCOPES_H_ | 679 #endif // V8_SCOPES_H_ |
OLD | NEW |