Skip to content

Conversation

@janvorli
Copy link
Member

@janvorli janvorli commented Nov 3, 2025

This change adds a way to wrap any method call in a SEH exception try / catch. Until now, we were adding a new function for each case that needed this wrapping.

I've verified that the generated code in the release build is the same as before this change.

This change adds a templated way to wrap any method call in a SEH
exception try / catch. Until now, we were adding a new function for each
case that needed this wrapping.
@janvorli janvorli added this to the 11.0.0 milestone Nov 3, 2025
@janvorli janvorli self-assigned this Nov 3, 2025
@janvorli janvorli requested a review from BrzVlad as a code owner November 3, 2025 18:43
Copilot AI review requested due to automatic review settings November 3, 2025 18:43
@janvorli janvorli requested a review from kg as a code owner November 3, 2025 18:43
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

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 refactors exception handling for method calls in the interpreter by introducing a generic CallWithSEHWrapper template function to replace specialized wrapper functions (CallPreStub and CallGetMethodDescOfVirtualizedCode). This consolidates duplicate SEH exception handling logic into a single reusable template.

  • Replaced two specialized SEH wrapper functions with a single generic template
  • Updated all call sites to use the new generic wrapper
  • Consolidated duplicate exception handling logic

@janvorli
Copy link
Member Author

janvorli commented Nov 4, 2025

Hmm, the new version breaks the interpreter test, I am investigating ...

@janvorli
Copy link
Member Author

janvorli commented Nov 4, 2025

Ah, copy and paste error for the GetMethodDescOfVirtualizedCode

janvorli and others added 2 commits November 4, 2025 16:35
Fix copy and paste error
Removed the CallGetMethodDescOfVirtualizedCode function, which is now a dead code.
@janvorli
Copy link
Member Author

janvorli commented Nov 5, 2025

/ba-g infra issues and failures unrelated to the change

@janvorli janvorli merged commit f7e7d27 into dotnet:main Nov 5, 2025
81 of 94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants