Commit Graph

3402 Commits

Author SHA1 Message Date
Brandon Fish
0583ae4846 Add system to skip wast commands to allow failures or skipping 2019-08-04 11:25:46 -06:00
Brandon Fish
f0cdb97320 Add invoke action and imports 2019-08-04 10:19:50 -06:00
Brandon Fish
7d376e18ee Add debug line info 2019-08-03 18:07:23 -06:00
Brandon Fish
021fefcdee Disable unlinkable spec temporarily, specs timeout 2019-08-03 17:57:34 -06:00
Brandon Fish
f46d07b5b3 Add more assertions 2019-08-03 17:31:43 -06:00
Yaron Wittenstein
8d583ad4d4 runtime-c-api: Cargo.toml - adding default-features=false for wasmer-runtime and wasmer-runtime-core dependencies 2019-08-03 22:47:36 +03:00
Yaron Wittenstein
a06fa40faa runtime-c-api: adding feature default-backend-singlepass to Cargo.toml 2019-08-03 22:03:21 +03:00
Yaron Wittenstein
9e51c39144 Cargo.toml - configuring singlepass feature 2019-08-03 11:54:59 +03:00
Syrus Akbary
8dc3bffe6e
Skip middleware-llvm tests until is fixed on CI
More info of the failure: https://circleci.com/gh/wasmerio/wasmer/11663

```
cargo test --manifest-path lib/middleware-common/Cargo.toml --release --features llvm
   Compiling wasmer-llvm-backend v0.6.0 (/home/circleci/project/lib/llvm-backend)
   Compiling inkwell v0.1.0 (https://github.com/wasmerio/inkwell?branch=llvm8-0#4c5359e5)
   Compiling wasmer-middleware-common v0.6.0 (/home/circleci/project/lib/middleware-common)
    Finished release [optimized] target(s) in 14.54s
     Running target/release/deps/wasmer_middleware_common-3c263452f3b7d07e

running 2 tests
test metering::tests::test_points_reduced_after_call ... test metering::tests::test_points_reduced_after_call has been running for over 60 seconds
test metering::tests::test_traps_after_costly_call ... test metering::tests::test_traps_after_costly_call has been running for over 60 seconds
Makefile:59: recipe for target 'middleware-llvm' failed
make: *** [middleware-llvm] Terminated
Too long with no output (exceeded 10m0s)
```
2019-08-02 18:45:21 -07:00
bors[bot]
fc37b00abc Merge #623
623: Add support for (register) command in spec tests and enable importing mutable globals. r=nlewycky a=nlewycky

Enable the part of the simd spec tests that now pass.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-08-02 23:51:39 +00:00
Nick Lewycky
9fcb06a270 Missed a line! 2019-08-02 16:49:28 -07:00
Nick Lewycky
59ef811b46 Update readme. 2019-08-02 16:48:34 -07:00
Brandon Fish
22808d1dba Implement spectests summary report 2019-08-02 16:00:35 -06:00
Nick Lewycky
546969a742 These tests are fixed too. 2019-08-02 14:33:11 -07:00
Nick Lewycky
2fabb5bc20 Add support for (register) command in spec tests and enable importing mutable globals.
Enable the part of the simd spec tests that now pass.
2019-08-02 14:18:07 -07:00
Syrus Akbary
17b5082c9b
Merge pull request #621 from wasmerio/feature/add-deny-dead_code-lint
Add deny dead_code lint and fix one error
2019-08-02 13:36:53 -07:00
Brandon Fish
b358605791 One CamelCase style cleanup and allow dead code warning 2019-08-02 14:14:59 -06:00
Brandon Fish
e2e096117a Allow dead_code for existing arch specific methods 2019-08-02 14:07:10 -06:00
bors[bot]
9489af4207 Merge #616
616: runtime-c-api: create the import object separately from instance instantiation  r=bjfish a=YaronWittenstein

Creating an `import object` separately from the `wasmer` instance, let's us build the import object incrementally and support the use-case of having import functions (a.k.a `vmcalls`) implemented in 2 programming languages (Rust and Golang for example) and consumed by the same `wasmer` instance.

Co-authored-by: Yaron Wittenstein <yaron.wittenstein@gmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
2019-08-02 20:03:56 +00:00
Yaron Wittenstein
2a5aaee147 Merge branch 'c-api-import_object_t' of github.com:spacemeshos/wasmer into c-api-import_object_t 2019-08-02 23:01:10 +03:00
Yaron Wittenstein
c67df1c954 Merge branch 'master' into c-api-import_object_t 2019-08-02 22:54:54 +03:00
Yaron Wittenstein
eed3b28eab comment cleanup 2019-08-02 22:54:00 +03:00
Brandon Fish
80e155c1fc
Merge branch 'master' into c-api-import_object_t 2019-08-02 13:51:25 -06:00
Brandon Fish
21ea2465c0 Catch panicking tests 2019-08-02 11:36:38 -06:00
Brandon Fish
2f70a199e4 Add deny dead_code lint and fix one error 2019-08-01 20:46:35 -06:00
bors[bot]
315c72e0b8 Merge #620
620: clang-format the C++, also replace one 'throw()' with 'noexcept'. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-08-02 00:41:20 +00:00
Nick Lewycky
83aa9c67c7 Replace throw() with noexcept. Unlike throw(), noexcept indicates that the function does not throw.
Before C++17, throw() was equivalent to wrapping the function in a try {} catch
{ std::unexpected(); }. In C++17 throw() was made equivalent to noexcept and
in C++20 throw() was removed.
2019-08-01 17:13:23 -07:00
Nick Lewycky
ac49e57c2d Run clang-format-8 over the C++ code. No functionality change. 2019-08-01 17:12:46 -07:00
bors[bot]
a224d53c93 Merge #619
619: Fix typos. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-08-01 23:45:38 +00:00
Nick Lewycky
5fed2cef03 Fix typos. 2019-08-01 16:24:40 -07:00
bors[bot]
1138a048d8 Merge #618
618: Implement InternalEvent::Breakpoint in the llvm backend. r=nlewycky a=nlewycky

