Skip to content

Commit

Permalink
don't use write barriers for frozen objects (dotnet#76135)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo authored Sep 26, 2022
1 parent b34abe1 commit 315bdd4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coreclr/jit/gcinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ GCInfo::WriteBarrierForm GCInfo::gcIsWriteBarrierCandidate(GenTreeStoreInd* stor
return WBF_NoBarrier;
}

if (store->Data()->IsIconHandle(GTF_ICON_OBJ_HDL))
{
// Ignore frozen objects
return WBF_NoBarrier;
}

WriteBarrierForm wbf = gcWriteBarrierFormFromTargetAddress(store->Addr());

if (wbf == WBF_BarrierUnknown)
Expand Down

0 comments on commit 315bdd4

Please sign in to comment.