Commit Graph

3928 Commits

Author SHA1 Message Date
Brandon Fish
07ca48a34f Try initial travis arm64 setup 2019-11-10 14:26:11 -06:00
losfair
03c5614203 Rerun cargo fmt 2019-11-11 02:00:16 +08:00
losfair
03a9d1ad60 Cargo fmt 2019-11-11 01:43:16 +08:00
losfair
7d5699c19d Add missing instructions for aarch64. 2019-11-11 01:43:01 +08:00
losfair
899fbed35d Merge master. 2019-11-11 01:42:43 +08:00
bors[bot]
0d644a53db
Merge #939
939: Fix WASI append bug, add test r=MarkMcCaskey a=MarkMcCaskey

resolves #936 

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2019-11-09 00:34:07 +00:00
Mark McCaskey
adc9f3d479 Explicitly delete temp file in fd_append test 2019-11-08 16:33:08 -08:00
bors[bot]
23c9dbd9f3
Merge #938
938: Fuzz all the backends. r=nlewycky a=nlewycky

![](https://i.imgflip.com/3fq2bw.jpg)


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-11-08 23:54:53 +00:00
Syrus Akbary
3341528f71
Merge branch 'master' into fix/wasi-append 2019-11-08 14:21:24 -08:00
bors[bot]
5fee189e30
Merge #940
940: Update supported Rust version to 1.38 r=MarkMcCaskey a=MarkMcCaskey

Bump stable version to latest release - 1

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-11-08 21:06:48 +00:00
Syrus Akbary
e80ffed109
Merge pull request #937 from wasmerio/nlewycky/fuzzer-spectests-extensions
Pass --enable-all to wasm2json when building corpus out of spectests.
2019-11-08 11:43:45 -08:00
Mark McCaskey
a94fabf56e Update supported Rust version to 1.38 2019-11-08 11:40:53 -08:00
Mark McCaskey
64783423ea Fix WASI append bug, add test 2019-11-08 11:17:04 -08:00
Nick Lewycky
6370e11034 Fuzz all the backends. 2019-11-08 11:10:44 -08:00
Nick Lewycky
37268b2f46 Pass --enable-all to wasm2json when building corpus out of spectests. 2019-11-08 10:41:42 -08:00
bors[bot]
38f4fdb195
Merge #935
935: Apply TBAA to the correct instruction. r=nlewycky a=nlewycky

Another instance of the bug in PR #933.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-11-07 20:57:19 +00:00
Nick Lewycky
dccaa3a285 Apply TBAA to the correct instruction.
Another instance of the bug in PR #933.
2019-11-07 12:42:29 -08:00
bors[bot]
374fd5b393
Merge #933
933: Apply TBAA to the correct instruction. r=syrusakbary a=nlewycky

Caught by LLVM verifier complaining about !tbaa on a getelementptr.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-11-07 14:09:57 +00:00
Nick Lewycky
203efd0c06 Apply TBAA to the correct instruction.
Caught by LLVM verifier complaining about !tbaa on a getelementptr.
2019-11-06 23:25:39 -08:00
losfair
50c30ab212 runtime-core: Support cross-compilation. 2019-11-07 01:30:45 +08:00
losfair
001213716e Add fneg. 2019-11-07 01:30:27 +08:00
losfair
6135a004a4 Add itruncf/fconverti fast path. 2019-11-07 01:11:25 +08:00
bors[bot]
07a6fde420
Merge #932
932: Fix typo in comment. r=nlewycky a=nlewycky



Co-authored-by: nlewycky <nick@wasmer.io>
2019-11-05 19:32:26 +00:00
nlewycky
dc437bb4e7
Fix typo in comment. 2019-11-05 11:31:14 -08:00
bors[bot]
c07e6058f9
Merge #929
929: Update __wasi_rights_t and __wasi_signal_t with published changes r=MarkMcCaskey a=MarkMcCaskey

Follow up to #926 ; fixes everything else listed at https://github.com/WebAssembly/WASI/pull/135

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-11-05 18:24:43 +00:00
losfair
015491ea77 Add floating point instructions. 2019-11-06 01:43:41 +08:00
bors[bot]
5f9670fc19
Merge #931
931: Build Metadata using the current Context. r=nlewycky a=nlewycky

Fixes #927. Reverts #928.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-11-05 00:27:52 +00:00
Nick Lewycky
1d8f2b767d Build Metadata using the current Context.
Fixes #927. Reverts #928.
2019-11-04 15:27:38 -08:00
Mark McCaskey
ef5faccb76 Update __wasi_rights_t and __wasi_signal_t with published changes 2019-11-04 13:45:19 -08:00
bors[bot]
bbcccafc54
Merge #926 #928
926: Fix values of __wasi_advice_t r=nlewycky a=MarkMcCaskey

Issue identified in https://github.com/WebAssembly/WASI/issues/132 ; 

928: Add workaround for #927. r=MarkMcCaskey a=nlewycky

# Description

Add `--test-threads 1` to workaround #927.

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-11-04 19:20:34 +00:00
Nick Lewycky
efbb53a91e Add workaround for #927. 2019-11-04 11:04:50 -08:00
Mark McCaskey
aaa0160c95 Fix values of __wasi_advice_t 2019-11-04 10:48:42 -08:00
bors[bot]
69cc2f60bb
Merge #920
920: Export WasmPtr from wasmer_runtime r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-11-04 18:46:13 +00:00
bors[bot]
b9a9949281
Merge #921
921: Apply TBAA metadata in the LLVM backend. r=nlewycky a=nlewycky

# Description
Inform LLVM that the pointers to memory, globals, locals, etc., are distinct.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-11-02 01:05:20 +00:00
Nick Lewycky
c0c7661c65 Merge branch 'master' of github.com:wasmerio/wasmer into feature/llvm-tbaa 2019-11-01 17:53:52 -07:00
Nick Lewycky
132757ee9d Fix leak. Only create one NamedMDNode for each name. 2019-11-01 17:49:45 -07:00
bors[bot]
d8888c9459
Merge #911
911: Don't emit bounds checks when the offset is known at compile time to be less than the minimum memory size. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-11-01 19:53:17 +00:00
Nick Lewycky
20270411d9 When the const memory access is not larger than the minimum, use a runtime check.
The memory may have grown.
2019-11-01 12:49:54 -07:00
Nick Lewycky
bc521a2837 Add changelog entry. 2019-10-31 12:43:38 -07:00
Nick Lewycky
ef4b3c3428 Improve some TBAA label names, particular for memory.
Memory can't change between static and dynamic, so use that in the TBAA label
name.

Distinguish between local and imported memory, table and globals.
2019-10-31 12:40:32 -07:00
Syrus Akbary
e115d356a7
Update feature_matrix.md 2019-10-31 12:14:16 -07:00
Syrus Akbary
efc7385855
Merge pull request #922 from wasmerio/add-os-section-to-fetaure-matrix
Add OS compatibility section to feature matrix
2019-10-31 12:13:11 -07:00
Syrus Akbary
2b236be941
Update docs/feature_matrix.md 2019-10-31 12:12:56 -07:00
nlewycky
0e665c4001
Merge branch 'master' into feature/llvm-tbaa 2019-10-31 11:55:31 -07:00
Nick Lewycky
0ba686ffc6 Improve wording a little. 2019-10-31 11:50:33 -07:00
Nick Lewycky
88427c9696 Add some comments. 2019-10-31 11:48:52 -07:00
Mark McCaskey
16124672a3 Add OS compatibility section to feature matrix 2019-10-31 09:55:55 -07:00
bors[bot]
656491a337
Merge #917
917: feat(runtime-core) Host function without a `vm::Ctx` argument r=Hywan a=Hywan

Extracted from https://github.com/wasmerio/wasmer/pull/882.
~Includes https://github.com/wasmerio/wasmer/pull/916. Must not be merged until #916 lands in `master`.~
~If you want to compare only the different commits, see https://github.com/Hywan/wasmer/compare/feat-runtime-core-tests...Hywan:feat-runtime-core-host-function-without-vmctx?expand=1.~

This patch updates the `ExternalFunction` implementation to support host functions (aka imported functions) without having an explicit `vm::Ctx` argument.

It is thus possible to write:

```rust
fn add_one(x: i32) -> i32 {
    x + 1
}

let import_object = imports! {
    "env" => {
        "add_one" => func!(add_one);
    },
};
```

The previous form is still working though:

```rust
fn add_one(_: &mut vm::Ctx, x: i32) -> i32 {
    x + 1
}
```

The backends aren't modified. It means that the pointer to `vm::Ctx` is still inserted in the stack, but it is not used when the function doesn't need it.

We thought this is an acceptable trade-off.

About the C API. It has not check to ensure the type signature. Since the pointer to `vm::Ctx` is always inserted, the C API can digest host functions with or without a `vm::Ctx` argument. The C API uses [the `Export` + `FuncPointer` API](cf5b3cc09e/lib/runtime-c-api/src/import/mod.rs (L630-L653)) instead of going through the `Func` API (which is modified by this API), which is only possible since the C API only receives an opaque function pointer. Conclusion is: We can't ensure anything on the C side, but it will work with or without the `vm::Ctx` argument in theory.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-10-31 10:00:48 +00:00
Ivan Enderlin
912eb32be8 chore(cargo) Update Cargo.lock. 2019-10-31 11:00:07 +01:00
Ivan Enderlin
2703d48098 Merge branch 'master' into feat-runtime-core-host-function-without-vmctx 2019-10-31 10:59:16 +01:00