mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 20:00:29 +00:00
Track the list of blocks that form the body of a function. (#2941)
Use that list for lowering in lexical order, instead of rediscovering the list based on which blocks are referenced as branch targets.
This commit is contained in:
1 parent
5a90f660b9
commit
b908c6e274
61 files changed
+145
-176
No files matched your search
@@ -49,7 +49,7 @@ auto SemanticsHandleFunctionDefinitionStart(SemanticsContext& context,
|
||||
{.name_id = name_id,
|
||||
.param_refs_id = param_refs_id,
|
||||
.return_type_id = return_type_id,
|
||||
.body_id = context.node_block_stack().PeekForAdd()});
|
||||
.body_block_ids = {context.node_block_stack().PeekForAdd()}});
|
||||
auto decl_id = context.AddNodeToBlock(
|
||||
outer_block,
|
||||
SemanticsNode::FunctionDeclaration::Make(fn_node, function_id));
|
||||
|
||||
Reference in new issue
Block a user