• 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
..
OWNERS Loading commit data...
ast-expression-rewriter.cc Loading commit data...
ast-expression-rewriter.h Loading commit data...
ast-function-literal-id-reindexer.cc Loading commit data...
ast-function-literal-id-reindexer.h Loading commit data...
ast-literal-reindexer.cc Loading commit data...
ast-literal-reindexer.h Loading commit data...
ast-numbering.cc Loading commit data...
ast-numbering.h Loading commit data...
ast-traversal-visitor.h Loading commit data...
ast-type-bounds.h Loading commit data...
ast-types.cc Loading commit data...
ast-types.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...
compile-time-value.cc Loading commit data...
compile-time-value.h Loading commit data...
context-slot-cache.cc Loading commit data...
context-slot-cache.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...
variables.cc Loading commit data...
variables.h Loading commit data...