mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
up
This commit is contained in:
parent
5dcd7febe7
commit
d0b9d8b7ff
6
benchmarks/sum.py
Normal file
6
benchmarks/sum.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
def f(n):
|
||||||
|
if n == 0:
|
||||||
|
return 0
|
||||||
|
return n + f(n-1)
|
||||||
|
|
||||||
|
assert f(900) == 405450
|
2
src/vm.h
2
src/vm.h
@ -897,7 +897,9 @@ inline PyObject* VM::_exec(){
|
|||||||
bool need_raise = false;
|
bool need_raise = false;
|
||||||
|
|
||||||
while(true){
|
while(true){
|
||||||
|
#if DEBUG_EXTRA_CHECK
|
||||||
if(frame->id < base_id) UNREACHABLE();
|
if(frame->id < base_id) UNREACHABLE();
|
||||||
|
#endif
|
||||||
try{
|
try{
|
||||||
if(need_raise){ need_raise = false; _raise(); }
|
if(need_raise){ need_raise = false; _raise(); }
|
||||||
PyObject* ret = run_frame(frame);
|
PyObject* ret = run_frame(frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user