Skip to content

[embind] Drop the try/finally around stack-framed invokers - #27750

Open
dimokol wants to merge 1 commit into
emscripten-core:mainfrom
dimokol:embind-drop-invoker-finally
Open

dimokol wants to merge 1 commit into
emscripten-core:mainfrom
dimokol:embind-drop-invoker-finally

Conversation

@dimokol

@dimokol dimokol commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Follows sbc100's review on #27610. The invoker no longer restores the stack frame on an exception path, since callers that catch an exception from the module and carry on own the stackSave/stackRestore (#27748 makes the docs say so). The frame is released on the normal return path only. The throwing-conversion section of test_embind_trivial_value_stack goes with it, and the hello_embind codesize expectation drops by 23 bytes.

Restore the frame on the normal return path only, matching the rest of
emscripten: a JS caller that catches an exception and carries on owns the
stackSave/stackRestore (emscripten-core#27748). The throwing-conversion section of the
test goes with it, and hello_embind shrinks by 23 bytes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant