diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:25:55 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:25:55 +0000 |
commit | 365274da13cc701e3e8f6c72a24dd4eb4083a88d (patch) | |
tree | 110170545eae9de4a584f08dd34d259cef0b70a0 /py/bc.h | |
parent | 0119fc7532c573bd596fb6173b4d36ef5260027a (diff) | |
parent | a6d53188b7db85af9dc93186e4f36b7009084ea6 (diff) |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py/bc.h')
-rw-r--r-- | py/bc.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -4,6 +4,16 @@ typedef enum { MP_VM_RETURN_EXCEPTION, } mp_vm_return_kind_t; +// Exception stack entry +typedef struct _mp_exc_stack { + const byte *handler; + // bit 0 is saved currently_in_except_block value + machine_uint_t val_sp; + // We might only have 2 interesting cases here: SETUP_EXCEPT & SETUP_FINALLY, + // consider storing it in bit 1 of val_sp. TODO: SETUP_WITH? + byte opcode; +} mp_exc_stack; + mp_vm_return_kind_t mp_execute_byte_code(const byte *code, const mp_obj_t *args, uint n_args, const mp_obj_t *args2, uint n_args2, uint n_state, mp_obj_t *ret); -mp_vm_return_kind_t mp_execute_byte_code_2(const byte *code_info, const byte **ip_in_out, mp_obj_t *fastn, mp_obj_t **sp_in_out); +mp_vm_return_kind_t mp_execute_byte_code_2(const byte *code_info, const byte **ip_in_out, mp_obj_t *fastn, mp_obj_t **sp_in_out, mp_exc_stack *exc_stack, mp_exc_stack **exc_sp_in_out, volatile mp_obj_t inject_exc); void mp_byte_code_print(const byte *code, int len); |