Index: src/variables.h |
diff --git a/src/variables.h b/src/variables.h |
index e23e00bd38081da8a1805955230859e52644615f..732deb54aae272fd7d92c35357ba415207e0bac2 100644 |
--- a/src/variables.h |
+++ b/src/variables.h |
@@ -77,7 +77,8 @@ class Variable: public ZoneObject { |
Handle<String> name, |
VariableMode mode, |
bool is_valid_lhs, |
- Kind kind); |
+ Kind kind, |
+ InitializationFlag initialization_flag_); |
Jakob Kummerow
2011/10/31 12:44:34
nit: no trailing underscore
Steven
2011/10/31 14:28:29
Done.
|
// Printing support |
static const char* Mode2String(VariableMode mode); |
@@ -123,9 +124,7 @@ class Variable: public ZoneObject { |
mode_ == CONST_HARMONY); |
} |
bool binding_needs_init() const { |
- return (mode_ == LET || |
- mode_ == CONST || |
- mode_ == CONST_HARMONY); |
+ return initialization_flag_ == NEEDS_INITIALIZATION; |
} |
bool is_global() const; |
@@ -148,6 +147,9 @@ class Variable: public ZoneObject { |
Location location() const { return location_; } |
int index() const { return index_; } |
+ InitializationFlag initialization_flag() const { |
+ return initialization_flag_; |
+ } |
void AllocateTo(Location location, int index) { |
location_ = location; |
@@ -174,6 +176,7 @@ class Variable: public ZoneObject { |
// Usage info. |
bool is_accessed_from_inner_scope_; // set by variable resolver |
bool is_used_; |
+ InitializationFlag initialization_flag_; |
}; |