diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 1bd44219c7..97c63ff367 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -11,7 +11,7 @@ license = "Apache-2.0" name = "cton_wasm" [dependencies] -wasmparser = "0.10.0" +wasmparser = "0.11.2" cretonne = { path = "../cretonne" } cretonne-frontend = { path = "../frontend" } diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index 08f05eca79..7c0f794b3e 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -88,7 +88,7 @@ pub fn parse_import_section( } => { imports.push(Import::Global(Global { ty: type_to_type(&ty.content_type).unwrap(), - mutability: ty.mutability != 0, + mutability: ty.mutable, initializer: GlobalInit::Import(), })); } @@ -185,7 +185,7 @@ pub fn parse_global_section( let mut globals = Vec::new(); loop { let (content_type, mutability) = match *parser.read() { - ParserState::BeginGlobalSectionEntry(ref ty) => (ty.content_type, ty.mutability), + ParserState::BeginGlobalSectionEntry(ref ty) => (ty.content_type, ty.mutable), ParserState::EndSection => break, ref s => return Err(SectionParsingError::WrongSectionContent(format!("{:?}", s))), }; @@ -218,7 +218,7 @@ pub fn parse_global_section( } let global = Global { ty: type_to_type(&content_type).unwrap(), - mutability: mutability != 0, + mutability: mutability, initializer: initializer, }; runtime.declare_global(global);