mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
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:
@@ -88,7 +88,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
|
||||
mp_module_context_t *ctx = m_new_obj(mp_module_context_t);
|
||||
ctx->module.globals = mp_globals_get();
|
||||
ctx->constants = frozen->constants;
|
||||
module_fun = mp_make_function_from_raw_code(frozen->rc, ctx, NULL);
|
||||
module_fun = mp_make_function_from_proto_fun(frozen->proto_fun, ctx, NULL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user