summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* BinaryReaderIR: silence clang 14 warning (NFC) (#2232)Keith Winstein2023-05-091-1/+1
|
* Cleanup use of HAVE_WIN32_VT100 in color.ccShravan Narayan2023-05-091-22/+14
|
* c-writer.cc: Correctly handle label names when branching out of try block ↵Keith Winstein2023-05-082-2/+18
| | | | (#2208)
* Track use of SIMD and exceptions in IR, and CWriter includes support only if ↵Keith Winstein2023-05-0810-15/+28
| | | | used (#2226)
* README.md: fix relaxed-simd link (#2230)Michael R. Crusoe2023-05-071-1/+1
| | | The footnote was removed in https://github.com/WebAssembly/wabt/commit/463b54d39fdc86f41875d185a450173cf236f1f9
* Don't include windows.h for color printing if !HAVE_WIN32_VT100Shravan Narayan2023-05-051-0/+2
|
* wasm2c: update simde submodule to 0.7.4-rc4 and add remaining tests (#2225)Keith Winstein2023-05-047-1/+26
|
* BinaryReader/BinaryReaderIR: check for missing end markers (#2218)Keith Winstein2023-05-036-4/+34
|
* wasm2c: Enable exceptions and simd according to command line flagsShravan Narayan2023-05-0224-140/+249
|
* wasm2c: reduce the max exceptions sizeShravan Narayan2023-05-011-1/+1
|
* c-writer.cc: cleanup name lookups to happen consistently in one place (NFC) ↵Keith Winstein2023-04-271-9/+11
| | | | (#2207)
* Make sure (IR) Validator and BinaryReaderInterp agree re: validity (#2219)Keith Winstein2023-04-272-2/+57
| | | | Fixes one issue where Validator was incorrectly accepting some malformed modules from the spec tests.
* alloca() lives in <stdlib.h> on OpenBSD too (fixes #2216) (#2217)Landry Breuil2023-04-267-7/+7
| | | per http://man.openbsd.org/alloca.3
* wasm2c: Use malloc.h instead of alloca.h for mingwShravan Narayan2023-04-247-7/+23
|
* c-writer.cc: Fix memory64 allocation when limits are >2^32 (#2213)Keith Winstein2023-04-221-5/+10
| | | + use correct value of unlimited max pages for 64-bit memories
* wasm2c.includes.c: replace alloca.h with stdlib.h on FreeBSD (#2212)Petr Penzin2023-04-227-0/+16
|
* wasm-rt-impl: reset g_signal_handler_installed in wasm_rt_free (#2209)Keith Winstein2023-04-211-0/+1
|
* wasm2c exception handling: fix unwinding after br inside try (#2204)Soni L2023-04-212-6/+34
|
* wasm-objdump: Include function names in "init functions" subsection (#2202)Sam Clegg2023-04-207-14/+20
|
* wasm2c: Misc docs and inline comment fixesShravan Narayan2023-04-132-17/+11
|
* wasm2c: Add optional WASM_RT_GROW_FAILED_HANDLER to be notified of memory ↵Shravan Narayan2023-04-122-2/+22
| | | | growth failures
* wasm2c: Separate the macros for allocation and bounds checks strategiesShravan Narayan2023-04-1212-61/+146
|
* wasm2c: expose the initial and max size required from imported tablesShravan Narayan2023-04-113-14/+941
|
* wasm2c: Checkin prebuilt source code in source folder, add lint checks to ↵Shravan Narayan2023-04-118-7/+1489
| | | | ensure these are up to date
* wasm2c: add signature for the wasm2c trap handler if definedShravan Narayan2023-04-102-4/+8
|
* wasm2c: Fix warning of missing std namespace in call to move (#2191)Shravan Narayan2023-04-081-1/+1
|
* wasm2c: multiple .c outputs (#2146)Yuhan Deng2023-04-0514-100/+431
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wasm2c: multiple .c outputs This enables wasm2c to have multiple .c outputs, which allows parallel compilation of the wasm2c outputs. This is useful when the input WASM module is big. wasm2c takes the number of .c outputs as an argument to `--num-outputs` (defaulting to 1). If the number is equal to 1, the .c output does not change except for two new macro declarations and the ordering of declarations and definitions. If greater than 1, wasm2c outputs change in the following ways: 1) wasm2c outputs a [module-name]-impl.h that includes any module-wide declarations, including: * content of `WriteSourceTop()` * function type declarations * tag types * tag declarations * function declarations * data segments and elem segments declarations Any static declaration become extern in this header. 2) wasm2c outputs [module-name]_i.c for i = [0, ..., number of .c outputs - 1). Any module-wide material is written to [module-name]_0.c, including: * function types, tags, data segments, elem segments * imports and exports * module initialization, instantiation and free 3) For each function implementation, wasm2c assigns it to one output .c file by sorting the function names and partitioning into roughly equal buckets. Alternately, the caller can supply its own assignment function (helpful if it wants the assignments to be more stable in the face of function insertion or deletion).
* BinaryReaderIR: Limit number of function params, results, and locals (#2182)Keith Winstein2023-04-041-0/+19
|
* wasm2c: use CHECK_RESULT throughout workhorse function (NFC) (#2183)Keith Winstein2023-03-301-53/+44
| | | | | | | * wasm2c: use CHECK_RESULT throughout workhorse function Make sure to validate module before generating names. * Respond to review
* build.yml: use ubuntu-latest for all Linux runners (#2185)Raphael Amorim2023-03-281-4/+2
|
* Fix grammatical error (#2179)David Park2023-03-241-1/+1
|
* Silence warnings on GCC 12 (#2177)Keith Winstein2023-03-224-10/+7
| | | Fixes #2020
* wasm-interp: Add --run-export and --argument (#2176)Raphael Amorim2023-03-194-0/+163
|
* binary-reader.cc: expand max local count and fix error message (#2173)Keith Winstein2023-03-156-11/+12
| | | | | * binary-reader.cc: expand max local count and fix error message Fixes #1593
* Update wasm-c-api support to current API (#2172)Keith Winstein2023-03-142-30/+32
| | | | | Updates wasm-c-api submodule Fixes #1600
* c-writer.cc: Add local symbol prefix. (#2171)Yuhan Deng2023-03-155-66/+67
| | | | | | Add kLocalSymbolPrefix which is used for names of params, locals and stack vars. This allows c-writer to not assign global_sym_map_ to local_sym_map_ for writing each individual function, since local names can't duplicate global names.
* BinaryReaderIR: increase kMaxNestingDepth to 16,384 (#2170)Keith Winstein2023-03-141-1/+1
| | | | | | | | | Rationale: clang (compiled to Wasm) uses a label nesting depth of >1400, which is greater than the limit of 1024 created in PR #2169. In practice, with a debug build, values up to about 40,000 appear sufficient to keep the stack within an 8 MiB limit. On release builds it's more frugal and we could probably afford an even bigger limit. But, "16384 ought to be enough nesting depth for anybody."
* BinaryReaderIR: limit nesting depth to avoid stack overflow (#2169)Keith Winstein2023-03-131-18/+19
| | | | Fixes #2151 Fixes oss-fuzz #53958
* Add new tests (#2168)Keith Winstein2023-03-1378-7/+793
| | | | | | | | | | | | | | | | | Fixes a wasm2c bug where instantiation was initializing memories before tables. The spec requires tables to be initialized before memories (newly tested in the multi-memory linking0 test). Remaining missing tests are: - multi-memory/memory_copy1.txt (currently blank) - relaxed-simd/relaxed_dot_product.txt (we don't support the i16x8.relaxed_dot_i8x16_i7x16_s instruction) And for wasm2c only: - five SIMD tests (https://github.com/WebAssembly/wabt/pull/2021#issuecomment-1396386135) - all relaxed-simd and tail-call tests
* Update testsuite (#2167)Keith Winstein2023-03-1319-158/+169
| | | | | WastParser now handles the abbreviated (no tableidx) forms of table.{get,set,size,grow,fill} (needed after https://github.com/WebAssembly/spec/pull/1582).
* Improve lexing and parsing of invalid annotations (again) (#2166)Keith Winstein2023-03-108-14/+55
| | | | | | | | | | | | | | | This adds a bounds-check to WastLexer::GetText to handle the case when the offset is earlier than token_start (e.g. because GetStringToken found a newline in the string and reset token_start to point at it). Also revises GetIdToken -> GetIdChars to stop skipping the initial char in an annotation delimiter, which is an idchar+ but not an id token. Also fixes the WastParser to handle EOF when reading for the end of an annotation, both for code metadata annotations and other kinds. Previously this produced an infinite loop (but only with --enable-annotations). Fixes #2165
* wasm2c: implement the extended const expressions proposal (#2162)Keith Winstein2023-03-087-15/+108
|
* CI: add CIFuzz action (#2073)DavidKorczynski2023-03-071-0/+22
| | | Signed-off-by: David Korczynski <david@adalogics.com>
* Remove some old emcc link flags (#2158)Sam Clegg2023-03-061-3/+1
| | | | | I don't think there is any need to use `WASM=0` these days. If anybody really cares about node performance and this turns out still to be faster they can always add this back in.
* Fix longstanding typo (#2160)Soni L2023-03-051-1/+1
| | | Makes it possible to wasm2c --disable-sign-extension
* Fix for BUILD_FUZZ_TOOLS=ON (#2154)Sam Clegg2023-03-022-2/+5
| | | Fixes: #2153
* Always do a full roundtrip in run-roundtrip.py (#1661)Sam Clegg2023-02-288-48/+62
| | | | | | | | | | | | | | | | Even when the result is to be printed rather than compared byte for byte with the first version its still good to process the resulting wat output file so that we know we can parse what we generate. Case in point, this changed caused me to fix two latent bugs: 1. We were not correctly parsing events with inline import/export. 2. We were output element segment names even when bulk memory was not enabled (See #1651) The fix for (2) is a little more involved that we might like since for the first time the wat writer needs to know what features are enabled. Fixes: #1651
* Replace MakeUnique with c++14 std::make_unique (#2152)Keith Winstein2023-02-2713-278/+250
|
* Use C++17's [[fallthrough]]. NFC (#2091)Sam Clegg2023-02-275-17/+20
|
* Improve lexing of invalid annotations (#2150)Keith Winstein2023-02-252-1/+13
| | | | | | | | | This had been crashing even with annotations disabled. Adds a regression test. This was missed in #2001 when updating the lexer to match the updated spec (WebAssembly/spec#1499). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935