Commit Graph

2269 Commits

Author SHA1 Message Date
Dan Gohman
142b17a3f0 Delete an unused settings builder. 2017-10-10 09:47:04 -07:00
Dan Gohman
6dea25ee9f Store relocs in a Vec rather than in a HashMap. 2017-10-10 09:45:32 -07:00
Dan Gohman
f90e7ade86 Enable the cretonne verifier by default in debug builds. 2017-10-05 18:01:27 -07:00
Dan Gohman
c39cba4ae0 Start experimenting with cargo fuzz. This isn't very usable yet. 2017-10-05 18:00:54 -07:00
Dan Gohman
9f7d0a659c Use VmCtx arg for globals, and a global for the heap.
This replaces the ReservedReg strategy, and is more flexible.
2017-10-05 09:01:38 -07:00
Dan Gohman
b5732bc200 On error, always print the error message and exit with non-zero status. 2017-10-05 08:49:32 -07:00
Dan Gohman
c8e015f31a Remove an unused argument. 2017-10-04 12:32:45 -07:00
Dan Gohman
fc857a758e Remove an unneeded block. 2017-10-04 12:22:32 -07:00
Dan Gohman
b4e7e918cc Use the correct index for printing function definitions when imports are present. 2017-10-04 12:22:07 -07:00
Dan Gohman
23bafd1218 Split the runtime and execution code into separate crates. 2017-10-03 14:57:52 -07:00
Dan Gohman
6ded83332f Change the reloc sink to use vectors instead of hash maps. 2017-10-03 14:02:41 -07:00
Dan Gohman
412fedcc6d Fix reseting of the heap when compiling a module containing multiple functions. 2017-10-03 13:30:12 -07:00
Dan Gohman
31a962fa1b Support multiple globals. 2017-10-03 13:25:37 -07:00
Dan Gohman
865a3d9f31 Rename wasmstandalone::StandaloneRuntime to wasmstandalone::Runtime. 2017-10-03 13:01:31 -07:00
Dan Gohman
db88701eaa Use Self. 2017-10-03 12:54:35 -07:00
Dan Gohman
97b877bb9c Use Option::unwrap_or_else. 2017-10-03 12:53:28 -07:00
Dan Gohman
d4438f4006 Drop an unneeded dependency. 2017-10-03 12:48:33 -07:00
Dan Gohman
6c4bbc643c Set the faerie target based on the cretonne target. 2017-10-03 12:39:52 -07:00
Dan Gohman
a68b2619bd Sniff the wasm magic bytes, rather than relying on the filename extension. 2017-10-03 12:23:59 -07:00
Dan Gohman
e5ed1517ce Fix the command name in the usage message. 2017-10-03 12:21:09 -07:00
Dan Gohman
324a395a95 Make the "wat2wasm" error message not panic. 2017-10-03 12:20:37 -07:00
Dan Gohman
cad7e50106 Update to wasmparser 0.11.2. 2017-10-03 12:18:18 -07:00
Dan Gohman
5b0a083124 Avoid unnecessary BufReaders. 2017-10-03 06:56:23 -07:00
Dan Gohman
e64eb79aaf Fix dependency paths. wasmstandalone no longer depends on out-of-tree patches. 2017-09-23 15:38:38 -07:00
Dan Gohman
666d565fd4 Clean up unused imports. 2017-09-23 15:38:38 -07:00
Dan Gohman
0c78a2f298 Import the wasm2obj experiment and minimally update it. 2017-09-23 15:38:38 -07:00
Dan Gohman
06f0b00c2d Add an assert on an implemented feature rather than letting it silently fail. 2017-09-22 16:26:43 -07:00
Dan Gohman
64d596005c Reduce the extent of unsafe code. 2017-09-22 16:21:25 -07:00
Dan Gohman
ecd746718b Remove comments about manually saving callee-saved registers.
Even though Cretonne doesn't implement callee-saved registers yet,
it will, so we shouldn't need manual save/restore code when calling it.
2017-09-22 16:17:08 -07:00
Dan Gohman
4c5f584d01 Use debug_assert_eq! where applicable. 2017-09-22 16:13:04 -07:00
Dan Gohman
b583d75c7a Fix redundant borrows. 2017-09-22 16:11:11 -07:00
Dan Gohman
382415ed0c Fix a useless format!. 2017-09-22 16:09:10 -07:00
Dan Gohman
b89277d9ce Rename "wast" to "wat". 2017-09-22 15:57:32 -07:00
Dan Gohman
cdffc1b50a Roughly update for the recent Cretonne API changes.
Everything builds and simple modules run, though there's still lots more
to do.
2017-09-22 15:56:18 -07:00
Dan Gohman
b3a952ed67 Change the license to MIT/Apache-2.0. 2017-09-15 09:58:09 -07:00
Dan Gohman
73f5adb19d Clippy cleanups. 2017-09-06 09:56:14 -07:00
Dan Gohman
cb7e66d12a Fix missing documentation comment. 2017-09-06 09:19:34 -07:00
Dan Gohman
6c80e81c6c Remove trivial numeric casts. 2017-09-06 09:18:18 -07:00
Dan Gohman
54a3f1fcd4 Fix redundant qualification. 2017-09-06 08:59:10 -07:00
Dan Gohman
6c30cf8f00 Enable deny(missing_docs) in the wasmstandalone library. 2017-09-06 08:54:30 -07:00
Dan Gohman
3868467917 Format with rustfmt 0.9.0. 2017-09-06 08:37:12 -07:00
Dan Gohman
d0fe50a2a8 Check in the wasmstandalone code.
This is based on the code in https://github.com/denismerigoux/cretonne/commits/wasm2cretonne
before wasmstandalone was removed, with minor updates for the new library structure.
It is not yet updated for the latest cretonne API changes.
2017-09-05 17:06:51 -07:00
Dan Gohman
8f6957296e Merge commit '051bc08d23df0930be5e959645c50dd0cdf411d4' 2017-08-29 07:12:47 -07:00
Dan Gohman
344fbed77a Initial commit 2017-08-29 07:01:55 -07:00
Denis Merigoux
051bc08d23 Added description and license to Cargo.toml 2017-08-11 15:49:47 -07:00
Denis Merigoux
727f297ba9 Bugfix: wrong jump arguments for br_if to loops 2017-08-11 13:50:41 -07:00
Denis Merigoux
5fc61bd6f6 Added Fibonacci test case 2017-08-11 11:10:21 -07:00
Denis Merigoux
dfdab56a54 Integrated wasm test suite translation as cretonne test 2017-08-10 16:30:09 -07:00
Denis Merigoux
234e72a5b3 Dumped code from the wasm2cretonne repo 2017-08-10 16:05:04 -07:00
Jakob Stoklund Olesen
378e7cfe6b Switch branch relaxation to a FuncCursor. 2017-08-04 16:00:48 -07:00