Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index afe2ab6d2587f181e13c8b996c3cce4947e3190a..fe7ad4bb580c178b82a9581862cb81d5f7d31af3 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -2727,8 +2727,15 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
expr->expression()->AsSuperCallReference(); |
DCHECK_NOT_NULL(super_call_ref); |
- EmitLoadSuperConstructor(super_call_ref); |
- __ push(result_register()); |
+ // Push the super constructor target on the stack (may be null, |
+ // but the Construct builtin can deal with that properly). |
+ VisitForAccumulatorValue(super_call_ref->this_function_var()); |
+ __ AssertFunction(result_register()); |
+ __ Ldr(result_register(), |
+ FieldMemOperand(result_register(), HeapObject::kMapOffset)); |
+ __ Ldr(result_register(), |
+ FieldMemOperand(result_register(), Map::kPrototypeOffset)); |
+ __ Push(result_register()); |
// Push the arguments ("left-to-right") on the stack. |
ZoneList<Expression*>* args = expr->arguments(); |