| Age | Commit message (Collapse) | Author |
|
This adds a new configuration option to print runtime warnings and errors to
stderr. On Unix, CPython prints warnings and unhandled exceptions to stderr,
so the unix port here is configured to use this option.
The unix port already printed unhandled exceptions on the main thread to
stderr. This patch fixes unhandled exceptions on other threads and warnings
(issue #2838) not printing on stderr.
Additionally, a couple tests needed to be fixed to handle this new behavior.
This is done by also capturing stderr when running tests.
|
|
It enables all the DEBUG_printf outputs in the py/ source code.
|
|
|
|
This patch changes mp_uint_t to size_t for the len argument of the
following public facing C functions:
mp_obj_tuple_get
mp_obj_list_get
mp_obj_get_array
These functions take a pointer to the len argument (to be filled in by the
function) and callers of these functions should update their code so the
type of len is changed to size_t. For ports that don't use nan-boxing
there should be no change in generate code because the size of the type
remains the same (word sized), and in a lot of cases there won't even be a
compiler warning if the type remains as mp_uint_t.
The reason for this change is to standardise on the use of size_t for
variables that count memory (or memory related) sizes/lengths. It helps
builds that use nan-boxing.
|
|
Saves 168 bytes on bare-arm.
|
|
Each threads needs to have its own private references to its current
locals/globals dicts, otherwise functions running within different
contexts (eg imported from different files) can behave very strangely.
|
|
It's more efficient using the system mutexs instead of synthetic ones with
a busy-wait loop. The system can do proper scheduling and blocking of the
threads waiting on the mutex.
|
|
Saves the following number of bytes of code space: 176 for bare-arm, 352
for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266.
|
|
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
|
|
One can instead lookup __name__ in the modules dict to get the value.
|
|
We rely on the port setting and adjusting the stack size so there is
enough room to recover from hitting the stack limit.
|
|
|
|
This makes the VM/runtime thread safe, at the cost of not being able to
run code in parallel.
|
|
So the underlying thread implementation can do any necessary bookkeeping.
|
|
|
|
|
|
|
|
|
|
Simply raises the SystemExit exception.
|
|
|
|
|
|
|