1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-29 06:42:36 +00:00
serenity/Userland/Libraries/LibRegex
Timothy Flynn 9509433e25 LibRegex: Implement and use a REPEAT operation for bytecode repetition
Currently, when we need to repeat an instruction N times, we simply add
that instruction N times in a for-loop. This doesn't scale well with
extremely large values of N, and ECMA-262 allows up to N = 2^53 - 1.

Instead, add a new REPEAT bytecode operation to defer this loop from the
parser to the runtime executor. This allows the parser to complete sans
any loops (for this instruction), and allows the executor to bail early
if the repeated bytecode fails.

Note: The templated ByteCode methods are to allow the Posix parsers to
continue using u32 because they are limited to N = 2^20.
2021-08-15 11:43:45 +01:00
..
C LibRegex+LibC: Make re_nsub available to the user 2021-07-13 07:04:06 +02:00
CMakeLists.txt LibRegex+LibUnicode: Begin implementing Unicode property escapes 2021-07-30 21:26:31 +01:00
Forward.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Regex.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RegexByteCode.cpp LibRegex: Implement and use a REPEAT operation for bytecode repetition 2021-08-15 11:43:45 +01:00
RegexByteCode.h LibRegex: Implement and use a REPEAT operation for bytecode repetition 2021-08-15 11:43:45 +01:00
RegexDebug.h LibRegex: Switch to east-const style 2021-07-23 21:19:21 +04:30
RegexError.h LibRegex+LibUnicode: Begin implementing Unicode property escapes 2021-07-30 21:26:31 +01:00
RegexLexer.cpp LibRegex: Switch to east-const style 2021-07-23 21:19:21 +04:30
RegexLexer.h LibRegex: Switch to east-const style 2021-07-23 21:19:21 +04:30
RegexMatch.h LibRegex: Implement and use a REPEAT operation for bytecode repetition 2021-08-15 11:43:45 +01:00
RegexMatcher.cpp LibRegex: Implement and use a REPEAT operation for bytecode repetition 2021-08-15 11:43:45 +01:00
RegexMatcher.h LibRegex: Remove (mostly) unused regex::MatchOutput 2021-08-15 11:43:45 +01:00
RegexOptions.h LibRegex: Allow RegexOptions to be declared at compile time 2021-07-30 21:26:31 +01:00
RegexParser.cpp LibRegex: Implement and use a REPEAT operation for bytecode repetition 2021-08-15 11:43:45 +01:00
RegexParser.h LibRegex: Implement and use a REPEAT operation for bytecode repetition 2021-08-15 11:43:45 +01:00