Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index 93ea2c0e2a28ef5b2d8e88a9142b4d98000eb200..c4d0a0615cc5c901fff102dc729bda1751e68554 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -2887,8 +2887,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()); |
+ __ mov(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(); |