From a127b770b36dd369fbb452a9e4880f6420202dbe Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Mon, 29 Apr 2019 23:34:48 -0500 Subject: [PATCH 1/3] Update to newer common wasmparser version --- Cargo.lock | 20 ++++---------------- lib/clif-backend/Cargo.toml | 2 +- lib/llvm-backend/Cargo.toml | 2 +- lib/runtime-abi/Cargo.toml | 2 +- lib/singlepass-backend/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44e77e7df31..7b0a1d07e5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2264,7 +2264,7 @@ dependencies = [ "target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.3.0", "wasmer-win-exception-handler 0.3.0", - "wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2303,7 +2303,7 @@ dependencies = [ "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.3.0", - "wasmparser 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2331,7 +2331,7 @@ dependencies = [ "tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.3.0", - "wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "zbox 0.6.1 (git+https://github.com/wasmerio/zbox?branch=bundle-libsodium)", "zstd 0.4.22+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2385,7 +2385,7 @@ dependencies = [ "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.3.0", - "wasmparser 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2424,16 +2424,6 @@ dependencies = [ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "wasmparser" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "wasmparser" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "wasmparser" version = "0.29.2" @@ -2827,8 +2817,6 @@ dependencies = [ "checksum wabt-sys 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a6265b25719e82598d104b3717375e37661d41753e2c84cde3f51050c7ed7e3c" "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" -"checksum wasmparser 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5e01c420bc7d36e778bd242e1167b079562ba8b34087122cc9057187026d060" -"checksum wasmparser 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "40f426b1929bd26517fb10702e2a8e520d1845c49567aa4d244f426f10b206c1" "checksum wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)" = "981a8797cf89762e0233ec45fae731cb79a4dfaee12d9f0fe6cee01e4ac58d00" "checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" diff --git a/lib/clif-backend/Cargo.toml b/lib/clif-backend/Cargo.toml index 9259a190360..f1aa6ef0483 100644 --- a/lib/clif-backend/Cargo.toml +++ b/lib/clif-backend/Cargo.toml @@ -15,7 +15,7 @@ cranelift-entity = "0.30.0" cranelift-wasm = "0.30.0" hashbrown = "0.1" target-lexicon = "0.3.0" -wasmparser = "0.23.0" +wasmparser = "0.29.2" byteorder = "1" nix = "0.13.0" libc = "0.2.49" diff --git a/lib/llvm-backend/Cargo.toml b/lib/llvm-backend/Cargo.toml index 944db6d4124..c1a1cbbdc93 100644 --- a/lib/llvm-backend/Cargo.toml +++ b/lib/llvm-backend/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] wasmer-runtime-core = { path = "../runtime-core", version = "0.3.0" } inkwell = { git = "https://github.com/wasmerio/inkwell", branch = "llvm7-0" } -wasmparser = "0.28.0" +wasmparser = "0.29.2" hashbrown = "0.1.8" smallvec = "0.6.8" goblin = "0.0.20" diff --git a/lib/runtime-abi/Cargo.toml b/lib/runtime-abi/Cargo.toml index 459c08de230..bf971f7e860 100644 --- a/lib/runtime-abi/Cargo.toml +++ b/lib/runtime-abi/Cargo.toml @@ -13,7 +13,7 @@ wasmer-runtime-core = { path = "../runtime-core" } hashbrown = "0.1" failure = "0.1" tar = "0.4" -wasmparser = "0.23.0" +wasmparser = "0.29.2" zstd = "0.4" [target.'cfg(unix)'.dependencies.zbox] diff --git a/lib/singlepass-backend/Cargo.toml b/lib/singlepass-backend/Cargo.toml index 51fa613193d..b4046e76c47 100644 --- a/lib/singlepass-backend/Cargo.toml +++ b/lib/singlepass-backend/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] wasmer-runtime-core = { path = "../runtime-core", version = "0.3.0" } -wasmparser = "0.28.0" +wasmparser = "0.29.2" dynasm = "0.3.1" dynasmrt = "0.3.1" lazy_static = "1.2.0" From 8acf9edf678e7f3f6e9860d0b40c688ec893ce8c Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Mon, 29 Apr 2019 23:45:38 -0500 Subject: [PATCH 2/3] Remove unneeded returns --- lib/emscripten/src/process.rs | 2 +- lib/emscripten/src/time.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/emscripten/src/process.rs b/lib/emscripten/src/process.rs index 4c6e33e7027..319dc9eb466 100644 --- a/lib/emscripten/src/process.rs +++ b/lib/emscripten/src/process.rs @@ -159,7 +159,7 @@ pub fn _system(_ctx: &mut Ctx, _one: i32) -> c_int { debug!("emscripten::_system"); // TODO: May need to change this Em impl to a working version eprintln!("Can't call external programs"); - return EAGAIN; + EAGAIN } pub fn _popen(_ctx: &mut Ctx, _one: i32, _two: i32) -> c_int { diff --git a/lib/emscripten/src/time.rs b/lib/emscripten/src/time.rs index 312808a82da..56dfdbda810 100644 --- a/lib/emscripten/src/time.rs +++ b/lib/emscripten/src/time.rs @@ -345,7 +345,7 @@ pub fn _strftime( // pad for null? let bytes = result_str.chars().count(); if bytes as u32 > maxsize { - return 0; + 0 } else { // write output string for (i, c) in result_str.chars().enumerate() { From 01ba789eed1cded255b42034dffdf422b5c6a539 Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Mon, 29 Apr 2019 23:49:00 -0500 Subject: [PATCH 3/3] Cleanup some long literal lacking separators --- lib/llvm-backend/src/code.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/llvm-backend/src/code.rs b/lib/llvm-backend/src/code.rs index 05cde06949c..2795e6271de 100644 --- a/lib/llvm-backend/src/code.rs +++ b/lib/llvm-backend/src/code.rs @@ -1468,7 +1468,7 @@ fn parse_function( context, &function, -2147483904.0, - 2147483648.0, + 2_147_483_648.0, v1, ); let res = @@ -1482,8 +1482,8 @@ fn parse_function( intrinsics, context, &function, - -2147483649.0, - 2147483648.0, + -2_147_483_649.0, + 2_147_483_648.0, v1, ); let res = @@ -1503,8 +1503,8 @@ fn parse_function( intrinsics, context, &function, - -9223373136366403584.0, - 9223372036854775808.0, + -9_223_373_136_366_403_584.0, + 9_223_372_036_854_775_808.0, v1, ); let res =