-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix INTOP_UNBOX_ANY on wasm #120261
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
Fix INTOP_UNBOX_ANY on wasm #120261
Conversation
Handle IL unbox helpers
Tagging subscribers to this area: @mangod9 |
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.
Pull Request Overview
This PR fixes the INTOP_UNBOX_ANY instruction in the WebAssembly interpreter by adding support for IL unbox helpers. The key changes enable the interpreter to handle cases where unbox operations need to call IL methods rather than native helpers.
- Adds support for executing IL target methods during unbox operations
- Introduces a callback mechanism to handle post-execution cleanup
- Ensures proper initialization of new interpreter frame objects
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/coreclr/vm/interpexec.h | Adds std::function include and delegateBeforeExit member to InterpMethodContextFrame |
src/coreclr/vm/interpexec.cpp | Implements IL unbox helper support with proper frame initialization and cleanup |
If this looks good, I can modify the |
With #120199 in place + changes in this PR we are able to run
|
And with the added calli even the interpolated strings work now. Like
|
Co-authored-by: Aaron Robinson <[email protected]>
Would it make more sense to name the opcodes |
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 don't see anything that absolutely needs to change, so I'm OK with this. Thanks for doing all the work to fix it!
Co-authored-by: Katelyn Gadd <[email protected]>
Thanks for all the feedback, I have opened above issue to address the remaining feedback. |
Handle IL unbox helpers
Split unbox.any into 2 opcodes, by adding unbox.end
Add calli to make interpolated strings work