commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
9880d09f1fbcbf4d82b81c9c915658bdcf7194b9
Pat Hickey
2021-04-15T21:50:17
do some programming
diff --git a/crates/wasi-common/tokio/src/dir.rs b/crates/wasi-common/tokio/src/dir.rs new file mode 100644 index 000000000..9188d0cca --- /dev/null +++ b/crates/wasi-common/tokio/src/dir.rs @@ -0,0 +1,353 @@ +use crate::{ + asyncify, + file::{filetype_from, File}, +}; +use cap_fs_ext::{DirEntryExt, DirExt, Metad...
3
648
0
0acc1451eaecfcc73021fc619ea88b0e866bccb2
Andrew Brown
2021-04-15T18:53:58
x64: lower iabs.i64x2 using a single AVX512 instruction when possible (#2819) * x64: add EVEX encoding mechanism Also, includes an empty stub module for the VEX encoding. * x64: lower abs.i64x2 to VPABSQ when available * x64: refactor EVEX encodings to use `EvexInstruction` This change replaces the `encode...
diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs index 2eebf4140..b54f1b612 100644 --- a/cranelift/codegen/src/isa/x64/inst/args.rs +++ b/cranelift/codegen/src/isa/x64/inst/args.rs @@ -460,9 +460,7 @@ pub(crate) enum InstructionSet { BMI1, #[allow(dead_code)...
9
590
32
33dbd4388c86e0ec6f0ecdc64733f753bfe350aa
Pat Hickey
2021-04-15T18:39:11
use tokio's File with a cap-std Dir
diff --git a/Cargo.lock b/Cargo.lock index b7e1aa02e..3f5d294b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3138,7 +3138,14 @@ dependencies = [ name = "wasi-tokio" version = "0.26.0" dependencies = [ + "cap-fs-ext", + "cap-std", + "cap-time-ext", + "fs-set-times", + "system-interface", + "tempfile", "tokio", + "u...
3
23
6
7202494e9d75efe9fc4775cc25c071b88ff95aa6
Pat Hickey
2021-04-14T23:17:21
fix windows sched
diff --git a/crates/wasi-common/cap-std-sync/src/sched/windows.rs b/crates/wasi-common/cap-std-sync/src/sched/windows.rs index 752be626b..8d11df466 100644 --- a/crates/wasi-common/cap-std-sync/src/sched/windows.rs +++ b/crates/wasi-common/cap-std-sync/src/sched/windows.rs @@ -95,7 +95,7 @@ impl WasiSched for SyncSched ...
1
1
1
b883bda02290c6c6b4a98f9e6d9ba8c4f3dc0eb0
Pat Hickey
2021-04-14T23:06:50
fix test-programs for sync wasi
diff --git a/crates/test-programs/tests/wasm_tests/runtime/cap_std_sync.rs b/crates/test-programs/tests/wasm_tests/runtime/cap_std_sync.rs index 161088011..be3a35ac3 100644 --- a/crates/test-programs/tests/wasm_tests/runtime/cap_std_sync.rs +++ b/crates/test-programs/tests/wasm_tests/runtime/cap_std_sync.rs @@ -1,8 +1,...
1
3
3
2f0c7e59e7257cae7843c2aaed13f8d5900c08e5
Pat Hickey
2021-04-14T23:04:41
wasmtime-wasi: all funcs are async now
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index 2eefcfccd..f0ac46811 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -99,7 +99,7 @@ necessary. Additionally [`Wasi::get_export`] can be used to do name-based resolution.", }, }, - $async_mode...
1
2
2
c0e89b8da8a1abb85f94cf014d139e55e0c8cf68
Pat Hickey
2021-04-14T22:43:19
wasi-cap-std-sync: WasiFile and WasiDir converted to async_traits
diff --git a/crates/wasi-common/cap-std-sync/src/dir.rs b/crates/wasi-common/cap-std-sync/src/dir.rs index 255278790..13e839145 100644 --- a/crates/wasi-common/cap-std-sync/src/dir.rs +++ b/crates/wasi-common/cap-std-sync/src/dir.rs @@ -17,11 +17,12 @@ impl Dir { } } +#[wiggle::async_trait] impl WasiDir for Di...
4
153
82
564e43d1b3810d25d71e20295325f46cb3c90d8d
Pat Hickey
2021-04-14T22:22:25
WasiDir: make all operations async
diff --git a/crates/wasi-common/src/dir.rs b/crates/wasi-common/src/dir.rs index 1c7e3b2c5..df8850c29 100644 --- a/crates/wasi-common/src/dir.rs +++ b/crates/wasi-common/src/dir.rs @@ -6,9 +6,10 @@ use std::cell::Ref; use std::ops::Deref; use std::path::PathBuf; +#[wiggle::async_trait] pub trait WasiDir { fn ...
2
53
29
00e58567d926f6d7598aa462ced2f557533e8fae
Pat Hickey
2021-04-14T22:17:31
WasiFile: all operations are now async only fn as_any(&self) -> &dyn Any doesnt get to be async.
diff --git a/crates/wasi-common/src/file.rs b/crates/wasi-common/src/file.rs index 65fba7cd4..b8eadb367 100644 --- a/crates/wasi-common/src/file.rs +++ b/crates/wasi-common/src/file.rs @@ -4,30 +4,38 @@ use std::any::Any; use std::cell::{Ref, RefMut}; use std::ops::{Deref, DerefMut}; +#[wiggle::async_trait] pub tr...
4
114
75
025a1ecff45ed06a6ddf9f72b296970a7c4be040
Pat Hickey
2021-04-14T22:05:38
wasi-common: snapshots 0 and 1 traits are all async now
diff --git a/crates/wasi-common/src/snapshots/preview_0.rs b/crates/wasi-common/src/snapshots/preview_0.rs index 477f6648b..a428c3f7e 100644 --- a/crates/wasi-common/src/snapshots/preview_0.rs +++ b/crates/wasi-common/src/snapshots/preview_0.rs @@ -16,7 +16,7 @@ use wiggle::GuestPtr; wiggle::from_witx!({ witx: ["...
2
211
171
228096c840b188d43fa4b53d047e128c27a0b879
Pat Hickey
2021-04-14T21:51:24
wiggle: convenient syntax for marking all funcs async
diff --git a/crates/wiggle/generate/src/config.rs b/crates/wiggle/generate/src/config.rs index 2ab5e9119..bed0e5c83 100644 --- a/crates/wiggle/generate/src/config.rs +++ b/crates/wiggle/generate/src/config.rs @@ -47,7 +47,9 @@ impl Parse for ConfigField { } else if lookahead.peek(Token![async]) { ...
3
73
70
1243cea4554c6792a27c1e090817a4c89d335df6
Ulrich Weigand
2021-04-13T11:22:03
Update cap-std dependency to 0.13.9 This fixes a build failure on s390x.
diff --git a/Cargo.lock b/Cargo.lock index 0eb0b74a0..f61d3abc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,9 +287,9 @@ checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "cap-fs-ext" -version = "0.13.7" +version = "0.13.9" source = "registry+https://github.com/ru...
2
14
14
0127676621406d5794428519338f49442eb9b750
Pat Hickey
2021-04-14T21:02:50
wasi-cap-std-async is better named wasi-tokio
diff --git a/Cargo.lock b/Cargo.lock index d47be3ddc..b7e1aa02e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3068,16 +3068,6 @@ version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" -[[...
7
21
21
5904c09682f8f3340756300b693eab5f69ee8a5d
Ulrich Weigand
2021-04-14T11:54:02
Allow unwind support to work without a frame pointer The patch extends the unwinder to support targets that do not need to use a dedicated frame pointer register. Specifically, the changes include: - Change the "fp" routine in the RegisterMapper to return an *optional* frame pointer regsiter via Option<Register>. ...
diff --git a/cranelift/codegen/src/isa/aarch64/inst/unwind/systemv.rs b/cranelift/codegen/src/isa/aarch64/inst/unwind/systemv.rs index 9f2eb741a..b514dc20b 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/unwind/systemv.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/unwind/systemv.rs @@ -56,8 +56,8 @@ impl crate::i...
6
47
15
336c6369b40272ba432d0b03b28fad51fd571ee7
Ulrich Weigand
2021-04-14T11:51:16
Add back support for accumulating outgoing arguments The unwind rework (commit 2d5db92a) removed support for the feature to allow a target to allocate the space for outgoing function arguments right in the prologue (originally added via commit 80c2d70d). This patch adds it back.
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 380d2dfe0..72ff0e6d6 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -587,6 +587,7 @@ impl ABIMachineSpec for AArch64MachineDeps { flags: &settings::Fla...
5
37
0
e3bb36ba77f1f0bf1b1acc40885572ddcbfd1807
Ulrich Weigand
2021-04-14T11:46:08
Fix frame size after unwind rework After the unwind rework (commit 2d5db92a) the space used to save clobbered registers now lies between the nominal SP and the FP. Therefore, the size of that space should now be included in the frame size as reported by frame_size(), since this value is used to compute the nominal_sp_...
diff --git a/cranelift/codegen/src/machinst/abi_impl.rs b/cranelift/codegen/src/machinst/abi_impl.rs index 85a6d6831..73d320a43 100644 --- a/cranelift/codegen/src/machinst/abi_impl.rs +++ b/cranelift/codegen/src/machinst/abi_impl.rs @@ -1285,7 +1285,7 @@ impl<M: ABIMachineSpec> ABICallee for ABICalleeImpl<M> { ...
1
2
2
759019811ef5b28a99ea56ec640102fb27a2f110
Pat Hickey
2021-04-14T00:15:31
add tokio example Co-authored-by: Alex Crichton <alex@alexcrichton.com>
diff --git a/Cargo.lock b/Cargo.lock index b4c9069bd..d47be3ddc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1102,6 +1102,10 @@ dependencies = [ name = "example-fib-debug-wasm" version = "0.0.0" +[[package]] +name = "example-tokio-wasm" +version = "0.0.0" + [[package]] name = "example-wasi-wasm" version = "0.0.0...
5
202
0
66251c2e78d122c90c4aa69ced984af4c25c4444
Pat Hickey
2021-04-13T22:14:51
c-api: always use synchronous wasi-common
diff --git a/crates/c-api/src/wasi.rs b/crates/c-api/src/wasi.rs index 441fa6fa5..302fcde8b 100644 --- a/crates/c-api/src/wasi.rs +++ b/crates/c-api/src/wasi.rs @@ -12,9 +12,10 @@ use std::slice; use std::str; use wasmtime::{Extern, Linker, Trap}; use wasmtime_wasi::{ - snapshots::preview_0::Wasi as WasiSnapshot0...
1
4
3
bac02c50f2e7801ce3e3c2712307a70e18dd12d6
Pat Hickey
2021-04-13T19:42:00
port command and example to use sync wasmtime_wasi
diff --git a/examples/wasi/main.rs b/examples/wasi/main.rs index f808be3ec..0c3f077d9 100644 --- a/examples/wasi/main.rs +++ b/examples/wasi/main.rs @@ -5,7 +5,7 @@ use anyhow::Result; use wasmtime::*; -use wasmtime_wasi::{sync::WasiCtxBuilder, Wasi}; +use wasmtime_wasi::sync::{Wasi, WasiCtxBuilder}; fn main() -...
2
2
5
2b7a93c4030b5078a1eb56f018f707ae35304c96
Pat Hickey
2021-04-13T19:38:49
wasmtime-wasi: two distinct definitions of the Wasi struct, when sync vs async
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index 31045041d..0bb9ef6ea 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -7,10 +7,7 @@ //! Individual snapshots are available through //! `wasmtime_wasi::snapshots::preview_{0, 1}::Wasi::new(&Store, Rc<RefCell<WasiCtx>>)`. -use std::...
1
20
5
201da20c63bc7742f08417ec6316d1d18e5d18e8
Pat Hickey
2021-04-13T19:27:01
make wasmtime-wasi configurable at macro whether its real async or block_on
diff --git a/crates/wiggle/generate/src/config.rs b/crates/wiggle/generate/src/config.rs index a430a8547..2ab5e9119 100644 --- a/crates/wiggle/generate/src/config.rs +++ b/crates/wiggle/generate/src/config.rs @@ -280,12 +280,14 @@ impl Parse for ErrorConfField { } #[derive(Clone, Default, Debug)] -/// Modules and f...
4
138
61
8f9fb1f4e2986d17f214025b21dd71553d830c4b
Pat Hickey
2021-04-13T02:03:03
make wasi-cap-std-async work with wasmtime-wasi
diff --git a/Cargo.lock b/Cargo.lock index ea8cb56ae..b4c9069bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3533,6 +3533,7 @@ name = "wasmtime-wasi" version = "0.26.0" dependencies = [ "anyhow", + "wasi-cap-std-async", "wasi-cap-std-sync", "wasi-common", "wasmtime", diff --git a/crates/wasi/Cargo.toml b/crat...
3
12
0
ac3b4565239e8090cfe5c93ed0c0d886e56e6a10
Pat Hickey
2021-04-13T01:56:23
wasi-cap-std-async: exactly like wasi-cap-std-sync but with a different WasiSched
diff --git a/Cargo.lock b/Cargo.lock index 0eb0b74a0..ea8cb56ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2808,6 +2808,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "tokio" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83f0c8e7c0addab50b663055baf787d...
4
151
0
22d18ffb0dc46d3d0d2b38f27352d5f6af452a8b
Pat Hickey
2021-04-13T01:56:03
cap-std-sync: async-trait e-paperwork
diff --git a/crates/wasi-common/cap-std-sync/Cargo.toml b/crates/wasi-common/cap-std-sync/Cargo.toml index 821fa8a5b..e48ede540 100644 --- a/crates/wasi-common/cap-std-sync/Cargo.toml +++ b/crates/wasi-common/cap-std-sync/Cargo.toml @@ -13,6 +13,7 @@ include = ["src/**/*", "LICENSE" ] [dependencies] wasi-common = {...
3
9
6
68daec7e7d519783aec2471eaffd2a91c919a200
Pat Hickey
2021-04-13T01:55:25
wasi-common: WasiSched is an async trait now; poll_oneoff and sched_yield are async methods
diff --git a/crates/wasi-common/src/sched.rs b/crates/wasi-common/src/sched.rs index 10d12d662..3434ef62d 100644 --- a/crates/wasi-common/src/sched.rs +++ b/crates/wasi-common/src/sched.rs @@ -1,16 +1,18 @@ use crate::clocks::WasiMonotonicClock; use crate::file::WasiFile; use crate::Error; -use cap_std::time::{Durat...
3
29
19
c62d7f9ea1555b8ddb45461e2967358ec4d9e0f3
Pat Hickey
2021-04-13T01:11:21
wasmtime_wiggle: when async feature is disabled, run async on dummy executor
diff --git a/crates/wiggle/wasmtime/Cargo.toml b/crates/wiggle/wasmtime/Cargo.toml index 06f17700e..f51ea119b 100644 --- a/crates/wiggle/wasmtime/Cargo.toml +++ b/crates/wiggle/wasmtime/Cargo.toml @@ -26,6 +26,11 @@ name = "atoms_async" path = "tests/atoms_async.rs" required-features = ["async", "wasmtime/wat"] +[[...
4
316
41
6bdef484737906607743c09d02366914f395dcb4
Andrew Brown
2021-04-13T20:09:07
x64: refactor to use Inst::store during lowering This re-factoring replaces uses of `Inst::mov_r_m` with `Inst::store` to ensure there is only one code location to troubleshoot when generating store instructions for a specific type.
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index dc812a9e8..26c0b8974 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -4822,28 +4822,11 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( if elem_ty == type...
1
4
21
9b25b06d86263c97babcfbf32d2f232ec6e86d1b
Andrew Brown
2021-04-13T19:38:35
x64: store to all scalar sizes Previously, `Inst::store` only understood a subset of the scalar types, which resulted in failures seen in #2826. This change allows `Inst::store` to generate instructions for all scalar widths (`8 | 16 | 32 | 64`) since all of these are supported in the emission code of `Inst::MovRM`.
diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs index 099c97553..0e8b8d9f1 100644 --- a/cranelift/codegen/src/isa/x64/inst/mod.rs +++ b/cranelift/codegen/src/isa/x64/inst/mod.rs @@ -1126,16 +1126,7 @@ impl Inst { pub(crate) fn store(ty: Type, from_reg: Reg, to_add...
1
1
10
18dd82ba7ded31575f498657b5be7cf29307101d
Alex Crichton
2021-04-08T20:04:18
Improve signature lookup happening during instantiation (#2818) This commit is intended to be a perf improvement for instantiation of modules with lots of functions. Previously the `lookup_shared_signature` callback was showing up quite high in profiles as part of instantiation. As some background, this callback ...
diff --git a/crates/jit/src/instantiate.rs b/crates/jit/src/instantiate.rs index c6e6f0ef0..2d155e3d7 100644 --- a/crates/jit/src/instantiate.rs +++ b/crates/jit/src/instantiate.rs @@ -298,6 +298,7 @@ impl CompiledModule { } /// Returns the map of all finished JIT functions compiled for this module + #[i...
13
143
100
c91e14d83f3c3dc02811dc3e0cff01b1d3432838
Alex Crichton
2021-04-08T18:28:35
Precompute fields in `VMOffsets` This commit updates the implementation of `VMOffsets` to frontload all checked arithmetic on construction of the `VMOffsets` which allows eliding all checked arithmetic when accessing the fields of `VMOffsets`. For testing and such this adds a new constructor as well from a new `VMOffs...
diff --git a/crates/environ/src/lib.rs b/crates/environ/src/lib.rs index f21c48c2f..4b496a197 100644 --- a/crates/environ/src/lib.rs +++ b/crates/environ/src/lib.rs @@ -39,7 +39,7 @@ pub use crate::data_structures::*; pub use crate::module::*; pub use crate::module_environ::*; pub use crate::tunables::Tunables; -pub...
4
221
199
8e495ac79d68ca43cdd07395076dbdaa84fd8f98
Andrew Brown
2021-04-07T23:00:54
x64: match multiple ISA requirements before emitting Because there are instructions that are present in more than one ISA feature set, we need to see if any of the ISA requirements match before emitting. This change includes the `VPABSQ` instruction as an example, which is present in both `AVX512F` and `AVX512VL`.
diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs index 19fddae61..2eebf4140 100644 --- a/cranelift/codegen/src/isa/x64/inst/args.rs +++ b/cranelift/codegen/src/isa/x64/inst/args.rs @@ -10,6 +10,7 @@ use regalloc::{ PrettyPrint, PrettyPrintSized, RealRegUniverse, ...
3
71
18
c77ea0c5c771076711108a76e7eb884bc7010011
Alex Crichton
2021-04-08T17:23:54
Add some more `#[inline]` annotations for trivial functions (#2817) Looking at some profiles these or their related functions were all showing up, so this commit adds `#[inline]` to allow cross-crate inlining by default.
diff --git a/cranelift/entity/src/lib.rs b/cranelift/entity/src/lib.rs index 3baba3a1d..09054719e 100644 --- a/cranelift/entity/src/lib.rs +++ b/cranelift/entity/src/lib.rs @@ -70,21 +70,25 @@ macro_rules! entity_impl { // Basic traits. ($entity:ident) => { impl $crate::EntityRef for $entity { + ...
5
23
0
5c4c03d2787833a7d1422f13a30b85ad3d75821a
Alex Crichton
2021-04-08T16:48:24
Don't hash for the cache if it's disabled (#2816) This fixes an issue where even if the wasmtime cache was disabled we're still calculating the sha256 of modules for the hash key. This hash was then simply discarded if the cache was disabled!
diff --git a/crates/cache/src/lib.rs b/crates/cache/src/lib.rs index 9fe69c5ba..f29dd2105 100644 --- a/crates/cache/src/lib.rs +++ b/crates/cache/src/lib.rs @@ -48,17 +48,17 @@ impl<'config> ModuleCacheEntry<'config> { T: Hash, U: Serialize + for<'a> Deserialize<'a>, { + let inner = match ...
1
5
5
812c8ef3686aca95d9f43d1fe541fa9c9557c528
Alex Crichton
2021-04-08T16:45:10
Update wast to 35.0.2 (#2815) Fixes a panic or two in translation found by fuzzing.
diff --git a/Cargo.lock b/Cargo.lock index 37f8a4c63..0eb0b74a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -561,7 +561,7 @@ dependencies = [ "souper-ir", "target-lexicon", "thiserror", - "wast 35.0.1", + "wast 35.0.2", ] [[package]] @@ -1825,7 +1825,7 @@ dependencies = [ "peepmatic-test-operator", "peepm...
1
11
11
ad9fa11d48a5287ca79d4bb0e7ac558315add25e
Peter Huene
2021-04-07T23:37:04
Code review feedback. * Remove `once-cell` dependency. * Remove function address `BTreeMap` from `CompiledModule` in favor of binary searching finished functions directly. * Use `with_capacity` when populating `CompiledModule` finished functions and trampolines.
diff --git a/Cargo.lock b/Cargo.lock index e7faf3721..1fb9e09a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3407,7 +3407,6 @@ dependencies = [ "log", "more-asserts", "object", - "once_cell", "rayon", "region", "serde", diff --git a/cranelift/entity/src/primary.rs b/cranelift/entity/src/primary.rs index 9f4...
6
90
53
ed31f281586466a8fbf6aa3ce668999a4117e9aa
Nick Fitzgerald
2021-04-07T23:17:26
wasmtime-environ: Mark all VM offset functions as `#[inline]` Otherwise they won't get inlined across crates unless we enable LTO, and much of the usage of these function is across crates (eg from the `wasmtime-runtime` crate).
diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs index 042f0b9dc..5298e82f5 100644 --- a/crates/environ/src/vmoffsets.rs +++ b/crates/environ/src/vmoffsets.rs @@ -96,17 +96,20 @@ impl VMOffsets { impl VMOffsets { /// The offset of the `body` field. #[allow(clippy::erasing_op)] +...
1
66
0
875cb92cf03e97f521f8d54950a4e00f5ed77278
Peter Huene
2021-04-07T07:46:57
Refactor store frame information. This commit refactors the store frame information to eliminate the copying of data out from `CompiledModule`. It also moves the population of a `BTreeMap` out of the frame information and into `CompiledModule` where it is only ever calculated once rather than at every new module inst...
diff --git a/Cargo.lock b/Cargo.lock index 1fb9e09a6..e7faf3721 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3407,6 +3407,7 @@ dependencies = [ "log", "more-asserts", "object", + "once_cell", "rayon", "region", "serde", diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index 8d7ef7a04..f653df594 10...
6
214
187
758856507837b2250db0c9b84f95306bb4b068aa
Benjamin Bouvier
2021-04-06T14:23:58
Tweaks some tests for Mac aarch64 - some tests don't pass because of bad interactions with the system's libunwind; ignore them for now. - the page size on mac aarch64 is 16K, not 4K; tweak some tests which were expecting 4K or multiples of 4K pages to use a multiple of host page size instead. - a cranelift-native test...
diff --git a/cranelift/native/src/lib.rs b/cranelift/native/src/lib.rs index 3be04bc5f..e425baeb8 100644 --- a/cranelift/native/src/lib.rs +++ b/cranelift/native/src/lib.rs @@ -137,18 +137,20 @@ mod tests { if let Ok(isa_builder) = builder() { let flag_builder = settings::builder(); l...
3
27
10
04bf6e5bbb944630709e05eb6eec0d83d61c5f7f
Alex Crichton
2021-04-05T15:29:18
Move some scopes around to fix a leak on raising a trap (#2803) Some recent refactorings accidentally had a local `Store` on the stack when a longjmp was initiated, bypassing its destructor and causing `Store` to leak. Closes #2802
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 05b74cf91..2a70df9e3 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -1276,7 +1276,7 @@ pub unsafe trait WasmRet { // `invoke_wasm_and_catch_traps` is on the stack, and therefore this method // is unsafe...
2
115
59
37bb7af454dc7f25a18824ec8b2da5c006aee9eb
Peter Huene
2021-04-02T23:12:19
Fix incorrect range in `ininitialize_instance`. This commit fixes a bug where the wrong destination range was used when copying data from the module's memory initialization upon instance initialization. This affects the on-demand allocator only when using the `uffd` feature on Linux and when the Wasm page being initi...
diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs index e8e1e654a..611b069f6 100644 --- a/crates/runtime/src/instance/allocator.rs +++ b/crates/runtime/src/instance/allocator.rs @@ -379,7 +379,9 @@ fn initialize_instance( for (page_index, page) in pages.it...
2
23
1
d32501c554d007ce92cb216c737cf615956d095b
Andrew Brown
2021-04-02T00:13:28
x64: refactor REX-specific encoding machinery to its own module In preparation for adding new encoding modes to the x64 backend (e.g. VEX, EVEX), this change moves all of the current instruction encoding functions to `encodings::rex`. This refactor does not change any logic.
diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs index 8cd975f13..1674f2ab2 100644 --- a/cranelift/codegen/src/isa/x64/inst/emit.rs +++ b/cranelift/codegen/src/isa/x64/inst/emit.rs @@ -6,445 +6,12 @@ use crate::isa::x64::inst::args::*; use crate::isa::x64::inst::*; ...
4
460
438
da334960635bda682cdbd54aa0c4a6858c2201a2
Will Robson
2021-04-02T14:35:12
Seal the block that should have been sealed
diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs index 0d2791833..4c165809a 100644 --- a/cranelift/frontend/src/switch.rs +++ b/cranelift/frontend/src/switch.rs @@ -273,6 +273,7 @@ impl Switch { .icmp_imm(IntCC::UnsignedGreaterThan, discr, u32::max_value() as i64...
1
1
0
f5f3c2fb2547915143c786c2bc4d41a8080017ed
Will Robson
2021-04-02T14:34:49
Add test cases to show the unsealed block in switch generation
diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs index f4711e459..0d2791833 100644 --- a/cranelift/frontend/src/switch.rs +++ b/cranelift/frontend/src/switch.rs @@ -542,38 +542,47 @@ block4: #[test] fn switch_seal_generated_blocks() { - let keys = [0, 1, 2, 10, 11, 12,...
1
38
29
0ddfe97a09e36bc97caab36cd217b69fb76a1ba8
Peter Huene
2021-04-02T02:32:15
Change how flags are stored in serialized modules. This commit changes how both the shared flags and ISA flags are stored in the serialized module to detect incompatibilities when a serialized module is instantiated. It improves the error reporting when a compiled module has mismatched shared flags.
diff --git a/cranelift/codegen/meta/src/gen_settings.rs b/cranelift/codegen/meta/src/gen_settings.rs index 2808c2a77..d7116cac9 100644 --- a/cranelift/codegen/meta/src/gen_settings.rs +++ b/cranelift/codegen/meta/src/gen_settings.rs @@ -70,31 +70,25 @@ fn gen_constructor(group: &SettingGroup, parent: ParentGroup, fmt: ...
17
193
185
4ad0099da4daf88c0bd77d9bde542b81c5131596
Peter Huene
2021-04-01T19:04:47
Update `wat` crate. Update the `wat` crate to latest version and use `Error::set_path` in `Module::from_file` to properly record the path associated with errors.
diff --git a/Cargo.lock b/Cargo.lock index 2626813a7..148263def 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3598,9 +3598,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0fa059022c5dabe129f02b429d...
7
23
10
3da03bcfcfa13fcb051d509906fbd8d0411300c9
Peter Huene
2021-04-01T18:48:33
Code review feedback. * Expand doc comment on `Engine::precompile_module`. * Add FIXME comment regarding a future ISA flag compatibility check before doing a JIT from `Module::from_binary`. * Remove no-longer-needed CLI groups from the `compile` command.
diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs index 28391d298..f7d9c4eaa 100644 --- a/crates/wasmtime/src/engine.rs +++ b/crates/wasmtime/src/engine.rs @@ -89,6 +89,15 @@ impl Engine { /// If this is supplied then the text format will be parsed before validation. /// Note that...
3
14
8
1ce2a871499f7f9e13dce2c26ffe515935a01e09
Peter Huene
2021-03-31T00:20:15
Code review feedback. * Remove `Config::for_target` in favor of setter `Config::target`. * Remove explicit setting of Cranelift flags in `Config::new` in favor of calling the `Config` methods that do the same thing. * Serialize the package version independently of the data when serializing a module. * Use struct d...
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 1fd5ee8b3..2ccfca22a 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -392,20 +392,6 @@ impl Config { /// Creates a new configuration object with the default configuration /// specified. pub ...
9
180
178
273597903be217be42008a33dfa518520c0d4c1a
Peter Huene
2021-03-30T05:27:43
Fix spelling error.
diff --git a/crates/jit/src/code_memory.rs b/crates/jit/src/code_memory.rs index e22c6a46c..9c703f644 100644 --- a/crates/jit/src/code_memory.rs +++ b/crates/jit/src/code_memory.rs @@ -312,7 +312,7 @@ impl CodeMemory { } } - // Register all unwind entires for functions and trampolines. + ...
1
1
1
7e02940c7257011f1c38b5feb3936649c13de49f
Peter Huene
2021-03-30T05:24:53
Add Wasmtime to AOT header. Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
diff --git a/crates/wasmtime/src/module.rs b/crates/wasmtime/src/module.rs index c9922b4f2..6d1d9b3eb 100644 --- a/crates/wasmtime/src/module.rs +++ b/crates/wasmtime/src/module.rs @@ -17,7 +17,7 @@ mod serialization; use serialization::SerializedModule; -const COMPILED_MODULE_HEADER: &[u8] = b"\0aot"; +const COMP...
1
1
1
90aa5cf49fcf48c92a3fb39bdd28489fd62ecb99
Alex Crichton
2021-04-01T20:05:38
Daily update of wasm-smith (#2798) Because apparently it's daily now!
diff --git a/Cargo.lock b/Cargo.lock index 245ace4e4..33240d0d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3117,9 +3117,9 @@ dependencies = [ [[package]] name = "wasm-smith" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300164e6fa637089d32c89e...
2
3
3
0508394c62dcf799d56682f1072ad92551d43183
Pat Hickey
2021-04-01T16:33:37
Revert "wiggle: generate a span that is present at all levels" This reverts commit 0466f47cb4f48400745470d9d5c08d688e2227df.
diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index 69a5d89ee..4fcdcba47 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -69,9 +69,8 @@ pub fn define_func( ) -> Result<#abi_ret, #rt::Trap> { use std::convert::Tr...
1
1
2
dfffc6915026f1df904162bc82eb8bfd49e810f9
Alex Crichton
2021-03-31T20:39:37
Update wasm-smith again (#2794) More fuzz tweaks!
diff --git a/Cargo.lock b/Cargo.lock index 9a09dd8fe..245ace4e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3117,9 +3117,9 @@ dependencies = [ [[package]] name = "wasm-smith" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01b8616d526ea81915c7b5...
2
3
3
6748dfa43a0b48f12cad62cc12fe28157450587c
Alex Crichton
2021-03-31T14:19:51
Disable module linking in spectest fuzzing Module linking implicitly enables multiple tables but that isn't supported by the spec tests today.
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index 289e584de..65f25225f 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -438,6 +438,7 @@ pub fn spectest(fuzz_config: crate::generators::Config, test: crate::generators: let mut config = fuzz_config.to_w...
1
1
0
e0440eebb78c31c5f33ff0ecf9e664b9ab6c2152
Alex Crichton
2021-03-30T14:13:10
Update wasm-smith dependency Brings in a fuzzing bug fix!
diff --git a/Cargo.lock b/Cargo.lock index a234e2d22..9a09dd8fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3117,9 +3117,9 @@ dependencies = [ [[package]] name = "wasm-smith" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249f721ef7742a349bbb6c5...
2
3
3
a301202b7d91e73b2ba393f3817c4ab1d1392cbb
Alex Crichton
2021-03-29T22:26:02
Remove the type-driven ability for duplicates in a `Linker` (#2789) When `Linker` was first created it was attempted to be created with the ability to instantiate any wasm modules, including those with duplicate import strings of different types. In an effort to support this a `Linker` supports defining the same na...
diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs index 153ecd75d..cd2be6a32 100644 --- a/crates/wasmtime/src/linker.rs +++ b/crates/wasmtime/src/linker.rs @@ -1,7 +1,6 @@ use crate::instance::InstanceBuilder; use crate::{ - Extern, ExternType, Func, FuncType, GlobalType, ImportType, Insta...
2
26
86
e38166ac3f407f2a31b55f5ffee1f342e41e3837
Pat Hickey
2021-03-29T17:04:42
wiggle::async_trait is defined as async_trait::async_trait(?Send) async methods used by wiggle currently need to Not have the Send constraint, so rather than make all use sites pass the argument to the re-exported async_trait macro, define a new macro that applies the argument.
diff --git a/Cargo.lock b/Cargo.lock index 0e40dba03..a234e2d22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3651,6 +3651,7 @@ dependencies = [ name = "wiggle-macro" version = "0.25.0" dependencies = [ + "proc-macro2", "quote", "syn", "wiggle", diff --git a/crates/wiggle/generate/src/module_trait.rs b/crates/w...
7
25
10
b1a3c9047f50794fcbc7692f6f53383044ff2875
Alex Crichton
2021-03-29T15:23:23
Actually make spectest fuzzing deterministic Turns out #2106 missed the actual sorting operation. Silly me!
diff --git a/crates/fuzzing/build.rs b/crates/fuzzing/build.rs index 73d3e9d13..428355beb 100644 --- a/crates/fuzzing/build.rs +++ b/crates/fuzzing/build.rs @@ -13,11 +13,12 @@ fn main() { .unwrap() .join("../../tests/spec_testsuite"); let mut code = format!("static FILES: &[(&str, &str)] = &[\n"...
1
2
1
8da3de6756247cf1aa80539b6c2169b6126fa660
Pat Hickey
2021-03-27T00:21:51
wiggle-wasmtime: use fully qualified std::rc::Rc<std::cell::RefCell<>> in expansion
diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index 6dc7b1447..24732c7f2 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -288,7 +288,7 @@ fn generate_func( let #name_ident = wasmtime::Func::#wrapper( ...
1
1
1
ae4c5a9d7fe531041a4896ff4e7d30fa6a50db0e
Pat Hickey
2021-03-26T22:37:57
fixes in tests and examples
diff --git a/examples/linking.rs b/examples/linking.rs index 11f4022bc..b4cee53a4 100644 --- a/examples/linking.rs +++ b/examples/linking.rs @@ -3,9 +3,8 @@ // You can execute this example with `cargo run --example linking` use anyhow::Result; -use wasi_cap_std_sync::WasiCtxBuilder; use wasmtime::*; -use wasmtime_...
4
4
7
0466f47cb4f48400745470d9d5c08d688e2227df
Pat Hickey
2021-03-26T21:25:10
wiggle: generate a span that is present at all levels The code I wrote here prior was incorrect: a span is present at the level specified and below; previously I thought it was present at the level specified and above. So, previously, a TRACE-level event inside this span would be associated with the module and functio...
diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index 4fcdcba47..69a5d89ee 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -69,8 +69,9 @@ pub fn define_func( ) -> Result<#abi_ret, #rt::Trap> { use std::convert::Tr...
1
2
1
550c774c1d87b713795d21aebe60ac21d802f525
Alex Crichton
2021-03-26T19:38:34
fuzz: Allow incompatible import types in instantiation (#2778) Yesterday fuzzing was switched to using a `Linker` to improve coverage when using module linking since we can fake instance imports with definitions of each individual item. Using a `Linker`, however, means that we can't necessarily instantiate all modu...
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index c1f9b1e03..289e584de 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -126,15 +126,27 @@ pub fn instantiate_with_config( match linker.instantiate(&module) { Ok(_) => {} - // Allow tra...
1
21
9
31d3db1ec2976a3d9311ce2fd70e30d1cc5f5028
Johnnie Birch
2021-03-25T19:33:13
Implements convert low signed integer to float for x64 simd
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 7ce97d36f..ef141c8a9 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -4325,6 +4325,26 @@ pub(crate) fn define( .oper...
8
45
4
7d8931c51721b216757e3e909bfc51aaec063c0e
Alex Crichton
2021-03-26T00:11:02
Compile fewer trampolines with module linking (#2774) Previously each module in a module-linking-using-module would compile all the trampolines for all signatures for all modules. In forest-like situations with lots of modules this would cause quite a few trampolines to get compiled. The original intention was to h...
diff --git a/crates/jit/src/instantiate.rs b/crates/jit/src/instantiate.rs index df6a17fa2..df2cd77c3 100644 --- a/crates/jit/src/instantiate.rs +++ b/crates/jit/src/instantiate.rs @@ -205,7 +205,7 @@ pub struct CompiledModule { artifacts: CompilationArtifacts, code: Arc<ModuleCode>, finished_functions: ...
4
37
29
af7030197d39fa76f9b3c93597b6a01c821c246e
Pat Hickey
2021-03-25T23:58:06
wasmtime-cli: drop direct dep on cap_std by using re-export
diff --git a/Cargo.lock b/Cargo.lock index bb27126f3..0e40dba03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3269,7 +3269,6 @@ name = "wasmtime-cli" version = "0.25.0" dependencies = [ "anyhow", - "cap-std", "env_logger 0.8.3", "file-per-thread-logger", "filecheck", diff --git a/Cargo.toml b/Cargo.toml index ...
4
8
7
07245a87636aab1be2a7436cc313f3fb9a8127fe
Pat Hickey
2021-03-25T23:56:34
wasi-cap-std-sync: re-export Dir while we're at it
diff --git a/crates/wasi-common/cap-std-sync/src/lib.rs b/crates/wasi-common/cap-std-sync/src/lib.rs index fe3895129..ac8ee602e 100644 --- a/crates/wasi-common/cap-std-sync/src/lib.rs +++ b/crates/wasi-common/cap-std-sync/src/lib.rs @@ -14,6 +14,10 @@ //! `cap_std::fs::Dir`, and provides convenience methods for inheri...
1
7
6
183ee9d6d89372b11488d8850ad8cd708aea87e3
Pat Hickey
2021-03-25T23:52:15
wasmtime cli: use wasmtime_wasi's re-exports more deliberately this drops the direct dep on wasi-cap-std-sync and wasi-common.
diff --git a/Cargo.lock b/Cargo.lock index 88e88c82e..bb27126f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3285,8 +3285,6 @@ dependencies = [ "tempfile", "test-programs", "tracing-subscriber", - "wasi-cap-std-sync", - "wasi-common", "wasmparser", "wasmtime", "wasmtime-cache", diff --git a/Cargo.toml b/Car...
4
3
9
19a802549f6557efc639949b8adb713d1c3392d1
Pat Hickey
2021-03-25T23:49:31
wasmtime-wasi: re-export wasi-cap-std-sync
diff --git a/Cargo.lock b/Cargo.lock index 9aa8863d4..88e88c82e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3513,6 +3513,7 @@ name = "wasmtime-wasi" version = "0.25.0" dependencies = [ "anyhow", + "wasi-cap-std-sync", "wasi-common", "wasmtime", "wasmtime-wiggle", diff --git a/crates/wasi/Cargo.toml b/crates/...
3
14
0
211731b8769c1d96173df26a1ebff15c49719ef6
Alex Crichton
2021-03-25T23:44:31
Update wasm-tools crates (#2773) Brings in some fuzzing-related bug-fixes
diff --git a/Cargo.lock b/Cargo.lock index 64b5218f7..9aa8863d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -561,7 +561,7 @@ dependencies = [ "souper-ir", "target-lexicon", "thiserror", - "wast 35.0.0", + "wast 35.0.1", ] [[package]] @@ -1825,7 +1825,7 @@ dependencies = [ "peepmatic-test-operator", "peepm...
13
34
33
654156714c4787e5e4322ebfe2e78a16e47342e6
Alex Crichton
2021-03-25T23:44:22
Deduplicate function signatures in wasm modules (#2772) Currently wasmtime will generate a `SignatureIndex`-per-type in the module itself, even if the module itself declares the same type multiple times. To make matters worse if the same type is declared across multiple modules used in a module-linking-using-module...
diff --git a/crates/environ/src/module_environ.rs b/crates/environ/src/module_environ.rs index 2f53bb4af..57e2f6bb1 100644 --- a/crates/environ/src/module_environ.rs +++ b/crates/environ/src/module_environ.rs @@ -41,6 +41,8 @@ pub struct ModuleEnvironment<'data> { /// Intern'd types for this entire translation, sh...
1
16
10
516a97b3f3017ff86180acac74debde75d16186a
Alex Crichton
2021-03-25T23:44:04
A few more small fuzzing fixes (#2770) * Increase allowances for values when fuzzing The wasm-smith limits for generating modules are a bit higher than what we specify, so sync those up to avoid getting too many false positives with limits getting blown. * Ensure fuzzing `*.wat` files are in sync I keep loo...
diff --git a/crates/fuzzing/src/lib.rs b/crates/fuzzing/src/lib.rs index d131149dd..6e4e991c4 100644 --- a/crates/fuzzing/src/lib.rs +++ b/crates/fuzzing/src/lib.rs @@ -39,9 +39,13 @@ pub fn fuzz_default_config(strategy: wasmtime::Strategy) -> anyhow::Result<wasmt .wasm_bulk_memory(true) .wasm_referen...
3
15
6
8bb1f8adc9e544010427fb5062f54a25cd3441ca
Pat Hickey
2021-03-25T20:31:45
wasmtime-wiggle: make it possible to add host funcs to a config under an alias (#2761) * wasmtime-wiggle: make it possible to add host funcs to a config under an alias * remove debugging printlns
diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index 3a064cbae..6dc7b1447 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -135,6 +135,28 @@ contained in the `cx` parameter.", module_conf.name.to_string() ...
1
38
12
81c44033d6d82b50969702d3dcde07cb71e066f6
Alex Crichton
2021-03-25T18:56:34
Disable module-linking in differential fuzzing (#2769) Currently this exposes a bug where modules broken by module linking cause failures in the fuzzer, but we want to fuzz those modules since module linking isn't enabled when generating these modules.
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index b30bb71a2..3098005e0 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -179,8 +179,14 @@ pub fn differential_execution( let wasm = module.to_bytes(); log_wasm(&wasm); - for config in &configs ...
1
8
2
9476581ae639a4e9f18e82d9a11a3555694118c6
Alex Crichton
2021-03-25T18:35:38
Instantiate fewer instances when fuzzing (#2768) This commit fixes an issue where when module linking was enabled for fuzzing (which it is) import types of modules show as imports of instances. In an attempt to satisfy the dummy values of such imports the fuzzing integration would create instances for each import. ...
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index e54844866..b30bb71a2 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -13,7 +13,7 @@ pub mod dummy; use arbitrary::Arbitrary; -use dummy::dummy_imports; +use dummy::dummy_linker; use log::debug; use s...
3
78
40
30d9164b6e78351f0147253031c565b872b1b17a
Alex Crichton
2021-03-25T18:19:37
Fix a number of warnings cropping up on nightly Rust (#2767) Various small issues here and there, nothing major
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index e3e9b4fef..7ce97d36f 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -3582,7 +3582,7 @@ pub(crate) fn define( "f...
9
21
21
1d663bfd71b587ce76a1f9aba2479bf3e1eba98a
Pat Hickey
2021-03-24T18:19:12
delete straggler InDataField
diff --git a/crates/wasi-common/src/snapshots/preview_1.rs b/crates/wasi-common/src/snapshots/preview_1.rs index 494ba9111..0ee4044c3 100644 --- a/crates/wasi-common/src/snapshots/preview_1.rs +++ b/crates/wasi-common/src/snapshots/preview_1.rs @@ -96,7 +96,6 @@ impl From<wiggle::GuestError> for types::Errno { ...
1
0
1
e6c7e00a5220b48c6d23b9ffd38078dc103775a5
Pat Hickey
2021-03-24T17:39:06
wiggle-using crates: delete GuestErrorConversion
diff --git a/crates/wasi-common/src/snapshots/preview_0.rs b/crates/wasi-common/src/snapshots/preview_0.rs index 909c22859..02e6289cd 100644 --- a/crates/wasi-common/src/snapshots/preview_0.rs +++ b/crates/wasi-common/src/snapshots/preview_0.rs @@ -24,14 +24,6 @@ impl wiggle::GuestErrorType for types::Errno { } }...
4
0
32
d4b54ee0a8c0efbaa514712545994fb9af18e9d2
Alex Crichton
2021-03-24T16:41:33
More optimizations for calling into WebAssembly (#2759) * Combine stack-based cleanups for faster wasm calls This commit is an extension of #2757 where the goal is to optimize entry into WebAssembly. Currently wasmtime has two stack-based cleanups when entering wasm, one for the externref activation table and ano...
diff --git a/Cargo.lock b/Cargo.lock index 9bf50417f..64b5218f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3177,9 +3177,11 @@ dependencies = [ "cfg-if 1.0.0", "cpp_demangle", "indexmap", + "lazy_static", "libc", "log", "paste", + "psm", "region", "rustc-demangle", "serde", @@ -3478,7 +3480,6 @@ depe...
13
323
308
1c4af27f2d23730c1ed2133550ed90066d2c6889
Pat Hickey
2021-03-24T05:20:29
delete GuestErrorConversion from docs, tests
diff --git a/crates/wiggle/macro/src/lib.rs b/crates/wiggle/macro/src/lib.rs index 09ab2f635..4892a9420 100644 --- a/crates/wiggle/macro/src/lib.rs +++ b/crates/wiggle/macro/src/lib.rs @@ -113,17 +113,6 @@ use syn::parse_macro_input; /// } /// } /// -/// /// The `types::GuestErrorConversion` trait is also genera...
15
16
66
f74b0291adbdc94552bc014fc2c9497ef1e12a1a
Pat Hickey
2021-03-24T05:14:49
dead code: remove GuestErrorConversion, it now is never called
diff --git a/crates/wiggle/generate/src/lib.rs b/crates/wiggle/generate/src/lib.rs index 90cca766d..cecd610b5 100644 --- a/crates/wiggle/generate/src/lib.rs +++ b/crates/wiggle/generate/src/lib.rs @@ -38,17 +38,6 @@ pub fn generate(doc: &witx::Document, names: &Names, settings: &CodegenSettings) } }); -...
2
0
17
4a9ce90d346e7de785a9393f3e9a2b6d312c4848
Pat Hickey
2021-03-24T05:04:34
GuestError::InDataField never constructed, so delete it
diff --git a/crates/wiggle/src/error.rs b/crates/wiggle/src/error.rs index 965a88e81..e8dd0f5a3 100644 --- a/crates/wiggle/src/error.rs +++ b/crates/wiggle/src/error.rs @@ -27,13 +27,6 @@ pub enum GuestError { #[source] err: Box<GuestError>, }, - #[error("In data {typename}.{field}: {err}")] -...
1
0
7
1151f630b8f37e4e4458eceee63e4d6dd0c6221a
Pat Hickey
2021-03-24T05:03:25
wiggle GuestError: improve Display of InFunc, InDataField
diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index af15709d0..4fcdcba47 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -139,10 +139,12 @@ impl witx::Bindgen for Rust<'_> { ) { let rt = self.rt; let wrap_err =...
2
5
2
c95971ab59e5ea8e91923b41034bbf3eee352c96
Alex Crichton
2021-03-23T20:22:37
Optimize calling a WebAssembly function (#2757) This commit implements a few optimizations, mainly inlining, that should improve the performance of calling a WebAssembly function. This code path can be quite hot depending on the embedding case and we hadn't really put much effort into optimizing the nitty gritty. ...
diff --git a/crates/runtime/src/externref.rs b/crates/runtime/src/externref.rs index 7fd964b8e..01c296577 100644 --- a/crates/runtime/src/externref.rs +++ b/crates/runtime/src/externref.rs @@ -752,6 +752,7 @@ impl VMExternRefActivationsTable { /// // call has returned. /// drop(auto_reset_canary); /// ``...
6
41
29
81dfb9c45827d67347a58cb9331ee8cb6ccb3c24
Pat Hickey
2021-03-23T17:17:48
wasi: make WasiSched::sleep fallible some systems do not support sleeping and may want to return EINVAL here.
diff --git a/crates/wasi-common/cap-std-sync/src/sched/unix.rs b/crates/wasi-common/cap-std-sync/src/sched/unix.rs index ab8be60a0..da2ec1d14 100644 --- a/crates/wasi-common/cap-std-sync/src/sched/unix.rs +++ b/crates/wasi-common/cap-std-sync/src/sched/unix.rs @@ -108,8 +108,9 @@ impl WasiSched for SyncSched { ...
5
9
9
49ef2c652a51e63b837c33eac233b7c3903e92a4
Benjamin Bouvier
2021-03-23T15:07:32
Cranelift: remove logging of vcode when the log level isn't debug or more (#2755) This logging step may be quite expensive, since logging has never been optimized at all. Removing it is a clear win in compile times on my machine for a large wasm module, for which parallel compilation is lowering from 6 seconds to 1...
diff --git a/cranelift/codegen/src/machinst/compile.rs b/cranelift/codegen/src/machinst/compile.rs index 9a00cee80..0aaee5e98 100644 --- a/cranelift/codegen/src/machinst/compile.rs +++ b/cranelift/codegen/src/machinst/compile.rs @@ -5,7 +5,7 @@ use crate::machinst::*; use crate::settings; use crate::timing; -use lo...
1
16
9
2880dab8f81249138b66528294df09eff45a935b
Dan Gohman
2021-03-22T18:23:45
Add a `sleep` function to the `WasiSched` trait.
diff --git a/crates/wasi-common/cap-std-sync/src/sched/unix.rs b/crates/wasi-common/cap-std-sync/src/sched/unix.rs index 15bbb2913..ab8be60a0 100644 --- a/crates/wasi-common/cap-std-sync/src/sched/unix.rs +++ b/crates/wasi-common/cap-std-sync/src/sched/unix.rs @@ -108,6 +108,9 @@ impl WasiSched for SyncSched { ...
5
32
2
dd7e16762c4d8b09195059efd5166c490e8f306b
Dan Gohman
2021-03-22T17:44:42
Arrange for the new test to be called.
diff --git a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs index b5d7af706..6407a32f3 100644 --- a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs +++ b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs @@ -195,6 +195,7 @@ unsafe fn test_fd_r...
1
1
0
6b40724d18a144a0f781b7b907a13be885713f1f
Dan Gohman
2021-03-22T16:11:55
Support "sleep" forms of `poll_oneoff`. Add support for `poll_oneoff` calls which just sleep on a relative timeout. This fixes a bug handling code compiled with WASI libc's `sleep` family of functions, which call `poll_oneoff` with a `CLOCK_REALTIME` timer, which wasn't previously implemented.
diff --git a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs index a680cf630..b5d7af706 100644 --- a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs +++ b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs @@ -26,9 +26,10 @@ unsafe fn test_empty...
2
65
1
cba01446126b37d70e49ddbc4eda1ba36da4e6a4
Dan Gohman
2021-03-22T15:54:44
Use `min_by` instead of `sort_by` when we only want the minimum element. This is just a minor code simplification I happened to notice while doing unrelated work on `poll_oneoff`.
diff --git a/crates/wasi-common/src/sched.rs b/crates/wasi-common/src/sched.rs index db2a81f9d..a925cd4e9 100644 --- a/crates/wasi-common/src/sched.rs +++ b/crates/wasi-common/src/sched.rs @@ -67,16 +67,13 @@ impl<'a> Poll<'a> { self.subs.is_empty() } pub fn earliest_clock_deadline(&'a self) -> Optio...
1
2
5
b321a7291dfb9d71fd9ebc7ac1fc9f6dc603ac8d
bjorn3
2021-03-20T18:15:09
Clarify ownership of data returned by get_finalized_*
diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs index aa54ba185..dd900a29b 100644 --- a/cranelift/jit/src/backend.rs +++ b/cranelift/jit/src/backend.rs @@ -167,7 +167,7 @@ impl JITModule { /// corresponding module, it should only be used when none of the functions /// from that module...
1
7
1
6e6713ae0b0be578221a2802719327526458a8cf
Benjamin Bouvier
2021-03-18T14:21:40
cranelift: add support for the Mac aarch64 calling convention This bumps target-lexicon and adds support for the AppleAarch64 calling convention. Specifically for WebAssembly support, we only have to worry about the new stack slots convention. Stack slots don't need to be at least 8-bytes, they can be as small as the ...
diff --git a/Cargo.lock b/Cargo.lock index 574c97a2f..e5cd71f32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2705,9 +2705,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422045212ea98508a...
26
204
37
cc89111463627afbb9d72939f59307f550406056
bjorn3
2021-03-21T17:00:26
Support declaring anonymous functions and data objects
diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs index aa54ba185..1c13d9a1b 100644 --- a/cranelift/jit/src/backend.rs +++ b/cranelift/jit/src/backend.rs @@ -180,6 +180,53 @@ impl JITModule { .or_else(|| lookup_with_dlsym(name)) } + fn new_func_plt_entry(&mut self, id: Func...
3
189
56
1425c1e7bf5fb03a9b60cb674fad702ffd2d463f
MaxGraey
2021-03-21T15:03:25
fix emit_small_memset use shifts format more fix revert to multiply
diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index 365e5aeff..45937dc3f 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -768,9 +768,9 @@ impl<'a> FunctionBuilder<'a> { let ch = u64::from(ch); let raw_value = ...
1
3
3
1639f2c844e5c06de9d102d6298af192af99d11c
bjorn3
2021-03-20T17:46:16
Allow passing arbitrary MemFlags to emit_small_mem{cpy,move}
diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index 365e5aeff..3ebfc8efa 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -640,6 +640,7 @@ impl<'a> FunctionBuilder<'a> { dest_align: u8, src_align: u8, non_overla...
1
27
7
e6dda413a45c5cb922c9bbeee5dc64eb982bda0c
Peter Huene
2021-03-20T07:05:08
Code review feedback. * Add assert to `StackPool::deallocate` to ensure the fiber stack given to it comes from the pool. * Remove outdated comment about windows and stacks as the allocator now returns fiber stacks. * Remove conditional compilation around `stack_size` in the allocators as it was just clutter.
diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs index b8f2b3e3d..e8e1e654a 100644 --- a/crates/runtime/src/instance/allocator.rs +++ b/crates/runtime/src/instance/allocator.rs @@ -536,19 +536,14 @@ unsafe fn initialize_vmcontext_globals(instance: &Instance) { #[derive(C...
4
38
38
f556bd18a7461d383e8f7485b42866933dc9cb89
Peter Huene
2021-03-19T19:50:38
Set the thread stack guarantee for fibers on Windows. This commit fixes the Windows implementation of fibers in Wasmtime to reserve enough staack space for Rust to handle any stack overflow exceptions.
diff --git a/crates/fiber/src/windows.rs b/crates/fiber/src/windows.rs index e61f11d8d..be35ae4e1 100644 --- a/crates/fiber/src/windows.rs +++ b/crates/fiber/src/windows.rs @@ -5,6 +5,7 @@ use std::ptr; use winapi::shared::minwindef::*; use winapi::shared::winerror::ERROR_NOT_SUPPORTED; use winapi::um::fibersapi::*;...
2
22
12
8e34022784dc0cf6c54cf1e809458e6d7204f724
Peter Huene
2021-03-19T02:23:42
Add tests for hitting fiber stack guard pages.
diff --git a/tests/host_segfault.rs b/tests/host_segfault.rs index 30f3a4f9e..5efa1d6f8 100644 --- a/tests/host_segfault.rs +++ b/tests/host_segfault.rs @@ -10,15 +10,20 @@ // happened or anything like that. use std::env; +use std::future::Future; +use std::io::{self, Write}; +use std::pin::Pin; use std::process::...
1
165
43
38926fb1fc56dea9633bde95704506d65f012e94
Will Robson
2021-03-18T16:49:17
cranelift-module: Add support for passing a StackMapSink when defining functions Fixes #2738 This follows the convention set by the existing method of passing a TrapSink by adding another argument for a StackMapSink.
diff --git a/cranelift/jit/examples/jit-minimal.rs b/cranelift/jit/examples/jit-minimal.rs index 138c54583..aaba5a7ea 100644 --- a/cranelift/jit/examples/jit-minimal.rs +++ b/cranelift/jit/examples/jit-minimal.rs @@ -1,5 +1,5 @@ use cranelift::prelude::*; -use cranelift_codegen::binemit::NullTrapSink; +use cranelift_c...
6
26
24
2d3f2adf0407d4e37b8268b1ac1d74c5fbffbb62
Dan Gohman
2021-03-15T17:48:02
Fix nondeterministic failures in poll_oneoff_stdio. Adjust this test so that it tolerates poll_oneoff returning that both a timeout occurred and an input is ready for reading, at the same time.
diff --git a/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs b/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs index 761b83aa5..19f60d076 100644 --- a/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs +++ b/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs @@ -46,22 +46,2...
1
17
16
07c27039b1daf8ea61110e1a3f7920aa1ba0950e
Anton Kirilov
2021-03-02T18:35:40
Cranelift AArch64: Add initial support for the Armv8.1 atomics This commit enables Cranelift's AArch64 backend to generate code for instruction set extensions (previously only the base Armv8-A architecture was supported); also, it makes it possible to detect the extensions supported by the host when JIT compiling. The...
diff --git a/cranelift/codegen/meta/src/isa/arm64/mod.rs b/cranelift/codegen/meta/src/isa/arm64/mod.rs index 5d8bc76fc..cbc21347e 100644 --- a/cranelift/codegen/meta/src/isa/arm64/mod.rs +++ b/cranelift/codegen/meta/src/isa/arm64/mod.rs @@ -8,7 +8,10 @@ use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder}; u...
9
204
53
918c012d006ba87595ed267f20fdac0542e2bd5f
Alex Crichton
2021-03-11T17:32:33
Fix some issues around TLS management with async (#2709) This commit fixes a few issues around managing the thread-local state of a wasmtime thread. We intentionally only have a singular TLS variable in the whole world, and the problem is that when stack-switching off an async thread we were not restoring the previ...
diff --git a/crates/runtime/src/lib.rs b/crates/runtime/src/lib.rs index b53e73c16..1e6cfc8cd 100644 --- a/crates/runtime/src/lib.rs +++ b/crates/runtime/src/lib.rs @@ -48,7 +48,7 @@ pub use crate::mmap::Mmap; pub use crate::table::{Table, TableElement}; pub use crate::traphandlers::{ catch_traps, init_traps, ra...
4
236
22