This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 508
[Interpreter] Static constructors and field access #8370
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jkotas
reviewed
Oct 24, 2020
src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Oct 24, 2020
src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs
Outdated
Show resolved
Hide resolved
I'm guessing this won't be able to make the cut before the archive? |
jkotas
approved these changes
Oct 30, 2020
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.
LGTM. Thanks!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening this here, since I don't yet have a branch in the runtimelabs repo.
This PR adds support for instance and static fields on a reference type. It interprets the following opcodes:
ldfld
ldsfld
stfld
stsfld
As a consequence of adding static field support, I also added support for interpreting static constructors on dynamically loaded types. The following scenario is now supported:
The interpreter will happily load instance and static fields on both dynamically loaded types and types compiled into the native executable, while ensuring that static constructors have been run in both cases.
Note: Thread statics on dynamically loaded types are currently unsupported
cc @jkotas @MichalStrehovsky