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>
This commit is contained in:
Damien George
2024-02-09 17:41:48 +11:00
parent 5e3006f117
commit e2ff00e811
15 changed files with 63 additions and 39 deletions

View File

@@ -281,7 +281,7 @@ const mp_fun_table_t mp_fun_table = {
mp_obj_set_store,
mp_obj_list_append,
mp_obj_dict_store,
mp_make_function_from_raw_code,
mp_make_function_from_proto_fun,
mp_native_call_function_n_kw,
mp_call_method_n_kw,
mp_call_method_n_kw_var,