Uh oh!
There was an error while loading. Please reload this page.
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Add back some accidentally removed code.
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AaronRobinsonMSFT
commented
Aug 28, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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
Uh oh!
There was an error while loading. Please reload this page.
AaronRobinsonMSFT
commented
Aug 29, 2025
/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_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.