summaryrefslogtreecommitdiff
path: root/src/binary-reader-ast.c
Commit message (Collapse)AuthorAgeFilesLines
* Switch C files to CC files (#309)Ben Smith2017-02-231-1146/+0
| | | | | | | | | | | | | | | | | Mostly this involves adding additional casts. Though there are a few more substantial changes: * The default method for relocating parser stacks no longer works because Bison assumes that C++ values can't be memcpy'd. Ours can, but there's no easy way to make the generated code do the right thing, so we do it manually * Removed all uses of WabtBool and replaced with bool * Renamed all uses of export and mutable -> export_ and mutable_ * Casting an invalid value to an enum triggers ubsan, so we have to be a little more careful about when we do it (see binary-reader.c:read_sections()) * It's illegal to forward-declare enums, so we just #include instead. * Designated initializers are not allowed in g++, so we have to switch them to lazily initialized structures instead. Pretty horrible, so it will be nice to have a better solution for C++.
* Remove WabtAllocator (#307)Ben Smith2017-02-171-119/+92
| | | | It complicates the code everywhere. It's faster to use a stack allocator, but not worth the trouble for maintainability.
* Fix bug in wasm2wast w/ many imports (#305)Ben Smith2017-02-161-6/+10
| | | This fixes issue #304.
* Full typechecking for unreachable code (#302)Ben Smith2017-02-141-16/+10
| | | | | | | | | | | | | | | The typechecking is now shared between the validator and binary-reader-interpreter as well. * Shared the various LabelType enumerations -> WabtLabelType. * Fixed the "invalid depth" errors, the max value was incorrect. * Removed some tests that aren't useful anymore: - interp/if-then-br hasn't been useful for a while, but now is even less so because it doesn't validate without dropping the i32.const from the true branch - typecheck/bad-br-multi-type isn't possible because the block must specify the signature for the br. - typecheck/bad-label-multi-type used to test matching signature for fallthrough and br, but isn't possible because of block signatures.
* Rename all wasm prefixes to wabt (#298)Ben Smith2017-01-311-404/+404
|
* Add function names and relocations to wasmdump disassembly (#285)Sam Clegg2017-01-231-2/+3
|
* Pass import_index to binary reader import callbacks (#283)Ben Smith2017-01-191-12/+16
| | | | | It was being passed before as "index", which is confusing because the other callbacks have recently been changed to pass the func/global/memory/table index instead.
* Always use function index space in wasmdump (#278)Ben Smith2017-01-181-7/+5
| | | | | | This change also modifies a few BinaryReader callbacks to return indexes in the "module" space, rather than the "defined" space. This fixes issue #277.
* Fix some binary reader bugs found by fuzzing (#261)Ben Smith2016-12-271-3/+6
| | | | | | * Change assertions in apply-names to failures * Fix off-by-one bug in binary-reader-ast get_label_at * Keep track of last known section code, so the same section cannot be specified twice, with a custom section between.
* Update testsuite to f71cbe72bd5f4fb871bee39a9dc1278fa662a8a5Ben Smith2016-12-151-0/+2
|
* Make some binary reading/writing utilities public (#245)Sam Clegg2016-12-141-4/+5
| | | | | | | * Make some binary reading/writing utilities public This is mostly a refactor to make some of the internal binary reading/writing utilities public and available to the wasm linker prototype that I'm working on.
* Remove the "wasm-" prefix from source filesBen Smith2016-11-041-0/+1166