Update to Cranelift 0.25.
This commit is contained in:
@@ -18,10 +18,10 @@ name = "wasm2obj"
|
|||||||
path = "src/wasm2obj.rs"
|
path = "src/wasm2obj.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.24.0"
|
cranelift-codegen = "0.25.0"
|
||||||
cranelift-native = "0.24.0"
|
cranelift-native = "0.25.0"
|
||||||
cranelift-entity = "0.24.0"
|
cranelift-entity = "0.25.0"
|
||||||
cranelift-wasm = "0.24.0"
|
cranelift-wasm = "0.25.0"
|
||||||
wasmtime-environ = { path = "lib/environ" }
|
wasmtime-environ = { path = "lib/environ" }
|
||||||
wasmtime-execute = { path = "lib/execute" }
|
wasmtime-execute = { path = "lib/execute" }
|
||||||
wasmtime-obj = { path = "lib/obj" }
|
wasmtime-obj = { path = "lib/obj" }
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ cargo-fuzz = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
wasmtime-environ = { path = "../lib/environ" }
|
wasmtime-environ = { path = "../lib/environ" }
|
||||||
wasmtime-execute = { path = "../lib/execute" }
|
wasmtime-execute = { path = "../lib/execute" }
|
||||||
cranelift-codegen = "0.24.0"
|
cranelift-codegen = "0.25.0"
|
||||||
cranelift-wasm = "0.24.0"
|
cranelift-wasm = "0.25.0"
|
||||||
cranelift-native = "0.24.0"
|
cranelift-native = "0.25.0"
|
||||||
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
|
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
|
||||||
wasmparser = { version = "0.22.0", default-features = false }
|
wasmparser = { version = "0.22.0", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ license = "Apache-2.0 WITH LLVM-exception"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.24.0"
|
cranelift-codegen = "0.25.0"
|
||||||
cranelift-entity = "0.24.0"
|
cranelift-entity = "0.25.0"
|
||||||
cranelift-wasm = "0.24.0"
|
cranelift-wasm = "0.25.0"
|
||||||
memoffset = "0.2.1"
|
memoffset = "0.2.1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ pub struct ModuleEnvironment<'data, 'module> {
|
|||||||
|
|
||||||
/// References to information to be decoded later.
|
/// References to information to be decoded later.
|
||||||
pub lazy: LazyContents<'data>,
|
pub lazy: LazyContents<'data>,
|
||||||
|
|
||||||
/// The ISA's target front-end configuration.
|
|
||||||
frontend_config: isa::TargetFrontendConfig,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'data, 'module> ModuleEnvironment<'data, 'module> {
|
impl<'data, 'module> ModuleEnvironment<'data, 'module> {
|
||||||
@@ -46,7 +43,6 @@ impl<'data, 'module> ModuleEnvironment<'data, 'module> {
|
|||||||
isa,
|
isa,
|
||||||
module,
|
module,
|
||||||
lazy: LazyContents::new(),
|
lazy: LazyContents::new(),
|
||||||
frontend_config: isa.frontend_config(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,8 +144,8 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
|
|||||||
get_func_name(func_index)
|
get_func_name(func_index)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn target_config(&self) -> &isa::TargetFrontendConfig {
|
fn target_config(&self) -> isa::TargetFrontendConfig {
|
||||||
&self.frontend_config
|
self.isa.frontend_config()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn declare_signature(&mut self, sig: &ir::Signature) {
|
fn declare_signature(&mut self, sig: &ir::Signature) {
|
||||||
@@ -191,6 +187,10 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
|
|||||||
self.module.functions[func_index]
|
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) {
|
fn declare_global(&mut self, global: Global) {
|
||||||
self.module.globals.push(global);
|
self.module.globals.push(global);
|
||||||
}
|
}
|
||||||
@@ -199,6 +199,10 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
|
|||||||
&self.module.globals[global_index]
|
&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) {
|
fn declare_table(&mut self, table: Table) {
|
||||||
self.module.tables.push(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) {
|
fn declare_memory(&mut self, memory: Memory) {
|
||||||
self.module.memories.push(memory);
|
self.module.memories.push(memory);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ license = "Apache-2.0 WITH LLVM-exception"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.24.0"
|
cranelift-codegen = "0.25.0"
|
||||||
cranelift-entity = "0.24.0"
|
cranelift-entity = "0.25.0"
|
||||||
cranelift-wasm = "0.24.0"
|
cranelift-wasm = "0.25.0"
|
||||||
region = "1.0.0"
|
region = "1.0.0"
|
||||||
wasmtime-environ = { path = "../environ" }
|
wasmtime-environ = { path = "../environ" }
|
||||||
memmap = "0.7.0"
|
memmap = "0.7.0"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ categories = ["wasm"]
|
|||||||
license = "Apache-2.0 WITH LLVM-exception"
|
license = "Apache-2.0 WITH LLVM-exception"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.24.0"
|
cranelift-codegen = "0.25.0"
|
||||||
cranelift-entity = "0.24.0"
|
cranelift-entity = "0.25.0"
|
||||||
wasmtime-environ = { path = "../environ" }
|
wasmtime-environ = { path = "../environ" }
|
||||||
faerie = "0.6.0"
|
faerie = "0.6.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user