Index: src/variables.cc |
diff --git a/src/variables.cc b/src/variables.cc |
index d85e1b270ab30d452a3db4f84811a73458521c3b..6d85fd827155958da5a8b4e4e7af4957bd98b702 100644 |
--- a/src/variables.cc |
+++ b/src/variables.cc |
@@ -58,7 +58,8 @@ Variable::Variable(Scope* scope, |
Handle<String> name, |
VariableMode mode, |
bool is_valid_LHS, |
- Kind kind) |
+ Kind kind, |
+ InitializationFlag initialization_flag) |
: scope_(scope), |
name_(name), |
mode_(mode), |
@@ -68,9 +69,12 @@ Variable::Variable(Scope* scope, |
local_if_not_shadowed_(NULL), |
is_valid_LHS_(is_valid_LHS), |
is_accessed_from_inner_scope_(false), |
- is_used_(false) { |
- // names must be canonicalized for fast equality checks |
+ is_used_(false), |
+ initialization_flag_(initialization_flag) { |
+ // Names must be canonicalized for fast equality checks. |
ASSERT(name->IsSymbol()); |
+ // Var declared variables never need initialization. |
+ ASSERT(!(mode == VAR && initialization_flag == NEEDS_INITIALIZATION)); |
} |