summaryrefslogtreecommitdiff
path: root/src/prebuilt
Commit message (Collapse)AuthorAgeFilesLines
* Remove LexerSourceFile (#1054)Ben Smith2019-04-011-9524/+9655
| | | | | | 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.
* Make v128.const i32x4 op conform to the SIMD draft (#1037)gnzlbg2019-03-281-4489/+4597
| | | | | | | | | | | | | | * 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.
* Rename anyfunc -> funcref; parse reference types (#1026)Ben Smith2019-02-251-1060/+1060
| | | | | | | | | 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 (#938)Alex Crichton2019-02-141-9432/+9441
| | | | | | | | | | | | | | | | | | | | * 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-8986/+9160
| | | | | | 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.
* Rename exception -> event (#1013)Ben Smith2019-02-111-1070/+1068
|
* Remove the `if_except` instruction (#1009)Ben Smith2019-02-101-5285/+5240
| | | | It is no longer part of the exception proposal.
* Rename {memory,table}.drop to {data,elem}.drop (#1000)Alex Crichton2019-01-301-9492/+9381
| | | Carrying over renames from WebAssembly/bulk-memory-operations#46
* Remove the {assert,stdlib}.h includes in wasm2c (#986)Ben Smith2018-12-201-2/+0
| | | They don't seem to be used anymore.
* The great renaming (#985)Ben Smith2018-12-191-8456/+9486
| | | | | | | | 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-4585/+4781
| | | | | | | | | | | | 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-3126/+3216
| | | | | | | | | | | | 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
* Replace ErrorHandler with Errors and FormatErrors*Ben Smith2018-09-041-945/+944
| | | | | | | | | | | | | `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}`.
* Move WastLexer out of NameResolver, Validator, etc.Ben Smith2018-09-041-945/+944
| | | | Also remove wast-parser-lexer-shared.{cc,h}.
* Update spec tests; rename {grow,current}_memory (#849)Ben Smith2018-05-271-8435/+8353
| | | | | | | | | `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.
* Add some documentation for wasm2c (#803)Ben Smith2018-05-091-2/+0
| | | Also remove `WASM_RT_DEFINE_EXTERNAL`, as it doesn't seem to be used.
* Separate out wasm-rt.h and wasm-rt-impl.{c,h} (#813)Ben Smith2018-03-201-52/+1
| | | This makes it easier to use outside of running wasm2c spec tests.
* SIMD v8x16.shuffle implementation. (#811)lizhengxing2018-03-151-4277/+4330
|
* Simd Replace Lane instructions implementation. (#809)lizhengxing2018-03-151-3240/+3558
| | | | | | | | | Including: i8x16.replace_lane i16x8.replace_lane i32x4.replace_lane i64x2.replace_lane f32x4.replace_lane f64x2.replace_lane
* Simd remaining Extract Lane instructions implementation. (#806)lizhengxing2018-03-151-2891/+3163
| | | | | | | | | | 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
* Simd i8x16.extract_lane_s instruction implementation. (#802)lizhengxing2018-03-131-2356/+2413
| | | | | Including: 1. All necessary code for SIMD lanes accessing. 2. i8x16.extract_lane_s implementation.
* SIMD v128.load/v128.store implementation. (#801)lizhengxing2018-03-091-3163/+3209
|
* SIMD Floating point to integer with saturation implementation. (#797)lizhengxing2018-03-071-2663/+2908
| | | | | | | Including: i32x4.trunc_s/f32x4:sat i32x4.trunc_u/f32x4:sat i64x2.trunc_s/f64x2:sat i64x2.trunc_u/f64x2:sat
* SIMD Integer to floating point conversion implementation. (#795)lizhengxing2018-03-061-2743/+2939
| | | | | | | Including: f32x4.convert_s/i32x4 f32x4.convert_u/i32x4 f64x2.convert_s/i64x2 f64x2.convert_u/i64x2
* SIMD (f32x4/f64x2).sqrt implementation. (#789)lizhengxing2018-03-051-2341/+2383
|
* SIMD Floating-point div and mul implementation. (#787)lizhengxing2018-03-051-2703/+2771
| | | | Including: f32x4.div, f64x2.div, f32x4.mul, f64x2.mul
* SIMD Floating-point add and sub implementation. (#786)lizhengxing2018-03-031-7222/+7415
| | | | Including: f32x4.add, f64x2.add, f32x4.sub, f64x2.sub
* WIP on support for level1 exception spec (#773)Ben Smith2018-03-021-7329/+7200
| | | | | | | | | | | | Implemented: * Parsing `try`, `if_except`, `throw`, `rethrow` * Validation * Binary and text output Still missing: * `except_ref` for locals * Interpreter implementation
* SIMD Floating-point min and max implementation. (#784)lizhengxing2018-03-021-2651/+2711
| | | | Including: f32x4.min, f64x2.min, f32x4.max, f64x2.max
* SIMD (f32x4/f64x2).abs implementation. (#783)lizhengxing2018-03-011-2640/+2674
|
* SIMD (f32x4/f64x2).neg implementation. (#779)lizhengxing2018-02-281-1895/+1937
|
* SIMD Comparison Greater than or equal instructions implementation. (#778)lizhengxing2018-02-281-2293/+2389
| | | | | | | | Including: i8x16.ge_s, i8x16_ge_u i16x8.ge_s, i16x8_ge_u i32x4.ge_s, i32x4_ge_u f32x4.ge f64x2.ge
* SIMD Comparison Greater than instructions implementation. (#772)lizhengxing2018-02-271-2566/+2682
| | | | | | | | Including: i8x16.gt_s, i8x16_gt_u i16x8.gt_s, i16x8_gt_u i32x4.gt_s, i32x4_gt_u f32x4.gt f64x2.gt
* SIMD Comparison Less than or equal instructions implementation. (#771)lizhengxing2018-02-261-2221/+2317
| | | | | | | | Including: i8x16.le_s, i8x16_le_u i16x8.le_s, i16x8_le_u i32x4.le_s, i32x4_le_u f32x4.le f64x2.le
* SIMD Comparison Less than instructions implementation. (#770)lizhengxing2018-02-231-2492/+2604
| | | | | | | | Including: i8x16.lt_s, i8x16_lt_u i16x8.lt_s, i16x8_lt_u i32x4.lt_s, i32x4_lt_u f32x4.lt f64x2.lt
* SIMD Comparison Non-Equality instructions implementation. (#767)lizhengxing2018-02-211-2467/+2552
| | | | Including: (i8x16/i16x8/i32x4/f32x4/f64x2).ne
* SIMD Comparison Equality instructions implementation. (#766)lizhengxing2018-02-211-2456/+2515
| | | | Including: (i8x16/i16x8/i32x4/f32x4/f64x2).eq
* SIMD Boolean horizontal reductions implementation. (#763)lizhengxing2018-02-211-1977/+2257
| | | | | Including: (i8x16/i16x8/i32x4/i64x2).any_true (i8x16/i16x8/i32x4/i64x2).all_true
* SIMD v128.bitselect instruction implementation. (#759)lizhengxing2018-02-191-2708/+2752
|
* SIMD Bitwise logic instructions implementation. (#758)lizhengxing2018-02-141-2380/+2446
| | | | Including: v128.and, v128.or, v128.xor, v128.not
* SIMD right shift by scalar instructions implementation. (#755)lizhengxing2018-02-131-1637/+1741
| | | | | | | 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
* SIMD i16x8/i32x4/i64x2 shl implementation. (#751)lizhengxing2018-02-121-1886/+1937
|
* SIMD i8x16.shl implementation. (#750)lizhengxing2018-02-071-1658/+1675
|
* SIMD saturating sub implementation. (#747)lizhengxing2018-02-061-1376/+1516
|
* SIMD saturating add implementation. (#727)lizhengxing2018-01-211-1331/+1471
|
* SIMD i8x16.neg / i16x8.neg / i32x4.neg / i64x2.neg implementation. (#723)lizhengxing2018-01-181-2033/+2105
|
* SIMD i8x16.mul / i16x8.mul / i32x4.mul implementation. (#721)lizhengxing2018-01-181-2008/+2071
|
* SIMD i8x16.sub / i16x8.sub / i32x4.sub / i64x2.sub implementation. (#720)lizhengxing2018-01-171-1724/+1776
|
* SIMD i16x8.add / i32x4.add / i64x2.add implementation. (#714)lizhengxing2018-01-161-1967/+2018
|
* Use templates for generating wasm2c source (#712)Ben Smith2018-01-102-0/+244
| | | | | | | | | | | | | | | | | | | | | 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`.