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 f50b0d0896e3c66466147d53c1e8ae8f92f98acb..b4abf20894c1edeeb5faddc6ad37b1fac804d4e0 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -759,13 +759,10 @@ void FullCodeGenerator::VisitVariableDeclaration( |
case VariableLocation::LOOKUP: { |
Comment cmnt(masm_, "[ VariableDeclaration"); |
- __ Push(variable->name()); |
- // Declaration nodes are always introduced in one of four modes. |
- DCHECK(IsDeclaredVariableMode(mode)); |
+ DCHECK_EQ(VAR, mode); |
DCHECK(!hole_init); |
- __ Push(Smi::FromInt(0)); // Indicates no initial value. |
- __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
- __ CallRuntime(Runtime::kDeclareLookupSlot); |
+ __ Push(variable->name()); |
+ __ CallRuntime(Runtime::kDeclareEvalVar); |
PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
break; |
} |
@@ -819,8 +816,7 @@ void FullCodeGenerator::VisitFunctionDeclaration( |
Comment cmnt(masm_, "[ FunctionDeclaration"); |
PushOperand(variable->name()); |
VisitForStackValue(declaration->fun()); |
- PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
- CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
+ CallRuntimeWithOperands(Runtime::kDeclareEvalFunction); |
PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
break; |
} |