Permalink
Browse files

Force new type check when object ptr copy prop creates a mismatch

  • Loading branch information...
pleath committed Oct 26, 2018
1 parent 93752a1 commit 2c91a28baf1251c00d9201f27ca5e0821344f848
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Backend/GlobOptFields.cpp
@@ -1851,7 +1851,13 @@ GlobOpt::CopyPropPropertySymObj(IR::SymOpnd *symOpnd, IR::Instr *instr)
bool shouldOptimize = CompareCurrentTypesWithExpectedTypes(newValueInfo, propertySymOpnd);
if (!shouldOptimize)
{
propertySymOpnd->SetTypeCheckSeqCandidate(false);
// Force a new type check here. We used to disable optimization for this symbol, but that's
// no longer necessary now that inline caches are not shared.
BVSparse<JitArenaAllocator> *liveFields = this->currentBlock->globOptData.liveFields;
if (liveFields)
{
liveFields->Clear(newTypeSym->m_id);
}
}
}

0 comments on commit 2c91a28

Please sign in to comment.