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
41b47215129b85bed1055daeb6cb6d9b507912a0
Peter Huene
2020-07-10T20:49:55
Add a test case for WASI file truncation.
diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs index aab9d66d2..93f60ae64 100644 --- a/crates/test-programs/build.rs +++ b/crates/test-programs/build.rs @@ -218,6 +218,8 @@ mod wasi_tests { // TODO: virtfs does not support rename yet. "path_r...
3
98
15
b2551bb4d00f6b6b7600533ebe1df7b82bd469fb
Yury Delendik
2020-07-10T20:56:43
Make wasmtime_environ::Module serializable (#2005) * Define WasmType/WasmFuncType in the Cranelift * Make `Module` serializable
diff --git a/Cargo.lock b/Cargo.lock index a981255b6..cbfcb184f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1008,6 +1008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" dependencies = [ "autocfg 1.0.0", + "serde", ...
17
205
62
ec331a088cf7a16f3312bc247c58488ac2a6c72b
Nick Fitzgerald
2020-07-10T20:51:58
run-examples: Provide more error context for debugging Use `anyhow` for nice errors and provide error context on commands that we run.
diff --git a/Cargo.lock b/Cargo.lock index 91cc09f5d..855f8bfc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1742,6 +1742,7 @@ dependencies = [ name = "run-examples" version = "0.18.0" dependencies = [ + "anyhow", "cc", ] diff --git a/crates/misc/run-examples/Cargo.toml b/crates/misc/run-examples/Cargo.toml ind...
3
30
25
d07fdca73aa71b3155782a4198c1c9733b4b1d7d
Nick Fitzgerald
2020-07-10T18:33:26
wasmtime-c-api: Use a safe helper for initializing `MaybeUninit` out pointers
diff --git a/crates/c-api/src/func.rs b/crates/c-api/src/func.rs index 75ba6a631..fe494dbbc 100644 --- a/crates/c-api/src/func.rs +++ b/crates/c-api/src/func.rs @@ -220,12 +220,7 @@ fn _wasmtime_func_call( match result { Ok(Ok(out)) => { for (slot, val) in results.iter_mut().zip(out.into_vec(...
5
28
27
377b213fd561c182d486ccaf5e7f57c477ad9e9d
Nick Fitzgerald
2020-07-10T18:23:30
wasmtime-c-api: Remove unused `HostInfoState` struct
diff --git a/crates/c-api/src/lib.rs b/crates/c-api/src/lib.rs index 9a62dad2b..d820882c3 100644 --- a/crates/c-api/src/lib.rs +++ b/crates/c-api/src/lib.rs @@ -62,16 +62,3 @@ pub struct wasm_foreign_t { pub struct wasm_shared_module_t { _unused: [u8; 0], } - -struct HostInfoState { - info: *mut std::ffi::c_v...
1
0
13
b9bb095e0fe547824479f54d6eba73194bec82f0
Nick Fitzgerald
2020-07-10T18:13:46
wasmtime-c-api: Remove nested options from `wasm_ref_t` representation
diff --git a/crates/c-api/src/ref.rs b/crates/c-api/src/ref.rs index 524d39844..5b48776ce 100644 --- a/crates/c-api/src/ref.rs +++ b/crates/c-api/src/ref.rs @@ -7,7 +7,7 @@ use wasmtime::{ExternRef, Func, Val}; /// `*mut wasm_ref_t` is a reference type (`externref` or `funcref`), as seen by /// the C API. Because we ...
2
33
21
742f8ee1fc3db391e7fc3f1c290fba8dfc1af809
Nick Fitzgerald
2020-07-09T17:29:19
wasmtime-c-api: Make `wasmtime_externref_new` proxy to `wasmtime_externref_new_with_finalizer`
diff --git a/crates/c-api/src/ref.rs b/crates/c-api/src/ref.rs index 7fca245c2..524d39844 100644 --- a/crates/c-api/src/ref.rs +++ b/crates/c-api/src/ref.rs @@ -113,10 +113,7 @@ impl Drop for CExternRef { #[no_mangle] pub extern "C" fn wasmtime_externref_new(data: *mut c_void) -> wasm_val_t { - wasm_val_t::from_...
1
1
4
aaf4c941b87fef8a23e877177a2ffd635a6d8e5b
Nick Fitzgerald
2020-07-08T18:25:44
wasmtime-c-api: Add support for `funcref` values
diff --git a/crates/c-api/src/ref.rs b/crates/c-api/src/ref.rs index 5ddc43783..52f46040d 100644 --- a/crates/c-api/src/ref.rs +++ b/crates/c-api/src/ref.rs @@ -1,14 +1,61 @@ use std::os::raw::c_void; -use wasmtime::ExternRef; +use wasmtime::{ExternRef, Func, Val}; -#[repr(C)] +/// `*mut wasm_ref_t` is a reference t...
3
95
45
4cdf8b7cfd61f9bbd8aadbc528db4e7d199e0ac2
Nick Fitzgerald
2020-07-08T17:20:56
wasmtime-c-api: Add support for `externref` values This required that `wasm_val_t` have a `Drop` implementation, an explicit `Clone` implementation, and no longer be `Copy`, which rippled out through the crate a bit. Additionally, `wasm_func_call` and friends were creating references to uninitialized data for its out...
diff --git a/crates/c-api/src/func.rs b/crates/c-api/src/func.rs index 54b8d989b..75ba6a631 100644 --- a/crates/c-api/src/func.rs +++ b/crates/c-api/src/func.rs @@ -2,6 +2,7 @@ use crate::{wasm_extern_t, wasm_functype_t, wasm_store_t, wasm_val_t}; use crate::{wasm_name_t, wasm_trap_t, wasmtime_error_t}; use anyhow::a...
3
71
42
92f33284b650cbfc6afb1fd4cf72ebee286157cf
whitequark
2020-07-10T19:23:37
WASI: make O_CREAT|O_TRUNC actually truncate files on Windows Fixes #2009.
diff --git a/crates/wasi-common/src/sys/windows/path.rs b/crates/wasi-common/src/sys/windows/path.rs index 50a234474..d2a2d1727 100644 --- a/crates/wasi-common/src/sys/windows/path.rs +++ b/crates/wasi-common/src/sys/windows/path.rs @@ -224,7 +224,7 @@ pub(crate) fn open( let mut opts = OpenOptions::new(); ma...
1
1
1
0387169934e91722b8b6819773eacc6893718296
Rochet2
2020-07-09T16:03:55
Allow android compilation (#2002)
diff --git a/crates/runtime/src/traphandlers.rs b/crates/runtime/src/traphandlers.rs index 0bd6f2cd1..198d03a64 100644 --- a/crates/runtime/src/traphandlers.rs +++ b/crates/runtime/src/traphandlers.rs @@ -161,7 +161,7 @@ cfg_if::cfg_if! { } else if #[cfg(all(target_os = "linux", target_arch = "x86"))] ...
1
1
1
f316bef763241ab1a527e466376fb4d9ddbe801c
Benjamin Bouvier
2020-07-09T13:43:42
machinst aarch64: fix encoding generation of left-shift by 0; The ARM book says that the immr field should contain (-count % 64); the existing code was approximating this with (64 - count), which is not correct for a zero count.
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index bafe42abd..2ded2f5d4 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -534,8 +534,16 @@ impl MachInstEmit for Inst { ...
2
30
2
5c35a9631cdffc00a32b416f9cb0b80f182b716e
Andrew Brown
2020-06-03T19:20:44
Enable more SIMD spec tests
diff --git a/build.rs b/build.rs index 8fa7dbade..2baea0ab4 100644 --- a/build.rs +++ b/build.rs @@ -200,8 +200,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", _) if target.contains("aarch64") => return true, ("simd", "simd_conversions") => return true, // ...
1
0
2
af39692d66eff042b2863a2e33c4aa80a99bb66e
Andrew Brown
2020-06-03T19:19:04
Translate Wasm's i32x4.trunc_sat_f32x4_u to Cranelift's fcvt_to_uint_sat.i32x4
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index c62d29e60..a0496677f 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1559,6 +1559,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let a = pop1_w...
1
5
2
62655cdbe72c78dab219bb45d4a32c1f73ca9f92
Nick Fitzgerald
2020-07-07T20:52:14
wasmtime: Document support for `{extern,func}ref` in `Func::wrap`
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 865c7025a..660a9e84a 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -341,16 +341,17 @@ impl Func { /// function being called is known statically so the type signature can /// be inferred. Rust types wil...
1
11
10
392bbadac713ebd9130f11e1c9cda0b9e187a2f5
Nick Fitzgerald
2020-07-07T20:48:32
wasmtime: Ensure that `Func::wrap`'d return values are compatible with the current store
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index ea060198a..865c7025a 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -202,7 +202,18 @@ macro_rules! getters { let weak_store = instance.store.weak(); let weak_store = Weak...
2
179
2
c2fc371e58823048501284df4960d4d8ce03121d
Nick Fitzgerald
2020-07-07T18:06:29
wasmtime: Expand `Func::{wrap,get}` tests to cover `{func,extern}ref` args/returns
diff --git a/tests/all/func.rs b/tests/all/func.rs index 2c3f8bd37..ba1748de1 100644 --- a/tests/all/func.rs +++ b/tests/all/func.rs @@ -13,12 +13,16 @@ fn func_constructors() { Func::wrap(&store, || -> i64 { 0 }); Func::wrap(&store, || -> f32 { 0.0 }); Func::wrap(&store, || -> f64 { 0.0 }); + Func::w...
1
56
18
3e63774e9978b4552ce0b7c21fe57bd1c9babacd
Nick Fitzgerald
2020-07-07T18:02:00
wasmtime: Add support for `Option<Func>` args and returns in `Func::wrap`
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 70f502385..ea060198a 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -307,6 +307,22 @@ impl Func { } } + pub(crate) unsafe fn from_caller_checked_anyfunc( + store: &Store, + anyfun...
2
61
14
46ef80bf2f744fb38f370381760105cdca5735be
Nick Fitzgerald
2020-07-07T17:16:28
wasmtime: Support `ExternRef`s in `Func::wrap`'d functions Fixes #1868
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 3a775ee55..70f502385 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -1,6 +1,6 @@ use crate::runtime::StoreInner; use crate::trampoline::StoreInstanceHandle; -use crate::{Extern, FuncType, Memory, Store, Trap, V...
2
66
37
44e6fae29c2d0a99bb26e98e662a0743bad0204b
Nick Fitzgerald
2020-07-07T16:48:17
wasmtime: Modify `WasmTy` and `WasmRet` for future `{extern,func}ref` support
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index cfa36a3b5..3a775ee55 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -193,17 +193,26 @@ macro_rules! getters { unsafe extern "C" fn( *mut VMContext, ...
1
299
91
79f054f77f2edf84ff9b46b1e0ad57a423e6727b
Gabor Greif
2020-07-07T16:20:32
Correct the files' directory index when downgrading DWARF5 -> 4 (#1989) * correct the files' directory index when downgrading DWARF5 -> 4
diff --git a/crates/debug/src/transform/line_program.rs b/crates/debug/src/transform/line_program.rs index b34df1d4b..0de0a39d8 100644 --- a/crates/debug/src/transform/line_program.rs +++ b/crates/debug/src/transform/line_program.rs @@ -121,8 +121,11 @@ where dirs.push(dir_id); } let mut ...
1
4
1
70cef0a433df9db0ee06faf042788d8a021a23af
Nick Fitzgerald
2020-07-07T14:03:14
fuzzing: Enforce a maximum input length for `peepmatic_compile` target (#1985) This avoids timeouts from large inputs, like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23906
diff --git a/cranelift/peepmatic/crates/fuzzing/src/compile.rs b/cranelift/peepmatic/crates/fuzzing/src/compile.rs index 8df8a685c..ef635a6ba 100644 --- a/cranelift/peepmatic/crates/fuzzing/src/compile.rs +++ b/cranelift/peepmatic/crates/fuzzing/src/compile.rs @@ -4,9 +4,16 @@ use peepmatic_runtime::PeepholeOptimizatio...
1
7
0
92864baa1f004359aa3340bae483424e959f8fa3
Peter Huene
2020-07-07T02:02:52
Fix module doc comment.
diff --git a/cranelift/codegen/src/isa/unwind/winx64.rs b/cranelift/codegen/src/isa/unwind/winx64.rs index 6c06a8e67..02600296f 100644 --- a/cranelift/codegen/src/isa/unwind/winx64.rs +++ b/cranelift/codegen/src/isa/unwind/winx64.rs @@ -1,4 +1,4 @@ -//! System V ABI unwind information. +//! Windows x64 ABI unwind infor...
1
1
1
b1c7c1401ef8948aeb311f23b6bdd8d62fbedc6a
Peter Huene
2020-07-07T01:52:16
Fix incorrect scaling for SaveXmm128Far. The `SaveXmm128Far` unwind op should have a 32-bit unscaled value. The value was accidentally scaled down by 16 while calculating whether or not the `SaveXmm128` or `SaveXmm128Far` unwind op should be used.
diff --git a/cranelift/codegen/src/isa/unwind/winx64.rs b/cranelift/codegen/src/isa/unwind/winx64.rs index 649b0e7ed..6c06a8e67 100644 --- a/cranelift/codegen/src/isa/unwind/winx64.rs +++ b/cranelift/codegen/src/isa/unwind/winx64.rs @@ -80,13 +80,13 @@ impl UnwindCode { stack_offset, } => ...
1
4
4
a7c6433773f65977d8b9841597b78aacd3a98b77
Nick Fitzgerald
2020-07-06T21:18:54
wasmtime: Support reference types in the Rust API This is a mix of exposing new things (e.g. a `Table::fill` method) and extending existing support to `externref`s (e.g. `Table::new`). Part of #929
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index ea5045ea8..ad6092ba7 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -494,6 +494,16 @@ impl Instance { } } + pub(crate) fn defined_table_fill( + &self, + table_index: D...
5
249
8
cf5289c5530e29b501b849d874936e11b9c954d2
Dan Gohman
2020-07-05T16:13:01
Begin porting yanix to WASI. This isn't complete yet, but subsequent steps will depend on Rust libstd and libc bindings changes that are in flight.
diff --git a/crates/wasi-common/yanix/src/dir.rs b/crates/wasi-common/yanix/src/dir.rs index 12b05686a..50166a35b 100644 --- a/crates/wasi-common/yanix/src/dir.rs +++ b/crates/wasi-common/yanix/src/dir.rs @@ -4,7 +4,10 @@ use crate::{ }; use std::convert::TryInto; use std::io::{Error, Result}; +#[cfg(unix)] use std...
9
108
7
2ce2dd020397b8d1f03ff3cbccf7b043d7c1cf1d
Daiki Ueno
2020-07-06T16:22:05
wasmtime: add build-time option for parallel compilation (#1903) When running in embedded environments, threads creation is sometimes undesirable. This adds a feature to toggle wasmtime's internal thread creation for parallel compilation.
diff --git a/Cargo.lock b/Cargo.lock index 969214791..019b5a8da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2417,6 +2417,7 @@ dependencies = [ "anyhow", "base64 0.12.1", "bincode", + "cfg-if", "cranelift-codegen", "cranelift-entity", "cranelift-frontend", diff --git a/Cargo.toml b/Cargo.toml index 86474100...
6
149
123
9b56203732fef53f17c52429c8ff0fdaf7a21b73
Nick Fitzgerald
2020-07-06T16:18:52
fuzzing: Enable reference types by default Part of #929
diff --git a/crates/fuzzing/src/lib.rs b/crates/fuzzing/src/lib.rs index 534c42542..dc97644d9 100644 --- a/crates/fuzzing/src/lib.rs +++ b/crates/fuzzing/src/lib.rs @@ -39,6 +39,7 @@ pub(crate) fn fuzz_default_config( config .cranelift_nan_canonicalization(true) .wasm_bulk_memory(true) + ....
1
1
0
ef8fe182629a604cf767bcd962425985caaa471c
Graham Scheaffer
2020-07-06T14:26:28
Updated region versions (#1978)
diff --git a/cranelift/simplejit/Cargo.toml b/cranelift/simplejit/Cargo.toml index ab053456d..346adcc32 100644 --- a/cranelift/simplejit/Cargo.toml +++ b/cranelift/simplejit/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" cranelift-module = { path = "../module", version = "0.65.0" } cranelift-native = { path = "../nati...
2
2
2
3a67d25ed688acd47f1f0b3297ca21171f37f65e
Joey Gouly
2020-07-03T15:47:43
arm64: Implement SIMD shift instructions Copyright (c) 2020, Arm Limited.
diff --git a/build.rs b/build.rs index 29cb0ff53..aa4526ae3 100644 --- a/build.rs +++ b/build.rs @@ -183,6 +183,7 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", "simd_address") => return false, ("simd", "simd_align") => return false, ("simd", "sim...
5
158
17
9d5be00de491ed5bcd1cf418f1d2af5038e03d5f
Benjamin Bouvier
2020-07-02T15:11:06
Address review comments - put the division in the synthetic instruction as well, - put the branch table check in the inst's emission code, - replace OneWayCondJmp by TrapIf vcode instruction, - add comments describing code generated by the synthetic instructions
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 9802349f8..bafe42abd 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -1591,6 +1591,10 @@ impl MachInstEmit for Inst { le...
6
272
183
2115e70acb6278452e639047fb57d3655ff78dcb
Benjamin Bouvier
2020-06-26T16:05:51
machinst x64: implement enough to support branch tables;
diff --git a/cranelift/codegen/src/isa/aarch64/inst/mod.rs b/cranelift/codegen/src/isa/aarch64/inst/mod.rs index 5c3086efc..33f0c1604 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/mod.rs @@ -875,8 +875,7 @@ pub enum Inst { data: u64, }, - /// ...
7
251
10
f86ecdcb869d90965145de07b19e8b3a4c5761f0
Benjamin Bouvier
2020-06-26T13:36:49
machinst x64: lower and implement div/idiv; ADD TESTS
diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs index a19874a92..1bcc18ee4 100644 --- a/cranelift/codegen/src/isa/x64/inst/args.rs +++ b/cranelift/codegen/src/isa/x64/inst/args.rs @@ -532,7 +532,7 @@ pub enum CC { /// <= unsigned BE = 6, - /// > unsige...
4
341
4
da305273687fdf49c7f91c5f1e186290c1da38df
Benjamin Bouvier
2020-07-01T16:37:19
machinst x64: implement one way conditional jmp
diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs index 23043602a..7565d785f 100644 --- a/cranelift/codegen/src/isa/x64/inst/emit.rs +++ b/cranelift/codegen/src/isa/x64/inst/emit.rs @@ -1021,6 +1021,18 @@ pub(crate) fn emit( sink.put4(nt_disp); } ...
2
23
1
9d1bcfb2e8d13785ca96484b9b4bccd68c4be36c
Benjamin Bouvier
2020-06-25T17:30:11
machinst x64: implement cmov
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 1da3d4132..71f257abf 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -988,16 +988,7 @@ pub(crate) fn lower_icmp_or_ifcmp_to_flags<C: LowerCtx<I = Inst>>(...
5
160
29
bd88065571482a96da2f33ec1a9ee0f4390bf747
Benjamin Bouvier
2020-06-25T16:03:39
machinst x64: lower binary ALU operators;
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index 25012fec1..0411fb904 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -179,7 +179,7 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(ctx: &mut C, insn: IRInst) -> Codeg ...
1
9
5
faeed3c7a466fd9bf84ce77bcf06a579bc77c10b
Benjamin Bouvier
2020-07-01T16:37:02
machinst x64: implement spills and reloads
diff --git a/cranelift/codegen/src/isa/x64/abi.rs b/cranelift/codegen/src/isa/x64/abi.rs index 7e40dd54e..385bedad8 100644 --- a/cranelift/codegen/src/isa/x64/abi.rs +++ b/cranelift/codegen/src/isa/x64/abi.rs @@ -387,12 +387,32 @@ impl ABIBody for X64ABIBody { unimplemented!("store_stackslot") } - fn...
1
32
10
08efcbd9d5638c3d1ff2989f00e65c22ddc3c803
Benjamin Bouvier
2020-07-02T10:31:50
machinst x64: use movss for f32 loads;
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index 24e375289..25012fec1 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -515,7 +515,7 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(ctx: &mut C, insn: IRInst) -> Codeg ...
1
1
1
3555f97906adeb340802699853e4ae8e5df39433
Nick Fitzgerald
2020-07-02T23:56:02
wasmtime: Implement `table.fill` Part of #929
diff --git a/build.rs b/build.rs index 29cb0ff53..8fa7dbade 100644 --- a/build.rs +++ b/build.rs @@ -203,11 +203,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", "simd_load") => return true, // FIXME Unsupported feature: proposed SIMD operator I32x4TruncSatF32x4S ...
5
97
13
60681d7019b38a5648b5615001ffa55442a64b83
Johnnie Birch
2020-07-02T20:13:49
Add __dso_handle to exception list of deprecated export symbols When compiling C to WASM with clang-8, __dso_handle is a global that maybe exported but that currently is not whitelisted along with __heap_base and _data_end to be handled as allowable depricated exports. This PR adds the case for __dso_handle.
diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs index 43332216e..c22b89bf4 100644 --- a/crates/wasmtime/src/linker.rs +++ b/crates/wasmtime/src/linker.rs @@ -445,6 +445,11 @@ impl Linker { // which use --export-dynamic, which unfortunately doesn't work the way ...
1
5
0
5ed74abeee4c5c30bdd00207bf1111f09becf2ff
Andrew Brown
2020-07-01T17:56:49
Translate Wasm `narrow` instructions to CLIF's `snarrow` and `unarrow` In order to make it more clear what the incoming types are for this translation (e.g. two `I32X4`s narrow to an `I16X8`), this change explicitly sets the type to which to bitcast (if necessary) the incoming values.
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 023961035..c62d29e60 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1559,11 +1559,23 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let a = pop1_...
1
16
4
152d7fcee73efff6429294662d701ffa79016a51
Andrew Brown
2020-07-01T17:31:13
Fix typo and wording of CDSL error messages
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index 6d4b6738d..88a15c603 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -62,7 +62,7 @@ impl InstructionGroup { self.instruction...
1
2
2
ce51995828d6040c371dd78e187a7a98aeec6266
Sergei Shulepov
2020-07-02T16:24:03
Use smallvec for avoid allocations in the trampoline (#1965)
diff --git a/Cargo.lock b/Cargo.lock index 260306058..969214791 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2329,6 +2329,7 @@ dependencies = [ "log", "region", "rustc-demangle", + "smallvec", "target-lexicon", "tempfile", "wasmparser 0.58.0", diff --git a/crates/wasmtime/Cargo.toml b/crates/wasmtime/Cargo....
3
13
3
62e7b7f8382505d4b1d0a000c2ad89b3e7d76a02
Joey Gouly
2020-07-02T12:17:33
arm64: Implement basic SIMD arithmetic Copyright (c) 2020, Arm Limited.
diff --git a/build.rs b/build.rs index fa89812ed..6e3a93502 100644 --- a/build.rs +++ b/build.rs @@ -186,8 +186,11 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", "simd_boolean") => return false, ("simd", "simd_f32x4_cmp") => return false, ("simd",...
5
277
30
8e257e731e33236efd15eeca92dff468c496819b
Benjamin Bouvier
2020-07-02T09:56:02
cranelift-wasm: expose cranelift-frontend's FunctionBuilder in the public API;
diff --git a/cranelift/wasm/src/lib.rs b/cranelift/wasm/src/lib.rs index b3836fd25..661bfe8dd 100644 --- a/cranelift/wasm/src/lib.rs +++ b/cranelift/wasm/src/lib.rs @@ -70,6 +70,7 @@ pub use crate::translation_utils::{ DefinedTableIndex, ElemIndex, FuncIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex, ...
1
1
0
e7869c732037d9a1932682a7f2ec7ddd31a73fbc
Pat Hickey
2020-07-02T00:54:30
virtfs pipe: implement Clone correctly * The underlying `R`/`W` doesnt need to be Clone, since we just need to clone the Arc it sits behind. * The rights actually shouldn't be behind an Arc - those get mutated separately in each clone.
diff --git a/crates/wasi-common/src/virtfs/pipe.rs b/crates/wasi-common/src/virtfs/pipe.rs index b081a6817..ef253b72a 100644 --- a/crates/wasi-common/src/virtfs/pipe.rs +++ b/crates/wasi-common/src/virtfs/pipe.rs @@ -26,12 +26,21 @@ use std::sync::{Arc, RwLock}; /// let stdin = ReadPipe::from("hello from stdin!"); //...
1
30
18
0aa56c500c23c16a40428acf9baf7c5de84ccac7
Johnnie Birch
2020-06-26T21:34:42
Add x64 lowering of Clif flt load instruction for new backend Adds support for the clif flt load instruction.
diff --git a/cranelift/codegen/src/isa/x64/inst/emit_tests.rs b/cranelift/codegen/src/isa/x64/inst/emit_tests.rs index fc77fde87..96f350d43 100644 --- a/cranelift/codegen/src/isa/x64/inst/emit_tests.rs +++ b/cranelift/codegen/src/isa/x64/inst/emit_tests.rs @@ -77,7 +77,7 @@ fn test_x64_emit() { let _w_xmm6 = Writa...
2
13
2
f2dd1535d51b111621471b287ff920cbeaa8009c
Johnnie Birch
2020-06-11T05:09:47
Add x64 lowering of Clif flt store instruction for new backend Adds support for the clif flt store instruction.
diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs index 2325aca3a..d2666728c 100644 --- a/cranelift/codegen/src/isa/x64/inst/emit.rs +++ b/cranelift/codegen/src/isa/x64/inst/emit.rs @@ -1027,7 +1027,7 @@ pub(crate) fn emit( } } - Inst::XM...
4
74
14
cf303d91fc12ca2a8c986906616c5a24bb3f3bd6
Pat Hickey
2020-07-01T21:51:30
wasi-common virtfs pipe: convert to be Send and Sync
diff --git a/crates/wasi-common/src/virtfs/pipe.rs b/crates/wasi-common/src/virtfs/pipe.rs index 3067172f1..b081a6817 100644 --- a/crates/wasi-common/src/virtfs/pipe.rs +++ b/crates/wasi-common/src/virtfs/pipe.rs @@ -12,9 +12,8 @@ use crate::handle::{Handle, HandleRights}; use crate::wasi::{types, Errno, Result}; us...
1
25
31
f24c7e1249924dc975aeddc58c1559cd21fce9ba
Alex Crichton
2020-07-01T19:04:29
Expand top-level `wasmtime` crate docs (#1955) This is something I meant to do a long time ago but forgot to get around to it! This commit updates the top-level documentation of the `wasmtime` crate to have examples, more words, and generall be a bit more up-to-date and complete.
diff --git a/Cargo.lock b/Cargo.lock index ef4dcb60c..260306058 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2336,6 +2336,7 @@ dependencies = [ "wasmtime-jit", "wasmtime-profiling", "wasmtime-runtime", + "wasmtime-wasi", "wat", "winapi", ] diff --git a/crates/wasmtime/Cargo.toml b/crates/wasmtime/Cargo.toml ...
4
248
9
b37adbbe317787fc1c627a93e36327c154e0fa68
Dan Gohman
2020-07-01T18:53:16
Rename `OFlag`/`AtFlag` to `OFlags`/`AtFlags`. (#1951) * Rename `OFlag`/`AtFlag` to `OFlags`/`AtFlags`. This makes them consistent with `PollFlags` and common usage of bitflags types in Rust code in general. POSIX does tend to use names like `oflag` and `flag`, so this is in mild disagreement with POSIX style,...
diff --git a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/host_impl.rs b/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/host_impl.rs index ea14861f1..37ed2e4e3 100644 --- a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/host_impl.rs +++ b/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/host_impl.rs @@ ...
20
132
128
fddd94d23f5a3712ae6afbb9176fe8b32bcc5793
Adam C. Foltzer
2020-07-01T16:46:38
address review comments
diff --git a/crates/wasi-common/src/virtfs/pipe.rs b/crates/wasi-common/src/virtfs/pipe.rs index 08244fb79..3067172f1 100644 --- a/crates/wasi-common/src/virtfs/pipe.rs +++ b/crates/wasi-common/src/virtfs/pipe.rs @@ -11,7 +11,6 @@ //! real pipes exactly. use crate::handle::{Handle, HandleRights}; use crate::wasi::{t...
1
2
7
f80c2abffbbb69617182246c1a209e74e67a7ad5
Till Schneidereit
2020-07-01T14:11:38
Update various crates' `object` and `wast` dependencies (#1908) This somewhat cuts down on duplicate dependencies. `wast` is used in a much older version (`11.0.0`) by `witx`, and can be updated without issues there as well, but this at least gets us from 3 copies to 2.
diff --git a/Cargo.lock b/Cargo.lock index 347b12ccc..ef4dcb60c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,7 +108,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.20.0", + "object", "rustc-demangle", ] @@ -497,7 +497,7 @@ dependencies = [ "anyhow", "cranelift-codegen", "cranelif...
7
15
30
de9fbfa0958bd53cd04c21a7b710be46294fdf1a
Benjamin Bouvier
2020-06-30T12:50:00
machinst x64: correctly assign FP registers for incoming args; Fixes #1943. Thanks to @jlb6740 for noticing the issue and @bjorn3 for catching the error!
diff --git a/cranelift/codegen/src/isa/x64/abi.rs b/cranelift/codegen/src/isa/x64/abi.rs index e4dab4334..7e40dd54e 100644 --- a/cranelift/codegen/src/isa/x64/abi.rs +++ b/cranelift/codegen/src/isa/x64/abi.rs @@ -160,7 +160,7 @@ impl X64ABIBody { let call_conv = f.signature.call_conv; debug_assert!( ...
1
9
3
f4b87f3102a0ab155f681148723b6b026504c2ec
Andrew Brown
2020-06-29T22:56:21
Enable more spec tests
diff --git a/build.rs b/build.rs index 0e511a571..fa89812ed 100644 --- a/build.rs +++ b/build.rs @@ -200,11 +200,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", "simd_load") => return true, // FIXME Unsupported feature: proposed SIMD operator I32x4TruncSatF32x4S ...
1
0
5
c3993a5f8ea7727db823ae45bc0ab3a60c8eeff2
Andrew Brown
2020-06-29T22:56:12
Translate Wasm SIMD `abs` to Cranelift's `iabs` instruction
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 7344f0c0b..023961035 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1386,6 +1386,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let a = pop1_w...
1
7
3
26bdf9c3337061e816e2c323e83658f0c2525195
Andrew Brown
2020-06-29T22:37:36
Add `iabs` instructions.rs This is necessary for implementing SIMD [abs](https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#lane-wise-integer-absolute-value).
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 8e0063b45..b191ae554 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -2347,6 +2347,18 @@ pub(crate) fn define( .oper...
2
13
0
a2f42028008fb28eab2bc4356f1a412d922020e6
Nick Fitzgerald
2020-06-30T19:00:30
cranelift-frontend: Add the `FunctionBuilder::insert_block_after` method
diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index f7e5fae4d..802a13ff6 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -228,6 +228,11 @@ impl<'a> FunctionBuilder<'a> { block } + /// Insert `block` in the layout *afte...
2
14
36
98e899f6b325257d530869a03768b6d66127a868
Nick Fitzgerald
2020-06-26T23:13:55
fuzz: Add a fuzz target for `table.{get,set}` operations This new fuzz target exercises sequences of `table.get`s, `table.set`s, and GCs. It already found a couple bugs: * Some leaks due to ref count cycles between stores and host-defined functions closing over those stores. * If there are no live references for ...
diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs index e6e4cc76b..6641eddb6 100644 --- a/crates/fuzzing/src/generators.rs +++ b/crates/fuzzing/src/generators.rs @@ -11,6 +11,8 @@ #[cfg(feature = "binaryen")] pub mod api; +pub mod table_ops; + use arbitrary::{Arbitrary, Unstructured}...
10
254
31
959e424c81d6435172e9262503ae10b737308e0f
Dan Gohman
2020-06-30T18:26:59
Add O_PATH and O_CLOEXEC to yanix. (#1946) * Add O_PATH and O_CLOEXEC to yanix. While here, update the Wasmtime git branch name in a comment. * Add AT_EMPTY_PATH too.
diff --git a/crates/wasi-common/yanix/src/file.rs b/crates/wasi-common/yanix/src/file.rs index c16c4ac8b..57eeb88e0 100644 --- a/crates/wasi-common/yanix/src/file.rs +++ b/crates/wasi-common/yanix/src/file.rs @@ -21,6 +21,9 @@ bitflags! { const REMOVEDIR = libc::AT_REMOVEDIR; const SYMLINK_FOLLOW = li...
1
21
0
5a96b0deaac09a6d1dce3391a4de689d75147c71
Adam C. Foltzer
2020-06-30T02:20:54
🕳 Add virtual pipes to wasi-common This introduces `Handle` implementations for readable and writable pipes, backed by arbitrary `Read` and `Write` types, respectively. In particular, this allows for easily providing, capturing, or redirecting WASI stdio without having to resort to OS-provided file descriptors. The ...
diff --git a/crates/wasi-common/src/lib.rs b/crates/wasi-common/src/lib.rs index e6f8cef6a..65b5ea047 100644 --- a/crates/wasi-common/src/lib.rs +++ b/crates/wasi-common/src/lib.rs @@ -32,7 +32,7 @@ mod poll; mod sandboxed_tty_writer; pub mod snapshots; mod sys; -mod virtfs; +pub mod virtfs; pub mod wasi; pub us...
3
415
1
5f5d7cb0f710dc341ef6e955c9c52e23e179ce36
Pat Hickey
2020-06-30T17:10:10
code review: remove `unsafe` on borrow checker constructor
diff --git a/crates/wiggle/test-helpers/src/borrow.rs b/crates/wiggle/test-helpers/src/borrow.rs index 454a08414..5ed16e271 100644 --- a/crates/wiggle/test-helpers/src/borrow.rs +++ b/crates/wiggle/test-helpers/src/borrow.rs @@ -12,7 +12,7 @@ impl BorrowChecker { /// `GuestSlice` and `GuestStr` structs, which impl...
4
4
4
4d57ae99e391251ef9e369ca8bed59d5c33a3ce0
Andrew Brown
2020-06-30T16:08:21
Upgrade wasmparser to 0.58.0 (#1942) * Upgrade wasmparser to 0.58.0 * Enable more spec tests
diff --git a/Cargo.lock b/Cargo.lock index 10a179146..d35fb2f93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -595,7 +595,7 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser 0.57.0", + "wasmparser 0.58.0", "wat", ] @@ -1123,7 +1123,7 @@ dependencies = [ "staticvec", "thiserror", "...
15
74
47
05201b514de57b2f2e96e59d8c4d1cb9791106f7
Pat Hickey
2020-06-29T18:55:22
wiggle: factor BorrowChecker concrete implementation to live in engines The BorrowChecker methods get inlined as part of the GuestMemory trait. The BorrowChecker implementation moves out to the engines. Unfortunately this does mean having a copy in `test-helpers` along with another in `wasmtime-wiggle`. The `wasmtime...
diff --git a/crates/wiggle/src/guest_type.rs b/crates/wiggle/src/guest_type.rs index 4359d3745..27715254a 100644 --- a/crates/wiggle/src/guest_type.rs +++ b/crates/wiggle/src/guest_type.rs @@ -85,7 +85,7 @@ macro_rules! primitives { start: offset, len: size, };...
7
343
69
0bc0fd54ebec7a4f14a3a3a9a22261cf2971907d
Nick Fitzgerald
2020-06-29T17:41:22
deps: Bump `z3` to 0.6.0 Z3 is used by `peepmatic`.
diff --git a/Cargo.lock b/Cargo.lock index f3820ae53..10a179146 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2770,9 +2770,9 @@ dependencies = [ [[package]] name = "z3" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded00cd90f8e3a7ea3155bddd72573f...
3
7
7
c10c79b7aebc6f43f3632fc7ff1be070f923f907
Valentin
2020-06-29T13:55:37
Correct version of region dependency (#1933)
diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index b1ce6d468..61ad92226 100644 --- a/crates/jit/Cargo.toml +++ b/crates/jit/Cargo.toml @@ -21,7 +21,7 @@ wasmtime-environ = { path = "../environ", version = "0.18.0" } wasmtime-runtime = { path = "../runtime", version = "0.18.0" } wasmtime-debug = { path =...
3
3
3
1659b849baf52841ff9e3f55cf68f3a2c8751634
Pat Hickey
2020-06-26T17:14:14
wasmtime-wiggle: change stray `log` ecosystem macro to `tracing`
diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index 57f1e635b..2a60df1a8 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -207,7 +207,7 @@ fn generate_func( let mem = match caller.get_export("memor...
1
1
1
ae634417a04dbe199d127e5d0a97f977c2bbc7cc
Andrew Brown
2020-06-02T23:33:03
Enable more spec tests
diff --git a/build.rs b/build.rs index 8b3374b48..5ea2345fd 100644 --- a/build.rs +++ b/build.rs @@ -197,9 +197,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", _) if target.contains("aarch64") => return true, ("simd", "simd_conversions") => return true, // ...
1
0
3
e40c039e654ff817c56227b37b2e4b308a7efbf5
Nick Fitzgerald
2020-06-25T17:24:40
wasmtime: Rip out incomplete/incorrect externref "host info" support Better to be loud that we don't support attaching arbitrary host info to `externref`s than to limp along and pretend we do support it. Supporting it properly won't reuse any of this code anyways.
diff --git a/crates/c-api/macros/src/lib.rs b/crates/c-api/macros/src/lib.rs index 1ca265566..9d24ceec0 100644 --- a/crates/c-api/macros/src/lib.rs +++ b/crates/c-api/macros/src/lib.rs @@ -77,12 +77,13 @@ pub fn declare_ref(input: proc_macro::TokenStream) -> proc_macro::TokenStream { #[no_mangle] pu...
19
79
198
4087fcee65cf5a423cac96a38044b14e6220e256
Peter Huene
2020-06-23T20:45:18
Register individual FDEs for musl libc. When targeting musl, libunwind is used for the `__register_frame` implementation. Unlike when targeting libgcc which expects an entire frame table, the libunwind implementation expects a single FDE. This change ensures Wasmtime registers each individual FDE when targeting musl...
diff --git a/crates/jit/src/unwind/systemv.rs b/crates/jit/src/unwind/systemv.rs index 7c505f71d..b5890fbbf 100644 --- a/crates/jit/src/unwind/systemv.rs +++ b/crates/jit/src/unwind/systemv.rs @@ -90,8 +90,10 @@ impl UnwindRegistry { let mut eh_frame = EhFrame(EndianVec::new(RunTimeEndian::default())); ...
1
26
26
2d364f75bd944ecbe38251dfa0f328e7b06b529c
Johnnie Birch
2020-06-06T23:20:08
Remove xmm_r_r inst data structure and cases after related refactoring Removes unneeded data structure that was holding instructions for xmm based move instructions. These instructions can should be categorized as rm not just r. This change is intended to simplify organization and cases when lowering.
diff --git a/cranelift/codegen/src/isa/x64/abi.rs b/cranelift/codegen/src/isa/x64/abi.rs index 51fbddeac..0188dc2d4 100644 --- a/cranelift/codegen/src/isa/x64/abi.rs +++ b/cranelift/codegen/src/isa/x64/abi.rs @@ -280,7 +280,11 @@ impl ABIBody for X64ABIBody { return Inst::mov_r_r(/*is64=*/ true, fr...
6
23
83
82c41327001b608661b3935d8ce2c2b4e255639e
Pat Hickey
2020-06-24T21:34:35
simpler name, add rustdocs
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index bfaab7b54..d6f8e4fad 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -6,7 +6,7 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder}; // Defines a `struct Wasi` with member fields and appropriate APIs for dealing // with all the vari...
2
44
7
6b62b16c7d1ac02b4034cc06c34c66af86815418
Pat Hickey
2020-06-24T19:47:28
rewrite shim func generator with witx CoreType
diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index c60b8d9c8..446bcaf7d 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -1,6 +1,6 @@ use proc_macro::TokenStream; -use proc_macro2::{Ident, TokenStream as TokenStream2...
1
70
173
f2f770626511c08c632c52e5f868ac13170687be
Johnnie Birch
2020-06-06T22:32:36
Implements vcode lowering for f32.copysign. This patch implements the required but not already available x64 instructions for copysign as well as the actual lowering sequence and tests for the newly implemented x64 instructions. Those instructions include: andps, andnps, movaps, movd, orps, The lowering sequence is ...
diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs index fe65145c5..6c35b6dcb 100644 --- a/cranelift/codegen/src/isa/x64/inst/args.rs +++ b/cranelift/codegen/src/isa/x64/inst/args.rs @@ -214,6 +214,8 @@ pub(crate) enum InstructionSet { pub enum SseOpcode { Addss, ...
5
196
38
c6e599219a28864880af1a12c0ee18dd73bc6fdd
Pat Hickey
2020-06-24T04:08:05
Update crates/wiggle/src/lib.rs
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index 3c553b544..e756dc8db 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -540,7 +540,7 @@ impl<'a> GuestPtr<'a, str> { } impl<'a> GuestPtr<'a, [u8]> { - /// Returns a raw pointer to the string represented by a `[u8]` witho...
1
1
1
67f6aad415ad49fbe6176526e94a67d4838a19d7
Pat Hickey
2020-06-24T04:08:00
Update crates/wiggle/src/lib.rs
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index d3a3f4acd..3c553b544 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -499,7 +499,7 @@ impl<'a> GuestPtr<'a, str> { GuestPtr::new(self.mem, self.pointer) } - /// Returns a raw pointer for the underlying slic...
1
1
1
f66c1fbde94f03bfa54dc69d1d9f3b1e5c2ae97f
Pat Hickey
2020-06-24T00:42:04
reorganize configuration into modules
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index beb7b753f..bfaab7b54 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -15,23 +15,24 @@ wasmtime_wiggle::define_wasmtime_integration!({ ctx: WasiCtx, // This macro will emit a struct to represent the instance, // with th...
3
277
268
ea3c2325a500beee24cbddf256e3a014c4c451c7
Craig Pastro
2020-06-24T00:12:30
wiggle: add as_byte_ptr: str -> [u8] method
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index 85f59e330..d3a3f4acd 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -499,6 +499,12 @@ impl<'a> GuestPtr<'a, str> { GuestPtr::new(self.mem, self.pointer) } + /// Returns a raw pointer for the underlying sli...
1
6
0
7699c4d6e3f087f7c35e788604300f4029d07d51
Craig Pastro
2020-06-24T00:10:59
wiggle: fix lifetime in as_str_ptr
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index f4d95188d..85f59e330 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -536,7 +536,7 @@ impl<'a> GuestPtr<'a, str> { impl<'a> GuestPtr<'a, [u8]> { /// Returns a raw pointer to the string represented by a `[u8]` without ...
1
1
1
ddc2ce808060473a5433db3199fdf80fe54f6111
Nick Fitzgerald
2020-06-18T16:39:30
cranelift-wasm: Make `FuncEnvironment::translate_ref_func` take a `FuncIndex` It was previously taking a raw `u32`. This change makes it more clear what index space that index points into.
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 4baa7847b..b2df7bb85 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1045,7 +1045,8 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( state.push1(env...
4
9
4
c6f32f666df1039cdc0fbbdb13d4a68a8b42aafb
Nick Fitzgerald
2020-06-23T22:29:03
cranelift-wasm: Retain both the Wasm and Cranelift types of tables
diff --git a/cranelift/wasm/src/sections_translator.rs b/cranelift/wasm/src/sections_translator.rs index 967612178..a762bd0df 100644 --- a/cranelift/wasm/src/sections_translator.rs +++ b/cranelift/wasm/src/sections_translator.rs @@ -108,6 +108,7 @@ pub fn parse_import_section<'data>( ImportSectionEntryType...
3
10
3
03165e0cb5d2305092c633bbc70468d7424bebf3
Nick Fitzgerald
2020-06-23T22:19:22
cranelift-wasm: Allow more customization of ref type representations * Allow different Cranelift IR types to be used for different Wasm reference types. * Do not assume that all Wasm reference types are always a Cranelift IR reference type. For example, `funcref`s might not need GC in some implementations, and ...
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 26c7e5d8f..4baa7847b 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1039,12 +1039,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( Operator::F32Le |...
5
55
14
28fccaedc4c285d035c162669491e962e9570821
Nick Fitzgerald
2020-06-22T23:56:03
cranelift-wasm: Pass `ir::Table`s into all the `translate_table_*` methods This serves two purposes: 1. It ensures that we call `get_or_create_table` to ensure that the embedder already had a chance to create the given table (although this is mostly redundant due to validation). 2. It allows the embedder to easily g...
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 8b73f8dca..26c7e5d8f 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -533,7 +533,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( // `index` is the...
5
33
15
69f81397a8c9ed0d101a8289579a266d25d8392f
Pat Hickey
2020-06-23T23:29:11
add func overrides, to get rid of proc exit special case
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index 5d29cce91..beb7b753f 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -27,6 +27,11 @@ can be used to do name-based resolution." }, // Error to return when caller module is missing memory export: missing_memory: { wasi_c...
3
72
6
49c62ee828fc052aabd9b7fc41c893dfa5aa9c58
Pat Hickey
2020-06-23T22:26:17
make the missing memory error value configurable
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index f281b84e2..5d29cce91 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -24,7 +24,9 @@ wasm modules. This structure exports all that various fields of the wasi instance as fields which can be used to implement your own instantiation l...
3
47
5
62237de7ced87ed804dcaa2d72175037621f1e2f
Pat Hickey
2020-06-23T21:49:17
remove logging: wiggle now provides this functionality
diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index ebfc0bb98..9aa3c300f 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -66,25 +66,21 @@ fn generate( let mut shim_arg_decls = Vec::new(); l...
1
15
28
bb339aaba0275c255e66d58896450b03a14723cf
Pat Hickey
2020-06-23T21:16:53
rename macro. add comments to invocation.
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index d4a6e3a0d..f281b84e2 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -6,10 +6,15 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder}; // Defines a `struct Wasi` with member fields and appropriate APIs for dealing // with all the va...
2
7
2
abc3982234abae7e8acf6ae275661ea0deb12ee1
Pat Hickey
2020-06-23T21:13:27
add target to config
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index b79e56e48..d4a6e3a0d 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -7,6 +7,7 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder}; // Defines a `struct Wasi` with member fields and appropriate APIs for dealing // with all the variou...
3
43
6
cde32070fc7c041ce3142aba7e008cce9905aa32
Pat Hickey
2020-06-23T02:27:31
factor the docs out as well
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index 73e5481fb..b79e56e48 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -9,7 +9,16 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder}; wasmtime_wiggle::define_struct_for_wiggle!({ witx: ["../wasi-common/WASI/phases/snapshot/witx/wa...
3
101
35
6adbae3007aa69d76b279758808ffd770a6c8107
Pat Hickey
2020-06-23T02:01:29
paramaterize the instance type name as well
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index ff04a257d..73e5481fb 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -9,6 +9,7 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder}; wasmtime_wiggle::define_struct_for_wiggle!({ witx: ["../wasi-common/WASI/phases/snapshot/witx/was...
3
47
9
09971bc09051f5385c22f862fddddff30a6f86a5
Pat Hickey
2020-06-23T01:54:07
replace more custom idents with Names
diff --git a/crates/wiggle/wasmtime/macro/src/lib.rs b/crates/wiggle/wasmtime/macro/src/lib.rs index 2ff7e08d0..f709eb177 100644 --- a/crates/wiggle/wasmtime/macro/src/lib.rs +++ b/crates/wiggle/wasmtime/macro/src/lib.rs @@ -1,5 +1,5 @@ use proc_macro::TokenStream; -use proc_macro2::{Ident, Span, TokenStream as TokenS...
1
10
6
1050c6d99cc8c5a06f0ca53c5b70b7a49810d2f4
Pat Hickey
2020-06-23T01:47:21
wasmtime-wiggle-macro: re-use Names functionality rather than try to duplicate it in utils
diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index ab52d3270..ff04a257d 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -8,6 +8,7 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder}; // with all the various WASI exports. wasmtime_wiggle::define_struct_for_wiggle!({ witx: ["../wa...
4
25
16
185701df1bc387fcd1eb9cc817fe57d0051c1c49
Pat Hickey
2020-06-23T01:39:33
wasmtime-wiggle-macro: adopt config system from wiggle-generate
diff --git a/Cargo.lock b/Cargo.lock index e4bea38be..f3820ae53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2598,6 +2598,7 @@ dependencies = [ "proc-macro2", "quote", "syn", + "wiggle-generate", "witx", ] diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index 12d1d8d89..ab52d3270 100644 --- a/cr...
6
97
59
7d3d16aef0f2344a67585e1305d5b9fa8831c4a5
Pat Hickey
2020-06-23T00:24:43
wig: delete wiggle integration functionality
diff --git a/crates/wasi-common/wig/src/lib.rs b/crates/wasi-common/wig/src/lib.rs index 1a6688621..d0fd3f41e 100644 --- a/crates/wasi-common/wig/src/lib.rs +++ b/crates/wasi-common/wig/src/lib.rs @@ -38,11 +38,6 @@ pub fn define_wasi_struct(args: TokenStream) -> TokenStream { wasi::define_struct(args.into()).into...
2
0
284
303f7172a146c79c83153b7c4800a990a11dee47
Pat Hickey
2020-06-23T00:23:11
wasi: switch to use wasmtime-wiggle for wiggle integration
diff --git a/Cargo.lock b/Cargo.lock index a81dd3230..e4bea38be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2567,6 +2567,7 @@ dependencies = [ "wasi-common", "wasmtime", "wasmtime-runtime", + "wasmtime-wiggle", "wig", "wiggle", ] diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml index 6616a6ef1.....
3
3
1
712990191a1e7c4a2145c50bc91fc2a2717de716
Pat Hickey
2020-06-23T00:16:39
create wasmtime-wiggle crate, by copying implementation of `wig`
diff --git a/Cargo.lock b/Cargo.lock index 7b8c50b2f..a81dd3230 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2580,6 +2580,26 @@ dependencies = [ "wast 17.0.0", ] +[[package]] +name = "wasmtime-wiggle" +version = "0.18.0" +dependencies = [ + "wasmtime", + "wasmtime-wiggle-macro", + "wiggle", + "witx", +] + +[[packa...
7
442
0
cf8cf9a9481d6c6d97a83bd7a06eb9ccb7456ffd
Craig Pastro
2020-06-22T23:47:13
wiggle: fix a couple of typos in lib.rs docs
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index 0c82784c4..f4d95188d 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -259,7 +259,7 @@ impl<'a, T: ?Sized + Pointee> GuestPtr<'a, T> { /// Creates a new `GuestPtr` from the given `mem` and `pointer` values. /// ...
1
2
2
f9ef7346983ad4102f826f59f0cb1595f69d81fb
Craig Pastro
2020-06-22T23:46:40
wiggle: GuestPtr<[u8]> => GuestPtr<str> conversions
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index cbc92f266..0c82784c4 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -533,6 +533,14 @@ impl<'a> GuestPtr<'a, str> { } } +impl<'a> GuestPtr<'a, [u8]> { + /// Returns a raw pointer to the string represented by a `[u8...
1
8
0
60ac091afe8df48f843ce8ad06a2bd1a626f6183
Benjamin Bouvier
2020-06-22T10:15:08
Remove unused dependencies in Cranelift;
diff --git a/Cargo.lock b/Cargo.lock index 5e4f6c155..7b8c50b2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -441,7 +441,6 @@ dependencies = [ "log", "memmap", "num_cpus", - "region", "target-lexicon", "thiserror", ] @@ -467,9 +466,7 @@ dependencies = [ "cranelift-reader", "hashbrown 0.7.2", "log", - "p...
4
0
8
38f4ed084dee5bd9cf0839a500dd3ea8ad6b8026
Alexandru Ene
2020-06-18T23:14:29
Don't reuse the command between c/c++
diff --git a/crates/misc/run-examples/src/main.rs b/crates/misc/run-examples/src/main.rs index d9a44c74f..a0cc098ab 100644 --- a/crates/misc/run-examples/src/main.rs +++ b/crates/misc/run-examples/src/main.rs @@ -52,19 +52,19 @@ fn main() { .arg(&example)); println!("======== C/C++ example `{}` ...
1
12
12