• Leszek Swirski's avatar
    [sfi] Remove SFI function literal id field · ceb9c812
    Leszek Swirski authored
    SharedFunctionInfos store their original function literal's id. This is
    also their index in the Script's SFI list.
    
    Since the function literal id is only needed for lazy compilation and live
    edit, we can calculate it on-the-fly by linear search in the Script SFI list,
    and save a field on the SFI.
    
    If this regresses compile performance, we could alternatively store the
    function literal id on the preparsed scope data as future work.
    
    Bug: chromium:818642
    Change-Id: I5468cea0e115921f1c864d94e567d749a4349882
    Reviewed-on: https://chromium-review.googlesource.com/1082480
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53523}
    ceb9c812
shared-function-info.h 22.9 KB