diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-01 23:04:09 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-01 23:04:09 +0000 |
commit | 9aa2a527b532e31c77592cede3b38c018c83ac64 (patch) | |
tree | ea2c5431a7b645f4aba7d573086ada1109cbcdd1 /py/objfloat.c | |
parent | 7e5fb24e3bdd8a07e2c7f317ad44b62e85082547 (diff) |
py: Tidy up BINARY_OPs; negation done by special NOT bytecode.
IS_NOT and NOT_IN are now compiled to IS + NOT and IN + NOT, with a new
special NOT bytecode.
Diffstat (limited to 'py/objfloat.c')
-rw-r--r-- | py/objfloat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/py/objfloat.c b/py/objfloat.c index 9caeaf768..ed6260681 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -101,10 +101,10 @@ mp_obj_t mp_obj_float_binary_op(int op, mp_float_t lhs_val, mp_obj_t rhs_in) { case RT_BINARY_OP_TRUE_DIVIDE: case RT_BINARY_OP_INPLACE_TRUE_DIVIDE: lhs_val /= rhs_val; break; - case RT_COMPARE_OP_LESS: return MP_BOOL(lhs_val < rhs_val); - case RT_COMPARE_OP_MORE: return MP_BOOL(lhs_val > rhs_val); - case RT_COMPARE_OP_LESS_EQUAL: return MP_BOOL(lhs_val <= rhs_val); - case RT_COMPARE_OP_MORE_EQUAL: return MP_BOOL(lhs_val >= rhs_val); + case RT_BINARY_OP_LESS: return MP_BOOL(lhs_val < rhs_val); + case RT_BINARY_OP_MORE: return MP_BOOL(lhs_val > rhs_val); + case RT_BINARY_OP_LESS_EQUAL: return MP_BOOL(lhs_val <= rhs_val); + case RT_BINARY_OP_MORE_EQUAL: return MP_BOOL(lhs_val >= rhs_val); return NULL; // op not supported } |