summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-04-04 00:46:31 +1000
committerDamien George <damien.p.george@gmail.com>2018-04-04 00:46:31 +1000
commitc7f880eda38783817bd490b8f2f0b60412c3b73c (patch)
treebf330e4d844033bb7a91e2d1169a9c4997f598b0 /py
parentbcfff4fc98a73c5ad9b7d3e338649955e861ada4 (diff)
py/vm: Don't do unnecessary updates of ip and sp variables.
Neither the ip nor sp variables are used again after the execution of the RAISE_VARARGS opcode, so they don't need to be updated.
Diffstat (limited to 'py')
-rw-r--r--py/vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/vm.c b/py/vm.c
index 2a8e3c990..7b3a0b324 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -1118,7 +1118,7 @@ unwind_return:
ENTRY(MP_BC_RAISE_VARARGS): {
MARK_EXC_IP_SELECTIVE();
- mp_uint_t unum = *ip++;
+ mp_uint_t unum = *ip;
mp_obj_t obj;
if (unum == 2) {
mp_warning("exception chaining not supported");
@@ -1139,7 +1139,7 @@ unwind_return:
RAISE(obj);
}
} else {
- obj = POP();
+ obj = TOP();
}
obj = mp_make_raise_obj(obj);
RAISE(obj);