diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 13d7c8c5d5..31a90762db 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["webassembly", "wasm"] [dependencies] -wasmparser = { version = "0.21.4", default-features = false } +wasmparser = { version = "0.22.0", default-features = false } cranelift-codegen = { path = "../codegen", version = "0.24.0", default-features = false } cranelift-entity = { path = "../entity", version = "0.24.0", default-features = false } cranelift-frontend = { path = "../frontend", version = "0.24.0", default-features = false } diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 8d5fee979a..8a270e687e 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -253,7 +253,7 @@ pub fn translate_operator( } Operator::BrIf { relative_depth } => translate_br_if(relative_depth, builder, state), Operator::BrTable { table } => { - let (depths, default) = table.read_table(); + let (depths, default) = table.read_table()?; let mut min_depth = default; for depth in &*depths { if *depth < min_depth { diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index 1fbb41fcd6..bab2ac1f90 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -19,8 +19,8 @@ use translation_utils::{ use wasmparser::{ self, CodeSectionReader, Data, DataSectionReader, Element, ElementSectionReader, Export, ExportSectionReader, ExternalKind, FuncType, FunctionSectionReader, GlobalSectionReader, - GlobalType, Import, ImportSectionEntryType, ImportSectionReader, MemorySectionReader, - MemoryType, Operator, TableSectionReader, TypeSectionReader, + GlobalType, ImportSectionEntryType, ImportSectionReader, MemorySectionReader, MemoryType, + Operator, TableSectionReader, TypeSectionReader, }; /// Parses the Type section of the wasm module.