summaryrefslogtreecommitdiffstatshomepage
path: root/py/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/py/vm.c b/py/vm.c
index 748e0e935b..1d47076dfb 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -428,6 +428,14 @@ unwind_jump:
//sp -= 3; // pop 3 exception values
break;
+ case MP_BC_NOT:
+ if (TOP() == mp_const_true) {
+ SET_TOP(mp_const_false);
+ } else {
+ SET_TOP(mp_const_true);
+ }
+ break;
+
case MP_BC_UNARY_OP:
unum = *ip++;
SET_TOP(rt_unary_op(unum, TOP()));