Skip to content

Commit

Permalink
Merge branch 'jit-static-readonly-field-invariant' of github.com:Egor…
Browse files Browse the repository at this point in the history
…Bo/runtime-1 into jit-static-readonly-field-invariant
  • Loading branch information
EgorBo committed Feb 25, 2021
2 parents a89448e + 61f7ea3 commit 43360d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6492,8 +6492,9 @@ GenTree* Compiler::fgMorphField(GenTree* tree, MorphAddrContext* mac)
if ((info.compCompHnd->getStaticFieldCurrentClass(symHnd, &plsSpeculative) != NO_CLASS_HANDLE) &&
!plsSpeculative)
{
JITDUMP("Marking static read-only field '%s' as invariant.\n", eeGetFieldName(symHnd));
JITDUMP("Marking initialized static read-only field '%s' as invariant.\n", eeGetFieldName(symHnd));
tree->gtFlags |= GTF_IND_INVARIANT;
tree->gtFlags &= ~GTF_ICON_INITCLASS;
addr->gtFlags = GTF_ICON_CONST_PTR;
}

Expand Down

0 comments on commit 43360d3

Please sign in to comment.