Commit Graph

59 Commits

Author SHA1 Message Date
Dan Gohman
dcb65b59c1 Remove an unnecessary mut, fixing a compiler warning. 2017-08-30 09:10:08 -07:00
Dan Gohman
b2fcb1ad17 Change translate_module to use a slice rather than a borrowed Vec.
This makes it more convenient to call from a cargo-fuzz fuzzer.
2017-08-30 09:10:08 -07:00
Dan Gohman
5303e7708b Handle wasmparser errors gracefully. 2017-08-30 09:10:08 -07:00
Dan Gohman
c380df1d04 Eliminate a heap allocation. 2017-08-29 05:44:40 -07:00
Dan Gohman
4afa5df3b6 Remove the last_inst_return field.
It's not necessary to explicitly track whether the last instruction is a
return; if the builder for the last block isn't filled by the time we reach
the end, it needs a return to fill it.
2017-08-29 05:09:25 -07:00
Dan Gohman
ea1d053831 Simplify the "am I in unreachable code" predicate.
The phantom unreachable stack is only used when the real unreachable stack is
active, so it's sufficient to check whether the real unreachable stack is empty.
2017-08-29 03:36:38 -07:00
Dan Gohman
c71d4fc01b Remove a stale comment. 2017-08-29 03:30:22 -07:00
Dan Gohman
f905dc914b Enable missing_docs errors in the wasm crate.
This adds `#![deny(missing_docs)]` to the wasm crate, and adds documentation
to several struct and enum fields, as needed.
2017-08-28 17:07:28 -07:00
Denis Merigoux
ee9989c4b9 Dumped code from the wasm2cretonne repo.
Integrated wasm test suite translation as cretonne test

Fixes #146.
Fixes #143.
2017-08-28 15:57:43 -07:00