summaryrefslogtreecommitdiff
path: root/docs/develop
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 /docs/develop
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 'docs/develop')
-rw-r--r--docs/develop/compiler.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/develop/compiler.rst b/docs/develop/compiler.rst
index cac92585f..00cc90f81 100644
--- a/docs/develop/compiler.rst
+++ b/docs/develop/compiler.rst
@@ -157,7 +157,7 @@ The most relevant method you should know about is this:
mp_compile_to_raw_code(parse_tree, source_file, is_repl, &cm);
// Create and return a function object that executes the outer module.
- return mp_make_function_from_raw_code(cm.rc, cm.context, NULL);
+ return mp_make_function_from_proto_fun(cm.rc, cm.context, NULL);
}
The compiler compiles the code in four passes: scope, stack size, code size and emit.