mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 20:50:29 +00:00
Emit VarStorages eagerly (#7468)
We used to have to batch these at the end of pattern traversal in order to avoid accidentally adding them to a block that was speculatively pushed for an expression within a pattern, but that's no longer a concern with the more precise handling of those speculative blocks in #7445.
This commit is contained in:
1 parent
4261bb2dd2
commit
96c7cfe41c
6 files changed
+77
-93
No files matched your search
@@ -211,10 +211,6 @@ auto HandleParseNode(Context& context, Parse::ForHeaderId node_id) -> bool {
|
||||
// should be in scope.
|
||||
context.full_pattern_stack().EndPatternInitializer();
|
||||
|
||||
// Create storage for var patterns now.
|
||||
context.full_pattern_stack().BuildLocalVarStorage(context,
|
||||
/*is_returned_var=*/false);
|
||||
|
||||
// Initialize the pattern from `<element>.Get()`.
|
||||
auto element_value_id =
|
||||
CallOptionalAccessor(context, node_id, element_id, CoreIdentifier::Get);
|
||||
|
||||
Reference in new issue
Block a user