• adamk's avatar
    Don't crash when preparsing destructured arguments · 7485da7a
    adamk authored
    This adds the materialized literal count accumulated while parsing the
    parameters (in the parser proper) to that accumulated by the preparser.
    
    This should have been caught in cctest/test-parsing, but it's not covered
    because the parsing tests call directly into the preparser rather than
    using Parser::ParseFunctionLiteral (which fully-parses the parameters
    and then calls into the preparser to skip over the function body).
    
    Note that this further-inflates the materialized literal count for
    functions with destructured arguments, since some of the counted
    literals are actually binding patterns. But that's not specific to
    binding patterns in formal parameters: it happens in function bodies, too.
    
    BUG=v8:4400,v8:4407
    LOG=n
    
    Review URL: https://codereview.chromium.org/1350913005
    
    Cr-Commit-Position: refs/heads/master@{#30868}
    7485da7a
Name
Last commit
Last update
..
regress-173361.js Loading commit data...
regress-2219.js Loading commit data...
regress-2225.js Loading commit data...
regress-343928.js Loading commit data...
regress-3501.js Loading commit data...
regress-4056.js Loading commit data...
regress-405844.js Loading commit data...
regress-4160.js Loading commit data...
regress-4211.js Loading commit data...
regress-4298.js Loading commit data...
regress-4400.js Loading commit data...
regress-4417.js Loading commit data...
regress-508074.js Loading commit data...
regress-513474.js Loading commit data...
regress-517455.js Loading commit data...
regress-arrow-duplicate-params.js Loading commit data...
regress-crbug-347528.js Loading commit data...
regress-crbug-448730.js Loading commit data...
regress-crbug-451770.js Loading commit data...
regress-crbug-461520.js Loading commit data...
regress-crbug-465671-null.js Loading commit data...
regress-crbug-465671.js Loading commit data...
regress-lookup-transition.js Loading commit data...
regress-observe-empty-double-array.js Loading commit data...
regress-typedarray-out-of-bounds.js Loading commit data...