Update for new wasmparser.rs version.

This commit is contained in:
Nick Lewycky
2019-07-01 16:11:38 -07:00
parent 35c2325571
commit 9fc713f9b1
3 changed files with 27 additions and 12 deletions

View File

@ -29,7 +29,7 @@ use wasmer_runtime_core::{
},
vm::{self, LocalGlobal, LocalTable, INTERNALS_SIZE},
};
use wasmparser::{Operator, Type as WpType};
use wasmparser::{Operator, Type as WpType, TypeOrFuncType as WpTypeOrFuncType};
lazy_static! {
/// Performs a System V call to `target` with [stack_top..stack_base] as the argument list, from right to left.
@ -3335,8 +3335,9 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
loop_like: false,
if_else: IfElseState::If(label_else),
returns: match ty {
WpType::EmptyBlockType => smallvec![],
_ => smallvec![ty],
WpTypeOrFuncType::Type(WpType::EmptyBlockType) => smallvec![],
WpTypeOrFuncType::Type(inner_ty) => smallvec![inner_ty],
_ => panic!("multi-value returns not yet implemented"),
},
value_stack_depth: self.value_stack.len(),
});
@ -3434,8 +3435,9 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
loop_like: false,
if_else: IfElseState::None,
returns: match ty {
WpType::EmptyBlockType => smallvec![],
_ => smallvec![ty],
WpTypeOrFuncType::Type(WpType::EmptyBlockType) => smallvec![],
WpTypeOrFuncType::Type(inner_ty) => smallvec![inner_ty],
_ => panic!("multi-value returns not yet implemented"),
},
value_stack_depth: self.value_stack.len(),
});
@ -3447,8 +3449,9 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
loop_like: true,
if_else: IfElseState::None,
returns: match ty {
WpType::EmptyBlockType => smallvec![],
_ => smallvec![ty],
WpTypeOrFuncType::Type(WpType::EmptyBlockType) => smallvec![],
WpTypeOrFuncType::Type(inner_ty) => smallvec![inner_ty],
_ => panic!("multi-value returns not yet implemented"),
},
value_stack_depth: self.value_stack.len(),
});