summaryrefslogtreecommitdiff
path: root/test/unit.wast.fromBinary.noDebugInfo
Commit message (Collapse)AuthorAgeFilesLines
* [test] Port tests in test/ to test/lit/basic/ (#6160)Heejin Ahn2023-12-131-537/+0
| | | | | | | | | | | | | | | | | | | | | This ports all tests from `test/` to `test/lit/basic/`. The set of commands and `CHECK` lines used are the same as the ones in #6159. Now we use `lit` to test these, this also deletes all `.wast`, `.wast.from-wast`, `.wast.fromBinary`, and `.wast.fromBinary.noDebugInfo` files from `test/` and all related test routines from the python scripts. All `CHECK` lines are generated by `update_lit_checks.py --all-items`. This also deletes these three multi-memory tests in `test/lit/`, because they seem to contain the same code with the ones in `test/`, which have been ported to `test/lit/basic/` along with other tests. - `test/lit/multi-memories-atomics64.wast` - `test/lit/multi-memories-basics.wast` - `test/lit/multi-memories-simd.wast` This also adds newlines between `(func`s in case there are none to make `CHECK` lines easy to view, and removes some extra existing newlines here and there.
* Remove FunctionType (#2510)Thomas Lively2019-12-111-49/+49
| | | | | | | | | | | | | | | | | 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.
* Remove FunctionType from Event (#2466)Thomas Lively2019-11-251-32/+32
| | | | | | | | | This is the start of a larger refactoring to remove FunctionType entirely and store types and signatures directly on the entities that use them. This PR updates BrOnExn and Events to remove their use of FunctionType and makes the BinaryWriter traverse the module and collect types rather than using the global FunctionType list. While we are collecting types, we also sort them by frequency as an optimization. Remaining uses of FunctionType in Function, CallIndirect, and parsing will be removed in a future PR.
* Massive renaming (#1855)Thomas Lively2019-01-071-48/+48
| | | | | | 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-4/+4
| | | | | 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-4/+4
| | | | | | | | | | | | | | 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.
* Binary format local parsing fixes (#1664)Alon Zakai2018-09-111-68/+68
| | | | | | * Error if there are more locals than browsers allow (50,000). We usually just warn about stuff like this, but we do need some limit (or else we hang or OOM), and if so, why not use the agreed-upon Web limit. * Do not generate nice string names for locals in binary parsing - the name is just $var$x instead of $x, so not much benefit, and worse as our names are interned this is actually slow (which is why the fuzz testcase here hangs instead of OOMing). Testcases and bugreport in #1663.
* ensure unique import names for each type, by giving them a prefix, avoiding ↵Alon Zakai2018-02-221-5/+5
| | | | collisions between say a global import and a function with a name from the name section that happens to match it (#1424)
* 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-37/+37
|
* Avoid new blocks in binary reading/writing (#1165)Alon Zakai2017-09-121-210/+164
| | | | | | * 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
* Ignore unreachable code in wasm binaries (#1122)Alon Zakai2017-08-221-82/+0
| | | Ignoring unreachable code in wasm binaries lets us avoid corner cases with unstructured code in wasm binaries that is a poor fit for Binaryen's structured IR.
* emit an unreachable if an unreachable block context does not end in an ↵Alon Zakai2017-08-051-0/+15
| | | | unreachable
* Polymophic stack support (#1117)Alon Zakai2017-07-311-0/+5
| | | | | | | Emit valid wasm binaries even for corner cases of unreachable code. * emit an unreachable after a node that pushes a value that has unreachable type (where wasm type checking would have pushed a concrete type) * conversely, as a hack, emulate the wasm polymorphic stack mode by not emptying the stack when it has one element and that element is unreachable. this lets further pops work (all returning an unreachable element)
* Support new result syntax for if/loop/block (#1047)Sam Clegg2017-06-121-10/+10
| | | | | | Support both syntax formats in input since the old spec tests still need to be parsable.
* fix emitting of unreachable ifs (#944)Alon Zakai2017-03-141-0/+46
|
* use a single space for pretty printing of wasts, so massive wasts are less ↵Alon Zakai2017-03-091-571/+571
| | | | unruly (#928)
* Fix emitting of unreachable block/if/loop (#911)Alon Zakai2017-02-161-0/+138
| | | | | | | | | | | | | | | | | | | | | | * an unreachable block is one with an unreachable child, plus no breaks * document new difference between binaryen IR and wasm * fix relooper missing finalize * add a bunch of tests * don't assume that test/*.wast files print to themselves exactly; print to from.wast. this allows wast tests with comments in them * emit unreachable blocks as (block .. unreachable) unreachable * if without else and unreachable ifTrue is still not unreachable, it should be none * update wasm.js * cleanups * empty blocks have none type
* Change print order of top-level module components (#751)Derek Schuff2016-10-071-3/+3
| | | | | | | | In wast files, the spec and WABT require imports to appear before any non-import definitions (see also https://github.com/WebAssembly/wabt/issues/152). This patch re-orders visitModule in the wast printer to meet this requirement, and more or less match the order of the binary sections. Also remove extraneous whitespace around table definitions.
* Update i64 stores for 0xc (#731)jgravelle-google2016-10-041-0/+7
| | | | | | | | | | * Update i64 stores for 0xc * Update autogenerated LLVM tests * Update known torture test failures * Add i64.store32 test to unit.wast
* Print the name of memory along with size (#720)Derek Schuff2016-09-281-1/+1
| | | | | Otherwise when we export it as "$0" it's an undefined name. The spec interpreter actually rejects this, although I think it's intended to work, given the tests in export.wast. wabt also accepts it.
* fix signed int64 LEB bug with large negative values (#719)Alon Zakai2016-09-281-0/+4
|
* Update binary encoding for block, loop, and if signatures (#711)Derek Schuff2016-09-271-1/+1
| | | | | | Also updates the tests and has a few other changes for binary 0xc: Update nop/unrechable opcodes Fix for "name" section
* Make wasm-as emit the names section/debug info only with -g (#705)Alon Zakai2016-09-261-0/+450