Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 4050991a387c1b628d48ea0708fc7e753b4d876c..21dd3e87b4e7ba19e44d7bf43b26963d63dc124b 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -2880,8 +2880,13 @@ 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()); |
+ __ movp(result_register(), |
+ FieldOperand(result_register(), HeapObject::kMapOffset)); |
+ __ Push(FieldOperand(result_register(), Map::kPrototypeOffset)); |
// Push the arguments ("left-to-right") on the stack. |
ZoneList<Expression*>* args = expr->arguments(); |