2903 Commits

Author SHA1 Message Date
Heyang Zhou
e521dfe8c1
Fix typo (2)
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-03-10 12:38:55 +08:00
Heyang Zhou
cfbcd886d0
Fix typo (1)
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-03-10 12:38:39 +08:00
losfair
3e63f1aaa9 Deprecate wasmer_trampoline_buffer_builder_add_callinfo_trampoline. 2020-03-10 12:37:40 +08:00
losfair
7d2d89b606 Resolve review comments. 2020-03-10 12:28:54 +08:00
losfair
7e2ede3960 Fix floating point return values. 2020-03-10 03:16:22 +08:00
losfair
fc114ac671 Merge remote-tracking branch 'Hywan/test-runtime-core-polymorphic-host-functions' into fix/fpcc-workaround 2020-03-10 02:47:00 +08:00
losfair
65962f0186 Add a translation layer before import call in singlepass. 2020-03-10 02:46:13 +08:00
losfair
79613e42d7 Prettier format panic message in spectest. 2020-03-10 02:45:31 +08:00
losfair
3ff3554345 Merge remote-tracking branch 'origin/master' into fix/fpcc-workaround 2020-03-10 01:29:15 +08:00
bors[bot]
b292292267
Merge #1262
1262: Update to latest inkwell which adds context lifetime to basic blocks. r=nlewycky a=nlewycky

The latest inkwell adds lifetimes to basic blocks and also changes most APIs to pass them without reference.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-03-06 22:51:22 +00:00
Mark McCaskey
f8d34e0b57 Add WasmPtr access edge case test 2020-03-05 15:08:09 -08:00
Mark McCaskey
eb4c1bdace Prevent 0 length utf8 strings from WasmPtr too 2020-03-05 13:31:37 -08:00
Mark McCaskey
1c6424a754 Fix WasmPtr to work with accesses accessing the final valid byte
This also returns `None` for all accesses of zero sized types and
arrays of length 0.  Because the array accesses have a non-inclusive
length, length of 0 is not valid.  These checks prevent returning
empty slices that point just outside of memory bounds.
2020-03-05 13:23:50 -08:00
losfair
e62095da5d runtime-core: Move ArgumentRegisterAllocator into state. 2020-03-06 00:37:48 +08:00
losfair
a5de17fb18 runtime-core: Correctly allocate floating point registers for trampolines. 2020-03-05 22:49:58 +08:00
Ivan Enderlin
4d3e8ee117 test(runtime-core) Test polymorphic host functions with more types. 2020-03-05 14:17:04 +01:00
Mark McCaskey
c295adbaa8 Prepare for 0.15.0 release 2020-03-04 12:26:19 -08:00
Mark McCaskey
69fd76af10 Improve support for preopened directories in WASI syscalls
Also filters our default logging more and improves some debug statements
2020-03-04 11:51:24 -08:00
bors[bot]
b2e6535aa0
Merge #1264
1264: feat(interface-types) Implement lifting and lowering instructions r=Hywan a=Hywan

For the moment, WIT defines [a bunch of lifting and lowering instructions](https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/working-notes/instr.md). The encoders, the decoders and the AST support them, but we didn't have any instruction implementations for them. This PR implements the instructions for real.

To handle casting failure, I decided to use the `TryFrom` trait, instead of `as`, such as:

```rust
let x: i32 = 128;
let y: i8 = x.try_into().unwrap(); // fails
```

while:

```rust
let x: i32 = 128;
let y: i8 = x as _; // just overflows silently
```

Not all `*x` instructions aren't implement _yet_.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-04 13:43:33 +00:00
Mark McCaskey
4a6c96382d Update wording of doc comment from feedback 2020-03-03 17:04:52 -08:00
Mark McCaskey
469e43312a Improve WasmPtr documentation 2020-03-03 16:16:29 -08:00
losfair
f499dea0a7 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-03-04 01:56:52 +08:00
losfair
d9e744d9dc Resolve review comments. 2020-03-04 01:56:48 +08:00
Ivan Enderlin
de53659ee7 feat(interface-types) Implement s64-to-i32x and u64-to-i32x
Actually, `s64-to-i32` and `u64-to-i32` already error when overflow
happens.
2020-03-03 17:17:26 +01:00
Ivan Enderlin
c157bdaf63 test(interface-types) Test when lowering or lifting fails because of the value. 2020-03-03 17:10:10 +01:00
Ivan Enderlin
6576dfd64b test(interface-types) Add test cases for errors. 2020-03-03 17:04:26 +01:00
Ivan Enderlin
30e72eb796 feat(interface-types) Implement lifting and lowering instructions. 2020-03-03 16:57:05 +01:00
Nick Lewycky
3e0d299227 Update to latest inkwell which adds context lifetime to basic blocks. 2020-03-02 14:25:30 -08:00
bors[bot]
115a6573a9
Merge #1261
1261: Fix our side of wasmparser typo. r=MarkMcCaskey a=nlewycky

This is a `cargo update` plus change to fix for ac6df05378 .


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-03-02 21:53:13 +00:00
Nick Lewycky
d5581331a2 Fix our side of wasmparser typo. 2020-03-02 11:16:21 -08:00
MikaelUrankar
48fcc8af09 Recognize FreeBSD 2020-03-02 15:41:41 +01:00
Syrus
7a88a320c7 Allow / in mapdir wasm path 2020-02-29 08:47:25 -08:00
Syrus
3f456db4ad Updated headers 2020-02-29 08:45:48 -08:00
losfair
d443ad8d40 Remove outdated comment. 2020-02-29 11:15:09 +08:00
losfair
4012645aee Fix CodeMemory doc comments. 2020-02-29 11:13:34 +08:00
bors[bot]
85a3bb7148
Merge #1244
1244: feat(interface-types) Update to last standard version r=MarkMcCaskey a=Hywan

WIP

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-02-28 18:35:28 +00:00
losfair
2ddf9ad4c8 Disallow "fat" closures. 2020-02-28 22:16:29 +08:00
losfair
6516243e8a Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-28 11:54:13 +08:00
losfair
31a72e59fb Rename ErasedFunc to DynamicFunc and fix leaky PolymorphicContext. 2020-02-28 11:41:36 +08:00
Mark McCaskey
91808b9df2 Update test-rest to explicitly test each crate 2020-02-27 14:22:26 -08:00
losfair
32915f0077 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-27 23:49:10 +08:00
Mark McCaskey
0593965459 Make gdb jit symbol weak linking default in llvm-backend features 2020-02-26 19:41:53 -08:00
Mark McCaskey
b5cbb9df60 Fix test and build for musl 2020-02-26 19:07:30 -08:00
Mark McCaskey
dbb2ececf8 Work around unstable linkage attribute 2020-02-26 18:32:40 -08:00
Mark McCaskey
a089cf5a0c Link GDB JIT exposed global and fn as "linkonce"
This is required because LLVM exposes its own
2020-02-26 18:05:24 -08:00
Mark McCaskey
3691c80b7d Add generate_debug_info field to test 2020-02-26 17:29:18 -08:00
Mark McCaskey
56e47c17b0 Revert Wasm parsing to improved old style, fixing singlepass 2020-02-26 16:35:25 -08:00
Mark McCaskey
cb20cd9b2d Merge branch 'master' into feature/debug-prototype2 2020-02-26 14:39:02 -08:00
Mark McCaskey
a8b4f2a1e4 Update clif option string, fix table parsing to match AnyFunc 2020-02-26 13:25:41 -08:00
Mark McCaskey
0a92d9c65e Update LLVM backend to wasmparser 0.51.3 2020-02-26 13:07:31 -08:00