Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index a29ff82e166506cb7cb87c56544f2df18fb9c55c..7c7ec9f1b4b70dee50adcabbf0365fec08706ff3 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -3203,6 +3203,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(r0); |
} |
@@ -3252,6 +3254,8 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
RecordJSReturnSite(expr); |
+ // Restore context register. |
+ __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
context()->Plug(r0); |
} |
@@ -4154,9 +4158,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, r0); |
} |