| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 23cc5aba30746445d9fbcacd31cce8907135e944..99a26722bf2def0701deb564e35f3492775cbe5e 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -714,8 +714,8 @@ void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy,
|
| // need to "declare" it at runtime to make sure it actually exists in the
|
| // local context.
|
| Variable* variable = proxy->var();
|
| - bool binding_needs_init =
|
| - mode == CONST || mode == CONST_HARMONY || mode == LET;
|
| + bool binding_needs_init = (function == NULL) &&
|
| + (mode == CONST || mode == CONST_HARMONY || mode == LET);
|
| switch (variable->location()) {
|
| case Variable::UNALLOCATED:
|
| ++(*global_count);
|
|
|