Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 3cbdaca6fd0585736ca9d869f1551859e7fe6d78..afbd45c3ec0db0b8639a5bbad92a2322f76f26b0 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -762,15 +762,8 @@ void FullCodeGenerator::VisitVariableDeclaration( |
__ Push(variable->name()); |
// Declaration nodes are always introduced in one of four modes. |
DCHECK(IsDeclaredVariableMode(mode)); |
- // Push initial value, if any. |
- // Note: For variables we must not push an initial value (such as |
- // 'undefined') because we may have a (legal) redeclaration and we |
- // must not destroy the current value. |
- if (hole_init) { |
- __ PushRoot(Heap::kTheHoleValueRootIndex); |
- } else { |
- __ Push(Smi::FromInt(0)); // Indicates no initial value. |
- } |
+ DCHECK(!hole_init); |
+ __ Push(Smi::FromInt(0)); // Indicates no initial value. |
__ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
__ CallRuntime(Runtime::kDeclareLookupSlot); |
PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |