1. 12 Oct, 2017 1 commit
  2. 05 Oct, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: Fix hoisting. · f6f5bafe
      Marja Hölttä authored
      The catch variable is a special VAR-mode variable which is not in a declaration
      scope. Normally creating such a variable is not possible with DeclareVariable,
      but Parser bypasses it by calling DeclareLocal directly (which doesn't have the
      hoisting check).
      
      PreParser used to cut corners and declare the catch variable as a LET-mode
      variable to prevent hoisting.
      
      But since LET and VAR variables behave differently when deciding whether they
      block sloppy block function hoisting, that approach doesn't fly.
      
      BUG=v8:5516,chromium:771474
      
      Change-Id: Ic6f5f4996416c9fa59132725c8b0b6b570c72f48
      Reviewed-on: https://chromium-review.googlesource.com/700634
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48308}
      f6f5bafe
  3. 25 Sep, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: fix async arrow funcs. · 62960a03
      Marja Hölttä authored
      Track whether the async arrow func parameter list was simple or not; the
      information is already there, we just didn't pipe it through correctly. It's
      needed by PreParser so that it can create the correct Scope structure.
      
      Implementation notes:
      
      - I could've used async_classifier for transmitting the "is_simple" bit, but I
        made it explicit (it would be unnecessary to use ExpressionClassifier for
        this, as we're not classifying any expressions) instead.
      
      - I'm also moving work (setting parameter_list.is_simple) from Parser to
        ParserBase, and adding a DCHECK in Parser to assert that the work was indeed
        already done.
      
      BUG=v8:5516,chromium:765532
      
      Change-Id: Iacf91b150d1b57996544b5e64baa7d91ac134445
      Reviewed-on: https://chromium-review.googlesource.com/674695
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48132}
      62960a03
  4. 31 Aug, 2017 1 commit
  5. 22 Aug, 2017 1 commit
  6. 16 Aug, 2017 1 commit
  7. 12 Aug, 2017 1 commit
  8. 04 Aug, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: implement a bailout. · e7a46253
      Marja Hölttä authored
      In some cases, PreParser cannot replicate the Scope structure created by
      Parser. It happens esp. with arrow function parameters, since the relevant
      information is already lost by the time we figure out it's an arrow function.
      
      In these cases, PreParser should bail out of trying to create data for skipping
      inner functions.
      
      Implementation notes:
      
      - The arrow function case is more fundamental; the non-arrow case could be
        hacked together somehow if we implemented tracking is_simple for each param
        separately; but now that it's possible to bail out consistently from both
        cases, I don't think the is_simple complication is worth it.
      
      - The added mjsunit test cases are based on the test262 test cases which exposed
        the problem.
      
      - cctest/preparser/PreParserScopeAnalysis was exercising similar cases, but the
        problem didn't show up because the function parameters didn't contain
        skippable functions. Those test cases have been repurposed for testing the
        bailout.
      
      - Extra precaution: the bailout tests are in a separate file, to guard from the
        bug that a bailout case results in bailing out of *all* data creation, which
        would make all skipping tests in the same file useless.
      
      BUG=v8:5516
      
      Change-Id: I4324749a5ec602fa5d7dc27647ade0284a6842fe
      Reviewed-on: https://chromium-review.googlesource.com/599849Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47170}
      e7a46253
  9. 30 Jun, 2017 1 commit
  10. 23 Jun, 2017 1 commit
  11. 22 Jun, 2017 2 commits
  12. 31 May, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: make more functions skippable. · 06f05ec2
      Marja Hölttä authored
      - Enable aggressive lazy inner funcs (make non-declaration funcs lazy, ie let f =
        function() { ... } when --experimental-preparser-scope-analysis is on.
      - Turn on variable tracking for lazy top level functions: this makes their inner
        functions skippable.
      - Test fix for an testing bug uncovered by this work: when restoring the data
        for the relevant scope, don't assume it's the outermost scope for which we
        have data.
      - Fix: if we abort lazy parsing a function, we shouldn't produce any data for
        it.
      
      BUG=v8:5516
      
      Change-Id: I0606fbabb5886dc57dbb53ab5f3fb894ff5d032e
      Reviewed-on: https://chromium-review.googlesource.com/518165Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45615}
      06f05ec2
  13. 18 Apr, 2017 1 commit
  14. 12 Apr, 2017 1 commit