nlewycky
0e665c4001
Merge branch 'master' into feature/llvm-tbaa
2019-10-31 11:55:31 -07:00
Nick Lewycky
e7d1742c63
Update module to be held by Rc<RefCell<>> so that we can pass it to LLVMFunctionCodeGenerator.
...
Use that to generate distinct TBAA labels for distinct local variables.
2019-10-30 13:11:29 -07:00
Ivan Enderlin
edb6cbefca
fix(runtime-core) Share the definition of Trampoline
across all the backends.
...
This patch updates all the backends to use the definition of
`Trampoline` as defined in the `wasmer_runtime_core::typed_func`
module. That way, there is no copy of that type, and as such, it is
easier to avoid regression (a simple `cargo check` does the job).
This patch also formats the `use` statements in the updated files.
2019-10-30 13:10:34 +01:00
Nick Lewycky
bc64b4ce6c
Set target triple and datalayout when creating the LLVM module.
2019-10-23 16:04:29 -07:00
Nick Lewycky
b180a2e14c
Get aggressive about running cargo check over all packages with all features.
...
Fixes the one issue uncovered. The capstone disassembling support in the LLVM backend was broken. Fixed by removing it. Instead, use the `--llvm-object-file` flag to get a finished object file to disassemble with any disassembler.
2019-10-17 15:37:35 -07:00
Nick Lewycky
59597b9e83
Switch from PIC+Default (small) to Static+Large. Should fix flaky test failures.
2019-09-16 10:49:39 -07:00
losfair
e89ab43b98
Fix unused 'stackmaps' and 'module_info' on Windows
2019-08-22 13:25:52 -07:00
losfair
eef38429fc
Fix unused imports on Windows.
2019-08-22 13:14:05 -07:00
losfair
b0beb28ea7
Fix unused import on Windows.
2019-08-21 15:32:20 -07:00
losfair
56e735349d
Format everything
2019-08-21 15:23:56 -07:00
losfair
53ebcc355a
Disable LLVM stackmap on Windows
2019-08-21 15:23:11 -07:00
losfair
bf9d915635
Fix a few issues from PR comments.
2019-08-21 14:53:33 -07:00
losfair
7028df23ef
Allow only integers for LLVM function param/return values.
2019-08-15 19:07:03 -07:00
losfair
0e0573c73c
Merge remote-tracking branch 'origin/master' into feature/llvm-osr
2019-08-14 16:33:26 -07:00
Brandon Fish
0bf33662d1
Add missing LLVM imported memory functions
2019-08-13 20:07:55 -06:00
losfair
44f71759f6
Use Vec::with_capacity in various places.
2019-08-10 03:23:29 +08:00
losfair
b8c18215aa
Refactor tier switching code
2019-08-10 02:32:14 +08: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
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
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
losfair
9ed5094f86
Resolve semantics for more values.
2019-08-01 23:28:39 +08:00
Syrus Akbary
12f8f3d085
First working version of LLVM in Windows
2019-07-30 14:47:53 -07:00
losfair
0a7f95ee06
Allow a range of instruction offsets to be used in ip lookup.
2019-07-30 22:25:15 +08:00
losfair
efb5277d1d
Stack parsing now works with LLVM.
2019-07-27 02:50:49 +08:00
losfair
cc4f0e31a6
TwoHalves & trying to get cowsay to compile again
2019-07-25 02:44:28 +08:00
losfair
0133b92bec
Populating LLVM stack maps into MSM/FSM.
2019-07-23 02:55:43 +08:00
losfair
2e030c9c4a
Parsing LLVM stackmaps.
2019-07-19 02:02:15 +08:00
Mackenzie Clark
9ab7199fe5
Merge branch 'master' into feature/cleanup-imports-unsafe
2019-04-24 08:37:06 -07:00
Lachlan Sneff
706ddabf61
Hook up error propagation
2019-04-22 15:06:40 -07:00
Brandon Fish
9e93565a49
Cleanup build warnings imports and unnecessary unsafe
2019-04-20 20:37:39 -05:00
Lachlan Sneff
443663aa3f
Add caching support to llvm backend
2019-04-19 13:54:48 -07:00
Lachlan Sneff
4dd64ed72e
Remove UserTrapper trait
2019-04-18 10:00:15 -07:00
Lachlan Sneff
75cc65a8c5
Update llvm backend to new backend abstraction
2019-04-12 10:05:50 -07:00
Lachlan Sneff
60ac7a5b49
Remove unneeded semicolon
2019-04-11 12:13:36 -07:00
Lachlan Sneff
c898439817
Add well placed unwind(allowed) attribute
2019-04-11 12:07:54 -07:00
Lachlan Sneff
1cb3fbea0a
Add support for panicking/returning err back to llvm
2019-04-10 14:17:10 -07:00
Lachlan Sneff
cc656b26a9
Add implementations for typed func errors to cranelift and llvm
2019-04-09 17:09:33 -07:00
Ivan Enderlin
dea4705dcb
fix(llvm-backend) LLVMBackend::new
doesn't use instrinsics yet.
2019-03-29 10:04:56 +01:00
Ivan Enderlin
91f40639b7
fix(llvm-back) Mark WasmTrapType
as deadcode.
...
This enum is not used directly by Rust, but used externally.
2019-03-29 10:04:09 +01:00
Ivan Enderlin
a1ca7069af
fix(llvm-backend) Remove unused imports.
2019-03-29 10:03:40 +01:00
Lachlan Sneff
0e5d1172d6
Just install the signal handler once
2019-03-05 16:50:49 -08:00
Lachlan Sneff
fe8f8a0132
Add illegal arithmetic runtime error
2019-03-04 19:56:02 -08:00
Lachlan Sneff
3be7144892
Some cleanup
2019-03-04 17:37:05 -08:00
Lachlan Sneff
7ef2c0dece
Fix execute after free issue with llvm (and presumably cranelift?)
2019-03-04 14:41:56 -08:00
Lachlan Sneff
039ebdcf75
Fix merge errors and update llvm to use the new runtime error type.
2019-03-04 13:10:28 -08:00
Brandon Fish
c07298e58e
Make capstone optional with a feature
2019-03-03 16:02:20 -06:00
Lachlan Sneff
9cfda6800f
Try to return an error from call_protected when an exception occurs.
...
Something breaks pretty drastically sometimes, not sure why.
2019-03-02 19:08:15 -08:00
Lachlan Sneff
caf2205936
Add a signal handler for macos and linux.
...
Implementation Notes:
- To avoid setjmp, longjmp, and the mess that those create, we instead set the interrupting
context of the signal handler to return into the `throw_trap` routine. To my surprise,
this actually works. The stack ends up getting unwound normally and the memory-oob error
is caught by the trampoline.
2019-03-02 17:00:05 -08:00
Lachlan Sneff
57bfa9b0a4
Remove multiple throwing functions, just use one.
2019-03-02 14:16:02 -08:00
Lachlan Sneff
9a90689b93
Add preliminary support for throwing and catching uncatchable exceptions.
...
Additional info:
- WebAssembly "traps" are uncatchable, but are still caught by the trampoline caller.
2019-03-02 12:57:35 -08:00