From 87cb8bfa2c97e6572f968bcfcbbd4e6abbf7c108 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 23 Jul 2020 10:47:42 -0700 Subject: [PATCH] Fixup some rebase conflicts --- Cargo.lock | 20 ++++++++++---------- crates/environ/src/compilation.rs | 3 +-- crates/environ/src/cranelift.rs | 3 +-- crates/jit/Cargo.toml | 2 +- crates/jit/src/compiler.rs | 2 ++ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b03ba796a811..0edadc75f9fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -598,7 +598,7 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "wat", ] @@ -1133,7 +1133,7 @@ dependencies = [ "staticvec", "thiserror", "typemap", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "wat", ] @@ -2342,9 +2342,9 @@ checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" [[package]] name = "wasmparser" -version = "0.60.1" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91413a0e5bdee73a5f4fc4a1a95b90623926561fdc123de20df67856ea5fcbe" +checksum = "c2d5790a08f11f3d6b5767f6c49152df74b215e3dc5a38147713c4f6a05aac7f" [[package]] name = "wasmprinter" @@ -2353,7 +2353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecc836dba85dd00df43d71b22063bcb367d324aa1be0d046077cc7fca4c43876" dependencies = [ "anyhow", - "wasmparser 0.60.1", + "wasmparser 0.60.2", ] [[package]] @@ -2373,7 +2373,7 @@ dependencies = [ "smallvec", "target-lexicon", "tempfile", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "wasmtime-environ", "wasmtime-jit", "wasmtime-profiling", @@ -2447,7 +2447,7 @@ dependencies = [ "object 0.20.0", "target-lexicon", "thiserror", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "wasmtime-environ", ] @@ -2480,7 +2480,7 @@ dependencies = [ "tempfile", "thiserror", "toml", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "winapi", "zstd", ] @@ -2509,7 +2509,7 @@ dependencies = [ "env_logger", "log", "rayon", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "wasmprinter", "wasmtime", "wasmtime-wast", @@ -2535,7 +2535,7 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser 0.60.1", + "wasmparser 0.60.2", "wasmtime-debug", "wasmtime-environ", "wasmtime-obj", diff --git a/crates/environ/src/compilation.rs b/crates/environ/src/compilation.rs index 5bac4991de89..7440faa25763 100644 --- a/crates/environ/src/compilation.rs +++ b/crates/environ/src/compilation.rs @@ -2,8 +2,7 @@ //! module. use crate::address_map::{ModuleAddressMap, ValueLabelsRanges}; -use crate::ModuleTranslation; -use crate::{CacheConfig, FunctionBodyData, ModuleTranslation}; +use crate::{FunctionBodyData, ModuleTranslation}; use cranelift_codegen::{binemit, ir, isa, isa::unwind::UnwindInfo}; use cranelift_entity::PrimaryMap; use cranelift_wasm::{DefinedFuncIndex, FuncIndex, WasmError}; diff --git a/crates/environ/src/cranelift.rs b/crates/environ/src/cranelift.rs index 4b91b8d03b6e..816255ff10b3 100644 --- a/crates/environ/src/cranelift.rs +++ b/crates/environ/src/cranelift.rs @@ -294,7 +294,6 @@ impl Compiler for Cranelift { compile( isa, &translation.module.local, - translation.module_translation.as_ref().unwrap(), function_body_inputs, &translation.tunables, ) @@ -304,7 +303,6 @@ impl Compiler for Cranelift { fn compile( isa: &dyn isa::TargetIsa, local: &ModuleLocal, - module_translation: &ModuleTranslationState, function_body_inputs: PrimaryMap>, tunables: &Tunables, ) -> Result { @@ -363,6 +361,7 @@ fn compile( readonly: false, }); context.func.stack_limit = Some(stack_limit); + func_translator.translate_body( &mut input.validator, input.body.clone(), &mut context.func, diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index 7077de9c921e..66bc1d6a9679 100644 --- a/crates/jit/Cargo.toml +++ b/crates/jit/Cargo.toml @@ -25,7 +25,7 @@ wasmtime-obj = { path = "../obj", version = "0.19.0" } region = "2.1.0" thiserror = "1.0.4" target-lexicon = { version = "0.10.0", default-features = false } -wasmparser = "0.60.0" +wasmparser = "0.60.2" more-asserts = "0.2.1" anyhow = "1.0" cfg-if = "0.1.9" diff --git a/crates/jit/src/compiler.rs b/crates/jit/src/compiler.rs index 5c2ee9b95bfa..9ce8db2af439 100644 --- a/crates/jit/src/compiler.rs +++ b/crates/jit/src/compiler.rs @@ -214,12 +214,14 @@ impl Hash for Compiler { strategy, isa, tunables, + features, } = self; // Hash compiler's flags: compilation strategy, isa, frontend config, // misc tunables. strategy.hash(hasher); isa.triple().hash(hasher); + features.hash(hasher); // TODO: if this `to_string()` is too expensive then we should upstream // a native hashing ability of flags into cranelift itself, but // compilation and/or cache loading is relatively expensive so seems