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

Unified Diff: src/scopes.cc

Issue 7399023: Pass isolate to AST ID functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A bit less ugly Created 9 years, 5 months 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
« no previous file with comments | « src/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index f25f5a359325d29c6f5a5a43b50128bca342a4f6..390a0b6e11ba8f1ccd4081fda789f582c8bc1554 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -304,7 +304,7 @@ void Scope::Initialize(bool inside_with) {
Variable::VAR,
false,
Variable::THIS);
- var->set_rewrite(new(isolate_->zone()) Slot(var, Slot::PARAMETER, -1));
+ var->set_rewrite(NewSlot(var, Slot::PARAMETER, -1));
receiver_ = var;
}
@@ -350,7 +350,7 @@ Variable* Scope::LocalLookup(Handle<String> name) {
Variable* var =
variables_.Declare(this, name, mode, true, Variable::NORMAL);
- var->set_rewrite(new(isolate_->zone()) Slot(var, Slot::CONTEXT, index));
+ var->set_rewrite(NewSlot(var, Slot::CONTEXT, index));
return var;
}
@@ -407,8 +407,8 @@ VariableProxy* Scope::NewUnresolved(Handle<String> name,
// the same name because they may be removed selectively via
// RemoveUnresolved().
ASSERT(!already_resolved());
- VariableProxy* proxy =
- new(isolate_->zone()) VariableProxy(name, false, inside_with, position);
+ VariableProxy* proxy = new(isolate_->zone()) VariableProxy(
+ isolate_, name, false, inside_with, position);
unresolved_.Add(proxy);
return proxy;
}
@@ -708,7 +708,7 @@ Variable* Scope::NonLocal(Handle<String> name, Variable::Mode mode) {
// Declare a new non-local.
var = map->Declare(NULL, name, mode, true, Variable::NORMAL);
// Allocate it by giving it a dynamic lookup.
- var->set_rewrite(new(isolate_->zone()) Slot(var, Slot::LOOKUP, -1));
+ var->set_rewrite(NewSlot(var, Slot::LOOKUP, -1));
}
return var;
}
@@ -964,14 +964,12 @@ bool Scope::HasArgumentsParameter() {
void Scope::AllocateStackSlot(Variable* var) {
- var->set_rewrite(
- new(isolate_->zone()) Slot(var, Slot::LOCAL, num_stack_slots_++));
+ var->set_rewrite(NewSlot(var, Slot::LOCAL, num_stack_slots_++));
}
void Scope::AllocateHeapSlot(Variable* var) {
- var->set_rewrite(
- new(isolate_->zone()) Slot(var, Slot::CONTEXT, num_heap_slots_++));
+ var->set_rewrite(NewSlot(var, Slot::CONTEXT, num_heap_slots_++));
}
@@ -1024,7 +1022,7 @@ void Scope::AllocateParameterLocals() {
} else {
ASSERT(var->rewrite() == NULL || var->IsParameter());
if (var->rewrite() == NULL) {
- var->set_rewrite(new(isolate_->zone()) Slot(var, Slot::PARAMETER, i));
+ var->set_rewrite(NewSlot(var, Slot::PARAMETER, i));
}
}
}
« no previous file with comments | « src/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698