Update cranelift to 0.59.0

This commit is contained in:
Nick Fitzgerald
2020-02-24 14:16:48 -08:00
parent d4fcd32cdc
commit de4ad31cbd
9 changed files with 52 additions and 35 deletions

View File

@@ -13,10 +13,10 @@ edition = "2018"
[dependencies]
anyhow = "1.0"
cranelift-codegen = { version = "0.58.0", features = ["enable-serde"] }
cranelift-entity = { version = "0.58.0", features = ["enable-serde"] }
cranelift-wasm = { version = "0.58.0", features = ["enable-serde"] }
wasmparser = "0.51.0"
cranelift-codegen = { version = "0.59.0", features = ["enable-serde"] }
cranelift-entity = { version = "0.59.0", features = ["enable-serde"] }
cranelift-wasm = { version = "0.59.0", features = ["enable-serde"] }
wasmparser = "0.51.2"
lightbeam = { path = "../lightbeam", optional = true, version = "0.9.0" }
indexmap = "1.0.2"
rayon = "1.2.1"
@@ -44,7 +44,7 @@ tempfile = "3"
target-lexicon = { version = "0.10.0", default-features = false }
pretty_env_logger = "0.3.0"
rand = { version = "0.7.0", default-features = false, features = ["small_rng"] }
cranelift-codegen = { version = "0.58.0", features = ["enable-serde", "all-arch"] }
cranelift-codegen = { version = "0.59.0", features = ["enable-serde", "all-arch"] }
filetime = "0.2.7"
lazy_static = "1.3.0"

View File

@@ -7,7 +7,8 @@ use cranelift_codegen::isa::TargetFrontendConfig;
use cranelift_entity::PrimaryMap;
use cranelift_wasm::{
self, translate_module, DefinedFuncIndex, FuncIndex, Global, GlobalIndex, Memory, MemoryIndex,
ModuleTranslationState, SignatureIndex, Table, TableIndex, TargetEnvironment, WasmResult,
ModuleTranslationState, PassiveDataIndex, PassiveElemIndex, SignatureIndex, Table, TableIndex,
TargetEnvironment, WasmError, WasmResult,
};
use std::convert::TryFrom;
@@ -324,6 +325,16 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
Ok(())
}
fn declare_passive_element(
&mut self,
_: PassiveElemIndex,
_: Box<[FuncIndex]>,
) -> WasmResult<()> {
Err(WasmError::Unsupported(
"bulk memory: passive element segment".into(),
))
}
fn define_function_body(
&mut self,
_module_translation: &ModuleTranslationState,
@@ -362,6 +373,12 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
Ok(())
}
fn declare_passive_data(&mut self, _: PassiveDataIndex, _: &'data [u8]) -> WasmResult<()> {
Err(WasmError::Unsupported(
"bulk memory: passive data segment".into(),
))
}
fn declare_func_name(&mut self, func_index: FuncIndex, name: &'data str) -> WasmResult<()> {
self.result
.module