10 Commits
Author SHA1 Message Date
Saúl Ibarra Corretgé 5f2fb55994 Port Bellard's register-based regexp engine
Replace quickjs-ng's stack-based libregexp with Fabrice Bellard's
register-based backtracking engine, which
is faster and guarantees linear bytecode size growth. This also brings the
regexp implementation to full parity with upstream: v flag, regexp modifiers,
duplicate named capture groups, properties of strings, and Script=Unknown.

Includes the following upstream commits from bellard/quickjs:
  7ab2341  faster and simpler implementation of regexp backtracking
  a774007  removed buffer overflows introduced in regexp optimizations
  371c06e  ensure regexp bytecode size grows linearly with the input
  47aac8b  regexp: a set of registers instead of an auxiliary stack
  5907aa6  added missing lre_poll_timeout()
  f113949  removed alloca() in lre_exec(); \s/\S opcodes; optimized \b/\B
  7bd1ae2  \x{N} is a syntax error
  24379bf  added regexp duplicate named groups; fixed reset of captures
  f95b8ba  added regexp modifiers
  d7cdfdc  regexp: added v flag support; CR_OP_SUB + properties of strings
  fc524f7  added missing 'Unknown' unicode Script
2026-06-27 12:43:44 +02:00
Saúl Ibarra Corretgé a7914d1711 Use stdbool rather than custom booleans
Fixes: https://github.com/quickjs-ng/quickjs/issues/817
2025-01-15 14:21:37 +01:00
Linus Groh a236c4c497 Replace BOOL with LRE_BOOL in libunicode.h 2025-01-11 08:40:21 +01:00
Ben Noordhuis 554907e88f Add RegExp.escape (#687) 2024-11-15 12:17:38 +01:00
Saúl Ibarra Corretgé f5c388d693 Fix regexp case insensitive flag (#531)
Ref: https://github.com/bellard/quickjs/commit/af308614a8b89e80a6e6a3f270292ef724931d1e
2024-09-13 23:50:44 +02:00
Andrew Johnson af084de6f9 Add 'extern' statements to public headers for C++ compatibility 2024-07-15 00:23:49 +02:00
Charlie Gordon e36f4bc4b6 add missing include files in headers 2024-06-06 21:09:10 +02:00
Saúl Ibarra Corretgé a721bda7b5 Drop CONFIG_ALL_UNICODE and enable it by default 2023-11-20 10:52:04 +01:00
Ben Noordhuis 162a8b7409 Remove trailing whitespace (#46)
Not purely cosmetic because it breaks navigation with { and } in the
One True Editor.
2023-11-12 10:01:40 +01:00
bellard 91459fb672 2020-01-05 release 2020-09-06 18:53:08 +02:00