about summary refs log tree commit diff
path: root/boot/ir.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/ir.c')
-rw-r--r--boot/ir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/boot/ir.c b/boot/ir.c
index f86d63f..af631f8 100644
--- a/boot/ir.c
+++ b/boot/ir.c
@@ -468,6 +468,9 @@ struct Function
     // synthetic structure containing all captured locals. (only stateful lambdas)
     Type_Id capture_state_type_id;
 
+    // for nested functions this is the enclosing function. nil for top-level.
+    struct Function* parent_function;
+
     // tree-side header which produced this function node.
     // required for synthesizing the closure type after function is lowered.
     struct Tree_Function_Header* ast_header;