summaryrefslogtreecommitdiff
path: root/test/reduce/memory_table.wast.txt
Commit message (Collapse)AuthorAgeFilesLines
* [wasm-reduce] Do not crash on non-func element segments (#6778)Thomas Lively2024-07-261-0/+14
| | | | Generalize the code for simplifying element segments to handle more than just null and funcref elements.
* Simplify and consolidate type printing (#5816)Thomas Lively2023-08-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When printing Binaryen IR, we previously generated names for unnamed heap types based on their structure. This was useful for seeing the structure of simple types at a glance without having to separately go look up their definitions, but it also had two problems: 1. The same name could be generated for multiple types. The generated names did not take into account rec group structure or finality, so types that differed only in these properties would have the same name. Also, generated type names were limited in length, so very large types that shared only some structure could also end up with the same names. Using the same name for multiple types produces incorrect and unparsable output. 2. The generated names were not useful beyond the most trivial examples. Even with length limits, names for nontrivial types were extremely long and visually noisy, which made reading disassembled real-world code more challenging. Fix these problems by emitting simple indexed names for unnamed heap types instead. This regresses readability for very simple examples, but the trade off is worth it. This change also reduces the number of type printing systems we have by one. Previously we had the system in Print.cpp, but we had another, more general and extensible system in wasm-type-printing.h and wasm-type.cpp as well. Remove the old type printing system from Print.cpp and replace it with a much smaller use of the new system. This requires significant refactoring of Print.cpp so that PrintExpressionContents object now holds a reference to a parent PrintSExpression object that holds the type name state. This diff is very large because almost every test output changed slightly. To minimize the diff and ease review, change the type printer in wasm-type.cpp to behave the same as the old type printer in Print.cpp except for the differences in name generation. These changes will be reverted in much smaller PRs in the future to generally improve how types are printed.
* StackIR: Remove nops (#5746)Alon Zakai2023-05-301-1/+0
| | | | | | | No nop instruction is necessary in wasm, so in StackIR we can simply remove them all. Fixes #5745
* [NFC] Avoid unneeded work in GTO (#5304)Alon Zakai2022-11-301-4/+2
| | | | | As noticed in #5303, the test changes here are because we did unnecessary work which created a new rec group, which then led to a rec group being printed out.
* Change the default type system to isorecursive (#5239)Thomas Lively2022-11-231-2/+4
| | | | | | | | | | This makes Binaryen's default type system match the WasmGC spec. Update the way type definitions without supertypes are printed to reduce the output diff for MVP tests that do not involve WasmGC. Also port some type-builder.cpp tests from test/example to test/gtest since they needed to be rewritten to work with isorecursive type anyway. A follow-on PR will remove equirecursive types completely.
* Remove function index printing (#2742)Thomas Lively2020-04-091-3/+3
| | | | | | | | `BinaryIndexes` was only used in two places (Print.cpp and wasm-binary.h), so it didn't seem to be a great fit for module-utils.h. This change moves it to wasm-binary.h and removes its usage in Print.cpp. This means that function indexes are no longer printed, but those were of limited utility and were the source of annoying noise when updating tests, anyway.
* Remove FunctionType (#2510)Thomas Lively2019-12-111-5/+5
| | | | | | | | | | | | | | | | | Function signatures were previously redundantly stored on Function objects as well as on FunctionType objects. These two signature representations had to always be kept in sync, which was error-prone and needlessly complex. This PR takes advantage of the new ability of Type to represent multiple value types by consolidating function signatures as a pair of Types (params and results) stored on the Function object. Since there are no longer module-global named function types, significant changes had to be made to the printing and emitting of function types, as well as their parsing and manipulation in various passes. The C and JS APIs and their tests also had to be updated to remove named function types.
* test updateAlon Zakai (kripken)2019-03-311-17/+8
|
* Massive renaming (#1855)Thomas Lively2019-01-071-1/+1
| | | | | | Automated renaming according to https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
* Emit imports before defined things in text format (#1715)Alon Zakai2018-11-011-1/+1
| | | | | That is the correct order in the text format, wabt errors otherwise. See AssemblyScript/assemblyscript#310
* Unify imported and non-imported things (#1678)Alon Zakai2018-09-191-1/+1
| | | | | | | | | | | | | | Fixes #1649 This moves us to a single object for functions, which can be imported or nor, and likewise for globals (as a result, GetGlobals do not need to check if the global is imported or not, etc.). All imported things now inherit from Importable, which has the module and base of the import, and if they are set then it is an import. For convenient iteration, there are a few helpers like ModuleUtils::iterDefinedGlobals(wasm, [&](Global* global) { .. use global .. }); as often iteration only cares about imported or defined (non-imported) things.
* Optimize wasm-reduce (#1359)Alon Zakai2018-01-201-16/+16
|
* Update call_indirect text syntax to match spec update (#1281)Derek Schuff2017-11-131-2/+2
| | | | Function type gets its own element rather than being a part of the call_indirect (see WebAssembly/spec#599)
* Emit binary function index in comment in text format, for convenience (#1232)Alon Zakai2017-10-201-4/+4
|
* Avoid new blocks in binary reading/writing (#1165)Alon Zakai2017-09-121-8/+6
| | | | | | * don't emit a toplevel block if we don't need to, as in wasm it is a list context * don't create unnecessary blocks in wasm reading
* wasm-reduce tool (#1139)Alon Zakai2017-09-011-0/+38
Reduce an interesting wasm to a smaller still interesting wasm. This takes an arbitrary command to run, and reduces the wasm as much as it can while keeping the behavior of that command fixed. This can be used to reduce compiler bugs in an arbitrary VM, etc.