| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The only benefit to LexerSourceFile is to read files that are larger
than can be loaded into memory. That probably is only a valuable feature
when loading GB-sized files on a 32-bit machine. I'm not certain that
it's worth the extra complexity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update v128.const WAT parsing to conform to the SIMD draft
* manually fix indentation
* rename no_lanes to lane_count
* Fix parsing of OOB integers
* Update simd shuffle tests to new syntax
* Add the v128.const type tokens to the lexer.
|
|
|
|
|
|
|
|
|
| |
Also:
* Add feature limits on using v128 and anyref types (requires
--enable-simd and --enable-reference-types respectively).
* Separate out ParseValueType (used for params, locals, global types)
from ParseRefType (used for table types).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It is no longer part of the exception proposal.
|
|
|
| |
Carrying over renames from WebAssembly/bulk-memory-operations#46
|
|
|
| |
They don't seem to be used anymore.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`ErrorHandler` complicated all error handling in wabt, since it was
callback-based. Callbacks would be useful if we ever wanted to change
behavior when an error occurred, but instead all that the handler ever
did was write the errors to stdout/stderr or to a buffer.
This change adds a new class `Error`, which contains an `ErrorLevel`, a
`Location` and an error message. It also replaces ErrorHandler with
`Errors` (a typedef for `std::vector<Error>`), and adds a couple of
functions that can format a list of `Errors` for output:
`FormatErrorsTo{String,File}`.
|
|
|
|
| |
Also remove wast-parser-lexer-shared.{cc,h}.
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
| |
Also remove `WASM_RT_DEFINE_EXTERNAL`, as it doesn't seem to be used.
|
|
|
| |
This makes it easier to use outside of running wasm2c spec tests.
|
| |
|
|
|
|
|
|
|
|
|
| |
Including:
i8x16.replace_lane
i16x8.replace_lane
i32x4.replace_lane
i64x2.replace_lane
f32x4.replace_lane
f64x2.replace_lane
|
|
|
|
|
|
|
|
|
|
| |
Including:
i8x16.extract_lane_u
i16x8.extract_lane_s
i16x8.extract_lane_u
i32x4.extract_lane
i64x2.extract_lane
f32x4.extract_lane
f64x2.extract_lane
|
|
|
|
|
| |
Including:
1. All necessary code for SIMD lanes accessing.
2. i8x16.extract_lane_s implementation.
|
| |
|
|
|
|
|
|
|
| |
Including:
i32x4.trunc_s/f32x4:sat
i32x4.trunc_u/f32x4:sat
i64x2.trunc_s/f64x2:sat
i64x2.trunc_u/f64x2:sat
|
|
|
|
|
|
|
| |
Including:
f32x4.convert_s/i32x4
f32x4.convert_u/i32x4
f64x2.convert_s/i64x2
f64x2.convert_u/i64x2
|
| |
|
|
|
|
| |
Including:
f32x4.div, f64x2.div, f32x4.mul, f64x2.mul
|
|
|
|
| |
Including:
f32x4.add, f64x2.add, f32x4.sub, f64x2.sub
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented:
* Parsing `try`, `if_except`, `throw`, `rethrow`
* Validation
* Binary and text output
Still missing:
* `except_ref` for locals
* Interpreter implementation
|
|
|
|
| |
Including:
f32x4.min, f64x2.min, f32x4.max, f64x2.max
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Including:
i8x16.ge_s, i8x16_ge_u
i16x8.ge_s, i16x8_ge_u
i32x4.ge_s, i32x4_ge_u
f32x4.ge
f64x2.ge
|
|
|
|
|
|
|
|
| |
Including:
i8x16.gt_s, i8x16_gt_u
i16x8.gt_s, i16x8_gt_u
i32x4.gt_s, i32x4_gt_u
f32x4.gt
f64x2.gt
|
|
|
|
|
|
|
|
| |
Including:
i8x16.le_s, i8x16_le_u
i16x8.le_s, i16x8_le_u
i32x4.le_s, i32x4_le_u
f32x4.le
f64x2.le
|
|
|
|
|
|
|
|
| |
Including:
i8x16.lt_s, i8x16_lt_u
i16x8.lt_s, i16x8_lt_u
i32x4.lt_s, i32x4_lt_u
f32x4.lt
f64x2.lt
|
|
|
|
| |
Including:
(i8x16/i16x8/i32x4/f32x4/f64x2).ne
|
|
|
|
| |
Including:
(i8x16/i16x8/i32x4/f32x4/f64x2).eq
|
|
|
|
|
| |
Including:
(i8x16/i16x8/i32x4/i64x2).any_true
(i8x16/i16x8/i32x4/i64x2).all_true
|
| |
|
|
|
|
| |
Including:
v128.and, v128.or, v128.xor, v128.not
|
|
|
|
|
|
|
| |
Including:
i8x16.shr_s, i8x16.shr_u
i16x8.shr_s, i16x8.shr_u
i32x4.shr_s, i32x4.shr_u
i64x2.shr_s, i64x2.shr_u
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a very simple template syntax, without any advanced features:
```
%%top
...
%%bottom
...
```
This template will generate output with two C strings:
```
const char SECTION_NAME(top)[] = ...
...
const char SECTION_NAME(bottom)[] = ...
...
```
To update the generated files, run `make update-wasm2c`.
|