Enable now-working metering unit tests when run with the llvm backend.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-08-01 20:31:27 +00:00
nlewycky
bebc3eefe4
Merge branch 'master' into features/llvm-metering 2019-08-01 13:01:10 -07:00
Nick Lewycky
536f9813dc Implement InternalEvent::Breakpoint in the llvm backend.
Enable now-working metering unit tests when run with the llvm backend.
2019-08-01 12:44:25 -07:00
Yaron Wittenstein
18c7f96188 Merge branch 'master' into c-api-import_object_t 2019-08-01 22:27:41 +03:00
Syrus Akbary
a9e3ebaa4a
Merge pull request #615 from penberg/clif-backend
clif-backend: Eliminate FunctionEnvironment construction in feed_event()
2019-08-01 12:22:25 -07:00
Brandon Fish
dfef2b6899
Merge branch 'master' into clif-backend 2019-08-01 11:59:02 -06:00
Yaron Wittenstein
f64eee894e [FIX] test-context.c imports contains now the expected mul import too 2019-08-01 19:31:33 +03:00
losfair
9ed5094f86 Resolve semantics for more values. 2019-08-01 23:28:39 +08:00
Yaron Wittenstein
3f4ffb0e2d Merge branch 'develop' into c-api-import_object_t 2019-08-01 18:15:21 +03:00
Pekka Enberg
869ac21f7b clif-backend: Eliminate FunctionEnvironment construction in feed_event()
The feed_event() function is called for every wasm binary instruction.
Let's optimize it by storing FunctionEnvironment object in
CraneliftFunctionCodeGenerator, rather than constructing it for every
feed_event() invocation.

This change reduces the time to run "ngix compile" benchmark by 68%:

Before:

  nginx compile           time:   [1.4152 s 1.4186 s 1.4222 s]
  Found 1 outliers among 10 measurements (10.00%)
    1 (10.00%) high mild

After:

  nginx compile           time:   [447.76 ms 448.32 ms 448.80 ms]
                          change: [-68.542% -68.440% -68.352%] (p = 0.00 < 0.05)
                          Performance has improved.

I assume some of the clone() calls are very expensive (Vec::clone(),
likely). I did see libc malloc()/free() high up in "perf top" profiles,
which are eliminted by this change.

I also looked into eliminating FunctionBuilder construction from
feed_event(). That turns out to be painful on lifetime rules because it
borrows bunch of other objects, so I am leaving it for someone who knows
the code better than I do.
2019-08-01 18:06:40 +03:00
bors[bot]
bd3be45fcd Merge #602
602: C api extract instance context from instance r=bjfish a=YaronWittenstein

Here is an example of usage:
c9a9d56bd0/crates/svm-wasmer-c-api/examples/counter.c (L132)



Co-authored-by: Yaron Wittenstein <yaron.wittenstein@gmail.com>
2019-08-01 14:27:48 +00:00
Yaron Wittenstein
524585942a deleting test-context binary 2019-08-01 17:24:51 +03:00
Yaron Wittenstein
09d704d053 Merge branch 'master' into c-api-extract-instance_context-from-instance 2019-08-01 14:08:47 +03:00
Yaron Wittenstein
f73180f45e wasmer-c-api:
* adding `wasmer_import_object_new` and `wasmer_import_object_extend`
* adding test file `test-module-import-instantiate.c`
2019-08-01 14:06:25 +03:00
bors[bot]
93032c7360 Merge #609
609: Update dependencies r=syrusakbary a=syrusakbary

This PR does:
* Update dependencies (to explicitly use only one version of a package, in all the places we use it)
* Remove explicit dependency on `hashbrown` since it's already adopted as the default algorithm for `HashMap`
* Small fixes on code to use latest versions

Co-authored-by: Syrus <me@syrusakbary.com>
2019-08-01 08:30:08 +00:00
Syrus
70a767e204 Improved exported memory tests 2019-08-01 01:28:11 -07:00
Syrus
2c6fbcba1f Improved runtime_c_api_tests 2019-08-01 01:27:36 -07:00
Syrus
052ad1381d Use ordered IndexMap for exports in runtime-core 2019-08-01 01:27:21 -07:00
Yaron Wittenstein
ab76755ade runtime-c-api:
* import.rs - adding `import_object_t` and `wasmer_import_object_destroy`
* instance.rs - adding `wasmer_module_import_instantiate`
2019-08-01 10:48:03 +03:00
Mark McCaskey
a12d0ada1a add wasi::fd_pread test 2019-08-01 16:38:34 +09:00