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
0f49a830c9fc597f03b060493c3db79f3ab68b22
Nathan Froyd
2020-03-03T16:27:45
cranelift-module: expose trap information when defining functions The current interface of `cranelift-module` requires consumers who want to be informed about traps to discover that information through `Module::Product`, which is backend-specific. Since it's advantageous to manipulate this information in a backend-ag...
diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs index 40cca8edd..2520515cd 100644 --- a/cranelift/faerie/src/backend.rs +++ b/cranelift/faerie/src/backend.rs @@ -152,10 +152,11 @@ impl Backend for FaerieBackend { ctx: &cranelift_codegen::Context, namespace: &ModuleNamesp...
6
60
37
ea4d2d05350511d5576dd7c40799eb2497e25b92
Jakub Konka
2020-03-02T23:26:18
Return *mut u8 in GuestPtrMut::as_raw Currently, we create an immutable `GuestPtr` from `self` and call `as_raw` on it which correctly returns `*const u8`. However, since we're dealing with `GuestPtrMut` I thought it might make more sense to return `*mut u8` directly instead. This will be needed (and will save us from...
diff --git a/crates/runtime/src/memory/ptr.rs b/crates/runtime/src/memory/ptr.rs index a09068ae2..54a80e8ab 100644 --- a/crates/runtime/src/memory/ptr.rs +++ b/crates/runtime/src/memory/ptr.rs @@ -162,8 +162,8 @@ where } } - pub fn as_raw(&self) -> *const u8 { - self.as_immut().as_raw() + p...
1
2
2
f7c2a58d236bf23819139930bf1e469a47e08140
Alex Crichton
2020-03-02T17:43:47
Disable caches in CLI tests (#1204) Avoids creating extraneous directories while testing in your home directory. Closes #1197
diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs index f2b194a64..3387158d5 100644 --- a/tests/cli_tests.rs +++ b/tests/cli_tests.rs @@ -1,24 +1,23 @@ use anyhow::{bail, Result}; -use std::env; use std::io::Write; use std::path::Path; -use std::process::{Command, Stdio}; +use std::process::Command; use tempfile...
1
28
18
c459579396c81bce1c98e30ddc944bb56994ddb6
Darin Morrison
2020-03-02T03:35:25
Add tests for hex parsing
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index d6a6e8fe3..985183111 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -704,7 +704,7 @@ impl<'a> Parser<'a> { value = u16::from_str_radix(&text[2..], 16) .map_err(|_...
1
74
2
2300eec8a52e9450077cb737dbc814471e7615b2
Darin Morrison
2020-03-02T03:34:01
Implement hex parsing for imm16 and imm32
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index 02bf24ee8..d6a6e8fe3 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -687,10 +687,35 @@ impl<'a> Parser<'a> { fn match_imm16(&mut self, err_msg: &str) -> ParseResult<i16> { if let Some(To...
1
55
5
8597930eed2e5e92c78ec4cb6d6b39d80c5ea220
Alex Crichton
2020-03-02T14:55:25
rename PassiveElemIndex to ElemIndex and same for PassiveDataIndex (#1188) * rename PassiveElemIndex to ElemIndex and same for PassiveDataIndex (#1411) * rename PassiveDataIndex to DataIndex * rename PassiveElemIndex to ElemIndex * Apply renamings to wasmtime as well * Run rustfmt Co-authored-by: csmoe...
diff --git a/cranelift/wasm/src/environ/dummy.rs b/cranelift/wasm/src/environ/dummy.rs index 4ebf0bdc2..6c94116e0 100644 --- a/cranelift/wasm/src/environ/dummy.rs +++ b/cranelift/wasm/src/environ/dummy.rs @@ -11,8 +11,8 @@ use crate::environ::{ use crate::func_translator::FuncTranslator; use crate::state::ModuleTrans...
10
37
42
4866fa0e6a211c50458426eb3d033bd69885ae10
Nick Fitzgerald
2020-02-29T00:32:06
Limit rayon to one thread during fuzzing This should enable more deterministic execution.
diff --git a/Cargo.lock b/Cargo.lock index 018e1a438..39b0a3fa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2133,6 +2133,7 @@ dependencies = [ "binaryen", "env_logger 0.7.1", "log", + "rayon", "wasmparser 0.51.2", "wasmprinter", "wasmtime", diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml...
6
40
3
4bd9eb7402671b02a52290c22a09d9b8e6bd8428
Alex Crichton
2020-02-29T00:08:49
Fix build of cranelift-tools Accidentally left it out of the workspace members!
diff --git a/Cargo.lock b/Cargo.lock index debe8fbd6..cec542b10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -311,6 +311,18 @@ dependencies = [ "vec_map", ] +[[package]] +name = "clicolors-control" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90082ee5dcdd64dc4e9e...
2
234
0
6e2bb9ebdd1bd146f5188533726374f8d1ad6c60
Nick Fitzgerald
2020-02-28T23:42:50
Limit the number of exported function calls we make in the API calls fuzzer This should fix some fuzzing timeouts like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20847
diff --git a/crates/fuzzing/src/generators/api.rs b/crates/fuzzing/src/generators/api.rs index 33fb27b0c..3def5aa9a 100644 --- a/crates/fuzzing/src/generators/api.rs +++ b/crates/fuzzing/src/generators/api.rs @@ -48,12 +48,20 @@ use ApiCall::*; #[derive(Default)] struct Scope { id_counter: usize, - predicted_...
1
19
2
f2fef600c6df56e8ad03bf0ace3cdb0297832f06
Nick Fitzgerald
2020-02-28T23:20:15
Implement `Arbitrary::size_hint` for `WasmOptTtf`
diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs index c3813a1b6..f982b4284 100644 --- a/crates/fuzzing/src/generators.rs +++ b/crates/fuzzing/src/generators.rs @@ -44,6 +44,10 @@ impl Arbitrary for WasmOptTtf { let wasm = module.write(); Ok(WasmOptTtf { wasm }) } ...
1
4
0
5ed9796ef31c1564c289f4a3a3422626662f9afb
Nick Fitzgerald
2020-02-28T23:20:00
Implement `Arbitrary::size_hint` for `ApiCalls`
diff --git a/crates/fuzzing/src/generators/api.rs b/crates/fuzzing/src/generators/api.rs index 9ffe8c5e2..33fb27b0c 100644 --- a/crates/fuzzing/src/generators/api.rs +++ b/crates/fuzzing/src/generators/api.rs @@ -140,6 +140,25 @@ impl Arbitrary for ApiCalls { Ok(ApiCalls { calls }) } + + fn size_hint...
1
19
0
506a83d8ef9702a783cb958cfa00cd017da34beb
Nick Fitzgerald
2020-02-28T23:13:33
Update to arbitrary@0.4.0 and libfuzzer-sys@0.3.1
diff --git a/Cargo.lock b/Cargo.lock index debe8fbd6..018e1a438 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,15 +41,9 @@ checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" [[package]] name = "arbitrary" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index...
3
10
18
9cc9dacc080e918c70c81ab4b31baad427d0e16d
Jakub Konka
2020-02-28T20:06:12
Escape reserved keywords in generate This commit escapes certain (hopefully all keywords present in snapshot1!) reserved keywords in Rust that are autogenerated by wiggle.
diff --git a/crates/generate/src/names.rs b/crates/generate/src/names.rs index f268514c1..1167d25a6 100644 --- a/crates/generate/src/names.rs +++ b/crates/generate/src/names.rs @@ -77,6 +77,8 @@ impl Names { // FIXME this is a hack - just a proof of concept. if id.as_str().starts_with('2') { ...
1
14
2
16fe947e6531b135d108b419cbd1536d8a26c139
Jakub Konka
2020-02-28T20:10:52
Make generated modules public While public might be an overkill, until we successfully merge `wiggle` with `wasi-common` (and others), I suggest we just make the modules fully public and work from there.
diff --git a/crates/generate/src/lib.rs b/crates/generate/src/lib.rs index bc0ae49e2..1b235ca2f 100644 --- a/crates/generate/src/lib.rs +++ b/crates/generate/src/lib.rs @@ -27,7 +27,7 @@ pub fn generate(config: Config) -> TokenStream { let modtrait = define_module_trait(&names, &module); let ctx_type ...
1
2
2
5db335b7c7038baa458eb5ec2fa72125c54bb1bd
Jakub Konka
2020-02-28T20:15:22
Add EMPTY_FLAGS to flags generator This seems like a useful primitive to have especially when dealing with `Rights` flags in `wasi-common` (and WASI in general).
diff --git a/crates/generate/src/types/flags.rs b/crates/generate/src/types/flags.rs index 8837ceb79..67e380ff7 100644 --- a/crates/generate/src/types/flags.rs +++ b/crates/generate/src/types/flags.rs @@ -35,10 +35,11 @@ pub(super) fn define_flags(names: &Names, name: &witx::Id, f: &witx::FlagsDataty impl #i...
1
2
1
9050027e8b75cad2492696292e4ce1435da35e64
Alex Crichton
2020-02-28T20:30:00
Remove redundant profile config in cranelift/Cargo.toml
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index a1836037e..c8eb79c27 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -45,12 +45,3 @@ walkdir = "2.2" default = ["disas", "wasm", "cranelift-codegen/all-arch"] disas = ["capstone"] wasm = ["wat", "cranelift-wasm"] - -# We want debug symbol...
1
0
9
bb6995ceaf484af2c5c8fd4e34d90b1507d78d89
Pat Hickey
2020-02-28T19:43:43
make wiggle-generate ordinary lib, and wiggle the proc-macro lib this allows us to reuse the code in wiggle-generate elsewhere, because a proc-macro=true lib can only export a #[proc_macro] and not ordinary functions. In lucet, I will depend on wiggle-generate to define a proc macro that glues wiggle to the specifics...
diff --git a/Cargo.toml b/Cargo.toml index e834e6634..2c6400e24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,15 @@ version = "0.1.0" authors = ["Pat Hickey <phickey@fastly.com>", "Jakub Konka <kubkonk@jakubkonka.com>"] edition = "2018" +[lib] +proc-macro = true + [dependencies] wiggle-generate = { path = ...
13
32
30
0dbfad3aa723e65bbcbd7a27099dece14d6ce3fa
Alex Crichton
2020-02-28T18:44:27
Fix broken API doc links (#1020) Also enable the lint to guarantee they stay un-broken.
diff --git a/crates/api/src/frame_info.rs b/crates/api/src/frame_info.rs index 5e0ea1333..ce2349085 100644 --- a/crates/api/src/frame_info.rs +++ b/crates/api/src/frame_info.rs @@ -134,6 +134,8 @@ impl Drop for GlobalFrameInfoRegistration { /// Whenever a WebAssembly trap occurs an instance of [`Trap`] is created. Eac...
4
6
3
5f1cba0b7f90e3604b3dfb83119b09c242f8d3e5
Alex Crichton
2020-02-25T18:59:59
Hook up all crates via path dependencies
diff --git a/Cargo.lock b/Cargo.lock index 1df0ef9d1..3a4b15a1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6,6 +6,15 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +[[package]] +name = "ahash" +ver...
21
117
87
3e4509fd6a2a30b3327b93369e85494c05943b57
Johnnie Birch
2020-02-28T04:43:20
Update usage of target_lexicon to be consistent with v0.10 (#1003) Jitdump was using an api consisent v0.04 for target_lexicon instead of the version v0.10. This updates calls to target_lexicon to be consistent with v0.10.
diff --git a/crates/profiling/src/jitdump.rs b/crates/profiling/src/jitdump.rs index 266ad6ee4..cff4155c8 100644 --- a/crates/profiling/src/jitdump.rs +++ b/crates/profiling/src/jitdump.rs @@ -201,12 +201,8 @@ impl JitDumpAgent { match target_lexicon::HOST.architecture { Architecture::X86_64 => el...
1
2
6
6a61bba39e1b2586d7a8c84cae85dc4587d6d606
Joshua Nelson
2020-02-27T21:45:18
Allow modules to have names of arbitrary bytes (#1410) This is useful for me because I name the module after the file, which comes from the filesystem and may not be valid UTF8. This change is backwards-compatible.
diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index 044fdca81..dae26ea23 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -32,7 +32,7 @@ pub enum ObjectTrapCollection { /// A builder for `ObjectBackend`. pub struct ObjectBuilder { isa: Box<dyn...
1
5
5
ec75f874eea6ff5450d8d4a98b9ed9b1d4e3bad5
Jakub Konka
2020-02-27T13:25:39
Unify GuestType and GuestTypeClone, rename GuestTypeCopy to GuestTypeTransparent This commit refactors trait system for guest types. Namely, as discussed offline on zulip, `GuestType` now includes `GuestTypeClone`, whereas `GuestTypeCopy` has been renamed to `GuestTypeTransparent`.
diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs index 05154ded3..a049a72a6 100644 --- a/crates/generate/src/types.rs +++ b/crates/generate/src/types.rs @@ -105,7 +105,7 @@ fn define_int(names: &Names, name: &witx::Id, i: &witx::IntDatatype) -> TokenStr } } - impl ...
8
152
147
ed1d5180ef943823f050974e3713adb3a1f89b2e
Jakub Konka
2020-02-27T10:10:30
Add TryFromIntError to GuestError and fix error handling While working on the full WASI spec, it turned out that we need two tweaks to `GuestError`: 1. we need to support conversion from `TryFromIntError`, and 2. we need to invoke `e.into()` when unwrapping the result of `try_into()` in auto-implementation of raw i...
diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs index e788032e6..eb3a02ac1 100644 --- a/crates/generate/src/funcs.rs +++ b/crates/generate/src/funcs.rs @@ -62,7 +62,7 @@ pub fn define_func(names: &Names, func: &witx::InterfaceFunc) -> TokenStream { }; let err_typename ...
2
5
3
10dcaeeab424e532a9d56aa5a4b6219502124649
Pat Hickey
2020-02-26T23:25:52
factor lifetime determination into its own module
diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs index fc7593d4e..13eff6baa 100644 --- a/crates/generate/src/funcs.rs +++ b/crates/generate/src/funcs.rs @@ -1,8 +1,8 @@ use proc_macro2::TokenStream; use quote::quote; +use crate::lifetimes::{anon_lifetime, LifetimeExt}; use crate::names::Nam...
6
68
75
02f311cbb1190292218bacc03d5748d6c8a7152d
Pat Hickey
2020-02-26T22:24:09
finish union testing
diff --git a/tests/union.rs b/tests/union.rs index d5da1bff9..91b50c033 100644 --- a/tests/union.rs +++ b/tests/union.rs @@ -1,7 +1,5 @@ use proptest::prelude::*; -use wiggle_runtime::{ - GuestError, GuestErrorType, GuestMemory, GuestPtr, GuestPtrMut, GuestRef, GuestRefMut, -}; +use wiggle_runtime::{GuestError, Gue...
1
237
7
8ecbceb5de291e58e39e8400824a317232fd1f2c
Pat Hickey
2020-02-26T20:40:20
handle union result types (simplify logic)
diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs index 50344f876..fc7593d4e 100644 --- a/crates/generate/src/funcs.rs +++ b/crates/generate/src/funcs.rs @@ -345,22 +345,12 @@ where match &*tref.type_() { witx::Type::Builtin(b) => match b { - witx::BuiltinType::U8 - ...
1
6
16
126d7b6825e04c0342067b1ce7dc84d7cc4a14a0
Pat Hickey
2020-02-26T20:37:54
argument marshaling for unions
diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs index 8814df19a..50344f876 100644 --- a/crates/generate/src/funcs.rs +++ b/crates/generate/src/funcs.rs @@ -153,6 +153,25 @@ fn marshal_arg( } }; + let read_conversion = { + let pointee_type = names.type_ref(tref, anon_li...
1
21
22
235833ab97f2d5dce1b0289f780a5d2fa1e1faf3
Nick Fitzgerald
2020-02-25T22:09:23
Ignore a doc test
diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs index e157736da..62840072e 100644 --- a/crates/runtime/src/libcalls.rs +++ b/crates/runtime/src/libcalls.rs @@ -19,7 +19,7 @@ //! instances, and modules! Therefore, always use nested blocks to ensure //! drops run before raising a trap: ...
1
1
1
39307b2b36d4f3ba5ce02c689abbcb8f53a6fc8c
Nick Fitzgerald
2020-02-25T18:14:59
Fix comments about bulk memory that incorrectly referenced "multi-value"
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index 5bf035f98..db0f07c13 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -1199,9 +1199,9 @@ fn initialize_tables(instance: &Instance) -> Result<(), InstantiationError> { let anyfunc = instance...
1
2
2
aec8cc190478823cb9389daae1daa1969dea1bb1
Nick Fitzgerald
2020-02-24T20:52:57
List the bulk-memory tests that don't pass, rather than the ones that do We've crossed the threshold where this is easier :)
diff --git a/build.rs b/build.rs index 1942deec8..cafdb32f5 100644 --- a/build.rs +++ b/build.rs @@ -182,13 +182,11 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("reference_types", _) => return true, - ("bulk_memory_operations", "table_copy") - | ("bulk_...
1
5
7
81227892daf6695e9de2c23711ac58ec1cf30384
Nick Fitzgerald
2020-02-21T00:19:36
Implement bulk memory's partial failure instantiation semantics Essentially, table and memory out of bounds errors are no longer link errors, but traps after linking. This means that the partail writes / inits are visible.
diff --git a/build.rs b/build.rs index 4d2961e9a..1942deec8 100644 --- a/build.rs +++ b/build.rs @@ -186,7 +186,8 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { | ("bulk_memory_operations", "table_init") | ("bulk_memory_operations", "elem") | ("bulk_memory...
6
88
15
44c28612fbeeffce0fca5b5dc15d7e21e74e271e
Nick Fitzgerald
2020-02-20T00:41:05
Implement the `memory.fill` instruction from the bulk memory proposal
diff --git a/build.rs b/build.rs index 1d71b908f..4d2961e9a 100644 --- a/build.rs +++ b/build.rs @@ -184,7 +184,9 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("bulk_memory_operations", "table_copy") | ("bulk_memory_operations", "table_init") - | ("bulk_...
5
188
10
6d01fd41034045e44d301c1f76fc93ea8427c6be
Nick Fitzgerald
2020-02-14T02:03:45
deps: Update `wat` to 1.0.9
diff --git a/Cargo.toml b/Cargo.toml index 372369823..6aa979ad6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ anyhow = "1.0.19" target-lexicon = { version = "0.10.0", default-features = false } pretty_env_logger = "0.3.0" file-per-thread-logger = "0.1.1" -wat = "1.0.2" +wat = "1.0.10" libc = "0.2.60" ...
5
5
5
25a411d7fdf40de1e13d10b1d536f4407aa873ec
Pat Hickey
2020-02-26T18:44:04
rename the pointer read/write methods to read and write these names were artifacts of some early confusion / bad design i made in the traits. read and write are much simpler names! also, change a ptr_mut to ptr where we just read the contents in the argument marshalling for structs. this has no effect, but it is more...
diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs index 2cf450744..404544762 100644 --- a/crates/generate/src/funcs.rs +++ b/crates/generate/src/funcs.rs @@ -262,8 +262,8 @@ fn marshal_arg( let arg_name = names.func_ptr_binding(&param.name); let name = names.func_param(&...
6
14
14
427fc9a732abfb7cdee84bd5c565af813c2980f5
Alex Crichton
2020-02-26T18:36:00
Update the `wat` and `wast` crates (#998) Now with support for annotations, plus a few minor bug fixes
diff --git a/Cargo.lock b/Cargo.lock index 380ef5810..0b8216ff9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2231,7 +2231,7 @@ version = "0.9.0" dependencies = [ "anyhow", "wasmtime", - "wast 8.0.0", + "wast 9.0.0", ] [[package]] @@ -2245,20 +2245,20 @@ dependencies = [ [[package]] name = "wast" -version =...
4
9
9
9ffa19ca64f1e5c054e0ab99a0de0c5d279f3d18
Peter Huene
2020-02-26T18:14:48
Disable optimizations for SIMD testsuite tests.
diff --git a/tests/wast_testsuites.rs b/tests/wast_testsuites.rs index 543bed937..a4a1d0e64 100644 --- a/tests/wast_testsuites.rs +++ b/tests/wast_testsuites.rs @@ -1,5 +1,5 @@ use std::path::Path; -use wasmtime::{Config, Engine, Store, Strategy}; +use wasmtime::{Config, Engine, OptLevel, Store, Strategy}; use wasmti...
1
7
1
70275a2a1d4b502e075bb0efbb1d92e0b76fbc42
Peter Huene
2020-02-26T00:33:13
Change default opt-level for Config to `speed`. This commit changes the default opt-level for a new `Config` to `speed`. Fixes #981.
diff --git a/crates/api/src/runtime.rs b/crates/api/src/runtime.rs index 09dea30bd..f367328fa 100644 --- a/crates/api/src/runtime.rs +++ b/crates/api/src/runtime.rs @@ -46,6 +46,11 @@ impl Config { .set("enable_verifier", "false") .expect("should be valid flag"); + // Turn on cranelif...
1
5
0
a02bce6eaff48eb4a51c1820e8272e57287dfe93
Jakub Konka
2020-02-24T20:38:12
Revert changes and require Clone if Copy This commit aligns `wiggle` a little bit closer with Rust proper in the sense that now `GuestTypeCopy` implies `GuestTypeClone` which in turn implies that any type implementing `GuestTypeCopy` will have to provide `read_from_guest` and `write_to_guest` methods. As a result, we ...
diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs index 9fb8cea87..ebdb7d356 100644 --- a/crates/generate/src/types.rs +++ b/crates/generate/src/types.rs @@ -125,7 +125,7 @@ fn define_int(names: &Names, name: &witx::Id, i: &witx::IntDatatype) -> TokenStr } } - impl ...
4
36
41
7a4c881409f491be0a4ac12368e6837fda61e659
Jakub Konka
2020-02-23T17:16:26
Fix read/write for GuestTypeCopy members of non-copy structs This commit fixes stubs for struct members that are `GuestTypeCopy` but are not `GuestTypeClone`. In this case, we cannot rely on methods `T::read_from_guest` or `T::write_to_guest` since these are only available if `T: GuestTypeClone`. In those cases, we ca...
diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs index a089dad62..9fb8cea87 100644 --- a/crates/generate/src/types.rs +++ b/crates/generate/src/types.rs @@ -567,14 +567,14 @@ fn define_ptr_struct(names: &Names, name: &witx::Id, s: &witx::StructDatatype) - witx::TypeRef::Name(nt) => ...
1
27
3
d55a9967b17f389affd3de1bed64582c7d93862f
Dan Gohman
2020-02-26T13:13:28
Remove some obsolete re-exports in wasmtime-jit. (#992) These were from when wasmtime-jit was trying to present a different API; now they're not needed.
diff --git a/crates/api/src/callable.rs b/crates/api/src/callable.rs index 601b0ed76..c4983df8c 100644 --- a/crates/api/src/callable.rs +++ b/crates/api/src/callable.rs @@ -6,8 +6,7 @@ use crate::values::Val; use std::ptr; use std::rc::Rc; use wasmtime_environ::ir; -use wasmtime_jit::InstanceHandle; -use wasmtime_ru...
3
2
8
150a3e588b335363b7f17e7b71832ab23e90338c
Marcin Mielniczuk
2020-02-26T00:04:46
Fix a possible overflow due to use of fionread in poll_oneoff on Unix. (#881) Closes #578.
diff --git a/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs index 6094395a2..3e6748fbc 100644 --- a/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs +++ b/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs @@ -124,9 +124,24 @@ fn poll_oneoff_han...
2
24
2
fa65a14dba1d93084eb42c35653209a6e740ec1e
Peter Huene
2020-02-25T21:36:36
Make `WasiCtxBuilder` by-ref. This commit makes `WasiCtxBuilder` take `&mut Self` and return `&mut Self` for its methods. This is needed to allow for the same (unmoved) `WasiCtxBuilder` to be used when building a WASI context. Also fixes up the C API to remove the unnecessary `Box::from_raw` and `forget` calls which...
diff --git a/crates/c-api/src/wasi.rs b/crates/c-api/src/wasi.rs index bc5456479..5c71d8619 100644 --- a/crates/c-api/src/wasi.rs +++ b/crates/c-api/src/wasi.rs @@ -47,20 +47,16 @@ pub unsafe extern "C" fn wasi_config_set_argv( argc: c_int, argv: *const *const c_char, ) { - let mut config = Box::from_raw(...
4
115
111
07066835dbe7140ca45aa0f0a2c2a5f814449a93
Peter Huene
2020-02-25T21:01:54
Implement `PartialEq` on `FuncType`.
diff --git a/crates/api/src/types.rs b/crates/api/src/types.rs index 968f62e32..8e344d5d0 100644 --- a/crates/api/src/types.rs +++ b/crates/api/src/types.rs @@ -168,7 +168,7 @@ fn from_wasmtime_abiparam(param: &ir::AbiParam) -> Option<ValType> { /// A descriptor for a function in a WebAssembly module. /// /// WebAss...
2
2
6
104919eb79ccd9013dd5b7e39d9db7788e1971c7
Peter Huene
2020-02-25T20:58:38
Remove Drop impl for `wasi_instance_t`.
diff --git a/crates/c-api/src/wasi.rs b/crates/c-api/src/wasi.rs index b709750e8..b03fe2b08 100644 --- a/crates/c-api/src/wasi.rs +++ b/crates/c-api/src/wasi.rs @@ -192,15 +192,7 @@ pub unsafe extern "C" fn wasi_config_preopen_dir( #[repr(C)] pub struct wasi_instance_t { wasi: Wasi, - export_cache: HashMap<St...
1
5
13
de4ad31cbdc6933c4aa90d136bf0f971fe589ea8
Nick Fitzgerald
2020-02-24T22:16:48
Update cranelift to 0.59.0
diff --git a/Cargo.lock b/Cargo.lock index 0e71a7d36..c6979deb5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,18 +323,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0f53d59dc9ab...
9
52
35
d4fcd32cdc54bae93c53b6646739eb9d650251b8
Alex Crichton
2020-02-24T21:18:09
Optimize generated code via the CLI by default (#973) * Optimize generated code via the CLI by default This commit updates the behavior of the CLI and adds a new flag. It first enables the `--optimize` flag by default, ensuring that usage of the `wasmtime` CLI will enable cranelift optimizations by default. Next ...
diff --git a/src/commands/wasm2obj.rs b/src/commands/wasm2obj.rs index 4d144d3d7..494857b2a 100644 --- a/src/commands/wasm2obj.rs +++ b/src/commands/wasm2obj.rs @@ -75,7 +75,7 @@ impl WasmToObjCommand { self.target.as_ref(), strategy, self.common.enable_simd, - self.com...
4
43
9
78bf63c76d6488c828759d69f1e96ad19c61d474
Andrew Brown
2020-01-31T22:40:39
Translate Wasm SIMD's avgr_u to Cranelift's new avg_round instruction
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 9a6d24d0a..da2a7ed18 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1304,6 +1304,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let (a, b) = p...
1
7
3
4fe397ea43d57caf7d24d5046d2278d376ff465a
Jakub Konka
2020-02-15T21:12:56
Refactor and combine all FileType structs in yanix This commit does a bit of everything: refactors bits here and there, fixes a bug discovered in another #701, and combines all structs that we used in `yanix` and `wasi-common` crates to represent file types on *nix into one struct, `yanix::file::FileType`. Up until n...
diff --git a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/hostcalls_impl.rs b/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/hostcalls_impl.rs index 5afab3305..48736ac7d 100644 --- a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/hostcalls_impl.rs +++ b/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/h...
8
75
164
830bdd5127ce5fcab04105a33c576c309a5bf7b3
nalmt
2020-02-05T17:12:56
Add maximum threshold for number of blocks per function #951 To fix this case that may take forever to compile: function %a(){ ebb477777777: } We decide to define a maximum threshold for the number of blocks in functions. Based on a large WASM program (https://github.com/mozilla/perf-automation/blob/master/benchmar...
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index f0b866f47..6cedb25b0 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -27,6 +27,9 @@ use std::str::FromStr; use std::{u16, u32}; use target_lexicon::Triple; +/// After some quick benchmarks a progra...
1
25
0
5e05aa1b03fd8b6c5b064bc145750643ca92e803
Josh Triplett
2020-02-22T19:11:48
Update to wasmparser 0.51 wasmparser::BinaryReaderError now encapsulates its fields, so call the accessors rather than destructuring to get the fields.
diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml index 8bee878bb..4ac049626 100644 --- a/cranelift/wasm/Cargo.toml +++ b/cranelift/wasm/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["webassembly", "wasm"] edition = "2018" [dependencies] -wasmparser = { version = "0.49.0", default-features = false } +wa...
2
6
4
aa78d491b0a6ffb84439606ac4e7bd20587e056d
Josh Triplett
2020-02-22T23:56:23
Make Func::getN return a Result rather than an Option (#966) This allows getN to return a detailed explanation of any type signature mismatch, and makes it easy to just use `?` on the result of getN rather than constructing a (necessarily vaguer) error message in the caller.
diff --git a/crates/api/src/func.rs b/crates/api/src/func.rs index 917946bd2..bc24660af 100644 --- a/crates/api/src/func.rs +++ b/crates/api/src/func.rs @@ -1,5 +1,6 @@ use crate::callable::{NativeCallable, WasmtimeFn, WrappedCallable}; use crate::{Callable, FuncType, Store, Trap, Val, ValType}; +use anyhow::{ensure,...
3
86
65
48202e0c319c5466a8db330a35b4463e6ce06a32
Josh Triplett
2020-02-22T23:10:45
Update dependencies to current versions, reducing duplicate versions (#963) * Cargo.lock: Update, to no longer use multiple versions of autocfg * Update wasmtime-debug and wasmtime-profiling to current gimli 0.20.0 This also eliminates duplicate versions of gimli and arrayvec, and eliminates the nodrop dependen...
diff --git a/Cargo.lock b/Cargo.lock index b5b845185..0e71a7d36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,15 +51,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -[[package]] -name = "arrayvec"...
6
155
280
8be80cbd0dbb37b540da9d892e7d16373d15d0c4
Josh Triplett
2020-02-22T23:09:06
Extend Func::getN up to get10, allowing up to 10-argument functions (#965) * Func: Number type arguments rather than using successive letters This simplifies future extension, and avoids potential conflicts with other type argument names. * Extend Func::getN up to get10, allowing up to 10-argument functions
diff --git a/crates/api/src/func.rs b/crates/api/src/func.rs index 5309e3d71..917946bd2 100644 --- a/crates/api/src/func.rs +++ b/crates/api/src/func.rs @@ -213,61 +213,61 @@ impl Func { /// possible for when WebAssembly calls the function provided. With /// sufficient inlining and optimization the We...
1
60
12
09c6c5db4472823c32c46e192fee5eb3f950c620
Nathan Froyd
2020-02-21T23:14:37
add a "raw" function definition interface to cranelift-module (#1400) * move trap site definitions into cranelift-module `cranelift-faerie` and `cranelift-object` already have identical definitions of structures to represent trap sites. We might as well merge them ahead of work to define functions via a raw slic...
diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs index c0cb086a6..e6439a69b 100644 --- a/cranelift/faerie/src/backend.rs +++ b/cranelift/faerie/src/backend.rs @@ -10,9 +10,10 @@ use cranelift_codegen::isa::TargetIsa; use cranelift_codegen::{self, binemit, ir}; use cranelift_module::{ ...
10
188
42
f77000ad8f18503e2b552add95b91e657fe34394
Pat Hickey
2020-02-21T21:58:28
move ctx into wiggle-tests crate
diff --git a/crates/test/src/lib.rs b/crates/test/src/lib.rs index 8b036111a..2ff31211c 100644 --- a/crates/test/src/lib.rs +++ b/crates/test/src/lib.rs @@ -90,3 +90,38 @@ mod test { assert_eq!(h.buffer.as_mut_ptr() as usize % 4096, 0); } } + +use wiggle_runtime::GuestError; + +pub struct WasiCtx { + ...
4
37
42
91727d99c06fdd62eca801560c185525e2ad6322
Andrew Brown
2020-02-04T17:24:58
Clean up unnecessary return
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index f68c47de4..9a6d24d0a 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -2037,5 +2037,5 @@ pub fn wasm_param_types(params: &[ir::AbiParam], is_wasm: impl Fn(usize) -> bool ...
1
1
1
f9ef4948fcdf4b0728d54b08db700f6870075f4b
Andrew Brown
2020-02-04T17:24:17
Translate Wasm integer min/max to Cranelift's integer min/max
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 01242348c..f68c47de4 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1288,6 +1288,22 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let (a, b) = p...
1
28
0
46cfc26684b09a3e8318c269deb9efc55d3e9258
Andrew Brown
2020-02-04T17:17:42
Update wasmparser to 0.49.0
diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml index f9f2b8b4b..8bee878bb 100644 --- a/cranelift/wasm/Cargo.toml +++ b/cranelift/wasm/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["webassembly", "wasm"] edition = "2018" [dependencies] -wasmparser = { version = "0.48.2", default-features = false } +wa...
1
1
1
3ae1af1ad299a11c264e6004aab01c02d14a7c42
Andrew Brown
2020-01-31T21:52:20
Add new Cranelift instructions for integer min/max This includes legalizations to the previously-existing x86 SIMD integer min/max.
diff --git a/cranelift/codegen/meta/src/isa/x86/legalize.rs b/cranelift/codegen/meta/src/isa/x86/legalize.rs index 0d0ab76a5..aa91741db 100644 --- a/cranelift/codegen/meta/src/isa/x86/legalize.rs +++ b/cranelift/codegen/meta/src/isa/x86/legalize.rs @@ -43,6 +43,8 @@ pub(crate) fn define(shared: &mut SharedDefinitions, ...
2
87
0
2f223acc559077cd299085078bfe7f5107ef7f14
Pat Hickey
2020-02-21T16:43:45
merge GuestTypePtr and GuestTypeClone into a single GuestTypeClone<'a> trait (#14) * merge GuestTypePtr and GuestTypeClone into a single GuestTypeClone<'a> trait * GuestArray can derive Clone (but not impl GuestTypeClone) * fix array tests * Fix GuestTypeClone for flags Co-authored-by: Jakub Konka <kubkon@...
diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs index 4d2376ab9..d2fc80fbc 100644 --- a/crates/generate/src/types.rs +++ b/crates/generate/src/types.rs @@ -179,7 +179,7 @@ fn define_flags(names: &Names, name: &witx::Id, f: &witx::FlagsDatatype) -> Toke } impl wiggle_runtime:...
6
38
67
ec9700c70b4f949ff7bb9a48a7bcb3a4ae2ccb5e
Joshua Nelson
2020-02-16T16:41:04
Don't return a Result for ObjectBuilder::new Since it always returned an `Ok(Self)`, there was no reason to have a Result.
diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index 85af3b5a5..f8baf1452 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -54,14 +54,14 @@ impl ObjectBuilder { name: String, collect_traps: ObjectTrapCollection, libcall_name...
1
3
3
0a020918b5335b17b579c33650023fb53303b376
Alex Crichton
2020-02-20T22:38:03
Don't let the API fuzz generator run wild (#959) We've got some OOM fuzz test cases getting reported, but these aren't very interesting. The OOMs, after some investigation, are confirmed to be happening because the test is simply allocating thousands of instances with massive tables, quickly exceeding the 2GB memor...
diff --git a/crates/fuzzing/src/generators/api.rs b/crates/fuzzing/src/generators/api.rs index 1e59fea39..9ffe8c5e2 100644 --- a/crates/fuzzing/src/generators/api.rs +++ b/crates/fuzzing/src/generators/api.rs @@ -15,7 +15,9 @@ //! [swarm testing]: https://www.cs.utah.edu/~regehr/papers/swarm12.pdf use arbitrary::{A...
1
69
14
898af8e2fb2774b5fc5e54cbc02369a483535e24
Jakub Konka
2020-02-20T13:51:22
Revisit GuestArray and their deref mechanics In preparation for landing `string` support in `wiggle`, I've revisited `GuestArray` and the deref mechanics, and decided to scrap the current approach in favour of the previous. Namely, for `T: GuestTypeCopy` we provide `GuestArray::as_ref` which then can be derefed direct...
diff --git a/crates/runtime/src/memory/array.rs b/crates/runtime/src/memory/array.rs index 2250497a3..40a5e37d8 100644 --- a/crates/runtime/src/memory/array.rs +++ b/crates/runtime/src/memory/array.rs @@ -1,5 +1,5 @@ use super::ptr::{GuestPtr, GuestRef}; -use crate::{GuestError, GuestType}; +use crate::{GuestError, Gu...
2
110
64
7dfd159fd8378efc47a87000e040743c8d034a8a
Andrew Brown
2020-02-20T17:58:19
Avoid unused import warnings in generated legalizer code (#1393)
diff --git a/cranelift/codegen/meta/src/gen_legalizer.rs b/cranelift/codegen/meta/src/gen_legalizer.rs index c872ba32d..759121894 100644 --- a/cranelift/codegen/meta/src/gen_legalizer.rs +++ b/cranelift/codegen/meta/src/gen_legalizer.rs @@ -560,7 +560,7 @@ fn gen_transform_group<'a>( fmt: &mut Formatter, ) { ...
1
1
1
b6be99c9e15c0d4a70cf1e92f5437c6b2e1d466c
Alex Crichton
2020-02-20T02:58:06
Remove memory-related cases from `RelocationTarget` (#949) This commit shrinks the `RelocationTarget` enumeration to remove intrinsic-related relocations since they are no longer used. Instead these function calls are done indirectly via a table in the `VMContext`. This means that all of this is essentially dead co...
diff --git a/crates/environ/src/compilation.rs b/crates/environ/src/compilation.rs index 233556527..0a896316e 100644 --- a/crates/environ/src/compilation.rs +++ b/crates/environ/src/compilation.rs @@ -247,14 +247,6 @@ pub enum RelocationTarget { UserFunc(FuncIndex), /// A compiler-generated libcall. LibC...
5
2
77
4283fdc862ad2158607afb60703c61ed95846f24
Alex Crichton
2020-02-20T02:57:41
Fix a possible use-after-free with `Global` (#956) * Fix a possible use-after-free with `Global` This commit fixes an issue with the implementation of the `wasmtime::Global` type where if it previously outlived the original `Instance` it came from then you could run into a use-after-free. Now the `Global` type h...
diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs index 70d796e04..12a0c5ed3 100644 --- a/crates/api/src/externals.rs +++ b/crates/api/src/externals.rs @@ -4,7 +4,6 @@ use crate::Mutability; use crate::{ExternType, GlobalType, MemoryType, TableType, ValType}; use crate::{Func, Store}; use anyhow...
4
133
63
b69a061d23a108e2f25be9a7c86ea164aad4c08f
Alex Crichton
2020-02-18T22:22:18
Add a test that segfault handlers ignore non-wasm segfaults (#941) This is the subject of #940 which while fixed is good to have a regression test for!
diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml index acd2736da..8dd7873c7 100644 --- a/crates/api/Cargo.toml +++ b/crates/api/Cargo.toml @@ -44,3 +44,7 @@ default = ['wat'] # to cranelift. Requires Nightly Rust currently, and this is not enabled by # default. lightbeam = ["wasmtime-jit/lightbeam"] + +[[t...
2
104
0
a09eed97db71e54fe683499faf19a7499020416b
Alex Crichton
2020-02-18T19:59:22
Update wasmparser to 0.51.2 (#952) Fixes a bug in multi-value loop validation, bytecodealliance/wasmparser#195
diff --git a/Cargo.lock b/Cargo.lock index 358b85c32..51d2e8613 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -906,7 +906,7 @@ dependencies = [ "smallvec", "thiserror", "typemap", - "wasmparser 0.51.1", + "wasmparser 0.51.2", "wat", ] @@ -1877,9 +1877,9 @@ checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28f...
2
12
12
052ae684c2cbbc9da1d81980cd47c722a153a980
Peter Huene
2020-02-18T19:36:45
Fix memory leak in wasm_importtype_type. This commit fixes a memory leak in `wasm_importtype_type` which returns a non-owned `wasm_externtype_t`.
diff --git a/crates/c-api/src/lib.rs b/crates/c-api/src/lib.rs index ca2196796..82c1f819d 100644 --- a/crates/c-api/src/lib.rs +++ b/crates/c-api/src/lib.rs @@ -257,6 +257,7 @@ pub struct wasm_importtype_t { ty: ImportType, module_cache: Option<wasm_name_t>, name_cache: Option<wasm_name_t>, + type_cac...
1
10
5
efc19b593a34680e68058c2f9eb45968df0f28bc
Peter Huene
2020-02-18T19:34:54
Implement wasm_func_type. This commit implements the missing `wasm_func_type` C API function.
diff --git a/crates/c-api/src/lib.rs b/crates/c-api/src/lib.rs index 24490384a..ca2196796 100644 --- a/crates/c-api/src/lib.rs +++ b/crates/c-api/src/lib.rs @@ -1230,6 +1230,16 @@ pub unsafe extern "C" fn wasm_externtype_kind(et: *const wasm_externtype_t) -> w } } +#[no_mangle] +pub unsafe extern "C" fn wasm_fu...
1
10
0
b15b5cd05add81a16a8c5e264d8c8fa6f4c61764
Alex Crichton
2020-02-18T18:33:48
Use malloc/free to allocate `Instance` structure (#948) Previously `Instance` was always allocated with `mmap`. This was done to future-proof `Instance` for allowing storing the memory itself inline with an `Instance` allocation, but this can actually be done with `alloc`/`dealloc` since they take an alignment. By ...
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index c1195ffa2..0e851d370 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -6,7 +6,6 @@ use crate::export::Export; use crate::imports::Imports; use crate::jit_int::GdbJitImageRegistration; use crate::memo...
1
19
17
c94cdc7730bc2cf5e97c21678a0e393860dc092d
Sergei Pepyakin
2020-02-18T14:33:57
Treat undeclared maximum as 4GiB (#944) * Treat undeclared maximum as 4GiB * Review fixes.
diff --git a/crates/environ/src/module.rs b/crates/environ/src/module.rs index 127e3eb87..f6389c23d 100644 --- a/crates/environ/src/module.rs +++ b/crates/environ/src/module.rs @@ -2,6 +2,7 @@ use crate::module_environ::FunctionBodyData; use crate::tunables::Tunables; +use crate::WASM_MAX_PAGES; use cranelift_code...
1
14
12
45cc95e60ec82dafa32c2f82444131892a3ea280
bjorn3
2020-02-14T22:44:40
Merge emit_small_memcpy and emit_small_memmove (#1301) * Merge emit_small_memcpy and emit_small_memmove * Fix typo
diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index f81ccc88b..a5803cbcf 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -1,7 +1,6 @@ //! A frontend for building Cranelift IR from other languages. use crate::ssa::{SSABlock, SSABuilder,...
1
27
58
4d8cf563f3c943e10b861c28de7f8f06520cc236
Joshua Nelson
2020-02-13T21:25:41
Use zeroinit API for faerie and object (#1209) * use new zeroinit API for faerie * use bss for cranelift-object * don't crash when initializing bss * fix formatting * Improve code locality Co-Authored-By: Philip Craig <philipjcraig@gmail.com> * use `as` instead of try_into() for usize -> u64 * don...
diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs index f10d45777..c0cb086a6 100644 --- a/cranelift/faerie/src/backend.rs +++ b/cranelift/faerie/src/backend.rs @@ -217,20 +217,6 @@ impl Backend for FaerieBackend { ref data_relocs, } = data_ctx.description(); - ...
2
34
36
58e5a62cde5212d6edacab31428f8336357a8b00
Y-Nak
2020-02-13T07:56:08
Fix inverted result of is_leaf method
diff --git a/cranelift/codegen/src/ir/function.rs b/cranelift/codegen/src/ir/function.rs index 77c06964b..1e72d2bc4 100644 --- a/cranelift/codegen/src/ir/function.rs +++ b/cranelift/codegen/src/ir/function.rs @@ -295,8 +295,8 @@ impl Function { /// to be confused with a "leaf function" in Windows terminology. ...
2
4
4
d7c9a90df98c4becd0a65d9f78ea2a19a01b6559
Alex Crichton
2020-02-12T00:09:07
Re-update the `wat` crate (#935) This was accidentally downgraded as part of #926, but we want to be sure to pull in wast 7.0.0!
diff --git a/Cargo.lock b/Cargo.lock index 4ce7e991c..358b85c32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2152,15 +2152,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wast" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed3db7029d1d31a15c10126e78b58e5...
2
4
13
ca509f8c29887b0801e7e0e0788d7c46e6facc9b
Alex Crichton
2020-02-12T00:01:05
Update wasmparser (#934) Pulls in bytecodealliance/wasmparser#193 which is a good bug fix to have!
diff --git a/Cargo.lock b/Cargo.lock index e6e5f8b72..4ce7e991c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -906,7 +906,7 @@ dependencies = [ "smallvec", "thiserror", "typemap", - "wasmparser 0.51.0", + "wasmparser 0.51.1", "wat", ] @@ -1877,9 +1877,9 @@ checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28f...
2
12
12
51229c3f58552ee854e3511d354db245343057e6
Philip Craig
2020-01-25T03:19:09
cranelift-module: document that finalize methods may not be relevant
diff --git a/cranelift/module/src/backend.rs b/cranelift/module/src/backend.rs index 9efe17a92..218070a5c 100644 --- a/cranelift/module/src/backend.rs +++ b/cranelift/module/src/backend.rs @@ -119,6 +119,9 @@ where /// Perform all outstanding relocations on the given function. This requires all `Local` /// ...
2
12
0
3c15f8f12949dede11badb084dd27fa3386e9d00
Philip Craig
2020-01-24T04:09:32
cranelift-object: move relocation processing to `finish` This removes the need to call `finalize_definitions` for cranelift-object. `finalize_definitions` is only intended for backends that produce finalized functions and data objects, which cranelift-object does not.
diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs index f2c227a52..f10d45777 100644 --- a/cranelift/faerie/src/backend.rs +++ b/cranelift/faerie/src/backend.rs @@ -311,7 +311,7 @@ impl Backend for FaerieBackend { // Nothing to do. } - fn finish(self) -> FaerieProduct { + ...
5
72
87
699109658c9c32c8d0cbb09efee8236c0562a9d7
myfreeweb
2020-02-09T14:44:48
wasi-common/yanix: fix FreeBSD support (#756) * wasi-common/yanix: fix FreeBSD support * yanix: add fadvise support on FreeBSD and NetBSD * runtime,jit: use cfg(unix) instead of linux||macos
diff --git a/crates/jit/src/function_table.rs b/crates/jit/src/function_table.rs index 625ae9d7d..ed982cf7a 100644 --- a/crates/jit/src/function_table.rs +++ b/crates/jit/src/function_table.rs @@ -109,14 +109,14 @@ impl Drop for FunctionTable { /// Represents a runtime function table. /// /// This is used to registe...
6
59
16
2af544de8bfe40bb7f13d05f5721f2505a74db0f
Nick Fitzgerald
2020-02-07T22:47:55
Update to cranelift 0.58.0 and enable (but ignore) reference types and bulk memory tests (#926) * Update cranelift to 0.58.0 * Update `wasmprinter` dep to require 0.2.1 We already had it in the lock file, but this ensures we won't ever go back down. * Ensure that our error messages match `assert_invalid`'s ...
diff --git a/Cargo.lock b/Cargo.lock index e5f4ba09f..e6e5f8b72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "aho-corasick" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fb...
16
221
111
d42560c7bfecab2c55689a813a0bd63ce065216c
Nathan Froyd
2020-02-07T22:41:20
specify units for fields of `Tunables` (#930) ...since the documentation in `impl Default for Tunables` doesn't get translated anywhere, and the various fields have different units anyway.
diff --git a/crates/environ/src/tunables.rs b/crates/environ/src/tunables.rs index 20ddf7d2a..64032f1dd 100644 --- a/crates/environ/src/tunables.rs +++ b/crates/environ/src/tunables.rs @@ -1,13 +1,13 @@ /// Tunable parameters for WebAssembly compilation. #[derive(Clone)] pub struct Tunables { - /// For static hea...
1
3
3
950dadac9441d412823554a8321203ba55bb4222
Gabor Greif
2020-02-07T20:51:28
Catch a few typos (#1381)
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 58b6eb177..01242348c 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -15,7 +15,7 @@ //! are being translated: //! //! - the loads and stores need the memory base address;...
1
2
2
dfef71ea5fa7a8098ad2ac03c1c5afa0178a0ef7
Alex Crichton
2020-02-07T19:28:26
Add some debug logging to fuzzers (#923) * Add some debug logging to fuzzers This is useful when trying to figure out what happened locally when debugging fuzz test cases. By setting `RUST_LOG=wasmtime_fuzzing=debug` you can get wasm files written to disk and for the API calls test case see what API calls are be...
diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml index 9864ac844..2ba90cd99 100644 --- a/crates/fuzzing/Cargo.toml +++ b/crates/fuzzing/Cargo.toml @@ -6,13 +6,11 @@ name = "wasmtime-fuzzing" publish = false version = "0.9.0" -# See more keys and their definitions at https://doc.rust-lang.org/cargo...
2
35
3
98020050612e812030e6ce3ebe9b984580e54723
Alex Crichton
2020-02-07T19:22:07
Remove the `action` and `context` modules from `wasmtime_jit` (#924) * Remove the `action` and `context` modules from `wasmtime_jit` These modules are now no longer necessary with the `wasmtime` crate fleshed out, and they're entirely subsumed by the `wasmtime` API as well. * Remove some more modules
diff --git a/crates/api/src/module.rs b/crates/api/src/module.rs index 771960090..c8f159e55 100644 --- a/crates/api/src/module.rs +++ b/crates/api/src/module.rs @@ -9,7 +9,7 @@ use std::path::Path; use std::sync::{Arc, Mutex}; use wasmparser::{ validate, CustomSectionKind, ExternalKind, ImportSectionEntryType, M...
8
55
642
151075d55376932f072d10df1bf17df135c68338
Alex Crichton
2020-02-07T14:23:24
Remove a panic in the cache worker (#922) This panic can now be hit occasionally since the worker is indeed dropped, and the comment about the static no longer applies.
diff --git a/crates/environ/src/cache/worker.rs b/crates/environ/src/cache/worker.rs index 047276b83..f17ffa410 100644 --- a/crates/environ/src/cache/worker.rs +++ b/crates/environ/src/cache/worker.rs @@ -217,12 +217,6 @@ impl WorkerThread { condvar.notify_all(); } } - - //...
1
0
6
f5b505de041c5959c868f71502c33a114b39a997
Alex Crichton
2020-02-07T13:33:21
Remove the `jit_function_registry` global state (#915) * Remove the `jit_function_registry` global state This commit removes on the final pieces of global state in wasmtime today, the `jit_function_registry` module. The purpose of this module is to help translate a native backtrace with native program counters in...
diff --git a/Cargo.lock b/Cargo.lock index 31c9b5654..e5f4ba09f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2083,7 +2083,6 @@ dependencies = [ "cc", "cfg-if", "indexmap", - "lazy_static", "libc", "memoffset", "more-asserts", diff --git a/crates/api/src/frame_info.rs b/crates/api/src/frame_info.rs new file ...
16
239
244
a6adf524298f0658aa6561a83b1f9bc1a4e12d68
Alex Crichton
2020-02-07T10:06:59
Add more CLI flags for wasm features (#917) * Add more CLI flags for wasm features This commit adds a few more flags to enable wasm features via the CLI, mirroring the existing `--enable-simd` flag: * `--enable-reference-types` * `--enable-multi-value` * `--enable-threads` * `--enable-bulk-memory` Additio...
diff --git a/crates/api/src/runtime.rs b/crates/api/src/runtime.rs index 199cf3245..89a4b2bf2 100644 --- a/crates/api/src/runtime.rs +++ b/crates/api/src/runtime.rs @@ -70,13 +70,18 @@ impl Config { /// be enabled through this method for appropriate wasm modules. /// /// This feature gates items such as ...
4
60
46
664f7d38e0a81597d83fd7805b752452dc7339c0
Jakub Konka
2020-02-07T07:27:21
Add first pass at GuestArray (#5) * Add first pass at GuestArray * Return &'a [T] instead of Vec<Refs> Also, add a sanity test for `GuestArray`. * Change approach in GuestArray::as_ref The new approach should avoid unnecessary copying (does it?) by iterating through the memory and firstly validating the g...
diff --git a/crates/memory/src/borrow.rs b/crates/memory/src/borrow.rs index c691888db..bd1d077e1 100644 --- a/crates/memory/src/borrow.rs +++ b/crates/memory/src/borrow.rs @@ -5,6 +5,7 @@ use crate::region::Region; #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct BorrowHandle(usize); +#[derive(Debug)]...
4
409
1
344bf2d6f3241e1f667a8710bc5c42e0cf76422f
Alex Crichton
2020-02-06T23:36:06
Fuzz the multi-value support (#918) * Fuzz the multi-value support This commit enables multi-value by default for the fuzzers, in theory allowing us to find panics and such in the multi-value implementation. Or even runtime errors through the differential fuzzing! * Don't fuzz differential on multi value
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index e08082949..a43c0a50c 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -16,6 +16,16 @@ use dummy::{dummy_imports, dummy_values}; use std::collections::{HashMap, HashSet}; use wasmtime::*; +fn fuzz_defaul...
1
12
12
8a7d403fce79f974bde37d8840adb33b9b061910
Alex Crichton
2020-02-06T22:39:20
Remove a use of `lazy_static!` in `cache.rs` (#916) There's not really much reason to amortize the cost of this mtime calculation here since it's only done with debug assertions anyway, so let's avoid an extra dependency and just have a function do it inline.
diff --git a/crates/environ/Cargo.toml b/crates/environ/Cargo.toml index d4d8867c3..2f53823e6 100644 --- a/crates/environ/Cargo.toml +++ b/crates/environ/Cargo.toml @@ -26,7 +26,6 @@ sha2 = "0.8.0" base64 = "0.11.0" serde = { version = "1.0.94", features = ["derive"] } bincode = "1.1.4" -lazy_static = "1.3.0" log =...
2
12
29
de85efc2dd1952302fcd9d09089dbce88229e317
Yury Delendik
2020-02-06T21:28:09
Add support for DebugInfoRef during DWARF transform (#853)
diff --git a/crates/debug/src/transform/attr.rs b/crates/debug/src/transform/attr.rs index a7c18c932..bd0d78447 100644 --- a/crates/debug/src/transform/attr.rs +++ b/crates/debug/src/transform/attr.rs @@ -1,13 +1,10 @@ use super::address_transform::AddressTransform; use super::expression::{compile_expression, Compile...
4
159
46
4ff8257b176dfe9d79bafae1f1a1026f94b76736
Alex Crichton
2020-02-06T18:58:16
Update binaryen fuzzing dependency (#913) Fixes an infinite loop in fuzz test case generation, pulling in WebAssembly/binaryen#2637
diff --git a/Cargo.lock b/Cargo.lock index fda6af81c..801d2ab8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,18 +113,18 @@ checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "binaryen" -version = "0.8.2" +version = "0.10.0" source = "registry+https://github.com/rus...
2
5
5
348c597a8ed2f474f33f0917568fd67c2d61135e
Alex Crichton
2020-02-06T18:40:50
Remove global state for trap registration (#909) * Remove global state for trap registration There's a number of changes brought about in this commit, motivated by a few things. One motivation was to remove an instance of using `lazy_static!` in an effort to remove global state and encapsulate it wherever possib...
diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs index fda3d1b63..70d796e04 100644 --- a/crates/api/src/externals.rs +++ b/crates/api/src/externals.rs @@ -181,7 +181,7 @@ impl Global { if val.ty() != *ty.content() { bail!("value provided does not match the type of this global...
14
232
130
9dffaf9d577cf731d54e94b385fec2a8174dce36
Alex Crichton
2020-02-06T18:25:32
Update wasmparser dependency (#912) * Update wasmparser dependency Closes #905 * Fix lightbeam compilation
diff --git a/Cargo.lock b/Cargo.lock index cdc3486bd..fda6af81c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -896,7 +896,7 @@ dependencies = [ "smallvec", "thiserror", "typemap", - "wasmparser 0.47.0", + "wasmparser 0.51.0", "wat", ] @@ -1861,24 +1861,24 @@ checksum = "c702914acda5feeeffbc29e4d953e5b9ce79d8b9...
12
108
182
c860edc14fda8b45323e85c2cd0f9f0365e3e8f9
Alex Crichton
2020-02-06T18:04:53
Disable cranelift's verifier by default (#882) The intention of the `wasmtime` crate was to disable this verifier by default, but it looks like cranelift actually has it turned on by default which was making our documentation incorrect! This was discovered by seeing a number of timeouts when fuzzing. The debug v...
diff --git a/crates/api/src/runtime.rs b/crates/api/src/runtime.rs index a930cac46..7bc5edaf6 100644 --- a/crates/api/src/runtime.rs +++ b/crates/api/src/runtime.rs @@ -35,6 +35,11 @@ impl Config { .enable("avoid_div_traps") .expect("should be valid flag"); + // Invert cranelift's def...
2
13
2
8e0651374aebbee063846058c978c6b6dd50989a
Alex Crichton
2020-02-06T17:41:44
Deregister JIT frames on Linux in reverse order (#910) Investigating a susprisingly slow-compiling module recently, it turns out that if you create a wasm module with 40k empty functions (e.g. `(module (func) (func) (func) ...)`) then it takes **3 seconds** to compile and drop via the CLI locally on a Linux system....
diff --git a/crates/jit/src/function_table.rs b/crates/jit/src/function_table.rs index ffa37ce95..625ae9d7d 100644 --- a/crates/jit/src/function_table.rs +++ b/crates/jit/src/function_table.rs @@ -199,9 +199,23 @@ impl Drop for FunctionTable { fn __deregister_frame(fde: *const u8); } - if...
1
16
2
3dd5a3cb3f0943bfa2c448f5029e975d343e9a2b
Alex Crichton
2020-02-06T15:23:06
Reimplement `wasmtime-wasi` on top of `wasmtime` (#899) * Reimplement `wasmtime-wasi` on top of `wasmtime` This commit reimplements the `wasmtime-wasi` crate on top of the `wasmtime` API crate, instead of being placed on top of the `wasmtime-*` family of internal crates. The purpose here is to continue to exerci...
diff --git a/Cargo.lock b/Cargo.lock index 3a9030718..cdc3486bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1655,9 +1655,6 @@ dependencies = [ "tempfile", "wasi-common", "wasmtime", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", "wasmtime-wasi", "wat", ] @@ -2075,9 +2072,7 @@ dependencies = [...
20
284
488
efb7f0a6c70ad860fc780d95e211262a84f9883a
Nathan Froyd
2020-02-05T17:17:12
factor out declaring exports (#906)
diff --git a/crates/environ/src/module_environ.rs b/crates/environ/src/module_environ.rs index 86410c084..9273c6f99 100644 --- a/crates/environ/src/module_environ.rs +++ b/crates/environ/src/module_environ.rs @@ -86,6 +86,14 @@ impl<'data> ModuleEnvironment<'data> { self.result.module_translation = Some(module...
1
12
20
9f76df6c85682a776a09997e146c93245831aaaf
Alex Crichton
2020-02-05T16:28:50
Remove trap registration from `wasmtime` crate (#903) Our trampoline shims no longer have traps baked into them so this is largely all dead code now at this point.
diff --git a/crates/api/src/trampoline/func.rs b/crates/api/src/trampoline/func.rs index e08feda3b..4a522b9df 100644 --- a/crates/api/src/trampoline/func.rs +++ b/crates/api/src/trampoline/func.rs @@ -1,12 +1,10 @@ //! Support for a calling of an imported function. use super::create_handle::create_handle; -use supe...
4
11
73