Skip to content

Commit 5775ba1

Browse files
committed
[MERGE #5258 @pleath] OS#17497699: Re-enable pinning of types referenced in monomorphic property guards
Merge pull request #5258 from pleath:17497699 This was accidentally disabled in the polymorphic type guards change. Equivalent type checks will clear references to collected types, types used in monomorphic checks must be pinned at jit time.
2 parents 40d261b + 9018aae commit 5775ba1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Backend/Lower.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7573,9 +7573,10 @@ Lowerer::GenerateCachedTypeCheck(IR::Instr *instrChk, IR::PropertySymOpnd *prope
75737573
// as long as there are other objects with types equivalent on the properties referenced by this code. The type is kept alive until entry point
75747574
// installation by the JIT transfer data, and after that by the equivalent type cache, so it will stay alive unless or until it gets evicted
75757575
// from the cache.
7576-
if (directCheckType != nullptr)
7576+
if (!doEquivTypeCheck)
75777577
{
7578-
PinTypeRef(directCheckType, directCheckType.t, instrChk, propertySymOpnd->m_sym->AsPropertySym()->m_propertyId);
7578+
Assert(monoType != nullptr);
7579+
PinTypeRef(monoType, monoType.t, instrChk, propertySymOpnd->m_sym->AsPropertySym()->m_propertyId);
75797580
}
75807581

75817582
return typeOpnd;

0 commit comments

Comments
 (0)