summaryrefslogtreecommitdiff
path: root/src/expr-visitor.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the reference types proposal (#938)Alex Crichton2019-02-141-0/+12
| | | | | | | | | | | | | | | | | | | | * Add support for the reference types proposal This commit adds support for the reference types proposal to wabt. Namely it adds new opcodes like `table.{get,set,grow}` as well as adds a new `anyref` type. These are plumbed throughout for various operations in relatively simple fashions, no support was added for a subtyping relationship between `anyref` and `anyfunc` just yet. This also raises the restriction that multiple tables are disallowed, allowing multiple tables to exist when `--enable-reference-types` is passed. * Allow nonzero table indices in `call_indirect` Plumb support throughout for the `call_indirect` instruction (and `return_call_indirect`) to work with multi-table modules according to the reference types proposal.
* Add br_on_exn instruction (#1016)Ben Smith2019-02-131-0/+2
| | | | | | It takes two u32 immediates: the branch depth and an exception index. The stack signature is `[expect_ref] -> [except_ref]`, so the `except_ref` can be tested easily against multiple exception types.
* Remove the `if_except` instruction (#1009)Ben Smith2019-02-101-8/+0
| | | | It is no longer part of the exception proposal.
* Rename {memory,table}.drop to {data,elem}.drop (#1000)Alex Crichton2019-01-301-4/+4
| | | Carrying over renames from WebAssembly/bulk-memory-operations#46
* The great renaming (#985)Ben Smith2018-12-191-12/+12
| | | | | | | | This huge PR does all the renaming as described in issue #933. It also updates to the latest testsuite so the new names are used. The old names of the MVP instructions are still supported for convenience (though we should remove those too at some point), but the old simd and atomic instruction names are no longer supported.
* Add bulk memory opcode definitions (#927)Alex Crichton2018-10-121-0/+14
| | | | | | | | | | | | This commit starts to add support in wabt's various tools for the upcoming [bulk memory proposal][1]. This is based off the current proposal's overview, although these may get tweaked over time! This is also the first time I've significantly contributed to wabt, and what I thought would be a relatively simple addition ended up being much larger than I imagined! I didn't add many negative tests yet but if more tests are desired please let me know! [1]: https://github.com/webassembly/bulk-memory-operations
* Tailcall (#918)Ben Smith2018-10-011-0/+6
| | | | | | | | | | | | This doesn't do any of the real work yet, it just adds the ReturnCall/ReturnCallIndirect Expr and Opcode types, and the "--enable-tail-call" flag. Still TODO: * Parse the opcodes in binary-reader.cc * Validate the opcodes in validator.cc and type-checker.cc * Implement the opcodes in interp.cc * Write standard wabt tests, and enable the spec proposal tests too
* Update spec tests; rename {grow,current}_memory (#849)Ben Smith2018-05-271-4/+4
| | | | | | | | | `grow_memory` -> `memory.grow` `current_memory` -> `memory.size` This could have been a smaller change, but I took the opportunity to rename the Token types, Expr types, and callback functions too. Many of these are sorted alphabetically, so I resorted based on their new names.
* SIMD v8x16.shuffle implementation. (#811)lizhengxing2018-03-151-0/+2
|
* Simd i8x16.extract_lane_s instruction implementation. (#802)lizhengxing2018-03-131-0/+2
| | | | | Including: 1. All necessary code for SIMD lanes accessing. 2. i8x16.extract_lane_s implementation.
* WIP on support for level1 exception spec (#773)Ben Smith2018-03-021-9/+11
| | | | | | | | | | | | Implemented: * Parsing `try`, `if_except`, `throw`, `rethrow` * Validation * Binary and text output Still missing: * `except_ref` for locals * Interpreter implementation
* Rewrite ExprVisitor to be non-recursive (#765)Ben Smith2018-02-211-0/+29
| | | | | | This will help with wasm modules that have very deeply nested blocks. See issue #752.
* SIMD v128.bitselect instruction implementation. (#759)lizhengxing2018-02-191-0/+2
|
* Rename {wake,wait} -> atomic.{wake,wait} (#672)Ben Smith2017-11-211-4/+4
| | | | This was recently changed in the spec.
* Add `i{32,64}.wait` and `wake` operators (#646)Ben Smith2017-10-051-0/+4
| | | This implements everything except the interpreter.
* Add Atomic instructions (#633)Ben Smith2017-09-201-0/+10
| | | | | | | | This adds support for all atomic instructions, enabled via the `--enable-threads` flag. It supports all tools: parsing text, decoding binary, validation, and interpreting. It does not currently ensure that the memory is marked as shared; that flag is not supported in wabt yet.
* Always include quoted headers like "src/foo.h" (#601)Ben Smith2017-08-301-2/+2
| | | This way the names won't conflict with other headers with the same name.
* Use intrusive_list for Expr (#544)Ben Smith2017-06-301-1/+1
| | | | | | Nothing much special here, but it is becoming increasingly annoying that the parser Token cannot have value types (so everything must be moved then deleted).
* Refactor Expr as class hierarchy instead of union (#524)Ben Smith2017-06-231-76/+73
| | | | | | | | This has the benefit of making things much more type-safe, as well as simplifying destroying member variables. For now, many of the members are still raw pointers, but they probably should become unique_ptrs or ordinary values.
* Fix the validator to be able to validate exception handling constructs. (#514)KarlSchimpf2017-06-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Save state. * Add exception declaration syntax. * Extend validator to handle exception declarations. * Fix binary writer to handle exception declarations. * Fix code to handle external exception kind. * Regenerate lexer. * Fix bug with last merge. * Add exception declarations, and add examples. * Fix nits. * Initial extensions for expr visitor. * Save state. * Fix issues with master merge. * Reconcile issues with merge of tools wast2wasm and wast-desugar. * Save state. * Save work to move to mtv. * Fix resolving names on try/throw constructs. * Completed implementation of validation for exception handling. * Fix nits. * Combine Catch and CatchAll in IR. * Remove tryblock visitors. * Clean up to only use one visitor for each catch. * Rework the structure of try blocks and catches. * Remove the need for common CLI options. * Fix issues raised by binji. * Fix re2c generated file. * Fix memory leak, and fix nits.
* Make ExprVisitor into C++ class (#471)Ben Smith2017-06-021-0/+116
Add ExprVisitor::Delegate for callbacks, and ExprVisitor::DelegateNop when some functions aren't implemented (similar to BinaryReader).