Add basic Dec operations

This commit is contained in:
Jared Ramirez 2021-06-25 10:25:03 -07:00
parent 0827123c88
commit ecb89da7b8
6 changed files with 190 additions and 22 deletions

View file

@ -5547,7 +5547,12 @@ fn build_dec_binop<'a, 'ctx, 'env>(
match op {
NumAdd => call_bitcode_fn(env, &[lhs, rhs], &bitcode::DEC_ADD),
_ => panic!("TODO: Add RocDec function for op"),
NumSub => call_bitcode_fn(env, &[lhs, rhs], &bitcode::DEC_SUB),
NumMul => call_bitcode_fn(env, &[lhs, rhs], &bitcode::DEC_MUL),
NumDivUnchecked => call_bitcode_fn(env, &[lhs, rhs], &bitcode::DEC_DIV),
_ => {
unreachable!("Unrecognized int binary operation: {:?}", op);
}
}
}