Update cranelift libraries to 0.28.0

This commit is contained in:
Yury Delendik
2019-01-29 18:27:44 -06:00
committed by Dan Gohman
parent fdcb2184a8
commit e66f01b923
8 changed files with 28 additions and 44 deletions

View File

@@ -23,10 +23,10 @@ name = "wasm2obj"
path = "src/wasm2obj.rs"
[dependencies]
cranelift-codegen = "0.26.0"
cranelift-native = "0.26.0"
cranelift-entity = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-native = "0.28.0"
cranelift-entity = "0.28.0"
cranelift-wasm = "0.28.0"
wasmtime-environ = { path = "lib/environ" }
wasmtime-runtime = { path = "lib/runtime" }
wasmtime-jit = { path = "lib/jit" }

View File

@@ -11,9 +11,9 @@ cargo-fuzz = true
[dependencies]
wasmtime-environ = { path = "../lib/environ" }
wasmtime-jit = { path = "../lib/jit" }
cranelift-codegen = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-native = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-wasm = "0.28.0"
cranelift-native = "0.28.0"
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
wasmparser = { version = "0.23.0", default-features = false }
binaryen = "0.5.0"

View File

@@ -12,9 +12,9 @@ readme = "README.md"
edition = "2018"
[dependencies]
cranelift-codegen = "0.26.0"
cranelift-entity = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-entity = "0.28.0"
cranelift-wasm = "0.28.0"
cast = { version = "0.2.2", default-features = false }
failure = { version = "0.1.3", default-features = false }
failure_derive = { version = "0.1.3", default-features = false }

View File

@@ -1,7 +1,6 @@
use crate::func_environ::FuncEnvironment;
use crate::module::{Export, MemoryPlan, Module, TableElements, TablePlan};
use crate::tunables::Tunables;
use core::clone::Clone;
use cranelift_codegen::ir;
use cranelift_codegen::ir::{AbiParam, ArgumentPurpose};
use cranelift_codegen::isa::TargetFrontendConfig;
@@ -10,6 +9,7 @@ use cranelift_wasm::{
self, translate_module, DefinedFuncIndex, FuncIndex, Global, GlobalIndex, Memory, MemoryIndex,
SignatureIndex, Table, TableIndex, WasmResult,
};
use std::boxed::Box;
use std::string::String;
use std::vec::Vec;
@@ -80,16 +80,12 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
self.result.target_config
}
fn declare_signature(&mut self, sig: &ir::Signature) {
let sig = translate_signature(sig.clone(), self.pointer_type());
fn declare_signature(&mut self, sig: ir::Signature) {
let sig = translate_signature(sig, self.pointer_type());
// TODO: Deduplicate signatures.
self.result.module.signatures.push(sig);
}
fn get_signature(&self, sig_index: SignatureIndex) -> &ir::Signature {
&self.result.module.signatures[sig_index]
}
fn declare_func_import(&mut self, sig_index: SignatureIndex, module: &str, field: &str) {
debug_assert_eq!(
self.result.module.functions.len(),
@@ -104,18 +100,10 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
.push((String::from(module), String::from(field)));
}
fn get_num_func_imports(&self) -> usize {
self.result.module.imported_funcs.len()
}
fn declare_func_type(&mut self, sig_index: SignatureIndex) {
self.result.module.functions.push(sig_index);
}
fn get_func_type(&self, func_index: FuncIndex) -> SignatureIndex {
self.result.module.functions[func_index]
}
fn declare_global_import(&mut self, global: Global, module: &str, field: &str) {
debug_assert_eq!(
self.result.module.globals.len(),
@@ -134,10 +122,6 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
self.result.module.globals.push(global);
}
fn get_global(&self, global_index: GlobalIndex) -> &Global {
&self.result.module.globals[global_index]
}
fn declare_table_import(&mut self, table: Table, module: &str, field: &str) {
debug_assert_eq!(
self.result.module.table_plans.len(),
@@ -163,13 +147,13 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
table_index: TableIndex,
base: Option<GlobalIndex>,
offset: usize,
elements: Vec<FuncIndex>,
elements: Box<[FuncIndex]>,
) {
self.result.module.table_elements.push(TableElements {
table_index,
base,
offset,
elements,
elements: elements.to_vec(),
});
}

View File

@@ -12,10 +12,10 @@ readme = "README.md"
edition = "2018"
[dependencies]
cranelift-codegen = "0.26.0"
cranelift-entity = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-frontend = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-entity = "0.28.0"
cranelift-wasm = "0.28.0"
cranelift-frontend = "0.28.0"
wasmtime-environ = { path = "../environ", default-features = false }
wasmtime-runtime = { path = "../runtime", default-features = false }
region = "1.0.0"

View File

@@ -12,7 +12,7 @@ readme = "README.md"
edition = "2018"
[dependencies]
cranelift-codegen = "0.26.0"
cranelift-entity = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-entity = "0.28.0"
wasmtime-environ = { path = "../environ" }
faerie = "0.6.0"

View File

@@ -12,9 +12,9 @@ readme = "README.md"
edition = "2018"
[dependencies]
cranelift-codegen = "0.26.0"
cranelift-entity = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-entity = "0.28.0"
cranelift-wasm = "0.28.0"
wasmtime-environ = { path = "../environ", default-features = false }
region = "1.0.0"
lazy_static = "1.2.0"

View File

@@ -12,10 +12,10 @@ readme = "README.md"
edition = "2018"
[dependencies]
cranelift-codegen = "0.26.0"
cranelift-native = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-entity = "0.26.0"
cranelift-codegen = "0.28.0"
cranelift-native = "0.28.0"
cranelift-wasm = "0.28.0"
cranelift-entity = "0.28.0"
wasmtime-jit = { path = "../jit" }
wasmtime-runtime = { path = "../runtime" }
wasmtime-environ = { path = "../environ" }