Skip to content

Commit 8edc2e4

Browse files
committed
py/runtime0: Add comments about unary/binary-op enums used in bytecode.
1 parent d36539d commit 8edc2e4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

py/runtime0.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#define MP_NATIVE_TYPE_PTR16 (0x06)
4343
#define MP_NATIVE_TYPE_PTR32 (0x07)
4444

45+
// Note: the first 7 of these are used in bytecode and changing
46+
// them requires changing the bytecode version.
4547
typedef enum {
4648
MP_UNARY_OP_BOOL, // __bool__
4749
MP_UNARY_OP_LEN, // __len__
@@ -54,6 +56,8 @@ typedef enum {
5456
MP_UNARY_OP_SIZEOF, // for sys.getsizeof()
5557
} mp_unary_op_t;
5658

59+
// Note: the first 35 of these are used in bytecode and changing
60+
// them requires changing the bytecode version.
5761
typedef enum {
5862
// Relational operations, should return a bool
5963
MP_BINARY_OP_LESS,

0 commit comments

Comments
 (0)