Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 38999a8e366974a60dc0e931248924b3a23f4c1a..897c4ca1f2069da5c47371bd340fb700ec359407 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -2379,9 +2379,22 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ mov(r0, Operand(arg_count)); |
__ ldr(r1, MemOperand(sp, 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); |
+ __ mov(r2, Operand(cell)); |
+ } else { |
+ flags = NO_CALL_FUNCTION_FLAGS; |
+ } |
+ |
+ CallConstructStub stub(flags); |
+ __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
context()->Plug(r0); |
} |