losfair
23f03f555b
Fix compilation failure in tiering.rs.
2019-11-18 23:10:49 +08:00
losfair
1db6425cd5
Merge remote-tracking branch 'origin/master' into feature/singlepass-aarch64
2019-11-17 04:36:22 +08:00
anb
3b2d751c55
Enable compilation for specific target
...
By exposing the target information through `CompilerConfig`,
compiler(only LLVM at the moment) could create a machine with
different CPU feature flags other than current host, which makes it
capable to "cross compile" to some degree.
Update #959
2019-11-15 18:51:59 -08:00
losfair
a9c89eb1a8
Merge remote-tracking branch 'origin/master' into feature/singlepass-aarch64
2019-11-14 23:46:15 +08:00
bors[bot]
fff16c08d0
Merge #965
...
965: Add categories and keywords to `Cargo.toml`s r=MarkMcCaskey a=MarkMcCaskey
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-11-13 23:47:56 +00:00
Mark McCaskey
9127eaf825
Add categories and keywords to Cargo.toml
s
2019-11-13 15:46:09 -08:00
Ivan Enderlin
c4dffd6f59
doc(runtime-core) Fix typos.
2019-11-13 15:55:45 +01:00
Ivan Enderlin
7b809a765f
doc(runtime-core) Improve documentation of func!
.
...
This patch explains that `func!` can consume closures.
2019-11-13 15:54:41 +01:00
Ivan Enderlin
82e4d8e6cc
feat(runtime-core) func!
supports closures.
...
This patch allows to write:
```rs
func!(|…| -> … { … })
```
2019-11-13 15:54:09 +01:00
Ivan Enderlin
8f20a28ab1
Merge branch 'master' into feat-runtime-core-field-offset
2019-11-13 13:22:41 +01:00
losfair
605ada7ad7
Run cargo fmt.
2019-11-13 14:53:34 +08:00
losfair
08a1dd3e8c
Merge master and add documentation.
2019-11-13 14:52:22 +08:00
losfair
f1339b4033
Fix known_registers size.
2019-11-13 01:00:27 +08: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
89859a9ab5
Merge branch 'master' into feat-runtime-core-clos-host-function
2019-11-12 14:36:33 +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
Mark McCaskey
69950d9e5f
Prepare for 0.10.1 release
2019-11-11 16:22:37 -08: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
Ivan Enderlin
98e4ef066a
feat(runtime-core) Feed imported functions with vm::Ctx
again.
...
… and look for the associated `vm::FuncCtx`. This way, we don't break
the rule: “all functions receive a vmctx pointer as first argument.”.
2019-11-12 00:50:25 +01:00
Mark McCaskey
0a216c0779
Prepare for 0.10.0 release
2019-11-11 12:13:53 -08:00
Brandon Fish
a74acb7a8a
Add missing rustdoc for macro debug
2019-11-10 16:28:33 -06:00
Brandon Fish
ea3b6fa6d7
Add missing rustdocs for Windows code
2019-11-10 16:03:43 -06:00
Brandon Fish
82ec5e970a
Add additional rustdocs for missing docs found during CI
2019-11-10 15:16:07 -06:00
Brandon Fish
2d00b2589e
Update with PR review suggestions
2019-11-10 14:37:36 -06:00
Brandon Fish
1f9316b5ae
Update Protect enum with suggestions
2019-11-10 14:31:36 -06:00
Brandon Fish
328ab0a93b
Remove macro identifiers which don't work in rustdoc comments
2019-11-10 13:43:39 -06:00
Brandon Fish
aad390d09d
Deny missing docs in runtime core and add missing docs
2019-11-10 13:13:18 -06:00
losfair
03a9d1ad60
Cargo fmt
2019-11-11 01:43:16 +08:00
losfair
899fbed35d
Merge master.
2019-11-11 01:42:43 +08: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
losfair
50c30ab212
runtime-core: Support cross-compilation.
2019-11-07 01:30:45 +08:00
Ivan Enderlin
cf74b68c37
Merge branch 'master' into feat-runtime-core-clos-host-function
2019-11-06 14:48:47 +01:00
Ivan Enderlin
5ccaf12b2a
doc(runtime-core) Fix inline documentations.
2019-11-06 14:48:47 +01: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
293b71ac54
doc(runtime-core) Write more documentation.
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
81326cee13
doc(runtime-core) Write more documentation.
2019-11-06 14:48:46 +01:00
Ivan Enderlin
3b34a9187a
chore(runtime-core) Remove dbg!
.
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
nlewycky
dc437bb4e7
Fix typo in comment.
2019-11-05 11:31:14 -08:00
Ivan Enderlin
2703d48098
Merge branch 'master' into feat-runtime-core-host-function-without-vmctx
2019-10-31 10:59:16 +01:00
Ivan Enderlin
6a1d490a30
doc(runtimecore) Explain ExternalFunctionKind
with more details.
2019-10-30 19:34:04 +01:00