| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index 33521c6f17dcb320ef955b0d3a4bf1284a9f6938..c7b035fbc501bef7b377742bc4c3d1f373a06f18 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -3155,18 +3155,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(rax, this_var);
|
| - __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
|
| - Label uninitialized_this;
|
| - __ j(equal, &uninitialized_this);
|
| - __ Push(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();
|
| @@ -3203,6 +3191,14 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
|
|
|
| RecordJSReturnSite(expr);
|
|
|
| + Variable* this_var = super_ref->this_var()->var();
|
| + GetVar(rcx, this_var);
|
| + __ CompareRoot(rcx, Heap::kTheHoleValueRootIndex);
|
| + Label uninitialized_this;
|
| + __ j(equal, &uninitialized_this);
|
| + __ Push(this_var->name());
|
| + __ CallRuntime(Runtime::kThrowReferenceError, 1);
|
| + __ bind(&uninitialized_this);
|
|
|
| EmitVariableAssignment(this_var, Token::INIT_CONST);
|
| context()->Plug(rax);
|
|
|