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

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: 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') | test/cctest/test-parsing.cc » ('J')
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..e6c2086818fe89be51687d9e31ac531ba28ee9fd 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -80,7 +80,13 @@ 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 is_assigned_in_inner_function() {
titzer 2014/06/23 13:03:19 may_be_assigned_in_inner_function() ?
rossberg 2014/06/24 13:40:43 Done.
+ return is_assigned_in_inner_function_;
+ }
+ void set_is_assigned_in_inner_function() {
+ is_assigned_in_inner_function_ = true;
+ }
int initializer_position() { return initializer_position_; }
void set_initializer_position(int pos) { initializer_position_ = pos; }
@@ -155,6 +161,7 @@ class Variable: public ZoneObject {
// Usage info.
bool force_context_allocation_; // set by variable resolver
bool is_used_;
+ bool is_assigned_in_inner_function_;
InitializationFlag initialization_flag_;
// Module type info.
« no previous file with comments | « src/scopes.cc ('k') | src/variables.cc » ('j') | test/cctest/test-parsing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698