Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 86deac11dd26a51b9d0fa168f44d198b3046e74e..4c019a27684e73b5e4dca4296af794b1d7d015c7 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -2895,8 +2895,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(); |