Commit Graph

54 Commits

Author SHA1 Message Date
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
59597b9e83 Switch from PIC+Default (small) to Static+Large. Should fix flaky test failures. 2019-09-16 10:49:39 -07:00
e89ab43b98 Fix unused 'stackmaps' and 'module_info' on Windows 2019-08-22 13:25:52 -07:00
eef38429fc Fix unused imports on Windows. 2019-08-22 13:14:05 -07:00
b0beb28ea7 Fix unused import on Windows. 2019-08-21 15:32:20 -07:00
56e735349d Format everything 2019-08-21 15:23:56 -07:00
53ebcc355a Disable LLVM stackmap on Windows 2019-08-21 15:23:11 -07:00
bf9d915635 Fix a few issues from PR comments. 2019-08-21 14:53:33 -07:00
7028df23ef Allow only integers for LLVM function param/return values. 2019-08-15 19:07:03 -07:00
0e0573c73c Merge remote-tracking branch 'origin/master' into feature/llvm-osr 2019-08-14 16:33:26 -07:00
0bf33662d1 Add missing LLVM imported memory functions 2019-08-13 20:07:55 -06:00
44f71759f6 Use Vec::with_capacity in various places. 2019-08-10 03:23:29 +08:00
b8c18215aa Refactor tier switching code 2019-08-10 02:32:14 +08:00
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
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
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
9ed5094f86 Resolve semantics for more values. 2019-08-01 23:28:39 +08:00
12f8f3d085 First working version of LLVM in Windows 2019-07-30 14:47:53 -07:00
0a7f95ee06 Allow a range of instruction offsets to be used in ip lookup. 2019-07-30 22:25:15 +08:00
efb5277d1d Stack parsing now works with LLVM. 2019-07-27 02:50:49 +08:00
cc4f0e31a6 TwoHalves & trying to get cowsay to compile again 2019-07-25 02:44:28 +08:00
0133b92bec Populating LLVM stack maps into MSM/FSM. 2019-07-23 02:55:43 +08:00
2e030c9c4a Parsing LLVM stackmaps. 2019-07-19 02:02:15 +08:00
9ab7199fe5 Merge branch 'master' into feature/cleanup-imports-unsafe 2019-04-24 08:37:06 -07:00
706ddabf61 Hook up error propagation 2019-04-22 15:06:40 -07:00
9e93565a49 Cleanup build warnings imports and unnecessary unsafe 2019-04-20 20:37:39 -05:00
443663aa3f Add caching support to llvm backend 2019-04-19 13:54:48 -07:00
4dd64ed72e Remove UserTrapper trait 2019-04-18 10:00:15 -07:00
75cc65a8c5 Update llvm backend to new backend abstraction 2019-04-12 10:05:50 -07:00
60ac7a5b49 Remove unneeded semicolon 2019-04-11 12:13:36 -07:00
c898439817 Add well placed unwind(allowed) attribute 2019-04-11 12:07:54 -07:00
1cb3fbea0a Add support for panicking/returning err back to llvm 2019-04-10 14:17:10 -07:00
cc656b26a9 Add implementations for typed func errors to cranelift and llvm 2019-04-09 17:09:33 -07:00
dea4705dcb fix(llvm-backend) LLVMBackend::new doesn't use instrinsics yet. 2019-03-29 10:04:56 +01:00
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
a1ca7069af fix(llvm-backend) Remove unused imports. 2019-03-29 10:03:40 +01:00
0e5d1172d6 Just install the signal handler once 2019-03-05 16:50:49 -08:00
fe8f8a0132 Add illegal arithmetic runtime error 2019-03-04 19:56:02 -08:00
3be7144892 Some cleanup 2019-03-04 17:37:05 -08:00
7ef2c0dece Fix execute after free issue with llvm (and presumably cranelift?) 2019-03-04 14:41:56 -08:00
039ebdcf75 Fix merge errors and update llvm to use the new runtime error type. 2019-03-04 13:10:28 -08:00
c07298e58e Make capstone optional with a feature 2019-03-03 16:02:20 -06:00
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
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
57bfa9b0a4 Remove multiple throwing functions, just use one. 2019-03-02 14:16:02 -08:00
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
5760f6006a Start implementing exception handling by adding frame descriptor entry processing.
- Soon, we should be able basic exceptions.
2019-03-02 10:56:02 -08:00
a6fc06c908 Fix more compiling issues
Specifically:
- Don't truncate the list of local parameters.
- If the default destination in a br_table instruction is a loop, don't pop any results.
2019-03-02 10:04:44 -08:00
f0ac76517a Start running spectests
Additional info:
- Execution is turned off, this is just to make sure the backend can compile the entire specsuite.
- That being said, trampolines are implemented and protected call works (just doesn't protect).
2019-03-01 17:11:20 -08:00
3717c5720d Get control flow (at least according to the llvm verifier) working.
Next up:
- Importing vm intrinsics.
2019-03-01 15:48:43 -08:00