| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
(#2208)
|
|
|
|
| |
used (#2226)
|
|
|
| |
The footnote was removed in https://github.com/WebAssembly/wabt/commit/463b54d39fdc86f41875d185a450173cf236f1f9
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(#2207)
|
|
|
|
| |
Fixes one issue where Validator was incorrectly accepting some
malformed modules from the spec tests.
|
|
|
| |
per http://man.openbsd.org/alloca.3
|
| |
|
|
|
| |
+ use correct value of unlimited max pages for 64-bit memories
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
growth failures
|
| |
|
| |
|
|
|
|
| |
ensure these are up to date
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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).
|
| |
|
|
|
|
|
|
|
| |
* wasm2c: use CHECK_RESULT throughout workhorse function
Make sure to validate module before generating names.
* Respond to review
|
| |
|
| |
|
|
|
| |
Fixes #2020
|
| |
|
|
|
|
|
| |
* binary-reader.cc: expand max local count and fix error message
Fixes #1593
|
|
|
|
|
| |
Updates wasm-c-api submodule
Fixes #1600
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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."
|
|
|
|
| |
Fixes #2151
Fixes oss-fuzz #53958
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
WastParser now handles the abbreviated (no tableidx) forms of
table.{get,set,size,grow,fill} (needed after
https://github.com/WebAssembly/spec/pull/1582).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Signed-off-by: David Korczynski <david@adalogics.com>
|
|
|
|
|
| |
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.
|
|
|
| |
Makes it possible to wasm2c --disable-sign-extension
|
|
|
| |
Fixes: #2153
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|