summaryrefslogtreecommitdiffstatshomepage
path: root/py/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/py/vm.c b/py/vm.c
index 291e707c1f..dc4f9c2739 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -880,6 +880,12 @@ unwind_jump:;
nlr_pop();
goto run_code_state;
}
+ #if MICROPY_STACKLESS_STRICT
+ else {
+ deep_recursion_error:
+ mp_exc_recursion_depth();
+ }
+ #endif
}
#endif
SET_TOP(mp_call_function_n_kw(*sp, unum & 0xff, (unum >> 8) & 0xff, sp + 1));
@@ -912,6 +918,11 @@ unwind_jump:;
nlr_pop();
goto run_code_state;
}
+ #if MICROPY_STACKLESS_STRICT
+ else {
+ goto deep_recursion_error;
+ }
+ #endif
}
#endif
SET_TOP(mp_call_method_n_kw_var(false, unum, sp));
@@ -941,6 +952,11 @@ unwind_jump:;
nlr_pop();
goto run_code_state;
}
+ #if MICROPY_STACKLESS_STRICT
+ else {
+ goto deep_recursion_error;
+ }
+ #endif
}
#endif
SET_TOP(mp_call_method_n_kw(unum & 0xff, (unum >> 8) & 0xff, sp));
@@ -973,6 +989,11 @@ unwind_jump:;
nlr_pop();
goto run_code_state;
}
+ #if MICROPY_STACKLESS_STRICT
+ else {
+ goto deep_recursion_error;
+ }
+ #endif
}
#endif
SET_TOP(mp_call_method_n_kw_var(true, unum, sp));