Commit Graph

5218 Commits

Author SHA1 Message Date
Ivan Enderlin
30e72eb796 feat(interface-types) Implement lifting and lowering instructions. 2020-03-03 16:57:05 +01:00
MikaelUrankar
da04dab436 Add FreeBSD specific failure excludes. 2020-03-03 12:13:56 +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
bors[bot]
d2b546fef5
Merge #1260
1260: Recognize FreeBSD r=syrusakbary a=MikaelUrankar



Co-authored-by: MikaelUrankar <mikael.urankar@gmail.com>
2020-03-02 19:27:56 +00:00
Nick Lewycky
d5581331a2 Fix our side of wasmparser typo. 2020-03-02 11:16:21 -08:00
Syrus Akbary
e207c7f17d
Update LICENSE 2020-03-02 11:08:21 -08:00
MikaelUrankar
48fcc8af09 Recognize FreeBSD 2020-03-02 15:41:41 +01:00
Syrus Akbary
51084ec8fb
Update README.md 2020-02-29 09:47:00 -08:00
Syrus Akbary
5d55c69441
Update README.md 2020-02-29 09:41:31 -08:00
Syrus Akbary
2fe2bb9070
Update README.md 2020-02-29 09:39:53 -08:00
Syrus Akbary
b7231775bc
Update README.md 2020-02-29 09:36:41 -08:00
Syrus Akbary
527ac41415
Small improvements to README 2020-02-29 09:35:45 -08:00
Syrus Akbary
d647ac3023
Merge pull request #1252 from wasmerio/wasi-mapdir
Allow / in mapdir wasm path
2020-02-29 09:17:00 -08:00
Syrus
f8b206d438 Added changes into changelog 2020-02-29 08:49:38 -08: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
Syrus
4c19cd65e8 Add capi in ARM 2020-02-29 08:45:24 -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
losfair
84179dbd5e Fix changelog. 2020-02-29 11:12:26 +08:00
Syrus
80f7e98651 Moved build wapm into Makefile 2020-02-28 11:11:31 -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
bors[bot]
a13a897495
Merge #1212
1212: Add support for GDB JIT debugging r=MarkMcCaskey a=MarkMcCaskey

This PR adds support for JIT debugging to Wasmer with the Cranelift backend using a fork of `wasmtime-debug`.

The motivation for this change is partially inspired by the feature in Wasmtime and the implementation is largely derived from Wasmtime's `wasmtime-debug` crate and not included in this PR.  This implementation is currently Cranelift-only (if LLVM has value tracking we can add this there too without too much effort; we'd have to do the value tracking ourselves in Singlepass and I don't have enough context to know how hard that would be) and is based on a generic fork of the `wasmtime-debug` -- which will be published and uploaded in another repo.

This PR started out implementing the [Wasm-DWARF](https://yurydelendik.github.io/webassembly-dwarf/) reading and writing with gimli but after working on it for a few days, reading a chunk of the DWARF spec, seeing that Wasmtime had solved this well, and realizing how long this would likely take, I decided that it didn't make sense to spend the engineering effort there so I made a copy of `wasmtime-debug` and removed some of the less portable Cranelift pieces (very minor changes) and all code relying on data structures from wasmtime.  The resulting crate is completely generic and would work fine with Wasmtime or any other Wasm runtime at the cost of requiring some `transmute`s or a linear pass over the debug data to reconstruct it in terms of the new types exposed by the fork.  Perhaps there's a cleaner way to handle that that I haven't considered.

The integration with the GDB JIT interface is from the LLVM examples (I don't remember if I properly attributed everything in this PR/version of the code -- I still have the other branches locally though which I'll review before shipping this) and some of the code in this PR is from Wasmtime/Cranelift source code such as the sorting of the `ebb`s in `clif_backend::resolver`.  I spent a long time debugging some subtle bugs and ended up using a few things from Wasmtime's integration with `wasmtime-debug` and some bits from `cranelift-wasm` and `cranelift-codegen`.

If there's interest from other people in working on the generic `wasmtime-debug` fork, I'm happy to get other maintainers involved and/or move it to a shared organization.

Special thanks to [Yury Delendik](https://github.com/yurydelendik) and the other `wasmtime-debug` authors for their work on Wasm debugging.  Also shout out to Cranelift for the nice API for tracking variables/data.

### TODO:
- [x] Update attributions file for LLVM, [wasm-dwarf](https://github.com/yurydelendik/wasm-dwarf), and Wasmtime/Cranelift and do another pass over code to make sure we're in compliance with the licenses from the relevant projects and have properly attributed the code used from other projects.
- [x] Adjust API of wasm-debug based on feedback
- [x] Discuss with Nick integration with LLVM
- [x] Discuss with Heyang integration with Singlepass
- [x] Adjust implementation based on feedback from team (traits modified, etc.)
- [x] Clean up some pointer wrangling code
- [x] Add opt-in feature to wasmer-runtime-core to enale wasm-debug so library users who won't use debug info are not affected

# Review

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


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
2020-02-27 22:23:22 +00: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
0c8464e3bc Update changelog entry for gdb jit PR 2020-02-26 16:59:10 -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
Syrus Akbary
73370b9de9
Merge pull request #1250 from wasmerio/feature/update-wasmparser
Update wasmparser to 0.51.3 and clif forks to 0.59
2020-02-26 14:05:27 -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
losfair
72e6a85ea5 Update changelog. 2020-02-26 23:42:48 +08: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