Index: src/scopes.h |
=================================================================== |
--- src/scopes.h (revision 7161) |
+++ src/scopes.h (working copy) |
@@ -104,6 +104,9 @@ |
// doesn't re-allocate variables repeatedly. |
static bool Analyze(CompilationInfo* info); |
+ static Scope* DeserializeScopeChain(CompilationInfo* info, |
+ Scope* innermost_scope); |
+ |
// The scope name is only used for printing/debugging. |
void SetScopeName(Handle<String> scope_name) { scope_name_ = scope_name; } |
@@ -313,14 +316,6 @@ |
explicit Scope(Type type); |
- void InsertAfterScope(Scope* scope) { |
- inner_scopes_.Add(scope); |
- outer_scope_ = scope->outer_scope_; |
- outer_scope_->inner_scopes_.RemoveElement(scope); |
- outer_scope_->inner_scopes_.Add(this); |
- scope->outer_scope_ = this; |
- } |
- |
// Scope tree. |
Scope* outer_scope_; // the immediately enclosing outer scope, or NULL |
ZoneList<Scope*> inner_scopes_; // the immediately enclosed inner scopes |
@@ -413,6 +408,13 @@ |
private: |
Scope(Scope* inner_scope, SerializedScopeInfo* scope_info); |
+ void AddInnerScope(Scope* inner_scope) { |
+ if (inner_scope != NULL) { |
+ inner_scopes_.Add(inner_scope); |
+ inner_scope->outer_scope_ = this; |
+ } |
+ } |
+ |
void SetDefaults(Type type, |
Scope* outer_scope, |
SerializedScopeInfo* scope_info) { |