Add i32 literals support.

This commit is contained in:
Sergey Pepyakin
2018-12-11 20:12:55 +01:00
parent 0e9ba8332f
commit e02dbf1bc2
3 changed files with 26 additions and 1 deletions

View File

@@ -217,6 +217,9 @@ pub fn translate(
Operator::GetLocal { local_index } => {
get_local_i32(&mut ctx, local_index);
}
Operator::I32Const { value } => {
literal_i32(&mut ctx, value);
}
Operator::Call { function_index } => {
let callee_ty = translation_ctx.func_type(function_index);
assert!(callee_ty.returns.len() == 0, "is not supported");