aboutsummaryrefslogtreecommitdiff
path: root/py/bc0.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-01 23:04:09 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-01 23:04:09 +0000
commit9aa2a527b532e31c77592cede3b38c018c83ac64 (patch)
treeea2c5431a7b645f4aba7d573086ada1109cbcdd1 /py/bc0.h
parent7e5fb24e3bdd8a07e2c7f317ad44b62e85082547 (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/bc0.h')
-rw-r--r--py/bc0.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/py/bc0.h b/py/bc0.h
index 37c0bf7bb..2c8c47bd2 100644
--- a/py/bc0.h
+++ b/py/bc0.h
@@ -63,8 +63,9 @@
#define MP_BC_POP_EXCEPT (0x55)
#define MP_BC_UNWIND_JUMP (0x56) // rel byte code offset, 16-bit signed, in excess; then a byte
-#define MP_BC_UNARY_OP (0x60) // byte
-#define MP_BC_BINARY_OP (0x61) // byte
+#define MP_BC_NOT (0x60)
+#define MP_BC_UNARY_OP (0x61) // byte
+#define MP_BC_BINARY_OP (0x62) // byte
#define MP_BC_BUILD_TUPLE (0x70) // uint
#define MP_BC_BUILD_LIST (0x71) // uint