Ivan Enderlin
95706160ee
Merge branch 'master' into feat-runtime-core-clos-host-function
2019-11-12 00:55:40 +01:00
Ivan Enderlin
06c6b3c8e8
feat(runtime-core) More ABI compatible definition of Func
and FuncEnv
.
2019-11-12 00:52:14 +01:00
Ivan Enderlin
11f34a9285
feat(clif-backend,singlepass-backend) Feed imported functions with FuncCtx.vmctx
.
2019-11-12 00:51:57 +01:00
Brandon Fish
2d00b2589e
Update with PR review suggestions
2019-11-10 14:37:36 -06:00
Brandon Fish
aad390d09d
Deny missing docs in runtime core and add missing docs
2019-11-10 13:13:18 -06:00
Ivan Enderlin
c4c88f8af5
fix(runtime-core) Remove undefined behavior with mem::transmute
.
...
In the `wrap` functions, we use `std::mem::transmute(&())` to get the
pointer to the value “around” `wrap` (`Fn` has a method `to_raw` which
declares a `wrap` function, which uses `transmute` to retrieve
`Fn`). This is an undefined behavior. It was working until the
`FuncCtx` is introduced. Since then, the undefined behavior was
causing an error with the Singlepass backend.
This patch stores the pointer to `Fn` in `func_env`, so that the
pointer to the user-defined host function is always predictable.
2019-11-06 14:48:46 +01:00
Ivan Enderlin
0f82cd3c40
doc(runtime-core) Write more documentation.
2019-11-06 14:48:46 +01:00
Ivan Enderlin
2a041f898e
!temp
2019-11-06 14:48:46 +01:00
Ivan Enderlin
6035bd2d9b
feat(runtime-core,clif-backend,llvm-backend) Rename an ImportFunc
offset.
...
`ImportedFunc::offset_vmctx` becomes `ImportedFunc::offset_func_ctx`.
2019-11-06 14:48:46 +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
Patrick Ventuzelo
4b3880c88b
add details when calling unimplemented!
2019-10-03 11:26:54 +02: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
ccd369ff0c
Add example, rename Ctx fn, make things pub(crate), misc changes
2019-09-18 16:43:47 -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
9e9343878d
Implement Send for everything except Memory
2019-09-17 11:45:13 -07:00
Mark McCaskey
b35a522d28
Add method to call function at index on Ctx
2019-09-16 15:01:18 -07:00
Nick Lewycky
172ef77ddd
Use the static intrinsics for static shared memory too.
2019-08-19 17:26:35 -07:00
Brandon Fish
5a41686192
Fix bare_trait_objects warnings
2019-08-08 16:46:52 -06:00
Syrus
052ad1381d
Use ordered IndexMap for exports in runtime-core
2019-08-01 01:27:21 -07:00
Syrus
0dfa1f68a8
Formatted code
2019-07-31 23:51:12 -07:00
Syrus
a6461c3b14
Removed explicit hashbrown dependency
2019-07-31 23:18:38 -07:00
nlewycky
624f3459ab
Merge branch 'master' into simd
2019-07-24 14:44:52 -07:00
Yaron Wittenstein
c3ced14e46
Merge branch 'master' into ctx-drop-finalizer
2019-07-22 14:13:11 +03:00
Nick Lewycky
fc935710c7
Merge branch 'master' of github.com:wasmerio/wasmer into simd
2019-07-19 15:37:36 -07:00
Nick Lewycky
ea93b68165
Bump size of global up to 128 bits.
...
Fixes last spec test failure from the WAVM SIMD spec test.
2019-07-18 13:39:41 -07:00
nlewycky
3f3bf38d94
Fix typo in comment.
...
"Then thou must count to three. Three shall be the number of the counting and the number of the counting shall be three. Four shalt thou not count, neither shalt thou count two, excepting that thou then proceedeth to three."
2019-07-18 11:24:25 -07:00
nlewycky
42780042ef
Fix typo in comment.
2019-07-15 10:55:26 -07:00
Yaron Wittenstein
ad10152982
* vm.rs - calling Ctx
data_finalizer
upon destruction
2019-07-15 15:14:09 +03:00
losfair
5c5ecfff7d
Rename alternative_stack
to fault
.
2019-07-04 01:27:19 +08:00
losfair
967027003d
Full preemptive snapshot/resume.
2019-06-27 15:49:43 +08:00
losfair
0937e53801
Fully persist program state.
2019-06-26 01:38:39 +08:00
losfair
c6cd49a370
Support getting/setting metering points and internal fields with a Ctx.
2019-06-06 14:10:57 +08:00
Brandon Fish
c020c39193
Move get/set points used to middleware
2019-06-02 13:21:00 -05:00
Brandon Fish
e533a8a7b5
Add tests for metering, add option to compiler config
2019-06-02 11:37:02 -05:00
losfair
dcf52ef1a7
Cargo fmt
2019-05-23 20:10:34 +08:00
losfair
cf58305889
Dynamically allocate internal fields.
2019-05-23 20:10:17 +08:00
losfair
6aec1c4b5f
Use INTERNALS_SIZE
2019-05-17 01:33:33 +08:00
losfair
8e0d71b2bc
Fix missing internals
in test.
2019-05-17 01:32:41 +08:00
losfair
6aa87a0bbf
Add the internals
field and necessary structures for metering.
2019-05-17 01:10:21 +08:00
losfair
ee09209bfb
Fix clippy error.
2019-05-14 16:59:18 +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
Syrus
5a6cb96714
Merge branch 'master' into docs/better-runtime-docs
...
# Conflicts:
# lib/runtime-core/src/vm.rs
2019-05-13 11:08:00 -07:00
Heyang Zhou
af1ac9af96
Improve performance of memory access.
2019-05-13 05:11:08 -07:00
Heyang Zhou
61510f8116
Enforce runtime memory and stack bound check when using kernel loader.
2019-05-06 07:15:30 -07:00
Heyang Zhou
46e4cb05bc
Get memory intrinsics at runtime.
2019-05-04 10:33:12 -07:00