Ivan Enderlin
1b0bda82dd
feat(interface-types) Rename write-utf8
to string-to-memory
.
2020-03-10 10:25:58 +01:00
Ivan Enderlin
39d491e465
feat(interface-types) read-utf8
is renamed memory-to-string
.
2020-03-09 15:06:35 +01: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
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
Mark McCaskey
21fd95d760
Update wasmparser to 0.51.3 and clif forks to 0.59
2020-02-26 12:51:56 -08:00
Ivan Enderlin
c0933c52ca
feat(interface-types) Fix clippy errors and warnings.
2020-02-26 17:02:52 +01:00
Ivan Enderlin
bff63e3fad
Merge branch 'master' into feat-interface-types-update-to-last-standard-version
2020-02-26 16:22:56 +01:00
Ivan Enderlin
4e82d59ea1
feat(interface-types) Implement lifting and lowering instructions.
...
List from https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/working-notes/instr.md .
2020-02-26 16:20:39 +01:00
Ivan Enderlin
f951b6aa53
feat(interface-types) Remove abandonned instructions.
2020-02-26 15:48:00 +01:00
Ivan Enderlin
350a30507f
fix(interface-types) arg.get
's index is of type u32
.
2020-02-26 15:42:29 +01:00
Ivan Enderlin
3653c42e23
test(interface-types) Test adapter to binary.
2020-02-26 15:38:59 +01:00
Ivan Enderlin
4b7cd3a875
doc(interface-types) Fix a typo.
2020-02-26 15:34:04 +01:00
Ivan Enderlin
45283d4f52
test(interface-types) Fix all tests based on previous commits.
2020-02-26 15:32:14 +01:00
losfair
eb89720d5a
Merge remote-tracking branch 'origin/feature/polymorphic-v2' into feature/polymorphic-v2
2020-02-26 17:09:10 +08:00