Update to cranelift 0.18.1.

This commit is contained in:
Dan Gohman
2018-08-02 20:50:28 -07:00
parent c7c94a3786
commit 753d650f1a
6 changed files with 23 additions and 18 deletions

View File

@@ -17,11 +17,11 @@ name = "wasm2obj"
path = "src/wasm2obj.rs"
[dependencies]
cranelift-codegen = "0.16.1"
cranelift-frontend = "0.16.1"
cranelift-reader = "0.16.1"
cranelift-wasm = "0.16.1"
cranelift-native = "0.16.1"
cranelift-codegen = "0.18.1"
cranelift-frontend = "0.18.1"
cranelift-reader = "0.18.1"
cranelift-wasm = "0.18.1"
cranelift-native = "0.18.1"
wasmtime-runtime = { path = "lib/runtime" }
wasmtime-execute = { path = "lib/execute" }
wasmtime-obj = { path = "lib/obj" }

View File

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

View File

@@ -8,7 +8,7 @@ repository = "https://github.com/sunfishcode/wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
[dependencies]
cranelift-codegen = "0.16.1"
cranelift-wasm = "0.16.1"
cranelift-codegen = "0.18.1"
cranelift-wasm = "0.18.1"
region = "0.3.0"
wasmtime-runtime = { path = "../runtime" }

View File

@@ -6,7 +6,7 @@ publish = false
license = "Apache-2.0 WITH LLVM-exception"
[dependencies]
cranelift-codegen = "0.16.1"
cranelift-wasm = "0.16.1"
cranelift-codegen = "0.18.1"
cranelift-wasm = "0.18.1"
wasmtime-runtime = { path = "../runtime" }
faerie = "0.4.4"

View File

@@ -8,7 +8,7 @@ repository = "https://github.com/sunfishcode/wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
[dependencies]
cranelift-codegen = "0.16.1"
cranelift-wasm = "0.16.1"
cranelift-codegen = "0.18.1"
cranelift-wasm = "0.18.1"
wasmparser = "0.17.2"
target-lexicon = "0.0.3"

View File

@@ -166,9 +166,9 @@ impl<'data, 'module> ModuleEnvironment<'data, 'module> {
FuncEnvironment::new(self.isa, &self.module)
}
fn native_pointer(&self) -> ir::Type {
fn pointer_type(&self) -> ir::Type {
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
@@ -282,7 +282,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
offset: Offset32::new(0),
});
func.create_heap(ir::HeapData {
base: ir::HeapBase::GlobalValue(heap_base),
base: heap_base,
min_size: 0.into(),
guard_size: 0x8000_0000.into(),
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 {
func.import_signature(self.module.signatures[index].clone())
}
@@ -313,6 +317,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
&mut self,
mut pos: FuncCursor,
table_index: TableIndex,
_table: ir::Table,
_sig_index: SignatureIndex,
sig_ref: ir::SigRef,
callee: ir::Value,
@@ -414,7 +419,7 @@ impl<'data, 'module> cranelift_wasm::ModuleEnvironment<'data>
fn declare_signature(&mut self, sig: &ir::Signature) {
let mut sig = sig.clone();
sig.params.push(AbiParam {
value_type: self.native_pointer(),
value_type: self.pointer_type(),
purpose: ArgumentPurpose::VMContext,
extension: ArgumentExtension::None,
location: ArgumentLoc::Unassigned,