-
- Downloads
py: Protect mp_parse and mp_compile with nlr push/pop block.
To enable parsing constants more efficiently, mp_parse should be allowed to raise an exception, and mp_compile can already raise a MemoryError. So these functions need to be protected by an nlr push/pop block. This patch adds that feature in all places. This allows to simplify how mp_parse and mp_compile are called: they now raise an exception if they have an error and so explicit checking is not needed anymore.
Showing
- bare-arm/main.c 3 additions, 22 deletionsbare-arm/main.c
- cc3200/mptask.c 0 additions, 1 deletioncc3200/mptask.c
- esp8266/main.c 0 additions, 1 deletionesp8266/main.c
- minimal/main.c 4 additions, 22 deletionsminimal/main.c
- py/compile.c 1 addition, 1 deletionpy/compile.c
- py/compile.h 1 addition, 0 deletionspy/compile.h
- py/parse.c 25 additions, 12 deletionspy/parse.c
- py/parse.h 3 additions, 9 deletionspy/parse.h
- py/parsehelper.c 0 additions, 87 deletionspy/parsehelper.c
- py/parsehelper.h 0 additions, 36 deletionspy/parsehelper.h
- py/py.mk 0 additions, 1 deletionpy/py.mk
- py/runtime.c 18 additions, 36 deletionspy/runtime.c
- qemu-arm/main.c 3 additions, 22 deletionsqemu-arm/main.c
- qemu-arm/test_main.c 3 additions, 20 deletionsqemu-arm/test_main.c
- stmhal/pyexec.c 8 additions, 31 deletionsstmhal/pyexec.c
- unix-cpy/main.c 1 addition, 16 deletionsunix-cpy/main.c
- unix/main.c 28 additions, 49 deletionsunix/main.c
Loading
Please register or sign in to comment