Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mono] Add basic ref struct support for generic parameter #99081

Merged
merged 19 commits into from
Mar 13, 2024

Conversation

fanyang-mono
Copy link
Member

@fanyang-mono fanyang-mono commented Feb 28, 2024

Fixes #94421. Fixes #99165
Contributes to #94415

This PR enables ref struct type being used in generic parameters and added/fixed exceptions being thrown when ref struct type being used with box/newobj/static field by Mono JIT/AOT/interpreter.

Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

I'm very pleasantly surprised it's such a small change

src/mono/mono/metadata/class.c Outdated Show resolved Hide resolved
src/mono/mono/metadata/object-internals.h Outdated Show resolved Hide resolved
@fanyang-mono fanyang-mono reopened this Mar 1, 2024
@AaronRobinsonMSFT
Copy link
Member

@fanyang-mono The CoreCLR support, along with more tests, was merged with #98070. We should merge in main and remove the disabled test attributes.

@fanyang-mono
Copy link
Member Author

This PR is ready to be reviewed agian. @lambdageek

@fanyang-mono
Copy link
Member Author

CI failures are not related to this PR.

Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the generic instance check for load/store static fields

src/mono/mono/mini/method-to-ir.c Outdated Show resolved Hide resolved
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks Fan!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants