Index: src/full-codegen/mips/full-codegen-mips.cc |
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc |
index e2259dfa33d75fb3731edabc514d434faf3720d1..0d5cc7c9ec18ca46c38f58d6b0d46031c387041a 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -3003,8 +3003,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()); |
+ __ lw(result_register(), |
+ FieldMemOperand(result_register(), HeapObject::kMapOffset)); |
+ __ lw(result_register(), |
+ FieldMemOperand(result_register(), Map::kPrototypeOffset)); |
+ __ Push(result_register()); |
// Push the arguments ("left-to-right") on the stack. |
ZoneList<Expression*>* args = expr->arguments(); |