-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Remove test that sets static readonly field after type initialization #33413
Remove test that sets static readonly field after type initialization #33413
Conversation
dotnet/coreclr#20866 extends the jit to incorporate the type of readonly ref class typed static fields into jitted code when jitting happens after class initialization. For instance, the jit may optimize type tests or devirtualize calls. With the advent of type based jit optimizations we are also blocking reflection based updates to all readonly static fields after class initialization.
Func<PropertyAndFields> func = assignToReadonly.Compile(useInterpreter); | ||
func(); | ||
Assert.Equal("ABC" + useInterpreter, PropertyAndFields.StaticReadonlyStringField); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume both the false
and true
variants of this test fail now (by design) with your change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, no ... the compiled version will still "succeed."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are number of other discrepancies between interpreted and compiled expressions if the expression is invalid. This is just one more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be made consistent if there isn't a very good reason otherwise. I'll hopefully get back into contributing later this year, and I'd be interested in doing it then, but I'm by no means grabbing it if anyone else is interested.
CI showing some flaky failures. Any point in retrying them...? |
Since this is just deleting a test, no need. Thanks. |
LGTM |
…dotnet#33413) dotnet/coreclr#20866 extends the jit to incorporate the type of readonly ref class typed static fields into jitted code when jitting happens after class initialization. For instance, the jit may optimize type tests or devirtualize calls. With the advent of type based jit optimizations we are also blocking reflection based updates to all readonly static fields after class initialization.
…dotnet/corefx#33413) dotnet/coreclrdotnet/corefx#20866 extends the jit to incorporate the type of readonly ref class typed static fields into jitted code when jitting happens after class initialization. For instance, the jit may optimize type tests or devirtualize calls. With the advent of type based jit optimizations we are also blocking reflection based updates to all readonly static fields after class initialization. Commit migrated from dotnet/corefx@4914440
dotnet/coreclr#20866 extends the jit to incorporate the type of readonly ref
class typed static fields into jitted code when jitting happens after class
initialization. For instance, the jit may optimize type tests or devirtualize
calls.
With the advent of type based jit optimizations we are also blocking reflection
based updates to all readonly static fields after class initialization.