| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index eeef0e94e84ba17d6c0063b76eb9cf15b0b637be..0689a31f829b28c3969db4fc4eab4241d184cb63 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -2271,9 +2271,22 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
| __ Set(rax, arg_count);
|
| __ movq(rdi, Operand(rsp, arg_count * kPointerSize));
|
|
|
| - Handle<Code> construct_builtin =
|
| - isolate()->builtins()->JSConstructCall();
|
| - __ Call(construct_builtin, RelocInfo::CONSTRUCT_CALL);
|
| + // Record call targets in unoptimized code, but not in the snapshot.
|
| + CallFunctionFlags flags;
|
| + if (!Serializer::enabled()) {
|
| + flags = RECORD_CALL_TARGET;
|
| + Handle<Object> uninitialized =
|
| + TypeFeedbackCells::UninitializedSentinel(isolate());
|
| + Handle<JSGlobalPropertyCell> cell =
|
| + isolate()->factory()->NewJSGlobalPropertyCell(uninitialized);
|
| + RecordTypeFeedbackCell(expr->id(), cell);
|
| + __ Move(rbx, cell);
|
| + } else {
|
| + flags = NO_CALL_FUNCTION_FLAGS;
|
| + }
|
| +
|
| + CallConstructStub stub(flags);
|
| + __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
|
| context()->Plug(rax);
|
| }
|
|
|
|
|