Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 0d626bc2f5ce02b105dd13e05630d9ae86c46d9a..eeae10fa0a08fd680696df8681935093367f5dbe 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -2966,7 +2966,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
// Call the construct call builtin that handles allocation and |
// constructor invocation. |
- SetConstructCallPosition(expr); |
+ SetConstructCallPosition(expr, arg_count); |
// Load function and argument count into rdi and rax. |
__ Set(rax, arg_count); |
@@ -3002,7 +3002,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
// Call the construct call builtin that handles allocation and |
// constructor invocation. |
- SetConstructCallPosition(expr); |
+ SetConstructCallPosition(expr, arg_count); |
// Load new target into rcx. |
VisitForAccumulatorValue(super_call_ref->new_target_var()); |
@@ -3748,6 +3748,10 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
VisitForStackValue(args->at(0)); |
VisitForStackValue(args->at(1)); |
+ // Call the construct call builtin that handles allocation and |
+ // constructor invocation. |
+ SetConstructCallPosition(expr, 0); |
+ |
// Check if the calling frame is an arguments adaptor frame. |
Label adaptor_frame, args_set_up, runtime; |
__ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |