Rework RegExp engine and add support for proper unicode matching (#3746)

This change includes several bugfixes, general improvements, and support
for additional features.
- Added full support for web compatibility syntax defined in Annex B
- Implemented parsing and matching patterns in unicode mode
- Fixed capture results when iterating with nested capturing groups
- Significantly reduced regexp bytecode size
- Reduced stack usage during regexp execution
- Improved matching performance

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2020-05-26 15:28:54 +02:00
committed by GitHub
parent 908240ba62
commit 8f76a1f382
30 changed files with 3641 additions and 2647 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ struct jerry_context_t
/* Update JERRY_CONTEXT_FIRST_MEMBER if the first non-external member changes */
jmem_cpointer_t ecma_builtin_objects[ECMA_BUILTIN_ID__COUNT]; /**< pointer to instances of built-in objects */
#if ENABLED (JERRY_BUILTIN_REGEXP)
const re_compiled_code_t *re_cache[RE_CACHE_SIZE]; /**< regex cache */
re_compiled_code_t *re_cache[RE_CACHE_SIZE]; /**< regex cache */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
jmem_cpointer_t ecma_gc_objects_cp; /**< List of currently alive objects. */
jmem_heap_free_t *jmem_heap_list_skip_p; /**< This is used to speed up deallocation. */