• Toon Verwaest's avatar
    [parser] Move MarkLoopVariableAsAssigned to 'var' proxy allocation · 9b07087e
    Toon Verwaest authored
    This unifies the code between parser and preparser, and removes more code from
    the pattern rewriter.
    
    This makes "var x" without assignment and initializer in a loop pessimistically
    marked as assigned, but that seems pretty unlikely since the variable will just
    always be undefined. It is also still strictly better than what we had until
    very recently since any var outside of the function scope used to be marked as
    assigned. Now we only mark such variables as assigned.
    
    Change-Id: Icb37ab249b2a79c2d57a5769bdb964b435cebf62
    Reviewed-on: https://chromium-review.googlesource.com/c/1405228Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58736}
    9b07087e
expression-scope.h 21.6 KB