Skip to content

Fix a concatenation coalescing issue#859

Merged
natecook1000 merged 4 commits intomainfrom
empty-concatenation-fix
Apr 16, 2026
Merged

Fix a concatenation coalescing issue#859
natecook1000 merged 4 commits intomainfrom
empty-concatenation-fix

Conversation

@natecook1000
Copy link
Copy Markdown
Member

This addresses an out of bounds access when coalescing certain concatenation patterns.

rdar://174353630

The recursive DSLTree approach required nodes nested in nodes.
The DSLTree implementation flattened this tree, but didn't remove
the nested nodes, instead replacing them with placeholder entries
that were unused, in order to reduce the code change. This
change completes the transition, modifying the nodes to no
longer store their children.

With this change, we can also remove a significant amount of
unused code. The change includes some expanded test coverage
of the RegexBuilder syntax conversion, as well.

Note that even though `DSLTree.Node` no longer requires
declaration as `indirect`, compilation times are worsened
if we remove the indirection.
This addresses an out of bounds access when coalescing certain
concatenation patterns.

rdar://174353630
@natecook1000 natecook1000 force-pushed the empty-concatenation-fix branch from 0daa642 to a6210db Compare April 10, 2026 13:39
Base automatically changed from remove-old-dslnode to main April 15, 2026 22:41
@natecook1000
Copy link
Copy Markdown
Member Author

@swift-ci Please test Linux platform

@natecook1000 natecook1000 merged commit bc1397a into main Apr 16, 2026
24 checks passed
@natecook1000 natecook1000 deleted the empty-concatenation-fix branch April 16, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant