-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Portable EntryPoint feature #119178
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
Portable EntryPoint feature #119178
Conversation
This new feature will be for portable method entry points. For example, platforms that are unable to allocation executable memory (that is, WASM).
Change signatures to TADDR for PortableEntryPoint. Fix up NonVirtualEntry2MethodDesc.
Tagging subscribers to this area: @mangod9 |
Add back some accidentally removed code.
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 the initial foundation for a Portable EntryPoint feature to abstract away execution strategies on platforms that don't allow dynamic code generation. The changes remove WASM-specific code from precode paths and introduce a new PortableEntryPoint
class that can be used across platforms.
Key changes include:
- Introduction of
FEATURE_PORTABLE_ENTRYPOINTS
feature flag and corresponding infrastructure - Creation of new portable entry point implementation with stub methods for precode compatibility
- Refactoring of tiered compilation and interpreter code to work without platform-specific assumptions
- Clean-up of WASM-specific precode code and various runtime feature conditionals
Reviewed Changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/vm/wasm/cgencpu.h | Removes WASM-specific precode feature definitions |
src/coreclr/vm/util.hpp | Changes EEThreadId from void pointer to SIZE_T for better type safety |
src/coreclr/vm/tieredcompilation.h/.cpp | Moves IsTieringDelayActive method outside feature guards for broader availability |
src/coreclr/vm/precode_portable.hpp/.cpp | Adds new portable entry point implementation with stub methods |
src/coreclr/vm/precode.h/.cpp | Wraps traditional precode code in feature guards and removes WASM-specific code |
src/coreclr/vm/prestub.cpp | Adds portable entry point support for interpreter code paths |
src/coreclr/vm/method.hpp/.cpp | Integrates portable entry points into method descriptor infrastructure |
src/coreclr/vm/jitinterface.cpp | Updates JIT interface to handle portable entry points for interpreted code |
src/coreclr/vm/interpexec.cpp | Updates interpreter execution to work with portable entry points |
src/coreclr/interpreter/interpretershared.h | Minor formatting improvements to struct members |
Various build files | Adds feature flags and build configuration for portable entry points |
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, i don't know these areas super well though so more eyes on it would be good
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!
/ba-g Unrelated WASM on mono failures |
Start implementation of the Portable EntryPoint feature.
Remove all WASM specific code from the precode paths and define out precode types when
FEATURE_PORTABLE_ENTRYPOINT
is defined. This is currently limited to WASM, but is being developed in a WASM agnostic manner.This is only part 1 of the work. All
Precode
stubs that assert need to be removed. The current WASM progress is basically unchanged with these changes, in the sense it has not regressed further.There was also disabling of specific runtime features, which resulted in various clean-up.