-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[clr-interp] Intrinic handling for Delegate Invoke methods #118406
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
[clr-interp] Intrinic handling for Delegate Invoke methods #118406
Conversation
davidwrighton
commented
Aug 5, 2025
- Add a new opcode
- Add a new invocation method. Note that this needs to have the same copy the CallStubHeader logic as calli, as the target is not consistent from use to use
- Add a new opcode - Add a new invocation method. Note that this needs to have the same copy the CallStubHeader logic as calli, as the target is not consistent from use to use
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 intrinsic handling for delegate Invoke
methods in the CoreCLR interpreter by introducing a specialized execution path for delegate invocations. The changes optimize delegate calls by avoiding generic method dispatch overhead.
Key changes:
- Adds a new
INTOP_CALLDELEGATE
opcode specifically for delegate invoke operations - Implements
InvokeDelegateInvokeMethod
function that handles delegate-specific invocation logic - Updates the compiler to detect and emit the new opcode for delegate invoke methods
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/coreclr/vm/interpexec.cpp | Adds InvokeDelegateInvokeMethod function and INTOP_CALLDELEGATE case handler |
src/coreclr/interpreter/intops.def | Defines the new INTOP_CALLDELEGATE opcode |
src/coreclr/interpreter/compiler.cpp | Updates compiler to detect delegate invoke methods and emit the new opcode |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
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, thank you!
Test failure looks related to the PR:
|