Skip to content

Commit e77fd8b

Browse files
committed
CR feedback
1 parent 0e0763e commit e77fd8b

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

lib/Backend/IR.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,14 +1186,13 @@ Instr::ReplaceBailOutInfo(BailOutInfo *newBailOutInfo, BasicBlock * block)
11861186
if (oldBailOutInfo->bailOutInstr == this)
11871187
{
11881188
JitArenaAllocator * alloc = this->m_func->m_alloc;
1189-
// If the oldBailOutInfo's captured values were cached on the globopt-block-data,
1190-
// make a deep copy of the lists in the captured values on the block data.
1191-
if (block && block->globOptData.capturedValuesCandidate == &oldBailOutInfo->capturedValues)
1189+
// If the oldBailOutInfo's captured values were cached on the globopt-block-data, don't
1190+
// delete the old bailout info. It will eventually be freed when we're done jitting this function.
1191+
if (!(block && block->globOptData.capturedValuesCandidate == &oldBailOutInfo->capturedValues))
11921192
{
1193-
block->globOptData.capturedValuesCandidate = oldBailOutInfo->capturedValues.Clone(block->globOptData.GetGlobOptAllocator());
1193+
oldBailOutInfo->Clear(alloc);
1194+
JitAdelete(alloc, oldBailOutInfo);
11941195
}
1195-
oldBailOutInfo->Clear(alloc);
1196-
JitAdelete(alloc, oldBailOutInfo);
11971196
}
11981197

11991198
return;

0 commit comments

Comments
 (0)