mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 17:06:41 +00:00
Refactor region_stack logic out of Context (#4927)
This commit is contained in:
1 parent
0931c601be
commit
588bdd74c3
10 files changed
+113
-61
No files matched your search
@@ -401,7 +401,7 @@ static auto HandleFunctionDefinitionAfterSignature(
|
||||
// Create the function scope and the entry block.
|
||||
context.return_scope_stack().push_back({.decl_id = decl_id});
|
||||
context.inst_block_stack().Push();
|
||||
context.PushRegion(context.inst_block_stack().PeekOrAdd());
|
||||
context.region_stack().PushRegion(context.inst_block_stack().PeekOrAdd());
|
||||
context.scope_stack().Push(decl_id);
|
||||
StartGenericDefinition(context);
|
||||
|
||||
@@ -465,7 +465,7 @@ auto HandleParseNode(Context& context, Parse::FunctionDefinitionId node_id)
|
||||
context.decl_name_stack().PopScope();
|
||||
|
||||
auto& function = context.functions().Get(function_id);
|
||||
function.body_block_ids = context.PopRegion();
|
||||
function.body_block_ids = context.region_stack().PopRegion();
|
||||
|
||||
// If this is a generic function, collect information about the definition.
|
||||
FinishGenericDefinition(context, function.generic_id);
|
||||
|
||||
Reference in new issue
Block a user