Repository navigation
Conversation
zherczeg
reviewed
Oct 25, 2026
| // clang-format on | ||
|
|
||
| #if PT_LAMP != 0 | ||
| #error Please update low_properties in maint/GenerateUcd.py |
Collaborator
There was a problem hiding this comment.
Does it worth to detect which one is failed when you need to run a script anyway? Just use &&
Author
There was a problem hiding this comment.
Combined the property-number checks into one && guard and regenerated the table in 26eb3e4. @zherczeg, could you take another look and approve the CI run?
zherczeg
requested changes
Oct 28, 2026
| case PT_GC: | ||
| set_bit = (PRIV(ucp_gentype)[prop->chartype] == pdata); | ||
| break; | ||
| PCRE2_ASSERT(ptype <= PT_PXXDIGIT && ptype != PT_CLIST); |
Collaborator
There was a problem hiding this comment.
There should be an assert here that ucd_low_bitmap_indexes[ptype] + pdata <= ucd_low_bitmap_indexes[ptype + 1], except for the last ptype.
| { 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0xc0, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, | ||
| }; | ||
|
|
||
| const uint16_t PRIV(ucd_low_bitmap_indexes)[] = { |
Collaborator
There was a problem hiding this comment.
These could be two sets, first uses 16 bit values, the second uses 8 bit values.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #930.
Generate and deduplicate property bitmaps for code points below 256 with the Unicode tables, then reuse them when compiling character classes. Preserve the PT_ANY fast path and existing matching semantics.
For five local patterns across 8/16/32-bit builds, paired three-run medians improved compilation by 2.48-4.62x, adding 3136 bytes of read-only tables per width. All-width interpreter/JIT tests, 1608 property-bitmap equivalence cases per width, generator regeneration, GCC ASan/UBSan, and the Unicode/JIT-disabled build passed. Clang/Valgrind configurations were unavailable locally.