py: Add n_state to mp_code_state_t struct.

This value is used often enough that it is better to cache it instead of
decode it each time.
This commit is contained in:
Damien George
2019-09-24 15:57:08 +10:00
parent 4c5e1a0368
commit 81d04a0200
5 changed files with 12 additions and 5 deletions

View File

@@ -99,6 +99,7 @@ typedef struct _mp_code_state_t {
mp_obj_fun_bc_t *fun_bc;
const byte *ip;
mp_obj_t *sp;
uint16_t n_state;
uint16_t exc_sp_idx;
mp_obj_dict_t *old_globals;
#if MICROPY_STACKLESS