This commit is contained in:
blueloveTH 2023-04-09 19:06:19 +08:00
parent 5dcd7febe7
commit d0b9d8b7ff
2 changed files with 8 additions and 0 deletions

6
benchmarks/sum.py Normal file
View File

@ -0,0 +1,6 @@
def f(n):
if n == 0:
return 0
return n + f(n-1)
assert f(900) == 405450

View File

@ -897,7 +897,9 @@ inline PyObject* VM::_exec(){
bool need_raise = false;
while(true){
#if DEBUG_EXTRA_CHECK
if(frame->id < base_id) UNREACHABLE();
#endif
try{
if(need_raise){ need_raise = false; _raise(); }
PyObject* ret = run_frame(frame);