Skip to content

[6.0] Remove most consumer functions #734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

natecook1000
Copy link
Member

Explanation: This change removes most uses of consumer functions in the regex processor, by implementing them as instructions instead.
Scope: All the changes are internal implementation within the _StringProcessing module.
Issue: n/a
Original PR: #660
Risk: Low. There's no API or ABI impact of this change.
Testing: This change adds compilation tests that verify that consumer functions are removed when appropriate, and uses the existing unit tests to verify no change in matching behavior.
Reviewer: @stephentyrone


Original PR text:
This is based heavily off the work in #590, rebased onto main, with some changes to remove even more consumer uses. Consumer functions only have two remaining uses: non-ASCII ranges and Unicode lookups (for things like general category, binary properties, name, etc.).

This change primarily treats custom character classes as alternations around their contents, with set operations emitted as instructions instead of implemented via consumer function.

This is based heavily off the work in #590, rebased onto main, with
some changes to remove even more consumer uses. Consumer functions
only have two remaining uses: non-ASCII ranges and Unicode lookups
(for things like general category, binary properties, name, etc.).

This change primarily treats custom character classes as alternations
around their contents, with set operations emitted as instructions
instead of implemented via consumer function.
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit 3719a06 into swift/release/6.0 Apr 1, 2024
@natecook1000 natecook1000 deleted the swift6-shrink-consumer-interface branch April 1, 2024 18:17
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.

2 participants