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(Isolate* isolate, Zone* zone, | 83 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone, |
84 Context* context, Scope* script_scope); | 84 Context* context, Scope* script_scope); |
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 = false); |
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 Isolate* isolate() const { return isolate_; } | 98 Isolate* isolate() const { return isolate_; } |
99 Zone* zone() const { return zone_; } | 99 Zone* zone() const { return zone_; } |
100 | 100 |
101 // --------------------------------------------------------------------------- | 101 // --------------------------------------------------------------------------- |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 Scope* outer_scope, | 700 Scope* outer_scope, |
701 Handle<ScopeInfo> scope_info); | 701 Handle<ScopeInfo> scope_info); |
702 | 702 |
703 AstValueFactory* ast_value_factory_; | 703 AstValueFactory* ast_value_factory_; |
704 Zone* zone_; | 704 Zone* zone_; |
705 }; | 705 }; |
706 | 706 |
707 } } // namespace v8::internal | 707 } } // namespace v8::internal |
708 | 708 |
709 #endif // V8_SCOPES_H_ | 709 #endif // V8_SCOPES_H_ |
OLD | NEW |