diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-06-30 05:17:25 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-06-30 05:17:25 +0100 |
| commit | b601d9574ad03a18d3eb476d631f547c7ea28243 (patch) | |
| tree | 9fceb779e8109b1c147f6c30fe9a24e9d2b19d22 /py/emit.h | |
| parent | 5813efd634a282caea3cca6e8448bda253f21c35 (diff) | |
py: Improvements to native emitter.
Native emitter can now compile try/except blocks using nlr_push/nlr_pop.
It probably only works for 1 level of exception handling. It doesn't
work on Thumb (only x64).
Native emitter can also handle some additional op codes.
With this patch, 198 tests now pass using "-X emit=native" option to
micropython.
Diffstat (limited to 'py/emit.h')
| -rw-r--r-- | py/emit.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -134,6 +134,11 @@ typedef struct _emit_method_table_t { void (*yield_value)(emit_t *emit); void (*yield_from)(emit_t *emit); + // these methods are used to control entry to/exit from an exception handler + // they may or may not emit code + void (*start_except_handler)(emit_t *emit); + void (*end_except_handler)(emit_t *emit); + #if MICROPY_EMIT_CPYTHON // these methods are only needed for emitcpy void (*load_const_verbatim_str)(emit_t *emit, const char *str); |
