Commit Graph

52 Commits

Author SHA1 Message Date
5741a2cf70 Implement function lookups using the table 2019-09-18 16:06:46 -07:00
b35a522d28 Add method to call function at index on Ctx 2019-09-16 15:01:18 -07:00
228d562a3b Re-use registered module instances in spectests 2019-08-10 15:56:25 -06:00
5d9aa1f986 Return link error instead of assertion failure for bad data initialization 2019-08-07 15:40:42 -06:00
f6240721ea Merge branch 'master' into simd 2019-07-24 14:08:24 -07:00
3c952f307e fix Drop of uninit Ctx; use MaybeUninit 2019-07-24 11:29:16 -07:00
18307bb79c Improve panic/unreachable/unimplemented usage. Refactor a little. 2019-07-22 12:15:56 -07:00
3e009c5971 Reformat. 2019-07-18 13:40:24 -07:00
3be6a024aa Fix bugs in V128 support based on results from testing against simd spec test.
These is one test failure remaining with V128 global variables.

* Fix trunc_sat. We need both the largest float that can be converted to an int
  and the largest int, they are not the same number.
* Implement calling of functions that take V128 by passing in two i64's.
* Improve support for V128 in spectests. Parse binary modules with the same
  features as the outer spectest. Fix compilation error involving Result in
  emitted .rs file. Handle V128 in more cases when producing .rs file. Parse
  the wast script with SIMD enabled.
* Adjust the WAVM spectest so that it parses with WABT and mostly passes with
  wasmer. Wabt is particular about ints not having decimal places and floats
  having decimal places. Wasmer does not support mutable globals or shared
  memory. Tests of shuffles are disabled. Some assert_invalid tests that wabt
  won't even parse are disabled.
2019-07-18 12:52:59 -07:00
df5c12cbe1 Add V128 to wasmer runtime. Unimplemented in clif-backend. Other backends don't build. 2019-07-10 13:48:12 -07:00
0867208e0c Implement {get,set}_points_used. 2019-06-05 02:28:19 +08:00
32f9aee6fe Cargo fmt 2019-05-14 16:04:08 +08:00
db9705f00c Merge remote-tracking branch 'origin/master' into feature/remote-code-load 2019-05-14 15:46:15 +08:00
8218e550fc Improved docs and fixed few typos 2019-05-13 11:18:57 -07:00
0bbd6e6970 Fix function offset. 2019-05-07 08:25:46 -07:00
a590d7cd07 Tables 2019-05-04 09:56:52 -07:00
14bfd75ac9 Code loader framework. 2019-05-03 00:23:41 +08:00
389c6a015d Remove unused function memory offset addr 2019-04-24 02:00:07 -05:00
706ddabf61 Hook up error propagation 2019-04-22 15:06:40 -07:00
051d435423 Warnings and unused code cleanup 2019-04-12 10:27:14 -07:00
d8c6f76846 Redesign the interface between the runtime and the backends.
This removes the ProtectedCaller and FuncResolver traits, simplifying call implementations and improving dynamic call throughput.
2019-04-11 18:01:54 -07:00
870faf9838 Merge #341
341: feat(runtime-core) `Instance.exports` takes `&self` instead of `&mut self` r=lachlansneff a=Hywan

There is no reason for `exports` to take a mutable reference. This patch rewrites the `Instance.export` signature a little bit.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-04-10 19:22:12 +00:00
20297d1751 feat(runtime-core) Instance.exports takes &self instead of &mut self.
There is no reason for `exports` to take a mutable reference.
2019-04-10 12:17:16 -07:00
c212ba3619 Add implementations for typed func errors to cranelift and llvm 2019-04-09 15:53:01 -07:00
5e1a67d835 Initial typed func rewrite 2019-04-09 12:48:41 -07:00
7b0992e44f Instance now pulls state from the ImportObject 2019-03-28 11:56:31 -07:00
5e39a7b3d9 rewrite extending imports 2019-03-22 17:11:30 -07:00
7ef2c0dece Fix execute after free issue with llvm (and presumably cranelift?) 2019-03-04 14:41:56 -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
327e3a4a1a Implement many wasm instructions 2019-02-09 15:53:40 -08:00
aa90a33501 Make module info store FuncSig, not Arc<FuncSig> 2019-02-08 14:19:58 -08:00
1886b3d3c1 Naive short circuiting implementation for user panics and results. (#167)
* Add panic and result catching

* exit process on panic and user runtime error

* Complete initial implementation
2019-02-08 13:08:03 -08:00
e147983ece fix 2019-02-07 10:45:48 -08:00
8fe9b7eac2 Add caching. (#134)
* Allow a module to have a different signature registry than the process-specific

* Add core ability to build compiled code caches

* Remove timing printouts

* Serialize/Deserialize memories to reduce copies

* Work more on api

* Relocate local functions relatively before external functions

* Fix incorrect definition in test

* merge errors caused by merge

* Fix emscripten compile

* Fix review comments
2019-02-06 16:26:45 -08:00
00db5410c5 Change memory access api again 2019-02-04 23:07:58 -08:00
563cda7ba2 Merge branch 'fix/emscripten-translate' of github.com:wasmerio/wasmer into fix/emscripten-translate 2019-02-04 15:08:10 -08:00
7fce447276 Change memory api 2019-02-04 15:07:32 -08:00
5f753f727c Merge branch 'master' into fix/emscripten-translate 2019-02-04 15:05:43 -08:00
e688b374a6 fix some typos (#136) 2019-02-04 10:24:44 -08:00
dcc75b98ba Fix some tests 2019-02-02 16:02:28 -08:00
ccd43df767 Instantiate takes reference 2019-02-02 15:58:33 -08:00
eba66f3b33 Add typed functions and weird type parameter things 2019-02-02 15:28:50 -08:00
19242a413f Get table imports working 2019-01-29 10:16:39 -08:00
98305c8731 Add new global import api 2019-01-28 11:55:44 -08:00
e4686e67c4 Add importable memories and dynamic memories 2019-01-25 15:28:54 -08:00
ab25125bba Change error discriminant name 2019-01-23 16:51:34 -08:00
0aa1687ca3 Add context and context_mut methods to Instance 2019-01-23 15:58:28 -08:00
147b214965 Fix doc tests 2019-01-23 15:36:13 -08:00
bc2e527bb2 Add func method to Instance 2019-01-23 15:30:35 -08:00
ab65477d1f Refine the runtime api and document the exposed items (#115)
* private module, remove unused method, docs on compile_with

* refine runtime api and document exposed items

* Fix integration test build

* Fix lint
2019-01-23 12:34:15 -08:00