Update to wasmparser 0.11.2.

This commit is contained in:
Dan Gohman
2017-09-26 14:56:33 -07:00
parent 6ff681a90d
commit d13f29cfe4
2 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ license = "Apache-2.0"
name = "cton_wasm" name = "cton_wasm"
[dependencies] [dependencies]
wasmparser = "0.10.0" wasmparser = "0.11.2"
cretonne = { path = "../cretonne" } cretonne = { path = "../cretonne" }
cretonne-frontend = { path = "../frontend" } cretonne-frontend = { path = "../frontend" }

View File

@@ -88,7 +88,7 @@ pub fn parse_import_section(
} => { } => {
imports.push(Import::Global(Global { imports.push(Import::Global(Global {
ty: type_to_type(&ty.content_type).unwrap(), ty: type_to_type(&ty.content_type).unwrap(),
mutability: ty.mutability != 0, mutability: ty.mutable,
initializer: GlobalInit::Import(), initializer: GlobalInit::Import(),
})); }));
} }
@@ -185,7 +185,7 @@ pub fn parse_global_section(
let mut globals = Vec::new(); let mut globals = Vec::new();
loop { loop {
let (content_type, mutability) = match *parser.read() { 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, ParserState::EndSection => break,
ref s => return Err(SectionParsingError::WrongSectionContent(format!("{:?}", s))), ref s => return Err(SectionParsingError::WrongSectionContent(format!("{:?}", s))),
}; };
@@ -218,7 +218,7 @@ pub fn parse_global_section(
} }
let global = Global { let global = Global {
ty: type_to_type(&content_type).unwrap(), ty: type_to_type(&content_type).unwrap(),
mutability: mutability != 0, mutability: mutability,
initializer: initializer, initializer: initializer,
}; };
runtime.declare_global(global); runtime.declare_global(global);