• bakkot's avatar
    [parser] Simplify parse-time function name inference for properties · 2aab10f5
    bakkot authored
    Move the code to perform function name inference for properties into
    parsing the properties themselves, instead of the containing object.
    
    This allows us to avoid unnecessary calls when parsing shorthand
    properties and methods and simplifies the logic in the remaining cases.
    
    Also fixes an edge case bug: inferring the name of the getter in
    `class { static get constructor(){} }`.
    
    Review-Url: https://codereview.chromium.org/2313723005
    Cr-Commit-Position: refs/heads/master@{#39222}
    2aab10f5
function-name.js 10.9 KB