• Leszek Swirski's avatar
    [liveedit] Use start position in function lookup · ac0c19b6
    Leszek Swirski authored
    Instead of looking up functions by their function literal id (which can
    be slow now that function id involves a linear search for compiled
    functions), we key the lookup by the function's start position.
    
    This means that the script+literal id swapping to find equivalent
    unchanged functions during constant pool patching no longer works -- we
    could replace it by fixing up the start position of the redundant new
    function, but instead we just build up a side-table mapping (new) start
    positions to function literal ids, and use that function literal id to
    find the old function in the script's SFI list.
    
    Change-Id: I10bfce6c39665cba063e0ddbc8fd38a6f5fd5513
    Reviewed-on: https://chromium-review.googlesource.com/1140169Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54542}
    ac0c19b6
liveedit.cc 46.4 KB