Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 8d4792ee5d17efd78d2a771ba86b24d21d3b7ccd..d1565cca3567873f451f87ed7eec912a77a2d707 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -687,8 +687,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); |