File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -962,7 +962,8 @@ PropertySymOpnd::IsObjectHeaderInlined() const
962
962
bool
963
963
PropertySymOpnd::ChangesObjectLayout () const
964
964
{
965
- JITTypeHolder cachedType = this ->IsMono () ? this ->GetType () : this ->GetFirstEquivalentType ();
965
+ JITTypeHolder cachedType = this ->HasInitialType () ? this ->GetInitialType () :
966
+ this ->IsMono () ? this ->GetType () : this ->GetFirstEquivalentType ();
966
967
967
968
JITTypeHolder finalType = this ->GetFinalType ();
968
969
@@ -987,13 +988,11 @@ PropertySymOpnd::ChangesObjectLayout() const
987
988
// This is the case where the type transition actually occurs. (This is the only case that's detectable
988
989
// during the loop pre-pass, since final types are not in place yet.)
989
990
990
- Assert (cachedType != nullptr && Js::DynamicType::Is (cachedType->GetTypeId ()));
991
-
992
- const JITTypeHandler * cachedTypeHandler = cachedType->GetTypeHandler ();
993
991
const JITTypeHandler * initialTypeHandler = initialType->GetTypeHandler ();
994
992
995
- return cachedTypeHandler->GetInlineSlotCapacity () != initialTypeHandler->GetInlineSlotCapacity () ||
996
- cachedTypeHandler->GetOffsetOfInlineSlots () != initialTypeHandler->GetOffsetOfInlineSlots ();
993
+ // If no final type has been set in the forward pass, then we have no way of knowing how the object shape will evolve here.
994
+ // If the initial type is object-header-inlined, assume that the layout may change.
995
+ return initialTypeHandler->IsObjectHeaderInlinedTypeHandler ();
997
996
}
998
997
999
998
return false ;
You can’t perform that action at this time.
0 commit comments