regexp: removed alloca() is lre_exec() - added specific opcodes for \s and \S to have a smaller bytecode - optimized \b and \B

This commit is contained in:
Fabrice Bellard
2025-12-22 15:12:46 +01:00
parent 7bd1ae2c76
commit f1139494d1
5 changed files with 94 additions and 69 deletions

View File

@@ -147,6 +147,11 @@ static inline int lre_is_id_continue_byte(uint8_t c) {
UNICODE_C_DIGIT);
}
static inline int lre_is_word_byte(uint8_t c) {
return lre_ctype_bits[c] & (UNICODE_C_UPPER | UNICODE_C_LOWER |
UNICODE_C_UNDER | UNICODE_C_DIGIT);
}
int lre_is_space_non_ascii(uint32_t c);
static inline int lre_is_space(uint32_t c) {