Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wat2wasm failing with: unexpected token get_local, expected ). #1883

Closed
AloisReitbauer opened this issue Apr 2, 2022 · 3 comments
Closed

Comments

@AloisReitbauer
Copy link

This is the wat file used:

(module
    (func $how_old (param $year_now i32) (param $year_born i32) (result i32)
        get_local $year_now
        get_local $year_born
        i32.sub)

    (export "how_old" (func $how_old))
)

I am using the binary for 1.0.28

@AloisReitbauer
Copy link
Author

AloisReitbauer commented Apr 2, 2022

I also tried with 1.0.27. Same error.

I also tried with 1.0.24 and there it works. (Saw a similar issue posted where this solved the problem)

@keithw
Copy link
Member

keithw commented Apr 2, 2022

You'll have to use local.get now instead of `get_local -- the names were changed in 2018 before the WebAssembly 1.0 spec was finalized, and wabt dropped support for the pre-1.0 names late last year (#1792). (Dup of #1820)

@keithw keithw closed this as completed Apr 2, 2022
@AloisReitbauer
Copy link
Author

Thank you that worked!

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

No branches or pull requests

2 participants