Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 1a594ec043e043c4a8da82f45ae78799d467c554..e6fecdd342e4b501fdd482b49c396032e1754a70 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -2867,13 +2867,6 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
} |
-void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* expr) { |
- DCHECK(super_ref != NULL); |
- __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
- __ CallRuntime(Runtime::kGetPrototype, 1); |
-} |
- |
- |
void FullCodeGenerator::VisitCall(Call* expr) { |
#ifdef DEBUG |
// We want to verify that RecordJSReturnSite gets called on all paths |
@@ -2983,7 +2976,9 @@ void FullCodeGenerator::VisitCall(Call* expr) { |
} |
} else if (call_type == Call::SUPER_CALL) { |
SuperReference* super_ref = callee->AsSuperReference(); |
- EmitLoadSuperConstructor(super_ref); |
+ DCHECK(super_ref != NULL); |
+ __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
+ __ CallRuntime(Runtime::kGetPrototype, 1); |
__ Push(result_register()); |
VisitForStackValue(super_ref->this_var()); |
EmitCall(expr, CallICState::METHOD); |
@@ -3014,12 +3009,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
// Push constructor on the stack. If it's not a function it's used as |
// receiver for CALL_NON_FUNCTION, otherwise the value on the stack is |
// ignored. |
- if (expr->expression()->IsSuperReference()) { |
- EmitLoadSuperConstructor(expr->expression()->AsSuperReference()); |
- __ Push(result_register()); |
- } else { |
- VisitForStackValue(expr->expression()); |
- } |
+ VisitForStackValue(expr->expression()); |
// Push the arguments ("left-to-right") on the stack. |
ZoneList<Expression*>* args = expr->arguments(); |