Update parity-wasm

Bring in some support for bulk-memory-operations instructions
This commit is contained in:
Alex Crichton
2018-10-16 13:53:17 -07:00
parent 995aefa87e
commit a4a2ec605d
7 changed files with 27 additions and 15 deletions

View File

@ -13,7 +13,7 @@ Shared support for the wasm-bindgen-cli package, an internal dependency
[dependencies]
base64 = "0.9"
failure = "0.1.2"
parity-wasm = "0.34"
parity-wasm = "0.35"
tempfile = "3.0"
wasm-bindgen-shared = { path = "../shared", version = '=0.2.25' }
wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.25' }

View File

@ -153,8 +153,9 @@ impl ClosureDescriptors {
let to_remove = remove.get(&i).unwrap_or(&empty);
let mut current = Vec::new();
assert_eq!(entry.offset().code().len(), 2);
let mut offset = match entry.offset().code()[0] {
let offset = entry.offset().as_ref().unwrap();
assert_eq!(offset.code().len(), 2);
let mut offset = match offset.code()[0] {
Instruction::I32Const(x) => x,
_ => unreachable!(),
};
@ -172,7 +173,7 @@ impl ClosureDescriptors {
let members = mem::replace(&mut current, Vec::new());
let offset =
InitExpr::new(vec![Instruction::I32Const(offset), Instruction::End]);
let new_entry = ElementSegment::new(0, offset, members);
let new_entry = ElementSegment::new(0, Some(offset), members, false);
elements.entries_mut().push(new_entry);
}
offset = next_offset;
@ -180,7 +181,7 @@ impl ClosureDescriptors {
// Any remaining function table entries get pushed at the end.
if current.len() > 0 {
let offset = InitExpr::new(vec![Instruction::I32Const(offset), Instruction::End]);
let new_entry = ElementSegment::new(0, offset, current);
let new_entry = ElementSegment::new(0, Some(offset), current, false);
elements.entries_mut().push(new_entry);
}
}