diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-03-28 01:14:44 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-03 00:03:07 +0300 |
commit | 2039757b854b656a41c9e041776ccd5dad8ec5fe (patch) | |
tree | 2450c1e129651c27cb5579bb26a288a841c70c70 /py/bc.h | |
parent | f88eec0de24277e8713ebdfe34e1e7b852a25731 (diff) |
vm: Initial support for calling bytecode functions w/o C stack ("stackless").
Diffstat (limited to 'py/bc.h')
-rw-r--r-- | py/bc.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -46,6 +46,9 @@ typedef struct _mp_code_state { // bit 0 is saved currently_in_except_block value mp_exc_stack_t *exc_sp; mp_obj_dict_t *old_globals; + #if MICROPY_STACKLESS + struct _mp_code_state *prev; + #endif mp_uint_t n_state; // Variable-length mp_obj_t state[0]; @@ -56,6 +59,7 @@ typedef struct _mp_code_state { mp_uint_t mp_decode_uint(const byte **ptr); mp_vm_return_kind_t mp_execute_bytecode(mp_code_state *code_state, volatile mp_obj_t inject_exc); +mp_code_state *mp_obj_fun_bc_prepare_codestate(mp_obj_t func, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args); void mp_setup_code_state(mp_code_state *code_state, mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args); void mp_bytecode_print(const void *descr, mp_uint_t n_total_args, const byte *code, mp_uint_t len); void mp_bytecode_print2(const byte *code, mp_uint_t len); |