• marja's avatar
    [parser] Skipping inner funcs: add info about variables. · d4507a6c
    marja authored
    - Declaring a variable called "this" for preparsed functions was unnecessary;
      DeclarationScope ctor already adds the variable.
    
    - "arguments" for preparsed scopes need to be declared after parsing the
      function, like it's done in the parser.
    
    - Now arguments_ can be the dummy variable, so adapted code to it.
    
    - A previous refactoring CL ( https://codereview.chromium.org/2638333002 ) was
      incomplete; it had added ParserBase::ParseFunctionBody but
      PreParser::ParseFunction didn't call it. This CL completes that work. This is
      needed for getting "arguments" declared properly for preparsed functions.
    
    - AllocateVariablesRecursively is already called for preparsed scopes (without
      this CL, that is), and it bails out early. However, before the bailout it used
      to dcheck num_stack_slots_ == 0; that is no longer true since we've done scope
      analysis for preparsed scopes.
    
    - Test fix: we cannot have any lazy inner functions in the test, except the
      topmost lazy inner function. Such functions would also be lazy in the parser
      case, and the parser would just throw away their variables. Then the test
      tries to verify the preparsed data against the scopes without variables and fails.
    
    - Disabled a test w/ a sloppy block function, will get that working again in the
      upcoming CLs.
    
    BUG=v8:5516
    
    Review-Url: https://codereview.chromium.org/2655623005
    Cr-Commit-Position: refs/heads/master@{#42685}
    d4507a6c
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...