mirror of
https://github.com/RGBCube/serenity
synced 2025-10-29 06:42:36 +00:00
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. |
||
|---|---|---|
| .. | ||
| C | ||
| CMakeLists.txt | ||
| Forward.h | ||
| Regex.h | ||
| RegexByteCode.cpp | ||
| RegexByteCode.h | ||
| RegexDebug.h | ||
| RegexError.h | ||
| RegexLexer.cpp | ||
| RegexLexer.h | ||
| RegexMatch.h | ||
| RegexMatcher.cpp | ||
| RegexMatcher.h | ||
| RegexOptions.h | ||
| RegexParser.cpp | ||
| RegexParser.h | ||