Mark McCaskey
2bbe3406cf
Debugging LLVM trap code WIP
2020-04-26 12:52:58 -07:00
Mark McCaskey
9723270f96
Fix tests for the Cranelift backend
2020-04-24 14:55:30 -07:00
Mark McCaskey
b9ec8f9845
Define runtime error values explicitly in Singlepass
2020-04-24 13:21:45 -07:00
Mark McCaskey
bfb6814f23
Make runtime and trap errors well defined (WIP)
2020-04-23 12:40:35 -07:00
Mark McCaskey
bde319d9fb
Fix bug and un-deprecate Instance::call
2020-03-31 14:06:30 -07:00
Mark McCaskey
836711f7cd
Implement Instance::call
in terms of the exports API
2020-03-31 12:40:55 -07:00
Mark McCaskey
50fcd57e45
Improve consistency and add misc clean ups
2020-03-31 12:37:50 -07:00
Mark McCaskey
7ca721bd83
Update from feedback
...
Deprecate more methods on `Instance`, add `into_iter` method on
`Exports`, add FuncSig to ImportType and other updates.
2020-03-30 17:38:51 -07:00
Mark McCaskey
7cd9e82015
Simplify ImportType
2020-03-27 14:00:02 -07:00
Mark McCaskey
a0dca15fbc
Add misc. fixes and updates from feedback
2020-03-27 13:25:51 -07:00
Mark McCaskey
3eff8c1973
Convert usages of Instance::{func,dyn_func}
to exports.get
2020-03-26 18:13:45 -07:00
Mark McCaskey
2fb8f8197b
Deprecate Instance::func
and Instance::dyn_func
2020-03-26 17:11:37 -07:00
Mark McCaskey
a18371eb91
Implement instance.exports
field syntax
2020-03-26 16:24:23 -07:00
Mark McCaskey
f4dc419b5e
Add types and methods to provide updated API
2020-03-17 15:27:11 -07:00
losfair
e0aafbe9dd
Remove WasmTrapInfo
and passExceptionCode
in the generic Box<Any>
container.
2020-02-06 23:49:50 +08:00
Mark McCaskey
0a02f3bb97
Clean up misc. bits of runtime-core
2020-01-24 15:31:52 -08:00
Syrus
1a960a01ae
Improved lint
2019-12-20 20:45:10 -08:00
Syrus
c4d70a6b75
Use Arc instead of Rc
2019-12-20 20:37:47 -08:00
Syrus
294cc28135
Move inline breakpoint outside of runtime backend
...
There was some code smell leaking inline breakpoint implementation into the runtime core backend instead of the compiler itself
2019-12-20 18:26:56 -08:00
Ivan Enderlin
95706160ee
Merge branch 'master' into feat-runtime-core-clos-host-function
2019-11-12 00:55:40 +01:00
Brandon Fish
aad390d09d
Deny missing docs in runtime core and add missing docs
2019-11-10 13:13:18 -06:00
Ivan Enderlin
ba87af5b1a
feat(runtime-core) Ability for an export function to get a func env.
2019-11-07 20:44:17 +01:00
Ivan Enderlin
2e05104d45
fix(runtime-core) Introduce Context::ExternalWithEnv
.
...
Host functions use `Context::External` with a `*mut vm::FuncCtx`
pointer, casted to `*mut vm::Ctx`. It creates a conflict with exports
that also use `Context::External`.
This patch introduces `Context::ExternalWithEnv` to create a specific
path in the code for an external context with `*mut vm::FuncEnv`.
This patch fixes all the `linking.wast` tests in the spectests.
2019-11-07 14:32:19 +01:00
Ivan Enderlin
e002c377ef
feat(runtime-core) vm::ImportedFunc
and vm::FuncCtx
have NonNull
pointers.
2019-11-06 14:48:46 +01:00
Ivan Enderlin
177c507a4e
feat(runtime-core) Introduce vm::FuncCtx
.
...
`vm::FuncCtx` replaces `vm::Ctx` as first argument passed to host
functions (aka imported functions).
2019-11-06 14:48:46 +01:00
Mark McCaskey
c4818f12dc
Update spectests to work with new Instance; use Arc<Mutex<>>
2019-09-23 13:43:01 -07:00
Mark McCaskey
1e637badc4
Merge remote-tracking branch 'origin/master' into feature/make-instance-send
2019-09-23 11:05:00 -07:00
Mark McCaskey
05ad1aaea4
Add test for Instance, fix tests for ImportObject
2019-09-23 11:04:31 -07:00
Mark McCaskey
5741a2cf70
Implement function lookups using the table
2019-09-18 16:06:46 -07:00
Mark McCaskey
9c205e05a2
Add comments explaining the unsafe impls and simplify the code, too
2019-09-17 18:35:12 -07:00
Mark McCaskey
83c3909b00
Implement it for memory and make Instance Send
2019-09-17 14:58:26 -07:00
Mark McCaskey
b35a522d28
Add method to call function at index on Ctx
2019-09-16 15:01:18 -07:00
Brandon Fish
228d562a3b
Re-use registered module instances in spectests
2019-08-10 15:56:25 -06:00
Brandon Fish
5d9aa1f986
Return link error instead of assertion failure for bad data initialization
2019-08-07 15:40:42 -06:00
nlewycky
f6240721ea
Merge branch 'master' into simd
2019-07-24 14:08:24 -07:00
Mark McCaskey
3c952f307e
fix Drop of uninit Ctx; use MaybeUninit
2019-07-24 11:29:16 -07:00
Nick Lewycky
18307bb79c
Improve panic/unreachable/unimplemented usage. Refactor a little.
2019-07-22 12:15:56 -07:00
Nick Lewycky
3e009c5971
Reformat.
2019-07-18 13:40:24 -07:00
Nick Lewycky
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
Nick Lewycky
df5c12cbe1
Add V128 to wasmer runtime. Unimplemented in clif-backend. Other backends don't build.
2019-07-10 13:48:12 -07:00
losfair
0867208e0c
Implement {get,set}_points_used.
2019-06-05 02:28:19 +08:00
losfair
32f9aee6fe
Cargo fmt
2019-05-14 16:04:08 +08:00
losfair
db9705f00c
Merge remote-tracking branch 'origin/master' into feature/remote-code-load
2019-05-14 15:46:15 +08:00
Syrus
8218e550fc
Improved docs and fixed few typos
2019-05-13 11:18:57 -07:00
Heyang Zhou
0bbd6e6970
Fix function offset.
2019-05-07 08:25:46 -07:00
Heyang Zhou
a590d7cd07
Tables
2019-05-04 09:56:52 -07:00
losfair
14bfd75ac9
Code loader framework.
2019-05-03 00:23:41 +08:00
Brandon Fish
389c6a015d
Remove unused function memory offset addr
2019-04-24 02:00:07 -05:00
Lachlan Sneff
706ddabf61
Hook up error propagation
2019-04-22 15:06:40 -07:00
Lachlan Sneff
051d435423
Warnings and unused code cleanup
2019-04-12 10:27:14 -07:00