• Toon Verwaest's avatar
    [parser] Push variables of non-arrow parenthesized expression to parent · 7ff82992
    Toon Verwaest authored
    Parenthesized variable names are valid references for assignment. To make sure
    we can properly mark the variable as assigned, we should push parenthesized
    variables to the outer expression scope after the parenthesized expression is
    guaranteed to not be an arrow head; so that the variable list of the parent is
    complete.
    
    Technically we could probably get by with simply pushing a single variable,
    since more complex expressions aren't valid parenthesized assignment targets:
    (a) = ... and [(a),(b)] = ... are valid, but ([a,b]) = ... isn't.
    It doesn't really seem worth it though.
    
    Bug: chromium:1015372
    Change-Id: I095c35126742a14d0171537b9795f7258c33ab4d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1872389
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64455}
    7ff82992
Name
Last commit
Last update
..
OWNERS Loading commit data...
expression-scope-reparenter.cc Loading commit data...
expression-scope-reparenter.h Loading commit data...
expression-scope.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
keywords-gen.h Loading commit data...
keywords.txt Loading commit data...
literal-buffer.cc Loading commit data...
literal-buffer.h Loading commit data...
parse-info.cc Loading commit data...
parse-info.h Loading commit data...
parser-base.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
parsing.cc Loading commit data...
parsing.h Loading commit data...
pending-compilation-error-handler.cc Loading commit data...
pending-compilation-error-handler.h Loading commit data...
preparse-data-impl.h Loading commit data...
preparse-data.cc Loading commit data...
preparse-data.h Loading commit data...
preparser-logger.h Loading commit data...
preparser.cc Loading commit data...
preparser.h Loading commit data...
rewriter.cc Loading commit data...
rewriter.h Loading commit data...
scanner-character-streams.cc Loading commit data...
scanner-character-streams.h Loading commit data...
scanner-inl.h Loading commit data...
scanner.cc Loading commit data...
scanner.h Loading commit data...
token.cc Loading commit data...
token.h Loading commit data...