Index: src/ppc/full-codegen-ppc.cc |
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc |
index 455cc1e3fc7f6ac64e5543452f1b170d3368315d..86288cf86237d60fa7324f4dbde29613e96a6ebd 100644 |
--- a/src/ppc/full-codegen-ppc.cc |
+++ b/src/ppc/full-codegen-ppc.cc |
@@ -3384,9 +3384,6 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
expr->expression()->AsSuperCallReference(); |
DCHECK_NOT_NULL(super_call_ref); |
- VariableProxy* new_target_proxy = super_call_ref->new_target_var(); |
- VisitForStackValue(new_target_proxy); |
- |
EmitLoadSuperConstructor(super_call_ref); |
__ push(result_register()); |
@@ -3401,6 +3398,10 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
// constructor invocation. |
SetConstructCallPosition(expr); |
+ // Load original constructor into r7. |
+ VisitForAccumulatorValue(super_call_ref->new_target_var()); |
+ __ mr(r7, result_register()); |
+ |
// Load function and argument count into r1 and r0. |
__ mov(r3, Operand(arg_count)); |
__ LoadP(r4, MemOperand(sp, arg_count * kPointerSize)); |
@@ -3421,8 +3422,6 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
__ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
- __ Drop(1); |
- |
RecordJSReturnSite(expr); |
EmitInitializeThisAfterSuper(super_call_ref, expr->CallFeedbackICSlot()); |
@@ -4343,6 +4342,9 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
__ mr(r4, result_register()); |
__ Push(r4); |
+ // Load original constructor into r7. |
+ __ LoadP(r7, MemOperand(sp, 1 * kPointerSize)); |
+ |
// Check if the calling frame is an arguments adaptor frame. |
Label adaptor_frame, args_set_up, runtime; |
__ LoadP(r5, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |