Commit Graph

1865 Commits

Author SHA1 Message Date
Syrus Akbary
f909f7ed1f
Merge pull request #650 from wasmerio/feature/wasi-path-rename
implement wasi::path_rename
2019-08-09 01:09:23 -07:00
Mark McCaskey
61f1df06d1 implement wasi::path_rename 2019-08-09 15:40:04 +09:00
Brandon Fish
7f0c48b354 Add windows clif excludes 2019-08-08 21:12:36 -06:00
Brandon Fish
a7ff120dd9 Fix some spectest imports and namespace_table issue 2019-08-08 21:03:00 -06:00
Syrus
d39d4b5f6d Remove structopt dependency from LLVM 2019-08-08 19:42:41 -07:00
bors[bot]
27d8506a46 Merge #643
643: Improve error reporting of IO errors, implement path_symlink r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-08-09 00:34:22 +00:00
Nick Lewycky
b2c4501357 Add support for backend flags. Backend flags are opaque to src/bin/wasmer.rs.
Use them to implement three features in the LLVM backend, getting a valid ELF object file, the post-optimization LLVM IR and the pre-optimization LLVM IR.

Presently they are also global to the backend which is not ideal.
2019-08-08 17:05:31 -07:00
bors[bot]
77fe15db31 Merge #646
646: Fix bare_trait_objects warnings r=bjfish a=bjfish

These appear to be coming to stable soon:
https://github.com/rust-lang/rust/blob/master/RELEASES.md#compatibility-notes

Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
2019-08-08 23:25:07 +00:00
Brandon Fish
5a41686192 Fix bare_trait_objects warnings 2019-08-08 16:46:52 -06:00
Nick Lewycky
02f1d73f88 Reformat. 2019-08-08 13:55:44 -07:00
Nick Lewycky
c4d4a6888c Fix a bug where we would fail to find llvm-config-M or llvm-config-M-N when llvm-sys would.
Update to match features in newer llvm-sys.
2019-08-08 13:46:40 -07:00
losfair
c1619026d5 Swap code lazily when tiering up from singlepass to LLVM.
Does not handle long-running functions, but should work at least.
2019-08-09 04:26:17 +08:00
losfair
0d604b754b Commented out code for saving semantics of internal values. 2019-08-08 21:54:39 +08:00
Mark McCaskey
d0696a0c0e implement wasi::path_symlink test & fix readlink test 2019-08-08 16:42:27 +09:00
Brandon Fish
55f214b3ac
Merge branch 'master' into feature/unexclude-some-passing-unlinkable 2019-08-07 23:19:40 -06:00
Brandon Fish
1c32e2a4af Add windows specific clif failures 2019-08-07 23:10:50 -06:00
Mark McCaskey
cdfd9afccc Improve error reporting of IO errors, begin implementation of path_symlink 2019-08-08 11:59:35 +09:00
Brandon Fish
0b0a77413e Unexclude some now passing assert_unlinkable 2019-08-07 19:45:31 -06:00
bors[bot]
205d7081f5 Merge #640
640: Protect::ReadWriteExec is readable and writable. r=syrusakbary a=nlewycky

Also assert that page size is a power of two in two places we assume it is.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-08-08 01:36:19 +00:00
bors[bot]
321ca4e565 Merge #635
635: Update spectests and runner r=bjfish a=bjfish



Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Syrus <me@syrusakbary.com>
2019-08-08 00:51:59 +00:00
Mark McCaskey
b8f8a637c1
Merge branch 'master' into feature/more-wasi-syscalls 2019-08-07 16:55:03 -07:00
Nick Lewycky
75959577c3 Protect::ReadWriteExec is readable and writable.
Also assert that page size is a power of two in two places we assume it is.
2019-08-07 16:49:29 -07:00
Brandon Fish
8763d2cbde
Merge branch 'master' into feature/spectests-runner 2019-08-07 16:50:06 -06:00
Brandon Fish
5d9aa1f986 Return link error instead of assertion failure for bad data initialization 2019-08-07 15:40:42 -06:00
losfair
b113f5a24b longjmp turns out to work on Windows. Remove custom unwinding code. 2019-08-08 03:19:19 +08:00
Mark McCaskey
ddb0b99f12 implement path_link updated unlink, fix tests, add new test 2019-08-07 16:11:38 +09:00
Mark McCaskey
6ad0be1e02 add fd_sync test 2019-08-07 12:41:35 +09:00
Mark McCaskey
dbe96bbce9 add wasi::fd_sync 2019-08-07 12:17:52 +09:00
Brandon Fish
dc8384ed22 Add windows specific excludes 2019-08-06 21:03:09 -06:00
Brandon Fish
b7236a58fc Add support for platform star key skip exclude 2019-08-06 20:06:34 -06:00
losfair
4b1d337ebe Custom setjmp/longjmp to avoid SEH. (will it work?) 2019-08-07 00:38:42 +08:00
losfair
b50fd31adb Use setjmp/longjmp to handle LLVM exceptions. 2019-08-07 00:06:35 +08:00
Brandon Fish
8c13eae2b8 Allow platform specific excludes 2019-08-05 20:57:07 -06:00
Brandon Fish
a56aaeaaa3 Add additional spectest imports 2019-08-05 19:25:12 -06:00
Brandon Fish
03e1b3d8e8 Remove unnecessary println and make spectest runs nocapture 2019-08-05 18:58:51 -06:00
Brandon Fish
540520e54e cargo fmt 2019-08-05 17:55:41 -06:00
Brandon Fish
dc94cfb7b8 Merge branch 'master' into feature/spectests-runner 2019-08-05 17:53:04 -06:00
Brandon Fish
c65abf8ff5 Delete unused commented out println 2019-08-05 17:52:44 -06:00
Brandon Fish
08eb113394 Output failures in exclude format and add all failures as excludes 2019-08-05 17:51:02 -06:00
Nick Lewycky
1d54a938f6 Fix a couple bugs testing NaNs. Add an exclusion list for LLVM min/max. 2019-08-05 15:38:03 -07:00
Syrus Akbary
07e6599a28
Merge branch 'master' into feature/instance-benchmark 2019-08-05 15:07:58 -07:00
Syrus
47456b5baa Fixed formatting 2019-08-05 14:37:08 -07:00
Syrus
fed7c79923 Added extra assertions in Emscripten. Fixed #244 2019-08-05 14:15:36 -07:00
Syrus
ea5affc05d Remove svm mentions in wasmer c api codebase 2019-08-05 11:49:16 -07:00
Syrus Akbary
6692978926
Merge branch 'master' into dependabot/cargo/blake2b_simd-0.5.6 2019-08-05 10:57:06 -07:00
dependabot-preview[bot]
50ebbc500f
Bump blake2b_simd from 0.5.5 to 0.5.6
Bumps [blake2b_simd](https://github.com/oconnor663/blake2_simd) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/oconnor663/blake2_simd/releases)
- [Commits](https://github.com/oconnor663/blake2_simd/compare/0.5.5...0.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-05 08:38:35 +00:00
dependabot-preview[bot]
a036a306d5
Bump regex from 1.2.0 to 1.2.1
Bumps [regex](https://github.com/rust-lang/regex) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.2.0...1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-05 08:36:27 +00:00
Mark McCaskey
061d540627 Implement wasi::path_filestat_set_times 2019-08-05 15:53:42 +09:00
Mark McCaskey
6db7bd8f07 get fd_allocate test working 2019-08-05 14:01:04 +09:00
Mark McCaskey
f0eb85a919 refactor wasi state file to hide boilerplate 2019-08-05 11:59:32 +09:00
Mark McCaskey
c2e3847e9a add check for fd_allocate, improve debug str for filestat_t 2019-08-05 11:24:06 +09:00
Mark McCaskey
8f06db45a1 format emitter with current stable Rust 2019-08-05 09:58:54 +09:00
Mark McCaskey
09acf3e581
Merge branch 'master' into feature/more-wasi-syscalls 2019-08-05 09:55:40 +09:00
Brandon Fish
43ae30985c Cleanup test runner 2019-08-04 16:44:27 -06:00
Brandon Fish
e3d78a1343 Implement allowed failures 2019-08-04 16:13:47 -06:00
Brandon Fish
b8610e799f Update README.md, remove old README.md, remove old spectest code 2019-08-04 15:53:48 -06:00
Brandon Fish
93233eb4b4 Implement registered modules 2019-08-04 15:36:17 -06:00
Brandon Fish
5c3edabb7c Enable simd compile 2019-08-04 14:44:55 -06:00
Brandon Fish
665f8707dc Implement named modules 2019-08-04 14:20:09 -06:00
Brandon Fish
8c911cb1c3 Implement action get for assert return 2019-08-04 13:37:39 -06:00
Brandon Fish
7060785d8d Implement assert_exhaustion 2019-08-04 13:18:57 -06:00
Brandon Fish
36bcda711f Update spectests and run by globbing wast files 2019-08-04 12:42:20 -06:00
Brandon Fish
9a33ece373 Merge branch 'master' into feature/spectests-runner 2019-08-04 11:34:22 -06:00
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
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
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
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
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
Nick Lewycky
5fed2cef03 Fix typos. 2019-08-01 16:24:40 -07: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
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
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
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
Syrus
676bccff3c Tryin gto make c_api_tests verbose mitigates the flaky error
Each time `make capi` is run, there is a flaky error:

```
Running target/release/deps/runtime_c_api_tests-3df0f74fcea1252d

running 1 test
test test_c_api ... FAILED

failures:

---- test_c_api stdout ----
Running command: `cmake` arg: Some(".")
output:
status: 0
stdout:
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/syrusakbary/Development/wasmer/lib/runtime-c-api/tests

stderr:

Running command: `make` arg: Some("-Wdev -Werror=dev")
output:
status: 0
stdout:
[  7%] Built target test-tables
[ 15%] Built target test-module-exports
[ 23%] Built target test-module-imports
[ 30%] Built target test-globals
[ 38%] Built target test-imports
[ 46%] Built target test-module
[ 53%] Built target test-module-serialize
[ 61%] Built target test-memory
[ 69%] Built target test-validate
[ 76%] Built target test-import-function
[ 84%] Built target test-instantiate
[ 92%] Built target test-exports
[100%] Built target test-exported-memory

stderr:

Running command: `make` arg: Some("test")
output:
status: 2
stdout:
Running tests...
Test project /Users/syrusakbary/Development/wasmer/lib/runtime-c-api/tests
      Start  1: test-exported-memory
 1/13 Test  #1: test-exported-memory .............Child aborted***Exception:   0.00 sec
      Start  2: test-exports
 2/13 Test  #2: test-exports .....................   Passed    0.01 sec
      Start  3: test-globals
 3/13 Test  #3: test-globals .....................   Passed    0.00 sec
      Start  4: test-import-function
 4/13 Test  #4: test-import-function .............   Passed    0.01 sec
      Start  5: test-imports
 5/13 Test  #5: test-imports .....................   Passed    0.01 sec
      Start  6: test-instantiate
 6/13 Test  #6: test-instantiate .................   Passed    0.01 sec
      Start  7: test-memory
 7/13 Test  #7: test-memory ......................   Passed    0.00 sec
      Start  8: test-module
 8/13 Test  #8: test-module ......................   Passed    0.01 sec
      Start  9: test-module-exports
 9/13 Test  #9: test-module-exports ..............   Passed    0.01 sec
      Start 10: test-module-imports
10/13 Test #10: test-module-imports ..............   Passed    0.01 sec
      Start 11: test-module-serialize
11/13 Test #11: test-module-serialize ............   Passed    0.01 sec
      Start 12: test-tables
12/13 Test #12: test-tables ......................   Passed    0.00 sec
      Start 13: test-validate
13/13 Test #13: test-validate ....................   Passed    0.00 sec

92% tests passed, 1 tests failed out of 13

Total Test time (real) =   0.08 sec

The following tests FAILED:
	  1 - test-exported-memory (Child aborted)

stderr:
Errors while running CTest
make[1]: *** [test] Error 8

thread 'test_c_api' panicked at 'Command failed with exit status: ExitStatus(ExitStatus(512))', lib/runtime-c-api/tests/runtime_c_api_tests.rs:43:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2019-08-01 00:22:52 -07:00
Syrus
0dfa1f68a8 Formatted code 2019-07-31 23:51:12 -07:00
Syrus
ebce7d0371 Updated dependencies 2019-07-31 23:42:54 -07:00
Syrus
a6461c3b14 Removed explicit hashbrown dependency 2019-07-31 23:18:38 -07:00
Syrus
6245daaa84 Update dependencies to latest versions 2019-07-31 23:04:03 -07:00
Mark McCaskey
d24c4a9c1a Merge branch 'feature/more-wasi-syscalls' of github.com:wasmerio/wasmer into feature/more-wasi-syscalls 2019-08-01 14:58:59 +09:00
Mark McCaskey
e6f188286b Implement wasi::fd_pread 2019-08-01 14:58:17 +09:00
Yaron Wittenstein
3a84288fd9 Merge branch 'master' into c-api-extract-instance_context-from-instance 2019-08-01 08:54:52 +03:00
Yaron Wittenstein
dd91a8208a changes after PR review https://github.com/wasmerio/wasmer/pull/602#pullrequestreview-269368270 2019-08-01 08:48:20 +03:00
Mark McCaskey
61d72a179b implement updating times in wasi::fd_filestat_set_times 2019-08-01 14:06:28 +09:00
Mark McCaskey
bca1ffc8d6
Merge branch 'master' into feature/more-wasi-syscalls 2019-07-31 21:41:19 -07:00
Mark McCaskey
a824d8d4d8 Implement wasi::{fd_allocation, fd_filestat_set_size} 2019-08-01 13:34:42 +09:00
Syrus
a83b6eccfa Fixed middleware linting 2019-07-31 21:24:46 -07:00
Syrus
5e7a20ef94 Improved metering codebase 2019-07-31 21:20:39 -07:00
bors[bot]
33166eaf66 Merge #607
607: Feature/update wasmparser and clif fork deps r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-08-01 02:28:35 +00:00
Brandon Fish
a832a4c787
Merge branch 'master' into wasmer-c-api-error-visibility 2019-07-31 19:58:23 -06:00
Brandon Fish
d9e1609616
Merge branch 'master' into wasmer-c-api-changes 2019-07-31 19:15:39 -06:00
Mark McCaskey
20e424c11e update wasmparser and clif-fork dependencies 2019-08-01 10:13:25 +09:00
nlewycky
54b5c642dc
Merge branch 'master' into features/llvm-metering 2019-07-31 13:13:07 -07:00
Nick Lewycky
931d556de1 Add support for internal fields. 2019-07-31 13:10:51 -07:00
Nick Lewycky
0e1fedceef Fix build of metering_benchmark with the llvm backend. 2019-07-31 13:04:40 -07:00
Syrus
fccf68c734 Updated version to 0.6.0 2019-07-31 10:28:45 -07:00
Yaron Wittenstein
0fb7eb1e19 tests/test-context.c - destroying resources in the end 2019-07-31 14:48:22 +03:00
Yaron Wittenstein
f6b5f1ba1b wasmer-c-api: adding asserts to tests/test-context.c 2019-07-31 14:32:38 +03:00
Yaron Wittenstein
351977690b adding a document for wasmer_instance_context_get 2019-07-31 14:15:16 +03:00
Yaron Wittenstein
847dd6f65e c-api: adding wasmer_instance_context_get (instance.rs) 2019-07-31 14:12:25 +03:00
Mark McCaskey
7760d5a4a2 simplify example and make public get_wasi_state unsafe 2019-07-31 15:59:08 +09:00
Syrus Akbary
6a4091e78e
Merge branch 'master' into feature/no-mem-uninit 2019-07-30 22:28:56 -07:00
Mark McCaskey
0ab8a0de09 Remove all uses of mem::uninitialized for Rust 1.38 2019-07-31 13:21:20 +09:00
Mark McCaskey
b407633366 add logging to plugin example, improve swap, and add some consts 2019-07-31 12:51:55 +09:00
Mark McCaskey
c099ed54e9
Merge branch 'master' into feature/public-api-wasi-fs 2019-07-30 19:26:19 -07:00
Mark McCaskey
620a521690 clean up wasi fs public api changes 2019-07-31 09:58:39 +09:00
Syrus Akbary
0256a6eb88
Merge branch 'master' into features/llvm-windows 2019-07-30 17:38:36 -07:00
bors[bot]
7106a4f3cc Merge #599
599: Fix llvm backend failures in fat spec tests and simd_binaryen spec test. r=syrusakbary a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-07-31 00:13:23 +00:00
Syrus
97c6956d98 Added llvm in windows support to Changelog 2019-07-30 15:56:25 -07:00
nlewycky
9b815cb518
Merge branch 'master' into features/llvm 2019-07-30 15:50:55 -07:00
Nick Lewycky
c42f47da34 Adjust simd_binaryen.wast until it works with LLVM except for known issues.
This doesn't yet work as of this commit, we'll need to pick up a new version of wasmparser.rs too.
2019-07-30 15:47:00 -07:00
Syrus
22f8b3f3dc Improved LLVM compilation for Unix 2019-07-30 15:32:21 -07:00
Syrus
89178732cc Fixed unix errors 2019-07-30 15:23:03 -07:00
Syrus
180e4766fe Merge branch 'master' into features/llvm-windows 2019-07-30 15:09:21 -07:00
Nick Lewycky
bdb1c4c44e Fix inkwell assertion due to treating vector as float. Fix llvm backend fatal error due to missing support for fminimum/fmaximum. 2019-07-30 14:59:04 -07:00
Syrus Akbary
12f8f3d085 First working version of LLVM in Windows 2019-07-30 14:47:53 -07:00
Nick Lewycky
3e7545a278 Fix the Trunc[SU] operations, makes conversions.wast pass. 2019-07-30 12:42:25 -07:00
losfair
4f56703657 Support runtime tier switching. 2019-07-30 22:25:58 +08:00
losfair
283676af2b Add .clone() to fix singlepass. 2019-07-30 22:25:37 +08:00
losfair
0a7f95ee06 Allow a range of instruction offsets to be used in ip lookup. 2019-07-30 22:25:15 +08:00
Mark McCaskey
741fffedb0 fix metering benchmark 2019-07-30 15:59:21 +09:00
Mark McCaskey
fba09bef1a Add useful functions for external use of WASI filesystem 2019-07-30 14:53:42 +09:00
bors[bot]
e0e92dbb79 Merge #594
594: Improvement cache in Windows r=syrusakbary a=syrusakbary

Caching was disabled on Windows, but can be re-enabled easily by improving the folder cache naming.

Reason why caching was disabled on Windows: We use a very long string (64 chars) for the wasmer version (hash). But we can use the version directly (no need to hashing)

Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2019-07-30 01:36:44 +00:00
Syrus Akbary
98b20d9240 Fixed Caching in Windows lint and improved code 2019-07-29 18:29:20 -07:00
Syrus Akbary
13901cc665 Improvement cache in Windows 2019-07-29 17:33:50 -07:00
Nick Lewycky
5f0ce6ef2f Enable SIMD when parsing the spec tests. 2019-07-29 15:47:38 -07:00
Nick Lewycky
7a1ddc0b5a Rename validate to validate_with_features. 2019-07-29 12:11:23 -07:00
Nick Lewycky
86316c474a Use --enable-simd to control whether SIMD is enabled in the wasmparser.
Before this change, 'wasmer run --backend=llvm some-simd.wasm' would run without complaint.

Also, note that the flag is not part of the cache key, so after any successful run, we can run it again without passing the flag.
2019-07-29 12:11:23 -07:00
Yaron Wittenstein
784e65d587 making wasmer_byte_array fields public 2019-07-29 17:24:43 +03:00
Yaron Wittenstein
8408260edd wasmer-c-api: adding #[derive(Debug)] for wasmer_result_t (so that we can do assert_eq!) 2019-07-29 17:10:17 +03:00
Yaron Wittenstein
a8d2469689 wasmer-c-api: returning back pub(crate) fn inner for export.rs 2019-07-29 13:44:56 +03:00
Yaron Wittenstein
10fc660aad wasmer_byte_array visibility revert (see PR: "wasmer-c-api-changes: making wasmer_byte_array fields public #589") 2019-07-29 13:41:28 +03:00
Nick Lewycky
11f66d287b Improve NaN handling by canonicalizing NaNs before most operations.
Not handled here is @llvm.minnum and @llvm.maxnum which should be replaced with
@llvm.minimum and @llvm.maximum, but using those currently leads to LLVM backend
fatal errors.
2019-07-28 22:53:48 -07:00
Nick Lewycky
2f021f0e2a LLVM srem is undefined in cases where i32.rem_s and i64.rem_s are defined. 2019-07-28 22:53:48 -07:00
Brandon Fish
8098b7e44d Merge branch 'master' into feature/spectests-runner 2019-07-26 22:15:42 -05:00
Brandon Fish
d7c11bcf5f Fixes case with empty module, handle case with no signatures 2019-07-26 17:58:57 -05:00
bors[bot]
53c343bc6f Merge #579
579: fix caching for other backends, improve default compiler code r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2019-07-26 22:21:00 +00:00
losfair
efb5277d1d Stack parsing now works with LLVM. 2019-07-27 02:50:49 +08:00
Nick Lewycky
6cddc25ddd Derive Debug on these small structs. 2019-07-26 11:12:13 -07:00
Nick Lewycky
8f417f3d59 Add --enable-simd flag to wasmer run and wasmer validate. 2019-07-26 00:34:02 -07:00
Brandon Fish
459837f412 Initial commit of wast spectest runner 2019-07-25 22:31:19 -05:00
Syrus Akbary
ab5f28851a
Merge pull request #578 from vavrusa/master
llvm-backend: export FunctionCodeGenerator and ModuleCodeGenerator
2019-07-25 17:08:50 -07:00
Mark McCaskey
d1a5cc9139 fix semver issue with clif 0.31 + new version of wasmparser 2019-07-25 10:38:20 -07:00
Yaron Wittenstein
f04d552361 wasmer-c-api:
* error.rs - changing `update_last_error` visibility to `pub`.
* error.rs - changing `CApiError` `msg` field visibility to `pub`.
2019-07-25 15:46:57 +03:00
Yaron Wittenstein
015616b541 export.rs - changing FuncPointer inner visibility to pub 2019-07-25 14:59:59 +03:00
Yaron Wittenstein
6cc31d3b49 lib.rs - making wasmer_byte_array fields public 2019-07-25 11:42:47 +03:00
Syrus Akbary
4ada51957d
Merge branch 'master' into feature/caching-fix-and-better-default-compiler 2019-07-24 18:58:45 -07:00
Marek Vavruša
659f088c4f llvm-backend: export FunctionCodeGenerator and ModuleCodeGenerator
This is in line with the singlepass-backend to be able to use LLVM MCG with
a StreamingCompiler.
2019-07-24 18:46:35 -07:00
Syrus
76daa7b3fd Improved Wasmer Backends documentation 2019-07-24 18:06:59 -07:00
Mark McCaskey
a3089a4501 fix caching for other backends, improve default compiler code 2019-07-24 17:31:59 -07:00
nlewycky
624f3459ab
Merge branch 'master' into simd 2019-07-24 14:44:52 -07:00
nlewycky
f6240721ea
Merge branch 'master' into simd 2019-07-24 14:08:24 -07:00
Nick Lewycky
4b1bc24a2b Update cranelift to the version crates.io.
This is needed in order for the resulting wasmer to be releasable.
2019-07-24 14:06:19 -07:00
Mark McCaskey
610c5bfe1f
Merge branch 'master' into ctx-drop-finalizer 2019-07-24 13:52:57 -07:00
Nick Lewycky
5c1b7d2e5b Adds the SIMD tests from binaryren, updated to work with wasmer.
This test is too large and therefore does not run by default, see
`fn is_fat_test` in spectests.rs.
2019-07-24 13:48:38 -07:00
Mark McCaskey
ce9bea402c
Merge branch 'master' into fix/dropping-bad-data 2019-07-24 13:32:42 -07:00
losfair
cc4f0e31a6 TwoHalves & trying to get cowsay to compile again 2019-07-25 02:44:28 +08:00
Mark McCaskey
3c952f307e fix Drop of uninit Ctx; use MaybeUninit 2019-07-24 11:29:16 -07:00
Nick Lewycky
f763de94ab Update to wabt 0.9.0. 2019-07-24 10:03:08 -07:00
Nick Lewycky
0ed104b543 Remove incorrect comment -- wasmer does support mutable globals.
The reason this test needed to be disabled is correctly documented in the comment above.
2019-07-23 17:13:02 -07:00
Nick Lewycky
16fe3ce0af Merge branch 'master' into simd 2019-07-23 13:51:15 -07:00
Nick Lewycky
fe2bd6ad6c Add missing names to LLVM instructions. 2019-07-23 13:19:27 -07:00
Mark McCaskey
ad7e3b52d3 Prepare for release of 0.5.7 2019-07-23 11:20:59 -07:00
Nick Lewycky
18307bb79c Improve panic/unreachable/unimplemented usage. Refactor a little. 2019-07-22 12:15:56 -07:00
losfair
0133b92bec Populating LLVM stack maps into MSM/FSM. 2019-07-23 02:55:43 +08:00
Nick Lewycky
4535274cf3 Update the loader interface for 128 bit types. 2019-07-22 11:23:41 -07:00
Nick Lewycky
f8e8b1cdea Update to latest wasmer clif branch. 2019-07-22 10:59:27 -07:00
Yaron Wittenstein
c3ced14e46 Merge branch 'master' into ctx-drop-finalizer 2019-07-22 14:13:11 +03:00
Nick Lewycky
775c120b38 Update to newer wasmerio/wabt-rs. 2019-07-19 15:48:50 -07:00
Nick Lewycky
fc935710c7 Merge branch 'master' of github.com:wasmerio/wasmer into simd 2019-07-19 15:37:36 -07:00
Nick Lewycky
cd25356858 Fix shuffle and enable tests. Add support for new load_splat instructions.
Updates to wasmparser 0.34.0 and picks up a newer wasmerio/wabt.
2019-07-19 15:19:58 -07:00
Mark McCaskey
f15e90f8f3
Merge branch 'master' into feature/wasi-readlink 2019-07-19 13:36:27 -07:00