summaryrefslogtreecommitdiff
path: root/py/vm.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-02-15 16:50:02 +1100
committerDamien George <damien.p.george@gmail.com>2018-02-15 16:50:02 +1100
commit73d1d20b46dda54340ad2819b865f47ca25f4850 (patch)
tree64cd0a93d6874531c914bcedbccfae52e2c0566e /py/vm.c
parentd966a334869760215c19378d009800aeaaa1baec (diff)
py/objexcept: Remove long-obsolete mp_const_MemoryError_obj.
This constant exception instance was once used by m_malloc_fail() to raise a MemoryError without allocating memory, but it was made obsolete long ago by 3556e45711c3b7ec712748d013e678d035185bdd. The functionality is now replaced by the use of mp_emergency_exception_obj which lives in the global uPy state, and which can handle any exception type, not just MemoryError.
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/py/vm.c b/py/vm.c
index c629a61e2..ceb2060f9 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -1374,8 +1374,7 @@ unwind_loop:
// set file and line number that the exception occurred at
// TODO: don't set traceback for exceptions re-raised by END_FINALLY.
// But consider how to handle nested exceptions.
- // TODO need a better way of not adding traceback to constant objects (right now, just GeneratorExit_obj and MemoryError_obj)
- if (nlr.ret_val != &mp_const_GeneratorExit_obj && nlr.ret_val != &mp_const_MemoryError_obj) {
+ if (nlr.ret_val != &mp_const_GeneratorExit_obj) {
const byte *ip = code_state->fun_bc->bytecode;
ip = mp_decode_uint_skip(ip); // skip n_state
ip = mp_decode_uint_skip(ip); // skip n_exc_stack