Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index c9a5648aa1b9a9626bd7a29d4986f57b29c65a93..2da85c8a768552757b9222561ffe2faf9be5bf7e 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -3270,18 +3270,6 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
EmitLoadSuperConstructor(); |
__ push(result_register()); |
- SuperReference* super_ref = expr->expression()->AsSuperReference(); |
- Variable* this_var = super_ref->this_var()->var(); |
- |
- GetVar(r0, this_var); |
- __ CompareRoot(r0, Heap::kTheHoleValueRootIndex); |
- Label uninitialized_this; |
- __ b(eq, &uninitialized_this); |
- __ mov(r0, Operand(this_var->name())); |
- __ Push(r0); |
- __ 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(); |
@@ -3317,6 +3305,17 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
RecordJSReturnSite(expr); |
+ SuperReference* super_ref = expr->expression()->AsSuperReference(); |
+ Variable* this_var = super_ref->this_var()->var(); |
+ GetVar(r1, this_var); |
+ __ CompareRoot(r1, Heap::kTheHoleValueRootIndex); |
+ Label uninitialized_this; |
+ __ b(eq, &uninitialized_this); |
+ __ mov(r0, Operand(this_var->name())); |
+ __ Push(r0); |
+ __ CallRuntime(Runtime::kThrowReferenceError, 1); |
+ __ bind(&uninitialized_this); |
+ |
EmitVariableAssignment(this_var, Token::INIT_CONST); |
context()->Plug(r0); |
} |