alexcrichton opened PR #8150 from alexcrichton:refactor-traps
to bytecodealliance:main
:
Currently whenever a signal or trap is handled in Wasmtime we perform two lookups of the trap code. One during the trap handling itself to ensure we can handle the trap, and then a second once the trap is handled. There's not really any need to do two here, however, as the result of the first can be carried over to the second.
While I was here refactoring things I also changed how some return values are encoded, such as
take_jmp_buf_if_trap
now returns a more self-descriptive enum.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #8150.
alexcrichton requested wasmtime-core-reviewers for a review on PR #8150.
github-actions[bot] commented on PR #8150:
Subscribe to Label Action
cc @peterhuene
<details>
This issue or pull request has been labeled: "wasmtime:api"Thus the following users have been cc'd because of the following labels:
- peterhuene: wasmtime:api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen submitted PR review.
alexcrichton updated PR #8150.
alexcrichton has enabled auto merge for PR #8150.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
($($name:ident)*) => ($(if byte == Trap::$name as u8 { return Some(Trap::$name); })*); }
alexcrichton updated PR #8150.
alexcrichton updated PR #8150.
alexcrichton has enabled auto merge for PR #8150.
alexcrichton merged PR #8150.
Last updated: Nov 22 2024 at 16:03 UTC