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

Unified Diff: src/variables.h

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/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/variables.h
diff --git a/src/variables.h b/src/variables.h
index de209d871d56da5b77588b2eaeeec1ae5b484be5..3d67ff80a421cd332ff8a6a242fede882fc19ff9 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -80,7 +80,9 @@ class Variable: public ZoneObject {
force_context_allocation_ = true;
}
bool is_used() { return is_used_; }
- void set_is_used(bool flag) { is_used_ = flag; }
+ void set_is_used() { is_used_ = true; }
+ bool maybe_assigned() { return maybe_assigned_; }
+ void set_maybe_assigned() { maybe_assigned_ = true; }
int initializer_position() { return initializer_position_; }
void set_initializer_position(int pos) { initializer_position_ = pos; }
@@ -155,6 +157,7 @@ class Variable: public ZoneObject {
// Usage info.
bool force_context_allocation_; // set by variable resolver
bool is_used_;
+ bool maybe_assigned_;
InitializationFlag initialization_flag_;
// Module type info.
« no previous file with comments | « src/scopes.cc ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698