-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Make coreclr_initialize
run cleanly for corewasmrun
#119217
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
Conversation
Separate call invokers between JIT compatible interpreter and interpreter with Portable EntryPoints.
/cc @steveisok |
/azp list |
Add simple interpreter managed frame stack walker when native assert fires. This will help debugging asserts in interpreter scenarios.
corewasmrun
corewasmrun
coreclr_initialize
runs cleanly for corewasmrun
coreclr_initialize
runs cleanly for corewasmrun
coreclr_initialize
run cleanly for corewasmrun
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 implements support for making coreclr_initialize
run cleanly for corewasmrun
by separating call invokers between JIT-compatible interpreters and interpreters with Portable EntryPoints. The changes enable proper execution of CoreCLR with the interpreter on WebAssembly platforms.
Key changes:
- Implements separate call invokers for interpreted vs. JIT-compiled methods on WASM
- Adds support for Portable EntryPoints in the JIT helper system
- Introduces WASM-specific calling convention thunks for unmanaged code interop
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/vm/wasm/helpers.cpp | Implements WASM-specific call invokers and calli signature thunks |
src/coreclr/vm/wasm/cgencpu.h | Updates stack element size calculation for interpreter compatibility |
src/coreclr/vm/wasm/calldescrworkerwasm.cpp | Updates call descriptor worker to use Portable EntryPoints |
src/coreclr/vm/threads.cpp | Adds WASM-specific guards for patched helper assertions |
src/coreclr/vm/prestub.cpp | Adds interpreter data handling for IL stubs under Portable EntryPoints |
src/coreclr/vm/precode_portable.hpp | Extends Portable EntryPoint with state query methods and native initialization |
src/coreclr/vm/precode_portable.cpp | Implements new Portable EntryPoint functionality and validation |
src/coreclr/vm/mlinfo.cpp | Adds WASM-specific assertion for stack element size validation |
src/coreclr/vm/jitinterface.h | Updates helper function structure to support Portable EntryPoints |
src/coreclr/vm/jitinterface.cpp | Implements Portable EntryPoint support in JIT helper resolution |
src/coreclr/vm/jithelpers.cpp | Updates helper table structure and dynamic helper loading |
src/coreclr/vm/interpexec.cpp | Refactors call invokers and adds debug stack printing for WASM |
src/coreclr/vm/dllimport.cpp | Ensures vararg P/Invoke methods get precodes |
src/coreclr/vm/callingconvention.h | Updates argument offset calculation for interpreter stack alignment |
src/coreclr/vm/callhelpers.h | Removes unused fields from CallDescrData for WASM |
src/coreclr/vm/callhelpers.cpp | Updates call descriptor data initialization for WASM |
src/coreclr/pal/src/arch/wasm/stubs.cpp | Adds interpreter stack printing to debug break handler |
src/coreclr/inc/regdisp.h | Adds WASM-specific case for context pointer filling |
src/coreclr/debug/ee/controller.cpp | Updates helper function address comparison and logging format |
src/coreclr/debug/daccess/daccess.cpp | Updates helper function address comparison for new structure |
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 (modulo fixes for breaks that I have introduced by the last commit :)
Current output of
corewasmrun
running on Chrome.Fixes #119001