summaryrefslogtreecommitdiff
path: root/py/runtime0.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime0.h')
-rw-r--r--py/runtime0.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/py/runtime0.h b/py/runtime0.h
index a0f553a89..9edf7ec0e 100644
--- a/py/runtime0.h
+++ b/py/runtime0.h
@@ -4,7 +4,7 @@ typedef enum {
RT_UNARY_OP_POSITIVE,
RT_UNARY_OP_NEGATIVE,
RT_UNARY_OP_INVERT,
- // Used only for CPython-compatible codegeneration
+ // these are not supported by the runtime and must be synthesised by the emitter
RT_UNARY_OP_NOT,
} rt_unary_op_t;
@@ -34,18 +34,19 @@ typedef enum {
RT_BINARY_OP_INPLACE_TRUE_DIVIDE,
RT_BINARY_OP_INPLACE_MODULO,
RT_BINARY_OP_INPLACE_POWER,
- // TODO probably should rename these COMPARE->BINARY
- RT_COMPARE_OP_LESS,
- RT_COMPARE_OP_MORE,
- RT_COMPARE_OP_EQUAL,
- RT_COMPARE_OP_LESS_EQUAL,
- RT_COMPARE_OP_MORE_EQUAL,
- RT_COMPARE_OP_NOT_EQUAL,
- RT_COMPARE_OP_IN,
- RT_COMPARE_OP_NOT_IN,
- RT_COMPARE_OP_IS,
- RT_COMPARE_OP_IS_NOT,
- RT_COMPARE_OP_EXCEPTION_MATCH,
+ // these should return a bool
+ RT_BINARY_OP_LESS,
+ RT_BINARY_OP_MORE,
+ RT_BINARY_OP_EQUAL,
+ RT_BINARY_OP_LESS_EQUAL,
+ RT_BINARY_OP_MORE_EQUAL,
+ RT_BINARY_OP_NOT_EQUAL,
+ RT_BINARY_OP_IN,
+ RT_BINARY_OP_IS,
+ RT_BINARY_OP_EXCEPTION_MATCH,
+ // these are not supported by the runtime and must be synthesised by the emitter
+ RT_BINARY_OP_NOT_IN,
+ RT_BINARY_OP_IS_NOT,
} rt_binary_op_t;
typedef enum {