Commit Graph

376 Commits

Author SHA1 Message Date
3c996bc821 Prepare for 0.13.0 release 2020-01-15 11:09:47 -08:00
12f1f2d8a8 Merge #1143
1143: Set backend_id to static str r=MarkMcCaskey a=syrusakbary

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description

As per feedback in #1099, set backend_id to static str.

<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Syrus <me@syrusakbary.com>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-15 18:32:01 +00:00
286e5db370 Remove vestigial debug features from various crates 2020-01-14 13:03:19 -08:00
a1d8b9aa5b Move backend_id to static str 2020-01-13 15:40:09 +01:00
18421e3623 Make all tests pass 2020-01-07 16:12:39 +01:00
d7154fe791 Remove Backend dependency 2020-01-07 16:12:39 +01:00
c4d70a6b75 Use Arc instead of Rc 2019-12-20 20:37:47 -08:00
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
0419df937e Merge #1095
1095: Update to cranelift 0.52 r=nlewycky a=nlewycky

# Description
Update to cranelift 0.52.

To use our wasmer branch of cranelift, we point to its path on git. Per @syrusakbary , we don't want to push updated wasmer-clif crates until we're ready to release the matching wasmer that will use them.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-12-21 01:45:45 +00:00
fe969be612 Update wasmparser to version 0.45.0 2019-12-20 17:16:54 -08:00
8cddea341b Update to 0.45.0 wasmparser Operator names in llvm-backend 2019-12-20 17:16:54 -08:00
d5d82e2508 Merge #1096
1096: Add TBAA labels to initialization (default and copy) of locals. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-12-21 01:06:23 +00:00
cca73c0a6f Add TBAA labels to initialization (default and copy) of locals. 2019-12-20 17:02:58 -08:00
f00283ab03 Name the magic constants in the LLVM backend. 2019-12-20 16:20:58 -08:00
0cfe08fff3 Correct implementation of non-trapping float to int conversions in the llvm backend. 2019-12-20 16:20:58 -08:00
5b35313099 Use type traits to ensure that the float and int types match in trunc_sat. 2019-12-20 16:20:58 -08:00
6fb52e812e Merge #1084
1084: Prepare for 0.12.0 release r=MarkMcCaskey a=MarkMcCaskey

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-12-19 16:43:39 +00:00
6a74b7e994 Prepare for 0.12.0 release 2019-12-18 17:24:29 -05:00
5d0429989a Remove type_to_llvm_int_only, only use type_to_llvm. 2019-12-18 11:53:48 -08:00
6a0a4390c1 Use function defined in wasmer-runtime-core instead of our own copy of it. 2019-12-17 15:12:54 -08:00
05012f9514 Update Inkwell 2019-12-16 16:51:33 -05:00
952309a36b Merge branch 'master' into feature/llvm-on-arm 2019-12-13 13:03:51 -08:00
6189c9ae54 rename some variable, add more precise error message, use checked_sub everywhere needed in state.rs 2019-12-11 15:25:21 +01:00
0a278c55ee For error handling and breakpoints, use Box<Any + Send> instead of Box<Any>. 2019-12-09 21:00:01 -08:00
f3ab59eace Don't try to initialize a target whose inkwell feature flag was not enabled. 2019-12-06 20:01:20 -08:00
7162906297 Initial commit of AArch64 support for the llvm backend. 2019-12-06 17:23:39 -08:00
a221f1e570 Provide a default empty implementation for the LLVMCallbacks trait. 2019-12-06 12:09:34 -08:00
8d3cf874cd Add the ability to pass backend specific options through CompilerConfig.
Use this to replace wasmer_llvm_backend::GLOBAL_OPTIONS.
2019-12-05 12:13:51 -08:00
ad752d66a7 When modifying the value, also update its ExtraInfo.
Fixes a debug_assert! on python3.7 and rustpython in wapm.
2019-12-02 15:45:12 -08:00
31a77b0eb7 Fix llvm backend to work with latest inkwell.
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>
2019-11-26 19:59:03 -08:00
dfc7163b71 Merge #1020
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>
2019-11-27 01:16:34 +00:00
5a49fe76df Turn a few more assert!s that should never fire into debug_assert!s.
These are here to protect against errors when refactoring more than anything else.
2019-11-26 16:43:17 -08:00
f6f8780934 Merge #1006
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>
2019-11-27 00:36:29 +00:00
ff73c5d71b Address review feedback from Mark.
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.
2019-11-26 12:25:03 -08:00
d1ce8ee20d Give that panic! a message. Also, make it an unreachable!. 2019-11-26 12:20:44 -08:00
fa576093c2 Fix ExtraInfo on F32Add and similar.
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.
2019-11-26 12:20:44 -08:00
a06c858087 Make ExtraInfo bitand check for pending validity.
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().
2019-11-26 12:20:43 -08:00
284948b6d4 Refactor so as to convert ExtraInfo when potentially canonicalizing.
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.
2019-11-26 12:20:43 -08:00
26c8fd52c8 Initial implementation of "known to be arithmetic NaN / not NaN". 2019-11-26 12:20:43 -08:00
fafc7ad38c Add "known to not contain non-arithmetic NaNs" to ExtraInfo in LLVM backend.
Not wired up yet.
2019-11-26 12:20:43 -08:00
bb16547567 Merge branch 'ventuzelo/fix-1005-panic-sub-overflow' of github.com:pventuzelo/wasmer into ventuzelo/fix-1005-panic-sub-overflow 2019-11-26 09:18:05 +01:00
49665d5797 use checked_sub for peekn_extra 2019-11-26 09:17:13 +01:00
d376b89ef0 Merge branch 'master' into ventuzelo/fix-1005-panic-sub-overflow 2019-11-25 12:05:33 +01:00
5c1c786e35 Merge #1002
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>
2019-11-23 05:11:44 +00:00
3ef9f769df Fix TBAA crash with LLVM + the gas middleware. 2019-11-22 17:03:31 -08:00
681219b06c Fix bug in LLVM lowering of 'return' when the stack has a float on it. 2019-11-22 17:03:31 -08:00
2433d365af Add new test feature, enabled in test crates.
When test feature is enabled, turn on LLVM verifier. This was previously never enabled.
2019-11-22 16:51:44 -08:00
bb1e7a8d78 Prepare for 0.11.0 release 2019-11-22 11:18:06 -08:00
2261f8b449 cargo fmt 2019-11-22 17:21:15 +01:00
508004088e check stack len before getting value 2019-11-22 17:10:54 +01:00