Skip to content

setjmp support #7

Open
Open

Description

@calvin2021y

There is a lot code require setjmp to build into wasm, emcc support it by build into javascript backend. (and all mainstream browser support setjmp and exception). https://webassembly.org/roadmap/

I can see FastVM use goto every where, maybe microwasm can add setjmp/longjmp support base on goto ?

a lot library don't use exception but require setjmp, add setjmp will allow a lot wasm only run in browser/nodejs work for web49.

Activity

  1. ShawSumma commented on Jan 17, 2023

    @ShawSumma
    Member

    Thank you for the issue!

    I do plan on supporting longjmp through emcc's ABI and also wasm's standard exceptions.
    And pull requests are more than welcome 😉.

    This is enabled by miniwasm using an explicit stack as opposed to the "native" stack.
    It should be as trivial as keeping an array of jump back locations and stack depths.
    Things are kinda broken right now, and need to be fixed first.

    I'll keep this issue open so that i can reference it in any commit helping exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions