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

[interp] break up MINT_LDSTR_TOKEN into two opcodes #88738

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

lambdageek
Copy link
Member

@lambdageek lambdageek commented Jul 12, 2023

MINT_LDSTR_DYNAMIC for dynamic methods. the data item is an index into the DynamicMethod:method.method_data which stores pointers to MonoString objects that are held by the managed DynamicMethod.

MINT_LDSTR_CSTR for ilgen wrappers. the data item is a raw C string that is global, or was allocated by malloc

Fixes #88694 by allowing MINT_LDSTR_CSTR in any method since we no longer depend on mono_method_get_wrapper_data at execution time. And at transform time we have access to the actual wrapper method.

MINT_LDSTR_DYNAMIC for dynamic methods.  the data item is an index
into the DynamicMethod:method.method_data which stores pointers to
MonoString objects that are held by the managed DynamicMethod.

MINT_LDSTR_CSTR for ilgen wrappers. the data item is a raw C string
that is global, or was allocated by malloc

Fixes dotnet#88694 by allowing
MINT_LDSTR_CSTR in any method since we no longer depend on
mono_method_get_wrapper_data at execution time.  And at transform time
we have access to the actual wrapper method.
@ghost
Copy link

ghost commented Jul 12, 2023

Tagging subscribers to this area: @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

MINT_LDSTR_DYNAMIC for dynamic methods. the data item is an index into the DynamicMethod:method.method_data which stores pointers to MonoString objects that are held by the managed DynamicMethod.

MINT_LDSTR_CSTR for ilgen wrappers. the data item is a raw C string that is global, or was allocated by malloc

Fixes #88694 by allowing MINT_LDSTR_CSTR in any method since we no longer depend on mono_method_get_wrapper_data at execution time. And at transform time we have access to the actual wrapper method.

Author: lambdageek
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@lambdageek
Copy link
Member Author

/cc @fanyang-mono this should make #88626 work without the imethod->method = method hack (and probably without mb->method->iflags |= METHOD_IMPL_ATTRIBUTE_NOINLINING, too)

@lewing
Copy link
Member

lewing commented Jul 12, 2023

The wbt failures here appear to be from a new sdk not these changes

@lambdageek lambdageek merged commit 5b4ffc0 into dotnet:main Jul 12, 2023
91 of 98 checks passed
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[interp] inlining a wrapper with a MINT_LDSTR_TOKEN instruction aborts
3 participants