summaryrefslogtreecommitdiffstatshomepage
path: root/py/showbc.c
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/showbc.c
parent7e5fb24e3bdd8a07e2c7f317ad44b62e85082547 (diff)
downloadmicropython-9aa2a527b532e31c77592cede3b38c018c83ac64.tar.gz
micropython-9aa2a527b532e31c77592cede3b38c018c83ac64.zip
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/showbc.c')
-rw-r--r--py/showbc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/py/showbc.c b/py/showbc.c
index 4c19a6becc..d765c81a5f 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -263,12 +263,14 @@ void mp_byte_code_print(const byte *ip, int len) {
printf("POP_EXCEPT");
break;
- /*
+ case MP_BC_NOT:
+ printf("NOT");
+ break;
+
case MP_BC_UNARY_OP:
unum = *ip++;
- *sp = rt_unary_op(unum, *sp);
+ printf("UNARY_OP " UINT_FMT, unum);
break;
- */
case MP_BC_BINARY_OP:
unum = *ip++;