| 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 e460ac3220523de43e0792d03a4a7646a548bd2a..bcae5563e58f36c86b2e8006b6b82e3344a1a75d 100644
|
| --- a/src/full-codegen/arm64/full-codegen-arm64.cc
|
| +++ b/src/full-codegen/arm64/full-codegen-arm64.cc
|
| @@ -2910,6 +2910,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
| CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
|
| __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
|
| PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
|
| + // Restore context register.
|
| + __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| context()->Plug(x0);
|
| }
|
|
|
| @@ -2959,6 +2961,8 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
|
|
|
| RecordJSReturnSite(expr);
|
|
|
| + // Restore context register.
|
| + __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| context()->Plug(x0);
|
| }
|
|
|
| @@ -3883,9 +3887,10 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
|
| CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
|
| __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
|
|
|
| - __ Drop(1);
|
| + // Restore context register.
|
| + __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
|
|
| - context()->Plug(result_register());
|
| + context()->DropAndPlug(1, x0);
|
| }
|
|
|
|
|
|
|