Skip to content

[Wasm RyuJit] codegen for callfinally#128348

Merged
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:WasmCallfinally
May 19, 2026
Merged

[Wasm RyuJit] codegen for callfinally#128348
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:WasmCallfinally

Conversation

@AndyAyersMS
Copy link
Copy Markdown
Member

Implement the codegen needed to call the finally, in the cases where the finally was not inlined and needs to be invoked on a normal try exit.

Implement the codegen needed to call the finally, in the cases where the finally
was not inlined and needs to be invoked on a normal try exit.
Copilot AI review requested due to automatic review settings May 19, 2026 00:21
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 19, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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

Implements WASM RyuJIT codegen for BBJ_CALLFINALLY blocks, replacing the previous NYI_WASM stub. The new code emits an indirect WASM call to the finally funclet, passing SP and FP as pointer arguments, and emits an unreachable for retless calls.

Changes:

  • Replace NYI_WASM("genCallFinally") with real codegen.
  • Build the finally's WASM function signature (two pointer args, no return) via getWasmTypeSymbol.
  • Push SP/FP locals plus a funclet address constant, issue an indirect call, and emit unreachable when BBF_RETLESS_CALL is set.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

@kg PTAL
fyi @dotnet/wasm-contrib

@AndyAyersMS AndyAyersMS requested a review from kg May 19, 2026 01:12
@AndyAyersMS AndyAyersMS merged commit 2f5243c into dotnet:main May 19, 2026
137 of 140 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants