summaryrefslogtreecommitdiff
path: root/py/bc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-09-24 15:57:08 +1000
committerDamien George <damien.p.george@gmail.com>2019-10-01 12:26:22 +1000
commit81d04a0200e0d4038c011e4946bfae5707ef9d9c (patch)
tree63abd765209f3aa447285db2d8f35c3a53eccb52 /py/bc.h
parent4c5e1a036831a3ac36866e4daab3a50c772b4443 (diff)
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.
Diffstat (limited to 'py/bc.h')
-rw-r--r--py/bc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/bc.h b/py/bc.h
index 1d28dcc4f..69bce8902 100644
--- a/py/bc.h
+++ b/py/bc.h
@@ -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