Update to cranelift 0.18.1.
This commit is contained in:
10
Cargo.toml
10
Cargo.toml
@@ -17,11 +17,11 @@ name = "wasm2obj"
|
|||||||
path = "src/wasm2obj.rs"
|
path = "src/wasm2obj.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.16.1"
|
cranelift-codegen = "0.18.1"
|
||||||
cranelift-frontend = "0.16.1"
|
cranelift-frontend = "0.18.1"
|
||||||
cranelift-reader = "0.16.1"
|
cranelift-reader = "0.18.1"
|
||||||
cranelift-wasm = "0.16.1"
|
cranelift-wasm = "0.18.1"
|
||||||
cranelift-native = "0.16.1"
|
cranelift-native = "0.18.1"
|
||||||
wasmtime-runtime = { path = "lib/runtime" }
|
wasmtime-runtime = { path = "lib/runtime" }
|
||||||
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-runtime = { path = "../lib/runtime" }
|
wasmtime-runtime = { path = "../lib/runtime" }
|
||||||
wasmtime-execute = { path = "../lib/execute" }
|
wasmtime-execute = { path = "../lib/execute" }
|
||||||
cranelift-codegen = "0.16.1"
|
cranelift-codegen = "0.18.1"
|
||||||
cranelift-wasm = "0.16.1"
|
cranelift-wasm = "0.18.1"
|
||||||
cranelift-native = "0.16.1"
|
cranelift-native = "0.18.1"
|
||||||
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.17.2", default-features = false }
|
wasmparser = { version = "0.17.2", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ repository = "https://github.com/sunfishcode/wasmtime"
|
|||||||
license = "Apache-2.0 WITH LLVM-exception"
|
license = "Apache-2.0 WITH LLVM-exception"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.16.1"
|
cranelift-codegen = "0.18.1"
|
||||||
cranelift-wasm = "0.16.1"
|
cranelift-wasm = "0.18.1"
|
||||||
region = "0.3.0"
|
region = "0.3.0"
|
||||||
wasmtime-runtime = { path = "../runtime" }
|
wasmtime-runtime = { path = "../runtime" }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ publish = false
|
|||||||
license = "Apache-2.0 WITH LLVM-exception"
|
license = "Apache-2.0 WITH LLVM-exception"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.16.1"
|
cranelift-codegen = "0.18.1"
|
||||||
cranelift-wasm = "0.16.1"
|
cranelift-wasm = "0.18.1"
|
||||||
wasmtime-runtime = { path = "../runtime" }
|
wasmtime-runtime = { path = "../runtime" }
|
||||||
faerie = "0.4.4"
|
faerie = "0.4.4"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ repository = "https://github.com/sunfishcode/wasmtime"
|
|||||||
license = "Apache-2.0 WITH LLVM-exception"
|
license = "Apache-2.0 WITH LLVM-exception"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.16.1"
|
cranelift-codegen = "0.18.1"
|
||||||
cranelift-wasm = "0.16.1"
|
cranelift-wasm = "0.18.1"
|
||||||
wasmparser = "0.17.2"
|
wasmparser = "0.17.2"
|
||||||
target-lexicon = "0.0.3"
|
target-lexicon = "0.0.3"
|
||||||
|
|||||||
@@ -166,9 +166,9 @@ impl<'data, 'module> ModuleEnvironment<'data, 'module> {
|
|||||||
FuncEnvironment::new(self.isa, &self.module)
|
FuncEnvironment::new(self.isa, &self.module)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn native_pointer(&self) -> ir::Type {
|
fn pointer_type(&self) -> ir::Type {
|
||||||
use cranelift_wasm::FuncEnvironment;
|
use cranelift_wasm::FuncEnvironment;
|
||||||
self.func_env().native_pointer()
|
self.func_env().pointer_type()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Declare that translation of the module is complete. This consumes the
|
/// Declare that translation of the module is complete. This consumes the
|
||||||
@@ -282,7 +282,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
|
|||||||
offset: Offset32::new(0),
|
offset: Offset32::new(0),
|
||||||
});
|
});
|
||||||
func.create_heap(ir::HeapData {
|
func.create_heap(ir::HeapData {
|
||||||
base: ir::HeapBase::GlobalValue(heap_base),
|
base: heap_base,
|
||||||
min_size: 0.into(),
|
min_size: 0.into(),
|
||||||
guard_size: 0x8000_0000.into(),
|
guard_size: 0x8000_0000.into(),
|
||||||
style: ir::HeapStyle::Static {
|
style: ir::HeapStyle::Static {
|
||||||
@@ -291,6 +291,10 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn make_table(&mut self, _func: &mut ir::Function, _index: TableIndex) -> ir::Table {
|
||||||
|
unimplemented!("make_table");
|
||||||
|
}
|
||||||
|
|
||||||
fn make_indirect_sig(&mut self, func: &mut ir::Function, index: SignatureIndex) -> ir::SigRef {
|
fn make_indirect_sig(&mut self, func: &mut ir::Function, index: SignatureIndex) -> ir::SigRef {
|
||||||
func.import_signature(self.module.signatures[index].clone())
|
func.import_signature(self.module.signatures[index].clone())
|
||||||
}
|
}
|
||||||
@@ -313,6 +317,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
|
|||||||
&mut self,
|
&mut self,
|
||||||
mut pos: FuncCursor,
|
mut pos: FuncCursor,
|
||||||
table_index: TableIndex,
|
table_index: TableIndex,
|
||||||
|
_table: ir::Table,
|
||||||
_sig_index: SignatureIndex,
|
_sig_index: SignatureIndex,
|
||||||
sig_ref: ir::SigRef,
|
sig_ref: ir::SigRef,
|
||||||
callee: ir::Value,
|
callee: ir::Value,
|
||||||
@@ -414,7 +419,7 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
|
|||||||
fn declare_signature(&mut self, sig: &ir::Signature) {
|
fn declare_signature(&mut self, sig: &ir::Signature) {
|
||||||
let mut sig = sig.clone();
|
let mut sig = sig.clone();
|
||||||
sig.params.push(AbiParam {
|
sig.params.push(AbiParam {
|
||||||
value_type: self.native_pointer(),
|
value_type: self.pointer_type(),
|
||||||
purpose: ArgumentPurpose::VMContext,
|
purpose: ArgumentPurpose::VMContext,
|
||||||
extension: ArgumentExtension::None,
|
extension: ArgumentExtension::None,
|
||||||
location: ArgumentLoc::Unassigned,
|
location: ArgumentLoc::Unassigned,
|
||||||
|
|||||||
Reference in New Issue
Block a user