stijn
803264bb17
py: Guard against redef of nlr_push with DEBUG + MICROPY_NLR_SETJMP.
10 years ago
Paul Sokolovsky
3077fbff26
nlr: Add even more optional debugging logging.
Has to be enabled by manual editing, but at least it's there, as debugging
NLR issues may be weird.
10 years ago
Paul Sokolovsky
e89cc13e5c
nlr: If DEBUG, guard against recursive nlr_push().
Pushing same NLR record twice would lead to "infinite loop" in nlr_jump
(but more realistically, it will crash as soon as NLR record on stack is
overwritten).
10 years ago
Damien George
b4b10fd350
py: Put all global state together in state structures.
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.
10 years ago
Damien George
8a2347723e
py: Move global variable nlr_top to one place, in a .c file.
This reduces dependency on assembler, and allows to consolidate global
variables in the future.
10 years ago
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022 .
10 years ago
Damien George
2399aa03b8
py: Add NLR support for xtensa CPU.
10 years ago
Damien George
7860c2a68a
py: Fix some macros defines; cleanup some includes.
10 years ago
Paul Sokolovsky
a96cc824bd
py: Support arm and thumb ARM ISAs, in addition to thumb2.
These changes were tested with QEMU, and by few people of real hardware.
11 years ago
Emmanuel Blot
bf3366a48b
Add missing “assert.h” file header inclusion from “nlr.h”
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Paul Sokolovsky
f54bcbf099
py, unix: Make "mpconfig.h" be first included, as other headers depend on it.
Specifically, nlr.h does.
11 years ago
Paul Sokolovsky
e908591baa
py: Abstract no-return attribute for functions a bit.
11 years ago
Paul Sokolovsky
851c856585
nlr.h: As we treat all warnings as errors, can't use #warning.
And this is not good.
11 years ago
Paul Sokolovsky
3a83b805fc
nlr: Add implementation using setjmp/longjmp.
Having an optimized asm implementation is good, but if we want portability,
that's it.
11 years ago
Damien George
26cf55ae05
Add a check for NULL nlr_top in nlr_jump.
If no nlr_buf has been pushed, and an nlr_jump is called, then control
is transferred to nlr_jump_fail (which should bail out with a fatal
error).
11 years ago
Damien George
ea13f407a3
py: Change nlr_jump to nlr_raise, to aid in debugging.
This does not affect code size or performance when debugging turned off.
To address issue #420 .
11 years ago
Damien George
4b34c76fd6
Changes to get unix/ port compiling on Cygwin.
11 years ago
Paul Sokolovsky
82a165d9be
nlr.h: Do proper arch selection, using the same tests as nlr*.S .
11 years ago
Damien
8b3a7c2237
Fix func decls with no arguments: () -> (void).
11 years ago
Damien
152568bcb6
NLR and Python exceptions work on the board.
11 years ago
Damien
ce89a21ea4
Implement basic exception framework, and simple for loop.
11 years ago