| Index: src/full-codegen/arm64/full-codegen-arm64.cc
|
| diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
|
| index f34b76e2e030fb15a6e4899b030376495e830984..01aa77f8b7aec4053c77588912c0761c74abe577 100644
|
| --- a/src/full-codegen/arm64/full-codegen-arm64.cc
|
| +++ b/src/full-codegen/arm64/full-codegen-arm64.cc
|
| @@ -797,14 +797,11 @@ void FullCodeGenerator::VisitVariableDeclaration(
|
|
|
| case VariableLocation::LOOKUP: {
|
| Comment cmnt(masm_, "[ VariableDeclaration");
|
| - __ Mov(x2, Operand(variable->name()));
|
| - // Declaration nodes are always introduced in one of four modes.
|
| - DCHECK(IsDeclaredVariableMode(mode));
|
| + DCHECK_EQ(VAR, mode);
|
| DCHECK(!hole_init);
|
| - // Pushing 0 (xzr) indicates no initial value.
|
| - __ Push(x2, xzr);
|
| - __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
|
| - __ CallRuntime(Runtime::kDeclareLookupSlot);
|
| + __ Mov(x2, Operand(variable->name()));
|
| + __ Push(x2);
|
| + __ CallRuntime(Runtime::kDeclareEvalVar);
|
| PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
|
| break;
|
| }
|
| @@ -861,8 +858,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
|
| PushOperand(x2);
|
| // Push initial value for function declaration.
|
| VisitForStackValue(declaration->fun());
|
| - PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes()));
|
| - CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
|
| + CallRuntimeWithOperands(Runtime::kDeclareEvalFunction);
|
| PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
|
| break;
|
| }
|
|
|