summaryrefslogtreecommitdiff
path: root/py/nativeglue.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-02-09 17:41:48 +1100
committerDamien George <damien@micropython.org>2024-02-16 14:17:01 +1100
commite2ff00e81113d7a3f32f860652017644b5d68bf1 (patch)
tree061a1d917a23be78706c3a4cfd6a46b1307a4ebf /py/nativeglue.h
parent5e3006f1172d0eabbbefeb3268dfb942ec7cf9cd (diff)
py/emitglue: Introduce mp_proto_fun_t as a more general mp_raw_code_t.
Allows bytecode itself to be used instead of an mp_raw_code_t in the simple and common cases of a bytecode function without any children. This can be used to further reduce frozen code size, and has the potential to optimise other areas like importing. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/nativeglue.h')
-rw-r--r--py/nativeglue.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/nativeglue.h b/py/nativeglue.h
index cf73ffbfc..113f5fde6 100644
--- a/py/nativeglue.h
+++ b/py/nativeglue.h
@@ -58,7 +58,7 @@ typedef enum {
MP_F_STORE_SET,
MP_F_LIST_APPEND,
MP_F_STORE_MAP,
- MP_F_MAKE_FUNCTION_FROM_RAW_CODE,
+ MP_F_MAKE_FUNCTION_FROM_PROTO_FUN,
MP_F_NATIVE_CALL_FUNCTION_N_KW,
MP_F_CALL_METHOD_N_KW,
MP_F_CALL_METHOD_N_KW_VAR,
@@ -112,7 +112,7 @@ typedef struct _mp_fun_table_t {
void (*set_store)(mp_obj_t self_in, mp_obj_t item);
mp_obj_t (*list_append)(mp_obj_t self_in, mp_obj_t arg);
mp_obj_t (*dict_store)(mp_obj_t self_in, mp_obj_t key, mp_obj_t value);
- mp_obj_t (*make_function_from_raw_code)(const mp_raw_code_t *rc, const mp_module_context_t *cm, const mp_obj_t *def_args);
+ mp_obj_t (*make_function_from_proto_fun)(mp_proto_fun_t proto_fun, const mp_module_context_t *cm, const mp_obj_t *def_args);
mp_obj_t (*call_function_n_kw)(mp_obj_t fun_in, size_t n_args_kw, const mp_obj_t *args);
mp_obj_t (*call_method_n_kw)(size_t n_args, size_t n_kw, const mp_obj_t *args);
mp_obj_t (*call_method_n_kw_var)(bool have_self, size_t n_args_n_kw, const mp_obj_t *args);