• Leszek Swirski's avatar
    [parser] Fix AST func reindexing for function fields · a769ea7a
    Leszek Swirski authored
    AST reindexing has to skip visiting fields that are already in the
    member initializer, as they will have already been visited when
    visiting said initializer. This is the case for private fields and
    fields with computed names.
    
    However, the reindexer was incorrectly assuming that all properties
    with a FunctionLiteral value are methods (and thus not fields, and
    can safely be visited). This is not the case for fields with
    function expression values.
    
    Now, we correctly use the class property's "kind" when making this
    visitation decision.
    
    Fixed: chromium:1132111
    Change-Id: Ia53d1fe713453e361b818dfb0b5f88a90cecdf21
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2440519
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
    Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70247}
    a769ea7a
Name
Last commit
Last update
..
OWNERS Loading commit data...
ast-function-literal-id-reindexer.cc Loading commit data...
ast-function-literal-id-reindexer.h Loading commit data...
ast-source-ranges.h Loading commit data...
ast-traversal-visitor.h Loading commit data...
ast-value-factory.cc Loading commit data...
ast-value-factory.h Loading commit data...
ast.cc Loading commit data...
ast.h Loading commit data...
modules.cc Loading commit data...
modules.h Loading commit data...
prettyprinter.cc Loading commit data...
prettyprinter.h Loading commit data...
scopes.cc Loading commit data...
scopes.h Loading commit data...
source-range-ast-visitor.cc Loading commit data...
source-range-ast-visitor.h Loading commit data...
variables.cc Loading commit data...
variables.h Loading commit data...