• Adam Klein's avatar
    Accurately record eval calls in arrow parameter lists · fc023664
    Adam Klein authored
    Previously, we over-approximated Scope::scope_calls_eval_ in
    arrow functions: if either the outer scope or the arrow function
    parameters had a direct eval call, we marked both scopes as calling
    eval. This over-approximation kept getting us into trouble, though,
    especially when eager or lazy parsing would disagree about the
    "calls eval" bit.
    
    This patch instead tracks eval calls accurately, using a boolean on
    Scope::Snapshot that is reset as appropriately depending on whether
    a particular AssignmentExpression turned out to be an arrow parameter
    list or not.
    
    BUG=chromium:691687
    
    Change-Id: I527dc59b4d32a2797805ff26dc9f70b1311377b2
    Reviewed-on: https://chromium-review.googlesource.com/446094
    Commit-Queue: Adam Klein <adamk@chromium.org>
    Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#43499}
    fc023664
scopes.cc 81.2 KB