py: Add MP_BINARY_OP_DIVMOD to simplify and consolidate divmod builtin.

This commit is contained in:
Damien George
2015-06-13 22:00:10 +01:00
parent 6f49520042
commit c5029bcbf3
10 changed files with 71 additions and 85 deletions

View File

@@ -1199,7 +1199,7 @@ yield:
} else if (ip[-1] < MP_BC_UNARY_OP_MULTI + 6) {
SET_TOP(mp_unary_op(ip[-1] - MP_BC_UNARY_OP_MULTI, TOP()));
DISPATCH();
} else if (ip[-1] < MP_BC_BINARY_OP_MULTI + 35) {
} else if (ip[-1] < MP_BC_BINARY_OP_MULTI + 36) {
mp_obj_t rhs = POP();
mp_obj_t lhs = TOP();
SET_TOP(mp_binary_op(ip[-1] - MP_BC_BINARY_OP_MULTI, lhs, rhs));