Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 4b603ddabc20ab10de126c4f04bbfcac3943e086..d7d8438568545fb1b2ea845b6a790887c593ad57 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -3146,19 +3146,9 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
GetVar(eax, new_target_var); |
__ push(eax); |
- SuperReference* super_ref = expr->expression()->AsSuperReference(); |
EmitLoadSuperConstructor(); |
__ push(result_register()); |
- Variable* this_var = super_ref->this_var()->var(); |
- GetVar(eax, this_var); |
- __ cmp(eax, isolate()->factory()->the_hole_value()); |
- Label uninitialized_this; |
- __ j(equal, &uninitialized_this); |
- __ push(Immediate(this_var->name())); |
- __ CallRuntime(Runtime::kThrowReferenceError, 1); |
- __ bind(&uninitialized_this); |
- |
// Push the arguments ("left-to-right") on the stack. |
ZoneList<Expression*>* args = expr->arguments(); |
int arg_count = args->length(); |
@@ -3194,6 +3184,16 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
RecordJSReturnSite(expr); |
+ SuperReference* super_ref = expr->expression()->AsSuperReference(); |
+ Variable* this_var = super_ref->this_var()->var(); |
+ GetVar(ecx, this_var); |
+ __ cmp(ecx, isolate()->factory()->the_hole_value()); |
+ Label uninitialized_this; |
+ __ j(equal, &uninitialized_this); |
+ __ push(Immediate(this_var->name())); |
+ __ CallRuntime(Runtime::kThrowReferenceError, 1); |
+ __ bind(&uninitialized_this); |
+ |
EmitVariableAssignment(this_var, Token::INIT_CONST); |
context()->Plug(eax); |
} |