Commit Graph

20 Commits

Author SHA1 Message Date
Nick Lewycky
ea83924547 Update to LLVM 8.0. 2019-07-10 13:48:12 -07:00
Lachlan Sneff
706ddabf61 Hook up error propagation 2019-04-22 15:06:40 -07:00
Lachlan Sneff
443663aa3f Add caching support to llvm backend 2019-04-19 13:54:48 -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
Lachlan Sneff
48b36a3b01 Runs on linux and also hopefully ci 2019-03-05 14:54:44 -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
87c453a0ec Add check for table bounds on call_indirect. 2019-03-03 21:38:35 -08:00
Lachlan Sneff
51cf9dde05 Move SSA value caches to the entry block.
The supporting framework around LLVM will make sure to only compute values once if they
are known to never change. Previously, these values were attempted to be reused from places where
the users may not dominate the creation of the value. To avoid that, they are always created
in the entry block now.
2019-03-03 21:13:37 -08: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
Lachlan Sneff
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
Lachlan Sneff
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
Lachlan Sneff
6a20676fa9 Actually unmap the code after it's done being used 2019-02-28 17:20:18 -08:00
Lachlan Sneff
d4ae5cdd40 Get function addresses from llvm-compiled code 2019-02-28 12:31:39 -08:00
Lachlan Sneff
5d77769381 Hopefully finish the memory manager implementation for llvm RuntimeDyLd 2019-02-27 17:21:20 -08:00
Lachlan Sneff
4f833876e0 Start work on object loader using llvm's RuntimeDyld api. 2019-02-25 18:08:06 -08:00