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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone, | 100 static Scope* DeserializeScopeChain(Isolate* isolate, Zone* zone, |
101 Context* context, Scope* script_scope, | 101 Context* context, Scope* script_scope, |
102 AstValueFactory* ast_value_factory); | 102 AstValueFactory* ast_value_factory); |
103 | 103 |
104 // The scope name is only used for printing/debugging. | 104 // The scope name is only used for printing/debugging. |
105 void SetScopeName(const AstRawString* scope_name) { | 105 void SetScopeName(const AstRawString* scope_name) { |
106 scope_name_ = scope_name; | 106 scope_name_ = scope_name; |
107 } | 107 } |
108 | 108 |
109 void Initialize(); | |
110 void DeclareThis(AstValueFactory* ast_value_factory); | 109 void DeclareThis(AstValueFactory* ast_value_factory); |
111 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory); | 110 void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory); |
112 | 111 |
113 // Checks if the block scope is redundant, i.e. it does not contain any | 112 // Checks if the block scope is redundant, i.e. it does not contain any |
114 // block scoped declarations. In that case it is removed from the scope | 113 // block scoped declarations. In that case it is removed from the scope |
115 // tree and its children are reparented. | 114 // tree and its children are reparented. |
116 Scope* FinalizeBlockScope(); | 115 Scope* FinalizeBlockScope(); |
117 | 116 |
118 // Inserts outer_scope into this scope's scope chain (and removes this | 117 // Inserts outer_scope into this scope's scope chain (and removes this |
119 // from the current outer_scope_'s inner_scopes_). | 118 // from the current outer_scope_'s inner_scopes_). |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 | 827 |
829 void SetDefaults(); | 828 void SetDefaults(); |
830 | 829 |
831 PendingCompilationErrorHandler pending_error_handler_; | 830 PendingCompilationErrorHandler pending_error_handler_; |
832 }; | 831 }; |
833 | 832 |
834 } // namespace internal | 833 } // namespace internal |
835 } // namespace v8 | 834 } // namespace v8 |
836 | 835 |
837 #endif // V8_AST_SCOPES_H_ | 836 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |