summaryrefslogtreecommitdiffstatshomepage
path: root/shared/runtime/pyexec.c
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 /shared/runtime/pyexec.c
parent5e3006f1172d0eabbbefeb3268dfb942ec7cf9cd (diff)
downloadmicropython-e2ff00e81113d7a3f32f860652017644b5d68bf1.tar.gz
micropython-e2ff00e81113d7a3f32f860652017644b5d68bf1.zip
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 'shared/runtime/pyexec.c')
-rw-r--r--shared/runtime/pyexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c
index 9f6d9a1002..cc2aa53504 100644
--- a/shared/runtime/pyexec.c
+++ b/shared/runtime/pyexec.c
@@ -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
{