ladybird/Libraries/LibRegex/Rust/src
Aliaksandr Kalenik 7685a5e14a LibRegex: Inline \w and \d ranges in legacy positive char classes
Previously, a character class containing any builtin (\d, \w, \s)
forced the compiler down the slow "complex class" path, which emits
a disjunction of alternatives and backtracks at runtime.

For non-unicode, non-unicode-sets, non-negated classes, \w and \d
can be inlined as their raw ASCII code-point ranges. The resulting
class stays on the fast path and compiles into a single sorted
CharClass instruction.

The unicode/unicode_sets and negation guards are required for
correctness: with the /u + /i flags, \w gains non-ASCII members
via case folding (e.g. U+017F, U+212A), and negated classes have
a separate, smarter compilation path.
2026-04-21 16:36:38 +02:00
..
ast.rs LibRegex/Rust: Add the ECMA-262 regex engine 2026-03-27 17:32:19 +01:00
bytecode.rs LibRegex+LibUnicode: Migrate Unicode Rust FFI methods to LibUnicode 2026-04-19 10:39:26 +02:00
compiler.rs LibRegex: Inline \w and \d ranges in legacy positive char classes 2026-04-21 16:36:38 +02:00
ffi.rs Rust: Add a config file for rustfmt 2026-04-18 08:05:47 -04:00
lib.rs LibRegex+LibUnicode: Migrate Unicode Rust FFI methods to LibUnicode 2026-04-19 10:39:26 +02:00
parser.rs LibRegex+LibUnicode: Migrate Unicode Rust FFI methods to LibUnicode 2026-04-19 10:39:26 +02:00
regex.rs Rust: Add a config file for rustfmt 2026-04-18 08:05:47 -04:00
vm.rs LibRegex+LibUnicode: Migrate Unicode Rust FFI methods to LibUnicode 2026-04-19 10:39:26 +02:00