Commit Graph

2437 Commits

Author SHA1 Message Date
Frank Rehberger
ec940ee8af Migrating to wabt::wat2wasm (#29)
* Add test_environ_translate

* Migrating to wabt::wat2wasm
2018-11-30 10:44:44 -06:00
Dan Gohman
ff25397c9e Fix the type of the heap bound variable. 2018-11-29 19:28:35 -08:00
Dan Gohman
b3d831015c Add basic logging support to the wasmtime binary. 2018-11-29 15:38:12 -08:00
Sergey Pepyakin
5eb43f027a Introduce TranslationContext 2018-11-29 22:28:10 +01:00
Dan Gohman
b7d43edfd3 Be more careful about integer overflow when computing relocs. 2018-11-29 10:28:18 -08:00
Dan Gohman
f7dc961d2c Fix some clippy warnings. 2018-11-29 10:27:49 -08:00
Sergey Pepyakin
52c0443368 Pass function sig in function_body::translate 2018-11-29 18:58:14 +01:00
Dan Gohman
976a5a2e7e Add more trapping testcases. 2018-11-29 06:24:02 -08:00
Dan Gohman
5ae48b06e1 Fix the pthread_detach assert on Darwin. 2018-11-29 06:22:39 -08:00
Dan Gohman
38acc069fa Fix compilation errors on Darwin. 2018-11-29 06:01:25 -08:00
Dan Gohman
adb76ba9f1 Avoid casting to/from greg_t, which doesn't work consistently across platforms. 2018-11-29 05:59:17 -08:00
Dan Gohman
5e05e9628d Enable OSX builds on Travis. 2018-11-29 05:59:17 -08:00
Dan Gohman
216c0ce14e Fix the scope of the ScopeGuard in call_wasm. 2018-11-29 05:59:17 -08:00
Dan Gohman
869ed1b5c5 Add badges for Appveyor CI and Gitter chat. 2018-11-29 05:58:19 -08:00
Dan Gohman
4ef1bac12b Add a basic appveyor config file. 2018-11-29 05:57:53 -08:00
Dan Gohman
862d859587 Add a LICENSE file to each crate. 2018-11-29 05:57:32 -08:00
Sergey Pepyakin
13c36612b5 increment → reserve. 2018-11-28 05:45:25 -08:00
Sergey Pepyakin
aa5643b9b5 Implement if then else 2018-11-28 05:45:25 -08:00
Sergey Pepyakin
ba216b2e8a Add a simple i32.eq operator. 2018-11-28 05:45:25 -08:00
Sergey Pepyakin
b42696f207 Add a simple boilerplate. 2018-11-28 05:45:25 -08:00
Frank Rehberger
4ac41213ad Add test_environ_translate 2018-11-28 04:33:14 -08:00
Dan Gohman
2a760ae5e8 Add tests that trap, and fix handling of SIGFPE on x86. 2018-11-27 06:38:28 -08:00
Dan Gohman
35627cf37f Implement wasm trap handlers. (#27)
* Implement wasm trap handlers.

This adds signal handlers based on SpiderMonkey's signal-handler code.
The functionality for looking up the trap code and wasm bytecode offset
isn't yet implemented, but this is a start.

I considered rewriting this code in Rust, but decided against it for now
as C++ allows us to talk to the relevant OS APIs more directly.

Fixes #15.

* Compile with -std=c++11.

* Refactor InstallState initialization.

* Compile with -fPIC.

* Factor out the code for calling a wasm function with a given index.

* Fix unclear wording in a comment.
2018-11-27 06:05:58 -08:00
Dan Gohman
8e1e75f1f4 Fix rustfmt diffs. 2018-11-27 05:41:19 -08:00
Geoffroy Couprie
bf5a06bc95 separate the context intialization from the function execution (#21)
the start function is called from the initialization phase
2018-11-27 05:33:56 -08:00
Dan Gohman
95fba6a9de Update to Cranelift 0.25. 2018-11-26 22:50:07 -08:00
Dan Gohman
0e19f39831 Temporarily disable the fuzz check in test-all.sh
We can re-enable it once https://github.com/Amanieu/hashmap_core/pull/8
is merged.
2018-11-26 05:04:05 -08:00
Dan Gohman
e8201d0f93 Begin work on no_std support.
This adds no_std support to a bunch of things, but more work is needed.
2018-11-26 04:52:39 -08:00
Dan Gohman
82c8ef95c4 Update for Cranelift API changes. 2018-11-26 04:11:09 -08:00
Dan Gohman
f823526a42 Update to wasmparser 0.22. 2018-11-26 04:10:50 -08:00
Dan Gohman
df2b610304 Add a Rust version badge. 2018-11-25 07:09:46 -08:00
Dan Gohman
74ccddcd64 Update to Cranelift 0.24. 2018-11-25 05:08:29 -08:00
Dan Gohman
0a0108f959 Update to Cranelift 0.22. 2018-11-25 05:08:29 -08:00
Dan Gohman
9e56ed5aad Bump the minimum Rust version to 1.30.1, following Cranelift's policy. 2018-11-16 12:10:52 -08:00
Geoffroy Couprie
7fca0792dd add a way to provide imported functions during relocation
They are provided as a closure taking the module (&str) and function name (&str) as arguments,
returning an address (Option<isize>)
2018-11-16 09:56:36 -08:00
Sergey Pepyakin
08240761d5 Compile a simple function (#2)
* Implement basics.

* Execute code

* Add wasm2wat test cases.

* abi_loc_for_arg for stack.

* Assert that sp_depth is 0 at the epilogue

* Do 32bit add.

* Assert that RAX can be used as a scratch register

* Reuse assembler.

* Align stack slots.
2018-11-08 13:56:27 -08:00
Dan Gohman
d72ebe53d4 Use the correct base address for memories. 2018-11-02 16:18:18 -07:00
Dan Gohman
8e114a2703 Update authors in Cargo.toml. 2018-10-30 13:08:42 -07:00
Dan Gohman
4a41d2d6c6 Delete obsolete clippy scripts. 2018-10-30 13:08:42 -07:00
Dan Gohman
0ff372a6b8 Adjust whitespace to match the upstream exception text.
This is a whitespace-only change.
2018-10-30 13:08:42 -07:00
Dan Gohman
d3bc26bc93 Mention that a goal of lightbeam is linear-time compilation. 2018-10-30 13:00:34 -07:00
Dan Gohman
e32144727d Update project name. 2018-10-30 12:59:49 -07:00
Dan Gohman
dac2eaa3cb Adjust whitespace to match the upstream exception text.
This is a whitespace-only change.
2018-10-30 12:57:52 -07:00
Dan Gohman
8b92b91b0a Update issue tracker URL. 2018-10-30 10:24:06 -07:00
Dan Gohman
34646c6f1f Add some categories and keywords to Cargo.toml. 2018-10-30 10:08:47 -07:00
Dan Gohman
068f86f645 Add a basic README.md. 2018-10-30 10:07:39 -07:00
Dan Gohman
154b35ecc1 Initial experiment. 2018-10-29 12:02:01 -07:00
Nathan Froyd
5f11f44482 add a --target option to wasm2obj 2018-10-10 08:10:09 -07:00
Dan Gohman
1f8b7c31a9 Remove obsolete clippy scripts.
Now that clippy is installable via rustup and is generally more stable,
we no longer need special scripts. `rustup component add clippy-preview` is
sufficient to install clippy, and `cargo clippy` is sufficient to run it.

Also, don't run clippy in test-all.sh. We do generally want to fix things
clippy reports, however it's not a requirement that the code be kept
clippy-warning-free at all times.
2018-10-09 14:41:07 -07:00
Dan Gohman
5a96e022db Update to the rustfmt in rust 1.29, which is now stable. 2018-10-09 14:36:48 -07:00