Skip to content

Remove obsolete native managed-invocation machinery - #133660

Open
jkoritzinsky wants to merge 3 commits into
dev/jkoritzinsky/func-eval-ucofrom
dev/jkoritzinsky/invocation-cleanup
Open

jkoritzinsky wants to merge 3 commits into
dev/jkoritzinsky/func-eval-ucofrom
dev/jkoritzinsky/invocation-cleanup

Conversation

@jkoritzinsky

@jkoritzinsky jkoritzinsky commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Layer 4 of the stack for #123864, following #133659. Remove the native machinery whose final callers disappeared in the preceding reflection, custom-attribute, and func-eval layers.

  • Delete MethodDescCallSite, CallDescrData, CallDescrWorker, DispatchCallSimple, and their argument/return-value copying closure.
  • Remove the dedicated per-architecture workers, integrated x86/ARM assembly blocks, build entries, offsets, and return-address identification.
  • Remove unreachable EH branches and simplify the affected prestub/VSD/interpreter dispatcher paths without changing the surviving native-rethrow behavior.
  • Remove orphaned multicore-JIT diagnostic state and its now-unused holder; avoid computing a dead return address/PAC strip in Release builds.
  • Update VM-to-managed calling documentation to describe typed UCO entrypoints.

Retained: live InvokeUtil field/pointer/conversion/exception helpers, UnmanagedCallersOnlyCaller, default-constructor dispatch, ArgDestination GC reporting, profiler/calling-convention logic, and debugger raw-result storage. Historical stack traces are left intact.

The layer removes about 2,900 net lines across 49 files.

Validation

  • Windows x64 and x86 Checked native builds succeeded. The x86 binary was verified as I386 and executed with an architecture-matched CoreLib.
  • The initial cleanup passed 5,956 x64 reflection/emit/extensions/invocation cases. After the final dead-state/guard refinements, both x64 and x86 forced invocation suites passed 631 + 631 cases, and both multicore-JIT profile tests passed.
  • Independent native review covered EH/SEH, GC/DAC reporting, live helpers, and assembly/build wiring; identified cleanup advisories were addressed.
  • The unchanged MDbg frozen20 ran once against the final snapshot: 18 passed, 0 failed, 2 existing skips, with all exact outcomes and abort/nullable recovery markers preserved. Six binary hashes and actual loaded modules matched the supplied runtime.

The tested binaries were built from the identical final working tree before the cleanup commit, so their embedded native version identifies the parent commit. Actual Linux, ARM/ARM64, and WebAssembly runtime execution was not performed.


Stack created with GitHub Stacks CLI • Give Feedback 💬

Note

This PR description and cleanup were prepared with GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from 6ecc72a to ae37eaf Compare September 13, 2026 04:17
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from ae37eaf to f34fdbb Compare September 13, 2026 15:15
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from f34fdbb to cdf3559 Compare September 15, 2026 00:28
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from cdf3559 to 3e2eea9 Compare September 15, 2026 21:55
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from 3e2eea9 to 1f30315 Compare September 15, 2026 22:57
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from 1f30315 to 52121f1 Compare September 16, 2026 22:59
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from 52121f1 to 5dcd19e Compare September 18, 2026 20:06
@jkoritzinsky

Copy link
Copy Markdown
Member Author

/ba-g build analysis doesn't go green on PRs to non-main even though that's how stacked PRs work.

@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from 6d38cde to f0faf14 Compare November 2, 2026 23:40
@jkoritzinsky
jkoritzinsky enabled stacked auto-merge (squash) November 2, 2026 23:40
@jkoritzinsky
jkoritzinsky requested a review from janvorli November 2, 2026 23:41
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from f0faf14 to c608dd1 Compare November 3, 2026 03:28
jkoritzinsky and others added 3 commits November 2, 2026 21:30
Delete MethodDescCallSite, CallDescrWorker and their argument-copying, return-value, architecture assembly, build, and EH identification closure after the reflection, custom-attribute, and func-eval migrations. Remove orphaned multicore-JIT diagnostic state and update VM-to-managed calling documentation. Preserve live field-access helpers, typed UCO calls, GC argument reporting, and calling-convention traits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jkoritzinsky
jkoritzinsky force-pushed the dev/jkoritzinsky/invocation-cleanup branch from c608dd1 to b11c205 Compare November 3, 2026 05:31
@jkoritzinsky
jkoritzinsky requested a review from jkotas November 3, 2026 05:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants