Chromium Code Reviews| Index: src/arm64/full-codegen-arm64.cc |
| diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
| index ad8bb90947a77802b7c952fe0ddbcd6e32264cfb..d023a609a49f0930c11971ee6e18fb113f3094e2 100644 |
| --- a/src/arm64/full-codegen-arm64.cc |
| +++ b/src/arm64/full-codegen-arm64.cc |
| @@ -3074,9 +3074,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()); |
| @@ -3091,6 +3088,10 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| // constructor invocation. |
| SetConstructCallPosition(expr); |
| + // Load original constructor into x4. |
| + VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| + __ mov(x4, result_register()); |
|
jbramley
2015/07/14 16:57:35
We prefer the MacroAssembler's "__ Mov(...)" in AR
Michael Starzinger
2015/07/15 07:36:36
Done. One of these days I am gonna remember that,
|
| + |
| // Load function and argument count into x1 and x0. |
| __ Mov(x0, arg_count); |
| __ Peek(x1, arg_count * kXRegSize); |
| @@ -3111,8 +3112,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()); |
| @@ -4043,6 +4042,9 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
| __ CallRuntime(Runtime::kGetPrototype, 1); |
| __ Push(result_register()); |
| + // Load original constructor into x4. |
| + __ Peek(x4, 1 * kPointerSize); |
| + |
| // Check if the calling frame is an arguments adaptor frame. |
| Label adaptor_frame, args_set_up, runtime; |
| __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |