mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 11:40:18 +01:00
py: Add MP_BINARY_OP_DIVMOD to simplify and consolidate divmod builtin.
This commit is contained in:
2
py/vm.c
2
py/vm.c
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user