Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: src/scopes.h

Issue 5753005: Make closures optimizable by Crankshaft compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index d909b81fc1f420d41ca273e702522c70b015ad2c..df36d038561001039c87c9521c6625f688b11725 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -302,6 +302,14 @@ class Scope: public ZoneObject {
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
@@ -355,6 +363,10 @@ class Scope: public ZoneObject {
int num_stack_slots_;
int num_heap_slots_;
+ // Serialized scopes support.
+ bool resolved_;
+ void MarkAsResolved() { resolved_ = true; }
+
// Create a non-local variable with a given name.
// These variables are looked up dynamically at runtime.
Variable* NonLocal(Handle<String> name, Variable::Mode mode);

Powered by Google App Engine
This is Rietveld 408576698