1035: Fix/quiet some rustc warnings. r=nlewycky a=nlewycky
No functionality change.
Remaining warnings are either dead code in examples/parallel-guest, or due to macros in typed_func.rs for which removing the "extra" parentheses breaks the build.
Co-authored-by: Nick Lewycky <nick@wasmer.io>
1031: Improve portability of code by using c_char r=MarkMcCaskey a=MarkMcCaskey
This PR makes emscripten compile on ARM with an up to date nightly compiler
Co-authored-by: Mark McCaskey <mark@wasmer.io>
1004: Adapt backend usage depending on wasm file executed r=MarkMcCaskey a=d0iasm
Adapt backend usage depending on wasm file executed in issue #998.
Close#998
# Description
Add `auto` backend into a runtime-core and use it as a default backend.
The `auto` backend is equivalent to:
* singlepass if singlepass is enabled and the wasm file size is larger than 10MiB, or singlepass is enable and the target architecture is aarch64.
* cranelift otherwise.
Co-authored-by: Asami Doi <doiasami1219@gmail.com>
cargo update to pick up latest inkwell branch commit.
Add lifetime annotations to Module which now takes a lifetime, and more lifetime annotations across intrinsics.rs.
Add <'ctx> to missing places in CtxType and Intrinsics. Remove it from reference bindings.
Use ManuallyDrop to ensure that context's members are dropped before the Context.
Co-authored-by: Mark McCaskey <mark@wasmer.io>
1020: Turn a few more assert!s that should never fire into debug_assert!s. r=nlewycky a=nlewycky
These are here to protect against errors when refactoring more than anything else.
Co-authored-by: Nick Lewycky <nick@wasmer.io>
1006: fix 1005 panic sub overflow r=MarkMcCaskey a=pventuzelo
# Description
Fix issue https://github.com/wasmerio/wasmer/issues/1005
# Review
- [x] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com>
Co-authored-by: Patrick Ventuzelo <9038181+pventuzelo@users.noreply.github.com>
Fix a bug in Operator::Select and add a comment to explain the intention.
Use derived default for ExtraInfo.
Make ExtraInfo associated functions const.
Turn two asserts into debug_asserts.
We want to ignore the incoming pending NaN state (since the pending will propagate to the output if there was one on the input), and we want to add a new pending NaN state if we can (that is to say, if it isn't cancelled out by both inputs having arithmetic state). Do this by discarding the pending states on the inputs, intersecting them (to keep only the arithmetic state), then union in a pending nan state (which might do nothing, if it's arithmetic).
If the above sounds confusing, keep in mind that when a value is arithmetic, the act of performing the "NaN canonicalization" is a no-op. Thus, being arithmetic cancels out pending NaN states.
Unfortunately, this is quite buggy. For something as simple as F32Sub, to combine two ExtraInfos, we want to add a new pending_f32_nan(), unless both of the inputs are arithmetic_f32(). In this commit, we incorrectly calculate that we don't need a pending_f32_nan if either one of the inputs was arithmetic_f32().
It seemed like a good idea at the time, but in practice we discard the extra info all or almost all of the time.
This also introduces a new bug. In an operation like multiply, it's valid to multiply two values, one with a pending NaN and one without. As written, in the SIMD case (because of the two kinds of pending in play), we assert.
1017: Add a 'clear' method to map. r=nlewycky a=nlewycky
# Description
Motivated by work on the `nlewycky/inkwell-lifetimes` branch. No callers yet on master, but we use it on the branch and I'd like to merge in pieces.
Co-authored-by: Nick Lewycky <nick@wasmer.io>
1002: Update the LLVM pass list. r=nlewycky a=nlewycky
# Description
Adds optimizations of loops, and inlinling and some simple interprocedural optimization.
Measured on the libsodium benchmarks, the new pass pipeline is a 2.35% geomean improvement. No major performance regressions known.
Co-authored-by: Nick Lewycky <nick@wasmer.io>