Skip to content

Remove obsolete native managed-invocation machinery - #133660

Draft
jkoritzinsky wants to merge 1 commit into
dev/jkoritzinsky/func-eval-ucofrom
dev/jkoritzinsky/invocation-cleanup
Draft

Remove obsolete native managed-invocation machinery#133660
jkoritzinsky wants to merge 1 commit 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 CLIGive Feedback 💬

Note

This PR description and cleanup were prepared with GitHub Copilot.

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>
@jkoritzinsky
jkoritzinsky added this pull request to stack #133661 September 11, 2026 03:04
@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.

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.

1 participant