-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Remove usage of Precode::GetPrecodeFromEntryPoint
in WASM.
#120583
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
base: main
Are you sure you want to change the base?
Remove usage of Precode::GetPrecodeFromEntryPoint
in WASM.
#120583
Conversation
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 removes the usage of Precode::GetPrecodeFromEntryPoint
in WebAssembly (WASM) to address compilation issues. The changes restructure code around precode management and code versioning features to make them conditional based on whether portable entrypoints are enabled.
Key changes:
- Conditionally compile precode-related code based on
FEATURE_PORTABLE_ENTRYPOINTS
- Wrap code versioning functionality with
FEATURE_CODE_VERSIONING
ifdefs - Update build configuration to only enable code versioning when tiered compilation is enabled
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/vm/stubmgr.h | Wraps PrecodeStubManager class definition with FEATURE_PORTABLE_ENTRYPOINTS ifdef |
src/coreclr/vm/stubmgr.cpp | Conditionally compiles PrecodeStubManager implementation and DAC enumeration |
src/coreclr/vm/proftoeeinterfaceimpl.cpp | Wraps code versioning related functionality with FEATURE_CODE_VERSIONING ifdefs |
src/coreclr/vm/prestub.cpp | Adds conditional compilation for precode operations and code versioning features |
src/coreclr/vm/precode_portable.hpp | Removes GetPrecodeFromEntryPoint method declaration |
src/coreclr/vm/precode_portable.cpp | Removes GetPrecodeFromEntryPoint method implementation |
src/coreclr/vm/methodtablebuilder.cpp | Removes a debugging assertion |
src/coreclr/vm/method.hpp | Conditionally compiles precode and code versioning related methods |
src/coreclr/vm/method.cpp | Wraps various method implementations with appropriate feature ifdefs |
src/coreclr/vm/jitinterface.cpp | Conditionally compiles precode-related function entry point logic |
src/coreclr/vm/interpexec.cpp | Refactors prestub checking logic and fixes formatting |
src/coreclr/vm/dllimportcallback.h | Improves conditional compilation logic for interpreter features |
src/coreclr/vm/dllimport.cpp | Adds assertion for unsupported vararg P/Invoke with portable entrypoints |
src/coreclr/vm/datadescriptor/datadescriptor.inc | Conditionally includes code versioning data descriptors |
src/coreclr/vm/comdelegate.cpp | Wraps precode-related delegate conversion logic |
src/coreclr/vm/codeversion.h | Fixes endif comment formatting |
src/coreclr/vm/ceemain.cpp | Conditionally initializes CodeVersionManager |
src/coreclr/vm/ceeload.inl | Wraps IL code versioning lookup method |
src/coreclr/vm/ceeload.h | Conditionally compiles IL code versioning state mapping |
src/coreclr/vm/ceeload.cpp | Conditionally allocates memory for IL code versioning maps |
src/coreclr/vm/appdomain.cpp | Conditionally initializes PrecodeStubManager |
src/coreclr/clrdefinitions.cmake | Moves FEATURE_CODE_VERSIONING definition to tiered compilation section |
pMD->GetTemporaryEntryPoint() && // The prestub may not yet be ready to be used, so force temporary entry point creation, and check again. | ||
!pMD->IsPointingToPrestub()) | ||
return; | ||
// The prestub may not yet be ready to be used, so force temporary entry point creation, and check again. |
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.
We do a simple IsPointingToPrestub
check in other places as DoPrestub skipping optimization, e.g. ReflectionInvocation_CompileMethod
. If the correct way to do the prestub skipping is this, we have bugs in the other places.
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 fully understand this multi-step process either. @davidwrighton wrote this check originally. I simply didn't care for the complex checks in a predicate so rewrote it.
This inserted ifdefs and reorganizes things to remove usage of
Precode::GetPrecodeFromEntryPoint
in WASM.This removes the issue described in #120319