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

Unified Diff: src/scopes.cc

Issue 844006: Merge changes up to V8 version 2.1.3 into the partial snapshots (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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/scopeinfo.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
===================================================================
--- src/scopes.cc (revision 3964)
+++ src/scopes.cc (working copy)
@@ -309,7 +309,7 @@
// which is the current user of this function).
for (int i = 0; i < temps_.length(); i++) {
Variable* var = temps_[i];
- if (var->var_uses()->is_used()) {
+ if (var->is_used()) {
locals->Add(var);
}
}
@@ -317,7 +317,7 @@
p != NULL;
p = variables_.Next(p)) {
Variable* var = reinterpret_cast<Variable*>(p->value);
- if (var->var_uses()->is_used()) {
+ if (var->is_used()) {
locals->Add(var);
}
}
@@ -418,17 +418,16 @@
static void PrintVar(PrettyPrinter* printer, int indent, Variable* var) {
- if (var->var_uses()->is_used() || var->rewrite() != NULL) {
+ if (var->is_used() || var->rewrite() != NULL) {
Indent(indent, Variable::Mode2String(var->mode()));
PrintF(" ");
PrintName(var->name());
PrintF("; // ");
- if (var->rewrite() != NULL) PrintF("%s, ", printer->Print(var->rewrite()));
- if (var->is_accessed_from_inner_scope()) PrintF("inner scope access, ");
- PrintF("var ");
- var->var_uses()->Print();
- PrintF(", obj ");
- var->obj_uses()->Print();
+ if (var->rewrite() != NULL) {
+ PrintF("%s, ", printer->Print(var->rewrite()));
+ if (var->is_accessed_from_inner_scope()) PrintF(", ");
+ }
+ if (var->is_accessed_from_inner_scope()) PrintF("inner scope access");
PrintF("\n");
}
}
@@ -738,10 +737,10 @@
(var->is_accessed_from_inner_scope_ ||
scope_calls_eval_ || inner_scope_calls_eval_ ||
scope_contains_with_)) {
- var->var_uses()->RecordAccess(1);
+ var->set_is_used(true);
}
// Global variables do not need to be allocated.
- return !var->is_global() && var->var_uses()->is_used();
+ return !var->is_global() && var->is_used();
}
@@ -847,7 +846,7 @@
new Literal(Handle<Object>(Smi::FromInt(i))),
RelocInfo::kNoPosition,
Property::SYNTHETIC);
- arguments_shadow->var_uses()->RecordUses(var->var_uses());
+ if (var->is_used()) arguments_shadow->set_is_used(true);
}
}
« no previous file with comments | « src/scopeinfo.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698