Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a3927f7a6cf7f4e378afa983cc11edf05e2dcdd4 https://github.com/WebKit/WebKit/commit/a3927f7a6cf7f4e378afa983cc11edf05e2dcdd4 Author: Daniel Liu <danl...@umich.edu> Date: 2025-03-20 (Thu, 20 Mar 2025)
Changed paths: M Source/JavaScriptCore/yarr/YarrJIT.cpp Log Message: ----------- YarrJIT should prune leading character classes and null ops for near-adjacent character optimization https://bugs.webkit.org/show_bug.cgi?id=290118 rdar://146934667 Reviewed by Yusuke Suzuki. In 292003@main, we landed an optimization in YarrJIT for near-adjacent PatternCharacter atoms. However, this optimization could fail on patterns such as `[abc]d{2}ef`, since the YarrJIT reorders checking the more expensive character class `[abc]` after the constant terms `d{2}` and `ef`. However, `d{2}` is not supported by our optimization yet, so we begin at `ef`. The character class is still added, at offset 0 of the operation list, creating holes which trick the optimization into thinking there aren't any terms in the constant pattern. By pruning off the initial character class and holes, we ensure that only `ef` is a part of the check, and the character class is handled separately later on. * Source/JavaScriptCore/yarr/YarrJIT.cpp: Canonical link: https://commits.webkit.org/292448@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes