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.
This commit is contained in:
Damien George
2014-02-01 23:04:09 +00:00
parent 7e5fb24e3b
commit 9aa2a527b5
17 changed files with 144 additions and 135 deletions

View File

@@ -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