Mark McCaskey
3691c80b7d
Add generate_debug_info field to test
2020-02-26 17:29:18 -08:00
Mark McCaskey
65a9e04f3c
Add updates from feedback
...
Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-02-20 11:20:40 -08:00
Mark McCaskey
3653a448f5
Clean up code, add documentation, implement pieces properly
2020-02-18 16:51:02 -08:00
Mark McCaskey
e34e0bb897
Clean up, everything works
2020-02-12 17:09:30 -08:00
Mark McCaskey
0564000da3
Add wip debugging code
2020-02-11 09:52:21 -08:00
Mark McCaskey
0a02f3bb97
Clean up misc. bits of runtime-core
2020-01-24 15:31:52 -08:00
Mark McCaskey
5931944a21
Add clippy error checking in lint step
2020-01-17 15:47:45 -08:00
Mark McCaskey
c187d1656e
Add misc doc improvements to runtime-core
2020-01-17 14:31:10 -08:00
Syrus
59945a8875
Use detault
2020-01-07 16:13:33 +01:00
Syrus
d7154fe791
Remove Backend dependency
2020-01-07 16:12:39 +01:00
Syrus
ad82beffb4
Fixed tests
2019-12-20 21:11:55 -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
bors[bot]
c02846a147
Merge #1069
...
1069: Add fn for splitting borrow of memory & data in Ctx, use in WASI r=MarkMcCaskey a=MarkMcCaskey
Fixes a soundness issue / some undefined behavior
# Review
- [ ] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <5770194+markmccaskey@users.noreply.github.com>
2019-12-17 00:55:56 +00:00
Mark McCaskey
2819821ab7
Fix typo in doc comment
...
Co-Authored-By: nlewycky <nick@wasmer.io>
2019-12-16 16:37:34 -08:00
Mark McCaskey
9ccb59eae5
Add minor changes to runtime/vm doc comments + make fns const fns
2019-12-16 18:27:37 -05:00
Mark McCaskey
15c52fd743
Update doc comment on borrow splitting ctx fn
2019-12-16 18:16:20 -05:00
Mark McCaskey
bb344c1ab1
Add fn for splitting borrow of memory & data in Ctx, use in WASI
2019-12-16 16:48:52 -05:00
Nick Lewycky
0a278c55ee
For error handling and breakpoints, use Box<Any + Send> instead of Box<Any>.
2019-12-09 21:00:01 -08:00
Ivan Enderlin
8f20a28ab1
Merge branch 'master' into feat-runtime-core-field-offset
2019-11-13 13:22:41 +01:00
Ivan Enderlin
a1e8a8f0db
fix(runtime-core) Same bug with field-offset
as before.
...
It will be fixed in a following PR.
2019-11-12 15:17:36 +01:00
Ivan Enderlin
0775d496d3
feat(runtime-core) Replace the field-offset
crate by a custom offset_of!
macro.
...
The `field-offset` crate is unmaintained. When using its `offset_of!`
macro on a struct with a field of type `std::ptr::NonNull`, in release
mode, it generates a sigill.
This patch removes the `field-offset` crate, and implements a custom
`offset_of!` macro.
2019-11-12 15:12:31 +01:00
Ivan Enderlin
0de7f4fd0b
test(runtime-core) offset_of!
fails with a struct containing NonNull
types.
...
It fails only in release mode. That's a bug from the `field-offset`
crate. This patch is a temporary fix.
2019-11-12 14:34:55 +01:00
Ivan Enderlin
22abd8efdc
doc(runtime-core) Add missing doc on vm::FuncCtx
.
2019-11-12 01:10:32 +01:00
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