1. 20 Mar, 2020 1 commit
  2. 11 Mar, 2020 1 commit
  3. 09 Mar, 2020 1 commit
    • Santiago Aboy Solanes's avatar
      [interpreter] Merge nested loops that share the same header offset · 18b4b6b9
      Santiago Aboy Solanes authored
      This CL merges nested loops that share the same header offset with its
      parent loop, by not emitting JumpLoop bytecode for these inner loops.
      Instead, we generate a Jump to its parent's JumpToHeader (which in
      turn can be a JumpLoop or another Jump to its parent's JumpToHeader).
      
      Originally, every loop had a unique first Bytecode to jump to. Since
      IterationBody StackChecks are going to become implicit this will no
      longer be the case.
      
      As a note, this CL just sets the foundation that the follow-up CLs
      will build on top of. Since we have explicit StackChecks, and they
      are at the beginning of loops we do not have nested loops as of now.
      
      Bug: v8:10149, v8:9960
      Change-Id: I6daee4d2c6d6216f022228c87c4aa74e163997b2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062390
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66626}
      18b4b6b9
  4. 23 May, 2019 1 commit
  5. 28 Feb, 2019 3 commits
    • Leszek Swirski's avatar
      Reland "[ignition] Skip binding dead labels" · c7ebc581
      Leszek Swirski authored
      This is a reland of 35269f77
      
      Switches on an expression that unconditionally throws would have all their
      case statements dead, causing a DCHECK error in the SwitchBuilder. This
      fixes up the DCHECK to allow dead labels.
      
      Original change's description:
      > [ignition] Skip binding dead labels
      >
      > BytecodeLabels for forward jumps may create a dead basic block if their
      > corresponding jump was elided (due to it dead code elimination). We can
      > avoid generating such dead basic blocks by skipping the label bind when
      > no corresponding jump has been observed. This works because all jumps
      > except JumpLoop are forward jumps, so we only have to special case one
      > Bind for loop headers to bind unconditionally.
      >
      > Since Binds are now conditional on a jump existing, we can no longer rely
      > on using Bind to get the current offset (e.g. at the beginning of a try
      > block). Instead, we now expose the current offset in the bytecode array
      > writer. Conveniently, this means that we can be a bit smarter about basic
      > blocks around these statements.
      >
      > As a drive-by, remove the unused Bind(target,label) function.
      >
      > Bug: chromium:934166
      > Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
      > Reviewed-on: https://chromium-review.googlesource.com/c/1488763
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#59942}
      
      TBR=rmcilroy@chromium.org
      
      Bug: chromium:934166
      Change-Id: If6eab4162106717ce64a2dc477000c6a76354cb4
      Reviewed-on: https://chromium-review.googlesource.com/c/1494535Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59948}
      c7ebc581
    • Sigurd Schneider's avatar
      Revert "[ignition] Skip binding dead labels" · 8ee20f5e
      Sigurd Schneider authored
      This reverts commit 35269f77.
      
      Reason for revert: Fuzzer unhappy: https://ci.chromium.org/p/v8/builders/ci/V8%20Fuzzer/29792
      
      Original change's description:
      > [ignition] Skip binding dead labels
      > 
      > BytecodeLabels for forward jumps may create a dead basic block if their
      > corresponding jump was elided (due to it dead code elimination). We can
      > avoid generating such dead basic blocks by skipping the label bind when
      > no corresponding jump has been observed. This works because all jumps
      > except JumpLoop are forward jumps, so we only have to special case one
      > Bind for loop headers to bind unconditionally.
      > 
      > Since Binds are now conditional on a jump existing, we can no longer rely
      > on using Bind to get the current offset (e.g. at the beginning of a try
      > block). Instead, we now expose the current offset in the bytecode array
      > writer. Conveniently, this means that we can be a bit smarter about basic
      > blocks around these statements.
      > 
      > As a drive-by, remove the unused Bind(target,label) function.
      > 
      > Bug: chromium:934166
      > Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
      > Reviewed-on: https://chromium-review.googlesource.com/c/1488763
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#59942}
      
      TBR=rmcilroy@chromium.org,leszeks@chromium.org
      
      Change-Id: I8118e54e0afa5e08b0a0a874c952f8a01f1c3242
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:934166
      Reviewed-on: https://chromium-review.googlesource.com/c/1494534Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59947}
      8ee20f5e
    • Leszek Swirski's avatar
      [ignition] Skip binding dead labels · 35269f77
      Leszek Swirski authored
      BytecodeLabels for forward jumps may create a dead basic block if their
      corresponding jump was elided (due to it dead code elimination). We can
      avoid generating such dead basic blocks by skipping the label bind when
      no corresponding jump has been observed. This works because all jumps
      except JumpLoop are forward jumps, so we only have to special case one
      Bind for loop headers to bind unconditionally.
      
      Since Binds are now conditional on a jump existing, we can no longer rely
      on using Bind to get the current offset (e.g. at the beginning of a try
      block). Instead, we now expose the current offset in the bytecode array
      writer. Conveniently, this means that we can be a bit smarter about basic
      blocks around these statements.
      
      As a drive-by, remove the unused Bind(target,label) function.
      
      Bug: chromium:934166
      Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
      Reviewed-on: https://chromium-review.googlesource.com/c/1488763
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59942}
      35269f77
  6. 21 Dec, 2018 1 commit
    • Jakob Gruber's avatar
      [coverage] Rework continuation counter handling · 9365d090
      Jakob Gruber authored
      This changes a few bits about how continuation counters are handled.
      
      It introduces a new mechanism that allows removal of a continuation
      range after it has been created. If coverage is enabled, we run a first
      post-processing pass on the AST immediately after parsing, which
      removes problematic continuation ranges in two situations:
      
      1. nested continuation counters - only the outermost stays alive.
      2. trailing continuation counters within a block-like structure are
         removed if the containing structure itself has a continuation.
      
      R=bmeurer@chromium.org, jgruber@chromium.org, yangguo@chromium.org
      
      Bug: v8:8381, v8:8539
      Change-Id: I6bcaea5060d8c481d7bae099f6db9f993cc30ee3
      Reviewed-on: https://chromium-review.googlesource.com/c/1339119Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58443}
      9365d090
  7. 24 Jan, 2018 1 commit
  8. 09 Nov, 2017 1 commit
  9. 21 Jul, 2017 2 commits
  10. 13 Jul, 2017 1 commit
  11. 19 Jun, 2017 1 commit
    • jgruber's avatar
      [coverage] Add continuation counters · 95882f0e
      jgruber authored
      Track execution counts of the continuations of block structures (e.g.
      IfStatements) to capture cases in which execution does not continue after a
      block. For example:
      
      for (;;) {
        return;
      }
      // Never reached, tracked by continuation counter.
      
      A continuation counter only has a start position; it's range is implicitly
      until the next sibling range or the end of the parent range.
      
      Bug: v8:6000
      Change-Id: I8e8f1f5b140b64c86754b916e626eb50f0707d70
      Reviewed-on: https://chromium-review.googlesource.com/530846
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46006}
      95882f0e
  12. 15 May, 2017 1 commit
  13. 05 Apr, 2017 1 commit
  14. 09 Jan, 2017 1 commit
  15. 29 Nov, 2016 3 commits
  16. 13 Sep, 2016 1 commit
    • mstarzinger's avatar
      [interpreter] Merge {OsrPoll} with {Jump} bytecode. · c9864173
      mstarzinger authored
      This introduces a new {JumpLoop} bytecode to combine the OSR polling
      mechanism modeled by {OsrPoll} with the actual {Jump} performing the
      backwards branch. This reduces the overall size and also avoids one
      additional dispatch. It also makes sure that OSR polling is only done
      within real loops.
      
      R=rmcilroy@chromium.org
      BUG=v8:4764
      
      Review-Url: https://codereview.chromium.org/2331033002
      Cr-Commit-Position: refs/heads/master@{#39384}
      c9864173
  17. 19 Aug, 2016 1 commit
  18. 02 Aug, 2016 1 commit
    • mstarzinger's avatar
      [interpreter] Elide OSR polling from fake loops. · 962fd4ae
      mstarzinger authored
      This makes sure we are not inserting {OsrPoll} instructions for any
      statements that are not actually loops and have no back edges. Without
      back edges the {BytecodeGraphBuilder} is unable to deduce loop ranges
      and hence cannot construct a graph for OSR entry.
      
      R=neis@chromium.org
      TEST=mjsunit/regress/regress-5252
      BUG=v8:5252
      
      Review-Url: https://codereview.chromium.org/2200733002
      Cr-Commit-Position: refs/heads/master@{#38233}
      962fd4ae
  19. 22 Jul, 2016 1 commit
    • yangguo's avatar
      [debug] use catch prediction flag for promise rejections. · 6d0a4202
      yangguo authored
      This is in preparation to implementing exception prediction for async
      functions.  Each handler table entry can now predict "caught", "uncaught", or
      "promise". The latter indicates that the exception will lead to a promise
      rejection.
      
      To mark the relevant try-catch blocks, we add a new native syntax.
      try { } %catch (e) { } indicates a TryCatchStatement with the "promise"
      prediction.
      
      The previous implementation of using the function to tell the relevant
      try-catch apart from inner try-catch blocks will not work for async functions
      since these can have inner try-catch blocks inside the same function.
      
      BUG=v8:5167
      
      Review-Url: https://codereview.chromium.org/2161263003
      Cr-Commit-Position: refs/heads/master@{#37966}
      6d0a4202
  20. 12 Jul, 2016 1 commit
  21. 04 May, 2016 1 commit
  22. 27 Apr, 2016 1 commit
  23. 12 Feb, 2016 2 commits
  24. 11 Feb, 2016 1 commit
    • mstarzinger's avatar
      [interpreter] Correctly thread through catch prediction. · ba55f559
      mstarzinger authored
      This change correctly sets the {CatchPrediction} field in exception
      handler tables for bytecode and optimized code. It also adds tests
      independent of promise handling for this prediction, to ensure all our
      backends are in sync on their prediction.
      
      R=rmcilroy@chromium.org,yangguo@chromium.org
      TEST=mjsunit/compiler/debug-catch-prediction
      BUG=v8:4674
      LOG=n
      
      Review URL: https://codereview.chromium.org/1690973002
      
      Cr-Commit-Position: refs/heads/master@{#33906}
      ba55f559
  25. 22 Jan, 2016 1 commit
  26. 20 Jan, 2016 1 commit
    • mstarzinger's avatar
      [interpreter] Implement exception handler table building. · 82716f1c
      mstarzinger authored
      This implements a first version of exception handler table construction
      within the interpreter. Note that the local control flow for try-catch
      and try-finally statements is still off, and also stack unwinding does
      not yet respect interpreter frames. But generated handler tables should
      be populated correctly already.
      
      R=oth@chromium.org
      BUG=v8:4674
      LOG=n
      
      Review URL: https://codereview.chromium.org/1607433005
      
      Cr-Commit-Position: refs/heads/master@{#33400}
      82716f1c
  27. 21 Dec, 2015 1 commit
  28. 16 Dec, 2015 2 commits
  29. 30 Oct, 2015 1 commit
  30. 29 Oct, 2015 1 commit
    • oth's avatar
      [Interpreter] Add support for for..in. · dcf757a1
      oth authored
      For..in introduces 3 new bytecodes ForInPrepare, ForInNext, and
      ForInDone to start a for..in loop, get the next element, and check if
      the loop is done.
      
      For..in builds upon new LoopBuilder constructs for conditionally
      breaking and continuing during iteration: BreakIf{Null|Undefined}
      and ContinueIf{Null|Undefined}. New conditional jump bytecodes
      support this succinctly: JumpIfNull and JumpIfUndefined.
      
      Add missing check to BytecodeLabel that could allow multiple
      forward referencess to the same label which is not supported.
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1422033002
      
      Cr-Commit-Position: refs/heads/master@{#31651}
      dcf757a1
  31. 01 Oct, 2015 1 commit