• Leszek Swirski's avatar
    [liveedit] Fix patching functions with start position zero · e8c5a51c
    Leszek Swirski authored
    For a script '()=>42', the anonymous arrow function has both start and
    end position the same as the script function itself. This causes issues
    when sorting the SourcePositionEvents of the function, in two ways:
    
      * If the start positions are the same, we should order by *furthest*
        end position to ensure the stack is in the right order
      * If both start and end are the same, we need to order by function
        literal id to make sure that start order and end order are inversed.
    
    Also, MapLiterals assumes that start+end position uniquely identifies a
    function, which is false in this case, so we process the top-level
    script function separately in MapLiterals.
    
    Change-Id: I2b2185dc2825018b7ea44c7d0918238e9b1dd972
    Reviewed-on: https://chromium-review.googlesource.com/1141741
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54525}
    e8c5a51c
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...