Index: src/scopes.cc |
diff --git a/src/scopes.cc b/src/scopes.cc |
index 41622894a122d5a844788223bcc757f121585009..e999f23f4148afda440d45ef168509dfe69fe86a 100644 |
--- a/src/scopes.cc |
+++ b/src/scopes.cc |
@@ -772,6 +772,15 @@ Scope* Scope::DeclarationScope() { |
} |
+Scope* Scope::TempScope() { |
+ Scope* scope = this; |
+ while (!scope->is_declaration_scope() || scope->is_block_scope()) { |
+ scope = scope->outer_scope(); |
+ } |
+ return scope; |
+} |
+ |
+ |
Handle<ScopeInfo> Scope::GetScopeInfo(Isolate* isolate) { |
if (scope_info_.is_null()) { |
scope_info_ = ScopeInfo::Create(isolate, zone(), this); |