summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-09-22 11:54:08 +1000
committerDamien George <damien.p.george@gmail.com>2017-09-22 11:54:08 +1000
commit8edc2e4b141ffad74754686fbdc66e033ff24f34 (patch)
tree80d80297c2833073b87054dbae03f8b488c65cd4
parentd36539df06863cd83fc3a475c7b6f04d20095967 (diff)
downloadmicropython-8edc2e4b141ffad74754686fbdc66e033ff24f34.tar.gz
micropython-8edc2e4b141ffad74754686fbdc66e033ff24f34.zip
py/runtime0: Add comments about unary/binary-op enums used in bytecode.
-rw-r--r--py/runtime0.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/runtime0.h b/py/runtime0.h
index 54bf192d33..6d77cce68e 100644
--- a/py/runtime0.h
+++ b/py/runtime0.h
@@ -42,6 +42,8 @@
#define MP_NATIVE_TYPE_PTR16 (0x06)
#define MP_NATIVE_TYPE_PTR32 (0x07)
+// Note: the first 7 of these are used in bytecode and changing
+// them requires changing the bytecode version.
typedef enum {
MP_UNARY_OP_BOOL, // __bool__
MP_UNARY_OP_LEN, // __len__
@@ -54,6 +56,8 @@ typedef enum {
MP_UNARY_OP_SIZEOF, // for sys.getsizeof()
} mp_unary_op_t;
+// Note: the first 35 of these are used in bytecode and changing
+// them requires changing the bytecode version.
typedef enum {
// Relational operations, should return a bool
MP_BINARY_OP_LESS,