Skip to content

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Oct 9, 2025

This inserted ifdefs and reorganizes things to remove usage of Precode::GetPrecodeFromEntryPoint in WASM.

Fixes #120319

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 11.0.0 milestone Oct 9, 2025
@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 23:35
@AaronRobinsonMSFT AaronRobinsonMSFT added arch-wasm WebAssembly architecture area-VM-coreclr labels Oct 9, 2025
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link
Member

@radekdoulik radekdoulik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for resolving this. It is great that it also disables few more areas.

I will recheck it with the interpreter tests and let you know in #120319

@radekdoulik radekdoulik enabled auto-merge (squash) October 15, 2025 07:28
@radekdoulik radekdoulik disabled auto-merge October 15, 2025 07:29
Update ShouldCallPrestub for NULL to return TRUE.
@AaronRobinsonMSFT AaronRobinsonMSFT enabled auto-merge (squash) October 15, 2025 17:44
@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 7f5cd02 into dotnet:main Oct 15, 2025
97 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the runtime_wasm_cleanup branch October 15, 2025 22:34
kotlarmilos added a commit to kotlarmilos/runtime that referenced this pull request Oct 16, 2025
kotlarmilos added a commit to kotlarmilos/runtime that referenced this pull request Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-VM-coreclr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[wasm][coreclr] bc.GenericVirtualMethod<string> failing in the interpreter test

3 participants