Update to Cranelift 0.25.

This commit is contained in:
Dan Gohman
2018-11-26 22:50:07 -08:00
parent 0e19f39831
commit 95fba6a9de
6 changed files with 29 additions and 21 deletions

View File

@@ -18,10 +18,10 @@ name = "wasm2obj"
path = "src/wasm2obj.rs"
[dependencies]
cranelift-codegen = "0.24.0"
cranelift-native = "0.24.0"
cranelift-entity = "0.24.0"
cranelift-wasm = "0.24.0"
cranelift-codegen = "0.25.0"
cranelift-native = "0.25.0"
cranelift-entity = "0.25.0"
cranelift-wasm = "0.25.0"
wasmtime-environ = { path = "lib/environ" }
wasmtime-execute = { path = "lib/execute" }
wasmtime-obj = { path = "lib/obj" }

View File

@@ -10,9 +10,9 @@ cargo-fuzz = true
[dependencies]
wasmtime-environ = { path = "../lib/environ" }
wasmtime-execute = { path = "../lib/execute" }
cranelift-codegen = "0.24.0"
cranelift-wasm = "0.24.0"
cranelift-native = "0.24.0"
cranelift-codegen = "0.25.0"
cranelift-wasm = "0.25.0"
cranelift-native = "0.25.0"
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
wasmparser = { version = "0.22.0", default-features = false }

View File

@@ -10,9 +10,9 @@ license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
[dependencies]
cranelift-codegen = "0.24.0"
cranelift-entity = "0.24.0"
cranelift-wasm = "0.24.0"
cranelift-codegen = "0.25.0"
cranelift-entity = "0.25.0"
cranelift-wasm = "0.25.0"
memoffset = "0.2.1"
[features]

View File

@@ -34,9 +34,6 @@ pub struct ModuleEnvironment<'data, 'module> {
/// References to information to be decoded later.
pub lazy: LazyContents<'data>,
/// The ISA's target front-end configuration.
frontend_config: isa::TargetFrontendConfig,
}
impl<'data, 'module> ModuleEnvironment<'data, 'module> {
@@ -46,7 +43,6 @@ impl<'data, 'module> ModuleEnvironment<'data, 'module> {
isa,
module,
lazy: LazyContents::new(),
frontend_config: isa.frontend_config(),
}
}
@@ -148,8 +144,8 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
get_func_name(func_index)
}
fn target_config(&self) -> &isa::TargetFrontendConfig {
&self.frontend_config
fn target_config(&self) -> isa::TargetFrontendConfig {
self.isa.frontend_config()
}
fn declare_signature(&mut self, sig: &ir::Signature) {
@@ -191,6 +187,10 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
self.module.functions[func_index]
}
fn declare_global_import(&mut self, _global: Global, _module: &str, _field: &str) {
unimplemented!("imported globals");
}
fn declare_global(&mut self, global: Global) {
self.module.globals.push(global);
}
@@ -199,6 +199,10 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
&self.module.globals[global_index]
}
fn declare_table_import(&mut self, _table: Table, _module: &str, _field: &str) {
unimplemented!("imported tables");
}
fn declare_table(&mut self, table: Table) {
self.module.tables.push(table);
}
@@ -219,6 +223,10 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
});
}
fn declare_memory_import(&mut self, _memory: Memory, _module: &str, _field: &str) {
unimplemented!("imported memories");
}
fn declare_memory(&mut self, memory: Memory) {
self.module.memories.push(memory);
}

View File

@@ -10,9 +10,9 @@ license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
[dependencies]
cranelift-codegen = "0.24.0"
cranelift-entity = "0.24.0"
cranelift-wasm = "0.24.0"
cranelift-codegen = "0.25.0"
cranelift-entity = "0.25.0"
cranelift-wasm = "0.25.0"
region = "1.0.0"
wasmtime-environ = { path = "../environ" }
memmap = "0.7.0"

View File

@@ -8,7 +8,7 @@ categories = ["wasm"]
license = "Apache-2.0 WITH LLVM-exception"
[dependencies]
cranelift-codegen = "0.24.0"
cranelift-entity = "0.24.0"
cranelift-codegen = "0.25.0"
cranelift-entity = "0.25.0"
wasmtime-environ = { path = "../environ" }
faerie = "0.6.0"