Commit Graph

39 Commits

Author SHA1 Message Date
Lachlan Sneff
fe8f8a0132 Add illegal arithmetic runtime error 2019-03-04 19:56:02 -08:00
Lachlan Sneff
2969409ca7 Add hacky reinterpret instructions and pop used arguments off the value stack 2019-03-04 16:44:46 -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
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
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
87ddf4f855 Add personality function.
- This is part of supporting exceptions in the future.
2019-03-02 10:20:18 -08:00
Lachlan Sneff
362e5aa160 Fix issue caused by dangling instruction.
- Come on inkwell, I thought you were better than this.
2019-03-01 20:28:27 -08:00
Lachlan Sneff
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
Lachlan Sneff
6a20676fa9 Actually unmap the code after it's done being used 2019-02-28 17:20:18 -08:00
Lachlan Sneff
359ac5abec Connect part of the llvm backend to the runtime 2019-02-28 13:18:00 -08:00
Brandon Fish
74875ed554 Library restructure (#104)
* Move wasmer-runtime to wasmer-runtime-core

* Add the runtime library

* Fix issue with macros using wasmer_runtime, fmt

* Make default compiler dependency optional

* Add instantiate and validate functions
2019-01-22 11:02:06 -08:00
Lachlan Sneff
39ddd8f258 Add imports macro 2019-01-21 16:24:49 -08:00
Lachlan Sneff
dbd0f99514 Fix argument type conversion 2019-01-21 15:21:51 -08:00
Lachlan Sneff
29d053cb29 Fix macro again and inline docs 2019-01-21 15:10:07 -08:00
Lachlan Sneff
10c5aa02a2 Add export_func macro, prelude, and rename imports stuff 2019-01-21 14:43:04 -08:00
Brandon Fish
89c5984d47 Remove commented out code 2019-01-18 23:17:00 -06:00
Lachlan Sneff
c34df39095 Fix broken reference 2019-01-18 14:18:06 -08:00
Lachlan Sneff
8a9f5fa61a
Add special error types for compile, linking, and runtime errors. (#99)
* Add error types and convert most results to wasmer-runtime results

* Fix spectests

* Fix umbrella project to work with new error types
2019-01-18 10:54:16 -08:00
Lachlan Sneff
93d0918122 Passing all spectests 2019-01-17 14:13:28 -08:00
Lachlan Sneff
1dbbaa30b6 Get most spectests passing 2019-01-17 13:11:53 -08:00
Lachlan Sneff
bef2b05354 Fix some mutability issues (WIP) 2019-01-13 16:44:20 -05:00
Lachlan Sneff
a9e58203f2 Remove generated spectest codes from repo. 2019-01-12 23:48:21 -05:00
Lachlan Sneff
a7ffb44bbc Rework imports 2019-01-12 22:02:19 -05:00
Lachlan Sneff
f08f49fa38 Fix formatting 2019-01-12 17:53:17 -05:00
Lachlan Sneff
a983e9ce8b Rearrange some apis 2019-01-12 17:52:14 -05:00
Lachlan Sneff
60201ea7a6 Check if memory description fits imported memory 2019-01-12 16:45:32 -05:00
Lachlan Sneff
80a1fce329 Redesign import namespaces 2019-01-12 16:24:21 -05:00
Lachlan Sneff
a3b3523a78 Fix broken test that was creating a stack overflow 2019-01-12 09:51:32 -05:00
Lachlan Sneff
230e43a894 Rewrite exports and imports 2019-01-10 23:00:05 -05:00
Lachlan Sneff
2e26f8547e Fix arithmetic NaN handling in f32.nearest and f64.nearest 2019-01-10 12:20:23 -05:00
Lachlan Sneff
c44dcfec2b call_indirect checks signature structural equality instead of nominal equality 2019-01-10 11:26:52 -05:00
Lachlan Sneff
e7e62cb6b7 Down to 30 failing spectests 2019-01-09 23:43:18 -05:00
Lachlan Sneff
985e2b2f42 Fix support for floating point numbers 2019-01-09 20:32:02 -05:00
Lachlan Sneff
8c74d0a551 Push debugging stuff to help debug calls not working 2019-01-09 18:32:13 -05:00
Lachlan Sneff
cfaa9ff494 Improve imports ergonomics 2019-01-08 22:23:07 -05:00
Lachlan Sneff
82771673b5 Make function imports unsafe 2019-01-08 22:09:09 -05:00
Lachlan Sneff
bba168e61e Support imported functions 2019-01-08 21:57:28 -05:00
Lachlan Sneff
7324c85749 Add clif-backend crate and runtime example 2019-01-08 16:04:03 -05:00