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

Unified Diff: src/ast.cc

Issue 345573002: Infer whether a variable is assigned (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A few more tests Created 6 years, 6 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/ast.h ('k') | src/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index d332f4a3cbcf15c8de64e998896f25b06b31532a..59a99026865e4fde1ca33ef0ba57f67da423778f 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -65,8 +65,7 @@ VariableProxy::VariableProxy(Zone* zone, Variable* var, int position)
name_(var->name()),
var_(NULL), // Will be set by the call to BindTo.
is_this_(var->is_this()),
- is_trivial_(false),
- is_lvalue_(false),
+ is_assigned_(false),
interface_(var->interface()) {
BindTo(var);
}
@@ -81,8 +80,7 @@ VariableProxy::VariableProxy(Zone* zone,
name_(name),
var_(NULL),
is_this_(is_this),
- is_trivial_(false),
- is_lvalue_(false),
+ is_assigned_(false),
interface_(interface) {
// Names must be canonicalized for fast equality checks.
ASSERT(name->IsInternalizedString());
@@ -100,7 +98,7 @@ void VariableProxy::BindTo(Variable* var) {
// eval() etc. Const-ness and variable declarations are a complete mess
// in JS. Sigh...
var_ = var;
- var->set_is_used(true);
+ var->set_is_used();
}
« no previous file with comments | « src/ast.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698