Stream: git-wasmtime

Topic: wasmtime / PR #8150 Don't lookup trap codes twice on traps


view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2024 at 18:16):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2024 at 18:16):

alexcrichton requested fitzgen for a review on PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2024 at 18:16):

alexcrichton requested wasmtime-core-reviewers for a review on PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2024 at 18:44):

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:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 18:38):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 18:49):

alexcrichton updated PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 18:50):

alexcrichton has enabled auto merge for PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 19:12):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 19:12):

bjorn3 created PR review comment:

            ($($name:ident)*) => ($(if byte == Trap::$name as u8 {
                return Some(Trap::$name);
            })*);
        }

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 19:27):

alexcrichton updated PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 19:31):

alexcrichton updated PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 19:32):

alexcrichton has enabled auto merge for PR #8150.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 18 2024 at 20:29):

alexcrichton merged PR #8150.


Last updated: Nov 22 2024 at 16:03 UTC