Portable EntryPoint feature#119178
Merged
AaronRobinsonMSFT merged 15 commits intodotnet:mainfrom Aug 29, 2025
Merged
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.
Contributor
|
Tagging subscribers to this area: @mangod9 |
jkotas
reviewed
Aug 28, 2025
jkotas
reviewed
Aug 28, 2025
jkotas
reviewed
Aug 28, 2025
Add back some accidentally removed code.
Contributor
There was a problem hiding this comment.
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_ENTRYPOINTSfeature 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 |
Member
Author
kg
reviewed
Aug 28, 2025
kg
reviewed
Aug 28, 2025
kg
reviewed
Aug 28, 2025
kg
reviewed
Aug 28, 2025
kg
approved these changes
Aug 28, 2025
Member
kg
left a comment
There was a problem hiding this comment.
LGTM, i don't know these areas super well though so more eyes on it would be good
jkotas
reviewed
Aug 28, 2025
Member
Author
|
/ba-g Unrelated WASM on mono failures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start implementation of the Portable EntryPoint feature.
Remove all WASM specific code from the precode paths and define out precode types when
FEATURE_PORTABLE_ENTRYPOINTis 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
Precodestubs 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.