Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index fb566d1dd1fb4231730cc2856b0a382c4415d5cd..b8b5d1b15810713059e627fbbfc9899a1998f860 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -4239,14 +4239,17 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
__ Set(eax, Immediate(instr->arity())); |
__ mov(ebx, instr->hydrogen()->property_cell()); |
ElementsKind kind = instr->hydrogen()->elements_kind(); |
+ bool disable_allocation_sites = |
+ (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE); |
+ |
if (instr->arity() == 0) { |
- ArrayNoArgumentConstructorStub stub(kind); |
+ ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites); |
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
} else if (instr->arity() == 1) { |
- ArraySingleArgumentConstructorStub stub(kind); |
+ ArraySingleArgumentConstructorStub stub(kind, disable_allocation_sites); |
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
} else { |
- ArrayNArgumentsConstructorStub stub(kind); |
+ ArrayNArgumentsConstructorStub stub(kind, disable_allocation_sites); |
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
} |
} |