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

wast2json errors for memory.grow and memory.size #852

Closed
poemm opened this issue Jun 2, 2018 · 2 comments
Closed

wast2json errors for memory.grow and memory.size #852

poemm opened this issue Jun 2, 2018 · 2 comments

Comments

@poemm
Copy link
Contributor

poemm commented Jun 2, 2018

wast2json returns errors on instructions memory.grow and memory.size. Errors look like the following when run on the official test suite file memory.wast.

$ wast2json memory.wast -o memory.json
memory.wast:11:64: error: unexpected token "memory.size", expected an instr.
(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))
                                                               ^^^^^^^^^^^
memory.wast:13:67: error: unexpected token "memory.size", expected an instr.
(module (memory (data "")) (func (export "memsize") (result i32) (memory.size)))
                                                                  ^^^^^^^^^^^
memory.wast:15:68: error: unexpected token "memory.size", expected an instr.
...ule (memory (data "x")) (func (export "memsize") (result i32) (memory.size)))
                                                                  ^^^^^^^^^^^
memory.wast:39:24: error: unexpected token "memory.size", expected an expr.
  (module (func (drop (memory.size))))
                       ^^^^^^^^^^^
memory.wast:43:12: error: unexpected token "func", expected an instr.
  (module (func (drop (memory.grow (i32.const 0)))))
           ^^^^
memory.wast:43:24: error: unexpected token memory.grow.
  (module (func (drop (memory.grow (i32.const 0)))))

Similar errors for the following files from the official test suite.

br.wast
br_table.wast
imports.wast
linking.wast
memory_trap.wast
memory.wast
nop.wast
resizing.wast
return.wast
typecheck.wast
unreachable.wast

@binji
Copy link
Member

binji commented Jun 2, 2018

I implemented that recently in #849, perhaps you need to update?

@poemm
Copy link
Contributor Author

poemm commented Jun 2, 2018

Yes! Great tool, works great! Thank you!

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