Commit 359a269a authored by hpayer's avatar hpayer Committed by Commit bot

[crankshaft] There is no guarantee that allocations are folded in Crankshaft.

BUG=chromium:615770
LOG=N

Review-Url: https://codereview.chromium.org/2022743002
Cr-Commit-Position: refs/heads/master@{#36579}
parent 25c2203a
......@@ -5148,10 +5148,13 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object,
HAllocate* allocate = HAllocate::cast(object);
if (allocate->IsAllocationFolded()) {
HValue* dominator = allocate->allocation_folding_dominator();
DCHECK(HAllocate::cast(dominator)->IsAllocationFoldingDominator());
// There is no guarantee that all allocations are folded together because
// GVN performs a fixpoint.
if (HAllocate::cast(dominator)->IsAllocationFoldingDominator()) {
object = dominator;
}
}
}
if (object->IsConstant() &&
HConstant::cast(object)->HasExternalReferenceValue()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment