[clr-interp] Intrinic handling for Delegate Invoke methods#118406
Merged
davidwrighton merged 6 commits intodotnet:mainfrom Aug 7, 2025
Merged
[clr-interp] Intrinic handling for Delegate Invoke methods#118406davidwrighton merged 6 commits intodotnet:mainfrom
davidwrighton merged 6 commits intodotnet:mainfrom
Conversation
Member
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
Contributor
There was a problem hiding this comment.
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_CALLDELEGATEopcode specifically for delegate invoke operations - Implements
InvokeDelegateInvokeMethodfunction 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 <175728472+Copilot@users.noreply.github.com>
kg
reviewed
Aug 5, 2025
kg
approved these changes
Aug 5, 2025
jkotas
reviewed
Aug 5, 2025
jkotas
reviewed
Aug 5, 2025
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
12 tasks
BrzVlad
approved these changes
Aug 6, 2025
Member
|
Test failure looks related to the PR: |
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.