• Marja Hölttä's avatar
    [parser] Minor refactoring: parameter handling · e7ebb930
    Marja Hölttä authored
    - Different places used is_simple to mean different things; renamed one.
    
    - No need to do Scope::SetHasNoSimpleParameters multiple times.
    
    - Normally we create VAR parameters with a name, or (for destructuring
      parameters), TEMPORARY parmeters with an empty name. *Except* for
      destructuring rest parameters; then we create VAR a parameter with an empty
      name. This CL makes the empty-named parameter TEMPORARY instead of VAR.
    
    - This makes it clear that Parser::DeclareFormalParameters declares exactly
      those params which Parser::BuildParamerterInitializationBlock doesn't declare.
    
    - This unification doesn't change any functionality, but it makes sense to do
      since I'll need to make PreParser emulate what Parser does; this way I don't
      need to emulate the weird behavior.
    
    BUG=v8:5501
    
    Change-Id: Ifa6c116bc5908f4e03a36e74f47558888d1582bd
    Reviewed-on: https://chromium-review.googlesource.com/443106Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#43220}
    e7ebb930
parser.cc 193 KB