Commit Graph

1695 Commits

Author SHA1 Message Date
Dan Gohman
c0b37bb713 Merge pull request #406 from sunfishcode/wabt-workaround
Improve the workaround for what is now wabt issue #59.
2019-10-07 10:21:13 -07:00
Dan Gohman
292323229c Improve the workaround for what is now wabt issue #59.
wabt's ScriptParser doesn't appear to handle paths containing
directories, so just use basenames for now.
2019-10-07 06:00:43 -07:00
Dan Gohman
53291a8497 Merge pull request #397 from sunfishcode/integrate-lightbeam
Integrate Lightbeam
2019-10-04 20:06:04 -07:00
Dan Gohman
6ef46e0497 Use the Lightbeam cargo feature. 2019-10-04 18:12:06 -07:00
Dan Gohman
fb2a89a1b1 Fix compilation error by bringing in Lightbeam. 2019-10-04 17:36:14 -07:00
Dan Gohman
5ccdf13b11 Rename --always-cranelift to --cranelift.
Also, enable use of Lightbeam in wasm2obj.
2019-10-04 17:02:31 -07:00
Dan Gohman
36756613b8 Merge remote-tracking branch 'origin/master' into integrate-lightbeam 2019-10-04 16:11:12 -07:00
Jakub Konka
daa3c3aeef Update wasi-common version 2019-10-03 23:59:18 +02:00
Dan Gohman
1017cbbf63 Update the compile fuzzer for Lightbeam changes. 2019-10-02 14:27:21 -07:00
Dan Gohman
8d89c3b479 Add options to wasmtime and wasm2obj to pick compilation strategy. 2019-10-02 13:59:49 -07:00
Dan Gohman
d4353f03cb Don't check assert_trap tests when Lightbeam is enabled.
Lightbeam doesn't yet produce trap metadata, so it can't yet match the
expected `assert_trap` messages. Disable them for now.
2019-10-02 13:42:26 -07:00
Dan Gohman
7092499c10 Update wasmtime-rust for new API. 2019-10-02 12:52:44 -07:00
Dan Gohman
c43803b19c Update dependencies. 2019-10-02 12:32:31 -07:00
Dan Gohman
239f412616 Test Lightbeam. 2019-10-02 12:32:18 -07:00
Dan Gohman
5bf2fc0ffa Don't enable Lightbeam tests if Lightbeam isn't enabled. 2019-10-02 12:06:00 -07:00
Dan Gohman
65b8afabe6 Make use of Lightbeam configurable.
This adds a `--always-lightbeam` option as well as an `--always-cranelift`
option, to allow the compilation strategy to be selected via the
command-line. This also enables regular testing for Lightbeam.
2019-10-02 11:54:06 -07:00
Dan Gohman
8c524815c3 Update dependencies. 2019-10-02 11:00:28 -07:00
Dan Gohman
8d52e389f8 Update Lightbeam for various API changes. 2019-10-02 10:10:32 -07:00
Dan Gohman
9757f7194c Merge Lightbeam into Wasmtime. 2019-10-02 09:49:38 -07:00
Dan Gohman
4cf15bd8c4 Remove the Lightbeam submodule. 2019-10-02 09:48:05 -07:00
Dan Gohman
5832eff76f Merge remote-tracking branch 'yurydelendik-lightbeam/cranelift-32' 2019-10-02 09:45:54 -07:00
Dan Gohman
8298a7a8b5 Merge remote-tracking branch 'jlb6740-lightbeam/update_cranelift_cg_ver_44' 2019-10-02 09:44:35 -07:00
Dan Gohman
6e963b670e Delete .rustfmt.toml 2019-10-02 09:34:09 -07:00
Dan Gohman
25a7e00d50 Delete .gitignore 2019-10-02 09:33:58 -07:00
Dan Gohman
6d5937dee0 Move lightbeam into a subdirectory. 2019-10-02 09:26:36 -07:00
Peter Huene
cb38b48156 Fix memory leaks in extern conversion functions in C API. (#395)
This fixes the memory leaks in the following functions which should not be
returning "owned" pointers:

* `wasm_extern_as_func`
* `wasm_func_as_extern`
* `wasm_extern_as_global`
* `wasm_global_as_extern`
* `wasm_extern_as_memory`
* `wasm_extern_as_table`

Additionally, this commit implements the `wasm_memory_as_extern` and
`wasm_table_as_extern` functions.

Fixes #394.
2019-10-02 05:54:36 -07:00
Johnnie Birch
5096d7cf92 Updates Cranelift Codegen dependence to 0.44
In trying to build the lightbeam feature in wasmtime there are
compile errors mostly related to outdated or missing trait
definitions. This patch moves the current cranelift codegen
dependence to 0.44 in support of that, though other changes
are still needed in wasmtime to get the feature to build.
2019-10-01 08:45:19 -07:00
Jean-Bapiste Lepesme
e1b9c01d94 Fix opt_level setting passed to cranelift
With 92a19e9398 the optimisation levels of cranelift were renamed, without this change trying to use the -o flag on wasmtime runtime results in "error: Unexpected value for a setting, expected any among none, speed, speed_and_size".

"best" was renamed "speed_and_size", although I think "speed" is more adapted to wastime.

Bye,
JB.
2019-09-30 09:38:00 -07:00
Peter Huene
406bc7895a Implement reading module table imports in API. (#387)
This commit implements populating the table imports of a module from the API.

It also allows for `anyref` in table types as per the reference types proposal.
2019-09-27 05:50:54 -07:00
Dan Gohman
0653ae2c9c Fix compilation errors. 2019-09-26 19:37:23 -07:00
Dan Gohman
7899784663 Replace println error handling.
Use `panic!` and log macros for error handling instead of `println!`.
2019-09-26 19:37:23 -07:00
Dan Gohman
053fb3433e Fix compilation error. 2019-09-26 17:22:41 -07:00
Dan Gohman
34766f64ea Recognize "wasi_unstable_preview0" in addition to "wasi_unstable". 2019-09-26 17:22:41 -07:00
Andrew Brown
0667a2897d Ignore simd_const test when glibc has a floating point parsing issue 2019-09-26 15:46:18 -07:00
Andrew Brown
68de2247bc Avoid errors when converting V128 for the wasm-c-api
For this to work the wasm-c-api must add support for the V128 type (e.g. through __uint128_t)
2019-09-26 15:46:18 -07:00
Andrew Brown
03a9f0e461 Run SIMD const spec test 2019-09-26 15:46:18 -07:00
Andrew Brown
ce8e8662ff Enable SIMD in WAST testsuites 2019-09-26 15:46:18 -07:00
Andrew Brown
bb244d52d5 Pass enabled features (e.g. --enable-simd) on to WABT when running WAST files 2019-09-26 15:46:18 -07:00
Andrew Brown
fb1c473342 Alter invocation of functions to use 16-byte invocation arguments 2019-09-26 15:46:18 -07:00
Andrew Brown
5bd422b429 Add V128 type 2019-09-26 15:46:18 -07:00
Andrew Brown
290b51a5f6 Update wabt and spec test suite
Update wabt (see issue in https://github.com/pepyakin/wabt-rs/pull/56). Due to changes in wabt, the spec tests are updated as well.
2019-09-26 15:46:18 -07:00
Sergey Pepyakin
58e3e65bc8 Update lightbeam to rustfmt-ed revision 2019-09-26 15:44:47 -07:00
Dan Gohman
86142f2e94 Use r# to escape strings which may be rust keywords. (#379)
This is a minor simplification, replacing a hardcoded list of keywords.
2019-09-26 13:44:43 -07:00
Artur Jamro
bbd7e91d1c Reformat code with new rustfmt (#28) 2019-09-26 22:30:20 +02:00
Peter Huene
4288f33440 Fix borrow scope for store in WrappedCallable impl for WasmtimeFn.
This PR fixes the borrow scope of store in the `WrappedCallable` impl of
`WasmTimeFn` such that it does not remain borrowed across the call to
`wasmtime_call_trampoline`. By limiting the scope of the borrow, the
implementation can be reentered if an exported function calls an imported
function, which in turn calls another exported function.

Fixes #365.
2019-09-26 12:55:58 -07:00
Dan Gohman
a666e14279 Temporarily switch to the rustfmt branch of lightbeam.
This is branched from master to apply rustfmt, as a temporary measure to
fix the CI.
2019-09-26 12:45:29 -07:00
Dan Gohman
10845134f7 Update to latest walrus, wasmparser, and wasm-webidl-bindings. 2019-09-26 12:34:58 -07:00
Peter Huene
622a630acd Implement wasm_module_imports. (#384)
This commit implements `wasm_module_imports` and a few related APIs so that
import information can be read about a module.
2019-09-26 13:57:33 -05:00
Artur Jamro
286d2515f9 Check trap code in test suite assertions 2019-09-26 11:43:41 -07:00
Yury Delendik
b0fe01397b Use HOST call convension in Func signature (#383) 2019-09-26 13:10:41 -05:00