Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | [wasm-objdump] set function types for correct params+locals indexing (#2353) | Rod Vagg | 2023-12-13 | 1 | -0/+8 | |
| | ||||||
* | WastParser: tighten parsing of folded `if` (#2349) | Keith Winstein | 2023-12-05 | 1 | -22/+13 | |
| | | | | | This makes the `then` block mandatory per the spec, and parses multiple foldedinstrs in the `if` predicate (exercised by the new if.wast test). | |||||
* | [wasm-objdump] Print i64 values as unsigned (#2344) | Rod Vagg | 2023-12-01 | 1 | -1/+1 | |
| | | | | | This matches the behaviour of i32 printing. Ref: https://github.com/WebAssembly/wabt/pull/2342 | |||||
* | Add support for new WASM_SYMBOL_ABS symbol flag (#2305) | Sam Clegg | 2023-11-28 | 1 | -3/+12 | |
| | | | See https://github.com/llvm/llvm-project/pull/67493 | |||||
* | Update ID for tag name subsection (#2336) | Michael Williamson | 2023-11-27 | 2 | -0/+2 | |
| | | | | | | | The tag name subsection currently has the speculative ID of 10. However, the extended-name-section proposal has now been updated to use an ID of 11 for the tag name section. This updates the NameSectionSubsection enum accordingly, as well as adding a field name section with the ID of 10. | |||||
* | decompiler.cc: fix vector oob when if has empty then (#2334) | Hyxogen | 2023-11-20 | 1 | -1/+4 | |
| | ||||||
* | wasm2c: Improve address abstraction for BE support (#2328) | Soni L | 2023-11-14 | 6 | -197/+177 | |
| | ||||||
* | Avoid use of `typeof` as argument name (#2314) | walkingeyerobot | 2023-10-26 | 1 | -2/+2 | |
| | | | | While typeof is not a standard c++ keyword, it is in the gnu dialect (i.e. -std=gnu++17). Simply renaming typeof to typeoffunc and TypeOf to TypeOfFunc lets wabt be built with either dialect. | |||||
* | wasm2c: implement the tail-call proposal (#2272) | Keith Winstein | 2023-10-24 | 5 | -111/+587 | |
| | ||||||
* | feat: treat non-seekable files as pipes (#2309) | sethp | 2023-10-02 | 1 | -9/+13 | |
| | | | | | | | | | | | | | | | Previously, attempting to read from a pipe would result in an error: 'not a regular file', disallowing use of files like /dev/stdin or /dev/fd/3, named fifos, sockets, etc. The tools already understand how to (try to) read from non-regular files, so this change attempts to do so when the input is not seek-able (the "regular file" capability that's in use here). Additionally, this adds a test for the new behavior using a bash herestring and process substitution (the latter of which shows up in argv as something like `/dev/fd/NN`). Since bash isn't commonly installed on Windows, this change also introduces a new capability to filter tests to specific platforms (sorry). | |||||
* | Rename wasm-opcodecnt to wasm-stats (#2298) | Soni L | 2023-09-19 | 2 | -8/+7 | |
| | ||||||
* | WastParser: replace CircularArray with internal TokenQueue (NFC) (#2300) | Keith Winstein | 2023-09-18 | 2 | -284/+32 | |
| | ||||||
* | Implement custom section reading/writing (#2284) | Diego Frias | 2023-09-15 | 8 | -1271/+1450 | |
| | ||||||
* | c-writer.cc: clean up some handling of typevector structs (NFC) (#2296) | Keith Winstein | 2023-09-15 | 1 | -10/+13 | |
| | | | | | | - Only use "multivalue" to refer to a multi-value result type (not a tag type) - Deduplicate typevector struct declarations | |||||
* | Flip order of memory indexes on memory.copy (#2294) | Keith Winstein | 2023-09-11 | 12 | -30/+30 | |
| | | | | Reflects change in the multi-memory proposal: https://github.com/WebAssembly/multi-memory/pull/29 | |||||
* | [wasm2c] Use wasm_rt_memcpy everywhere in generated code (#2292) | Sam Clegg | 2023-09-09 | 2 | -30/+30 | |
| | ||||||
* | Share reading/validation code between elem exprs & other const exprs (#2288) | Keith Winstein | 2023-09-06 | 12 | -160/+178 | |
| | | | | | | This continues the work from #1783 and reduces special handling of elem exprs, by treating them the same as other const expressions (init expressions). | |||||
* | wasm2c: consolidate pack/unpack of tags & multi-value results (NFC) (#2286) | Keith Winstein | 2023-08-25 | 1 | -105/+84 | |
| | ||||||
* | Validator: normalize handling of Select in ExprVisitor Delegate (#2285) | Keith Winstein | 2023-08-23 | 1 | -5/+0 | |
| | | | | | | | | | Fixes #2283 Previously, the OnSelectExpr delegate would terminate validation if the SharedValidator found an error in the expression, or if the Validator had previously found an error at any point in validating the module. This commit normalizes the behavior to match how the Validator handles other expression types. | |||||
* | wasm-strip: add `-R/--remove-section` option (#2282) | Diego Frias | 2023-08-18 | 1 | -2/+16 | |
| | ||||||
* | wat-writer.cc: resolve missing type index in call_indirect (#2278) | Keith Winstein | 2023-07-31 | 1 | -2/+10 | |
| | ||||||
* | c-writer.cc: clean up handling of functions & tags (NFC) (#2271) | Keith Winstein | 2023-07-31 | 1 | -49/+41 | |
| | ||||||
* | c-writer.cc: eliminate redundant import_syms_ SymbolSet (NFC) (#2275) | Keith Winstein | 2023-07-31 | 1 | -23/+16 | |
| | ||||||
* | decompiler.cc: passive data segments do not have offsets (#2163) | mannkdev | 2023-07-30 | 1 | -1/+5 | |
| | ||||||
* | wasm2c: add link to clang bug on mips force read constraint | Shravan Narayan | 2023-07-30 | 2 | -0/+3 | |
| | ||||||
* | wasm2c: ensure force read constraints compile for clang on mips | Shravan Narayan | 2023-07-30 | 6 | -62/+86 | |
| | ||||||
* | C++20 compatibility fixes | Shravan Narayan | 2023-07-02 | 2 | -7/+7 | |
| | ||||||
* | wasm-objdump: Fix local numbering in disassembly (#2265) | Michael Williamson | 2023-06-27 | 1 | -1/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, in BinaryReaderObjdumpDisassemble::BeginFunctionBody, we had: local_index_ = objdump_state_->function_param_counts[index]; where index is the index of the function i.e. we treat the keys of function_param_counts as function indices. However, function_param_counts is populated in OnFuncType with: objdump_state_->function_param_counts[index] = param_count; where index is the index of the type i.e. we treat the keys of function_param_counts as type indices. This discrepancy would cause the locals to be incorrectly numbered in the "Code Disassembly" section. This fixes the discrepancy by adding a new field, function_types, which maps from function indices to type indices, and is populated in BinaryReaderObjdump::OnFunction. This field is used in BinaryReaderObjdumpDisassemble::BeginFunctionBody to get the type index for the given function, which is then used to get the parameter count. Fixes #2264. | |||||
* | BinaryReader/Writer: roundtrip large memory64 offsets (#2255) | Keith Winstein | 2023-06-20 | 2 | -2/+2 | |
| | | | With memory64, the offset becomes a u64. | |||||
* | wasm2c: fix bug in windows atomic load macro | Shravan Narayan | 2023-06-19 | 2 | -8/+8 | |
| | ||||||
* | memory64: when enabled, check offset range at validation-time (#2253) | Keith Winstein | 2023-06-12 | 5 | -54/+90 | |
| | | | | | | | | | | | | | | | | * memory64: when enabled, offset range check is at validation-time Before memory64, the "offset" in a load/store expression was a u32, and we enforced this in the WastParser and BinaryReader. After memory64, the "offset" becomes a u64 syntactically, and the validator checks that it's <= UINT32_MAX for i32 memories. We hadn't been correctly allowing these very large offsets in the text format (even when memory64 was enabled and the memory was i64). (This change also eliminates the "memories" member in the BinaryReader. The BinaryReader no longer needs to keep track of the memories and their types to check well-formedness.) | |||||
* | spectest-interp: assert_malformed must error in reader alone (#2252) | Keith Winstein | 2023-06-12 | 1 | -11/+92 | |
| | | | | | | Previously assert_malformed was treated the same as assert_invalid Also fixes a bug where spectest-interp wasn't trying to validate text modules (e.g. `(assert_invalid (module quote "...") "")`). | |||||
* | src/leb128.cc: fix detection of too-big u64 LEB128s (#2256) | Keith Winstein | 2023-06-09 | 1 | -2/+2 | |
| | ||||||
* | Add error when parameter size does not match on wasm-interp run-export (#2250) | Raphael Amorim | 2023-06-09 | 1 | -0/+7 | |
| | ||||||
* | binary-reader.cc: detect more malformed modules (#2251) | Keith Winstein | 2023-06-08 | 1 | -27/+23 | |
| | ||||||
* | WastParser: allow empty modules/scripts with warning (#2248) | Keith Winstein | 2023-06-07 | 1 | -3/+12 | |
| | ||||||
* | WastParser::ErrorExpected: ensure there is a token to consume (#2247) | Keith Winstein | 2023-06-07 | 1 | -1/+1 | |
| | | | Fixes assertion failure on empty quoted module | |||||
* | wasm2c: partial support for atomic memory ops | Shravan Narayan | 2023-05-17 | 5 | -6/+864 | |
| | ||||||
* | wasm2c: include simd128.h and wasm-rt-exceptions.h where necessary (#2236) | Keith Winstein | 2023-05-12 | 7 | -401/+399 | |
| | | | Co-authored-by: Shravan Narayan <shravanrn@gmail.com> | |||||
* | BinaryReaderIR: silence clang 14 warning (NFC) (#2232) | Keith Winstein | 2023-05-09 | 1 | -1/+1 | |
| | ||||||
* | Cleanup use of HAVE_WIN32_VT100 in color.cc | Shravan Narayan | 2023-05-09 | 1 | -22/+14 | |
| | ||||||
* | c-writer.cc: Correctly handle label names when branching out of try block ↵ | Keith Winstein | 2023-05-08 | 1 | -2/+6 | |
| | | | | (#2208) | |||||
* | Track use of SIMD and exceptions in IR, and CWriter includes support only if ↵ | Keith Winstein | 2023-05-08 | 3 | -3/+20 | |
| | | | | used (#2226) | |||||
* | Don't include windows.h for color printing if !HAVE_WIN32_VT100 | Shravan Narayan | 2023-05-05 | 1 | -0/+2 | |
| | ||||||
* | BinaryReader/BinaryReaderIR: check for missing end markers (#2218) | Keith Winstein | 2023-05-03 | 2 | -1/+20 | |
| | ||||||
* | wasm2c: Enable exceptions and simd according to command line flags | Shravan Narayan | 2023-05-02 | 4 | -2/+25 | |
| | ||||||
* | c-writer.cc: cleanup name lookups to happen consistently in one place (NFC) ↵ | Keith Winstein | 2023-04-27 | 1 | -9/+11 | |
| | | | | (#2207) | |||||
* | Make sure (IR) Validator and BinaryReaderInterp agree re: validity (#2219) | Keith Winstein | 2023-04-27 | 2 | -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 Breuil | 2023-04-26 | 2 | -2/+2 | |
| | | | per http://man.openbsd.org/alloca.3 | |||||
* | wasm2c: Use malloc.h instead of alloca.h for mingw | Shravan Narayan | 2023-04-24 | 2 | -2/+8 | |
| |