summaryrefslogtreecommitdiff
path: root/py/stackctrl.c
AgeCommit message (Collapse)Author
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2018-07-11WIP: after merge; before testingDan Halbert
2017-12-11py/runtime: Move mp_exc_recursion_depth to runtime and rename to raise.Damien George
For consistency this helper function is renamed to match the other exception helpers, and moved to their location in runtime.c.
2017-11-29py: Annotate func defs with NORETURN when their corresp decls have it.Damien George
2017-10-24Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_mergeScott Shawcroft
This is prep for merging in the NRF5 pull request.
2017-10-04all: Remove inclusion of internal py header files.Damien George
Header files that are considered internal to the py core and should not normally be included directly are: py/nlr.h - internal nlr configuration and declarations py/bc0.h - contains bytecode macro definitions py/runtime0.h - contains basic runtime enums Instead, the top-level header files to include are one of: py/obj.h - includes runtime0.h and defines everything to use the mp_obj_t type py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h, and defines everything to use the general runtime support functions Additional, specific headers (eg py/objlist.h) can be included if needed.
2017-08-25Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in ↵Dan Halbert
development) master. cpx build compiles and loads and works in repl; test suite not run yet esp8266 not tested yet
2017-08-05Allow max stack checking to be used with -flto build by determining topDan Halbert
of stack in a different way.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-23Measure and report maximum stack usage. (#175)Dan Halbert
Add max stack usage tracking, visible via debug module ustack. Add separate cpp flag for enabling modules: MICROPY_DEBUG_MODULES
2017-06-20py: Change asm form to make minimal port happy.Scott Shawcroft
2017-06-04Fix broken mp_stack_check: force mp_stack_ctrl_init() and mp_stack_usage() ↵Dan Halbert
not to be inlined even with -flto
2017-02-24py: Fix recursion exception.Scott Shawcroft
2017-02-24Switch exception throwing to mp_raise helpers. It saves a little code space ↵Scott Shawcroft
each time to share the call.
2016-06-28py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George
2016-03-07py/stackctrl: Add mp_stack_set_top() to explicitly set stack top value.Paul Sokolovsky
Useful for embedded targets with fixed stack layout.
2015-04-03vm: Support strict stackless mode, with proper exception reporting.Paul Sokolovsky
I.e. in this mode, C stack will never be used to call a Python function, but if there's no free heap for a call, it will be reported as RuntimeError (as expected), not MemoryError.
2015-02-15stackctrl: Encode "recursion depth exceeded" message as qstr.Paul Sokolovsky
So corresponding exception can be thrown even under tight memory conditions.
2015-01-07py: Put all global state together in state structures.Damien George
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2014-12-10py: Fix function type: () -> (void).Damien George
2014-08-30py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.Damien George
Part of code cleanup, working towards resolving issue #50.
2014-07-01stackctrl: Add "mp_" prefix.Paul Sokolovsky
2014-06-27py: Add portable framework to query/check C stack usage.Paul Sokolovsky
Such mechanism is important to get stable Python functioning, because Python function calling is handled with C stack. The idea is to sprinkle STACK_CHECK() calls in places where there can be C recursion. TODO: Add more STACK_CHECK()'s.