Implement getStaticFieldCurrentClass for NAOT#96982
Implement getStaticFieldCurrentClass for NAOT#96982EgorBo wants to merge 8 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsCloses #96963
|
|
/azp list |
This comment was marked as resolved.
This comment was marked as resolved.
|
/azp run runtime-coreclr outerloop, runtime-coreclr pgo, runtime-coreclr libraries-pgo, runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 4 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| // it can rely on them being invariant too. | ||
| if (fieldDesc.HasRva) | ||
| { | ||
| // Read-only RVA fields need no "is class initialized" check. |
There was a problem hiding this comment.
How do you know that the RVA field is read-only?
There was a problem hiding this comment.
How do you know that the RVA field is read-only?
Can it be not so? I thought RVA can be mutable only for C++/CLI. Here we check that the field is final.
There was a problem hiding this comment.
We have several of these compiler generated RVA fields. Some of them are read-only, some of them are mutable.
Here we check that the field is final.
Where do we check that?
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
| return true; | ||
| } | ||
|
|
||
| private CORINFO_CLASS_STRUCT_* getStaticFieldCurrentClass(CORINFO_FIELD_STRUCT_* field, byte* pIsSpeculative) |
There was a problem hiding this comment.
I'm a bit confused about the expected semantics of this API.
// Return field's exact type if its value is known to be never changed and
// is not null (for reference types). Returns nullptr otherwise.
Like Jan said - we don't check the initonly part - neither for the RVA nor for non-RVA statics. Should this always return null for !initonly?
We also return the type of the field, not the type of the value stored in the field (in the reference type case).
Closes #96963