• Iain Ireland's avatar
    [regexp] SpiderMonkey embedding fixes · 6beb0cf4
    Iain Ireland authored
    There are two changes in this patch.
    
    1. We previously added `VerifyRegExpSyntax` in regexp-parser.h to support checking regexp syntax for early errors in SpiderMonkey. Now that V8 is also emitting early errors for regexps (bug v8:896), SpiderMonkey can use the same code as V8.
    
    2. Bug v8:11069 used a std::unordered_map as a cache for range arrays. This is currently the only place in irregexp that can call non-placement new, which SpiderMonkey has a static analysis to detect. Converting this to a ZoneUnorderedMap solves the problem for us, and seems consistent with the rest of irregexp.
    
    Bug: v8:13108
    Change-Id: Icedafd7d30fd040760cb0676a7bef8d55853bb93
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3785444
    Commit-Queue: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#81988}
    6beb0cf4
regexp-parser.cc 75.5 KB