summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Exporting/importing debug location information from .wast/.asm.js/.s formats ↵Yury Delendik2017-06-011-2/+7
| | | | | | | | (#1017) * Extends wasm-as, wasm-dis and s2wasm to consume debug locations. * Exports source map from asm2wasm
* Address review feedback for #1014 (#1016)Alon Zakai2017-05-181-3/+3
| | | | | | * address review feedback for #1014
* Validate finalization (#1014)Alon Zakai2017-05-181-4/+9
| | | | | | | * validate that types are properly finalized, when in pass-debug mode (BINARYEN_PASS_DEBUG env var): check after each pass is run that the type of each node is equal to the proper type (when finalizing it, i.e., fully recomputing the type). * fix many fuzz bugs found by that. * in particular, fix dce bugs with type changes not being fully updated during code removal. add a new TypeUpdater helper class that lets a pass update types efficiently, by the helper tracking deps between blocks and branches etc., and updating/propagating type changes only as necessary.
* Replace text annotations with explicit file/line for debug info (#967)Derek Schuff2017-04-131-4/+5
| | | Rather than storing debug info as text annotations, store explicit file and line information. This will make it easier to experiment with outputting other serializations or representations (e.g. source maps), and will allow outputting debug info for binaries as well.
* Wasm h to cpp (#926)jgravelle-google2017-03-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Move WasmType function implementations to wasm.cpp * Move Literal methods to wasm.cpp * Reorder wasm.cpp shared constants back to top * Move expression functions to wasm.cpp * Finish moving things to wasm.cpp * Split out Literal into its own .h/.cpp. Also factor out common wasm-type module * Remove unneeded/transitive includes from wasm.h * Add comment to try/check methods * Rename tryX/checkX methods to getXOrNull * Add missing include that should fix appveyor build breakage * More appveyor
* read unknown users sections as binary data stored on the Module (#918)Alon Zakai2017-02-211-0/+5
|
* clean up raw pointer import->functionType, make it a Name like everything ↵Alon Zakai2017-02-171-1/+1
| | | | else (#915)
* asm2wasm debuginfo (#895)Alon Zakai2017-02-071-0/+13
| | | | | | | | | | | | * parse file/line comments in asm.js into debug intrinsics * convert debug intrinsics into annotations, and print them * ignore --debuginfo if not emitting text, as wasm binaries don't support that yet * emit full debug info when -g and emitting text; when -g and emitting binary, all we can do is the Names section * update wasm.js
* emit globals before table and memory, because they may use a global for ↵Alon Zakai2016-12-301-4/+4
| | | | their element/segment offsets
* Don't create a memory section for an imported memory; fixes #772 (#773)Benjamin Bouvier2016-10-131-8/+1
|
* allow a maximum 0 size for a tableAlon Zakai2016-10-111-1/+1
|
* Don't create table sections for imported tables (#756)Derek Schuff2016-10-111-11/+4
| | | Previously the Print pass searched the imports for a table import and skipped printing a local table declaration if found. Instead this refactors to make importation explicit, and also create importation records (previously we were inconsistent about whether such records were created in the IR depending on the wast syntax).
* Change print order of top-level module components (#751)Derek Schuff2016-10-071-12/+13
| | | | | | | | 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-1/+1
| | | | | | | | | | * Update i64 stores for 0xc * Update autogenerated LLVM tests * Update known torture test failures * Add i64.store32 test to unit.wast
* More binary updates for 0xc (#733)Derek Schuff2016-10-031-1/+1
| | | | | | | | | | | | | | | Refine tables to explicitly exist or not. Previously they were printed or encoded if it had any segments, or an initial or max size. However tables can be defined but empty, so we had a special hack that defined an empty segment when we really just wanted an empty table. Now, just make the existence explicit. Update Function table encoding for 0xc (Table and Element sections) Add end opcodes after function bodies (these are consumed by getMaybeBlock with the same behavior that it had before when it reached the function end, so no explicit decode) Update call_indirect encoding for 0xc (no arity, call target is last)
* Refactor Import::Kind and Export::Kind into an ExternalKind enum class (#725)Alon Zakai2016-10-031-10/+10
|
* Make the linker always create a table segment (#722)Derek Schuff2016-09-301-0/+2
| | | | | | | Previously a table was only created if there were any address-taken functions. New module validation rules require the existence of a table for any call-indirects to validate (even if they are dead and never called). However this use case seems common enough that we might want to make it continue to work. So the linker now always creates an empty table segment (indicating an empty table).
* Print the name of memory along with size (#720)Derek Schuff2016-09-281-0/+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.
* Type check block/loop/if sigs (#717)Alon Zakai2016-09-281-0/+3
| | | | | | * type check using block/loop/if types provided in text and binary formats. * print if and loop sigs which were missing. * remove dsl from OptimizeInstructions as after those changes it needs rethinking.
* Update binary encoding for block, loop, and if signatures (#711)Derek Schuff2016-09-271-0/+3
| | | | | | Also updates the tests and has a few other changes for binary 0xc: Update nop/unrechable opcodes Fix for "name" section
* memory and table printing fixesAlon Zakai2016-09-201-8/+36
|
* globals mutability fixesAlon Zakai2016-09-191-1/+5
|
* block signaturesAlon Zakai2016-09-161-0/+3
|
* call_import changes: no more call_import, shared index space with functionsAlon Zakai2016-09-161-1/+1
|
* new export syntax in spec repoAlon Zakai2016-09-071-16/+23
|
* new import syntax in spec repoAlon Zakai2016-09-071-23/+13
|
* allow forcing full print mode in the envAlon Zakai2016-09-071-0/+3
|
* improve full mode printingAlon Zakai2016-09-071-0/+3
|
* use globals in asm2wasmAlon Zakai2016-09-071-3/+3
|
* get_global and set_global use a Name instead of an Index, to be more ↵Alon Zakai2016-09-071-8/+5
| | | | consistent with refering to other global objects; e.g. this avoids ordering issues with imported vs non-imported globals
* import type for globalsAlon Zakai2016-09-071-1/+7
|
* import kindsAlon Zakai2016-09-071-0/+7
|
* export kindsAlon Zakai2016-09-071-7/+8
|
* globals printing fix, handle the case with no moduleAlon Zakai2016-09-071-1/+2
|
* check store value type, and validation printing improvementsAlon Zakai2016-09-071-0/+4
|
* print wasm types in full modeAlon Zakai2016-09-071-15/+16
|
* loops no longer have an out label and other upstream loop updatesAlon Zakai2016-09-071-8/+8
|
* call_indirect now has the target at the endAlon Zakai2016-09-071-1/+1
|
* it is not cool to return a nopAlon Zakai2016-09-071-1/+1
|
* add drop and tee expressionsAlon Zakai2016-09-071-2/+14
|
* debugging in printAlon Zakai2016-09-071-0/+2
|
* offset support in tableAlon Zakai2016-08-151-6/+9
|
* support function table initial and max sizes, and new printing formatAlon Zakai2016-08-121-1/+5
|
* support expressions in segment offsetsAlon Zakai2016-08-121-5/+6
|
* Fix trailing whitespace, single-character strings, checking map element ↵Dominic Chen2016-07-221-11/+11
| | | | presence, and eliminate explicit index counter (#633)
* support wasm globals (#650)Alon Zakai2016-07-211-0/+27
|
* quote names in s-format that need itAlon Zakai2016-07-051-9/+27
|
* Add initialization functions for passes to avoid missing pass registration ↵Jukka Jylänki2016-06-211-3/+9
| | | | due to linker dead code elimination. Fixes #577.
* make call_indirect type a name, so that it is not a dependency on the ↵Alon Zakai2016-06-031-1/+1
| | | | module, which would break consistency and make some parallel passes tricky (#568)
* move function parallelism to pass and pass runner, which allows more ↵Alon Zakai2016-06-031-4/+4
| | | | efficient parallel execution (#564)