Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index b4deec0a60f6a534d40ccb5e588f74af53929968..8de2bffef83dfd29705693c297e11d7a5f6d5f38 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -3194,6 +3194,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. |
+ __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
context()->Plug(r3); |
} |
@@ -3243,6 +3245,8 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
RecordJSReturnSite(expr); |
+ // Restore context register. |
+ __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
context()->Plug(r3); |
} |
@@ -4157,9 +4161,10 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); |
__ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
- __ Drop(1); |
+ // Restore context register. |
+ __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
- context()->Plug(result_register()); |
+ context()->DropAndPlug(1, r3); |
} |