Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index c1615c985c5e382dd844b3f1eb5b5139dc8e7bbd..3ec79b244574b5378a8864e87a1e415d97b16bc9 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -2956,20 +2956,9 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
GetVar(result_register(), new_target_var); |
__ Push(result_register()); |
- SuperReference* super_ref = expr->expression()->AsSuperReference(); |
EmitLoadSuperConstructor(); |
__ push(result_register()); |
- Variable* this_var = super_ref->this_var()->var(); |
- |
- GetVar(x0, this_var); |
- Label uninitialized_this; |
- __ JumpIfRoot(x0, Heap::kTheHoleValueRootIndex, &uninitialized_this); |
- __ Mov(x0, Operand(this_var->name())); |
- __ Push(x0); |
- __ 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(); |
@@ -3005,6 +2994,16 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
RecordJSReturnSite(expr); |
+ SuperReference* super_ref = expr->expression()->AsSuperReference(); |
+ Variable* this_var = super_ref->this_var()->var(); |
+ GetVar(x1, this_var); |
+ Label uninitialized_this; |
+ __ JumpIfRoot(x1, Heap::kTheHoleValueRootIndex, &uninitialized_this); |
+ __ Mov(x0, Operand(this_var->name())); |
+ __ Push(x0); |
+ __ CallRuntime(Runtime::kThrowReferenceError, 1); |
+ __ bind(&uninitialized_this); |
+ |
EmitVariableAssignment(this_var, Token::INIT_CONST); |
context()->Plug(x0); |
} |