From f852f56cb285e1e54be09f5cc9e6401520b85147 Mon Sep 17 00:00:00 2001 From: mbrandy Date: Wed, 9 Sep 2015 13:34:37 -0700 Subject: [PATCH] PPC: Fix "Desugar %DefaultConstructorCallSuper partially in parser." R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com BUG= Review URL: https://codereview.chromium.org/1303333009 Cr-Commit-Position: refs/heads/master@{#30666} --- src/full-codegen/ppc/full-codegen-ppc.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc index 35d03cc566..6a2f1480bc 100644 --- a/src/full-codegen/ppc/full-codegen-ppc.cc +++ b/src/full-codegen/ppc/full-codegen-ppc.cc @@ -4112,9 +4112,13 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); - // Evaluate new.target and super constructor. + // Evaluate new.target. VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); + + // Evaluate super constructor (to stack and r4). + VisitForAccumulatorValue(args->at(1)); + __ push(result_register()); + __ mr(r4, result_register()); // Load original constructor into r7. __ LoadP(r7, MemOperand(sp, 1 * kPointerSize));