Skip to content
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

[regexp] Replace unicode property comparison instructions with generic set comparisons #104

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

Hans-Halverson
Copy link
Owner

Summary

In preparation for fixes to case insensitive mode we are moving some special comparison instructions to generic set comparisons. This PR refactors unicode property comparison instructions to use the generic set comparison path, meaning individual comparisons are emitted for each range in the set.

Unicode properties now implement an add_to_set method instead of an is_match method, which builds the set of code points corresponding to that property.

Tests

Added RegExp bytecode snapshot tests for script and general category unicode properties, as well as complement classes. Verified that unicode property comparisons now use generic rang

@Hans-Halverson Hans-Halverson changed the title Unicode property set [regexp] Replace unicode property comparison instructions with generic set comparisons Jan 19, 2025
@Hans-Halverson Hans-Halverson merged commit 1bafa68 into master Jan 19, 2025
5 checks passed
@Hans-Halverson Hans-Halverson deleted the unicode-property-set branch January 19, 2025 22:18
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