diff options
| author | Damien George <damien@micropython.org> | 2022-05-15 13:37:06 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-05-17 14:25:51 +1000 |
| commit | 1762990579ff8ddc285e24492626fe40b6f2621d (patch) | |
| tree | 180999f988cc79cebf1c56bfe9a978d4dbe3aaab /py/nativeglue.h | |
| parent | 8e1db993cd6bca93c031619e05c465f05c48381c (diff) | |
py/bc: Provide separate code-state setup funcs for bytecode and native.
mpy-cross will now generate native code based on the size of
mp_code_state_native_t, and the runtime will use this struct to calculate
the offset of the .state field. This makes native code generation and
execution (which rely on this struct) independent to the settings
MICROPY_STACKLESS and MICROPY_PY_SYS_SETTRACE, both of which change the
size of the mp_code_state_t struct.
Fixes issue #5059.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/nativeglue.h')
| -rw-r--r-- | py/nativeglue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/nativeglue.h b/py/nativeglue.h index 49ce665f2..7b1ccd8d4 100644 --- a/py/nativeglue.h +++ b/py/nativeglue.h @@ -131,7 +131,7 @@ typedef struct _mp_fun_table_t { void (*delete_global)(qstr qst); mp_obj_t (*new_closure)(mp_obj_t fun, size_t n_closed_over, const mp_obj_t *closed); void (*arg_check_num_sig)(size_t n_args, size_t n_kw, uint32_t sig); - void (*setup_code_state)(mp_code_state_t *code_state, size_t n_args, size_t n_kw, const mp_obj_t *args); + void (*setup_code_state_native)(mp_code_state_native_t *code_state, size_t n_args, size_t n_kw, const mp_obj_t *args); mp_int_t (*small_int_floor_divide)(mp_int_t num, mp_int_t denom); mp_int_t (*small_int_modulo)(mp_int_t dividend, mp_int_t divisor); bool (*yield_from)(mp_obj_t gen, mp_obj_t send_value, mp_obj_t *ret_value); |
