1. 10 Aug, 2021 1 commit
    • Jakob Kummerow's avatar
      [bigint] Faster parsing from small strings · 7817cf1f
      Jakob Kummerow authored
      This patch significantly speeds up parsing of small BigInts. Its
      primary idea is to move the loop that's iterating over the string
      into the FromStringAccumulator API. That enables using function-
      local variables instead of member fields.
      A second optimization is to use a stack-allocated digit_t[] array
      for small sizes, before falling back to a (comparatively slow)
      std::vector.
      As a particularly fast path, when this stack-allocated storage is
      guaranteed to be enough, we can perform inlined multiply-and-add
      steps directly on that data.
      Finally, this patch changes the conversion of characters to their
      numeric values from computations to a lookup table, which is a bit
      faster for radixes <= 10 (where, in the old code, only one range
      needed to be checked), and a lot faster for radixes > 10.
      
      Bug: v8:11515
      Change-Id: Ifd8ec4799ac34447ba6d4350b7788b559307784c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064603
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76210}
      7817cf1f
  2. 30 Jul, 2021 1 commit
  3. 24 Jun, 2021 3 commits
  4. 22 Jun, 2021 1 commit
  5. 18 Jun, 2021 1 commit
  6. 10 Jun, 2021 1 commit
  7. 26 Apr, 2021 1 commit
  8. 25 Nov, 2020 1 commit
  9. 24 Nov, 2020 1 commit
  10. 20 Nov, 2020 1 commit
  11. 17 Nov, 2020 2 commits
  12. 12 Nov, 2020 1 commit
  13. 07 Sep, 2020 1 commit
  14. 03 Sep, 2020 1 commit
    • Jakob Kummerow's avatar
      Revert "Check interrupts in runtime BigInt parser" · ec49e377
      Jakob Kummerow authored
      This reverts commit 825c61d8.
      
      Reason for revert: Processing interrupts triggers a DisallowHeapAllocation scope failure.
      
      Original change's description:
      > Check interrupts in runtime BigInt parser
      > 
      > The BigInt constructor has quadratic complexity while parsing strings,
      > and the input is unbounded. Interrupts should be checked during this
      > operation to ensure the host has control over runaway execution.
      > 
      > Change-Id: I15db9adeeafadc7b866a395dd8263aa8c2109ce8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2384166
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69679}
      
      TBR=jkummerow@chromium.org,leszeks@chromium.org,marcel@laverdet.com
      
      Bug: chromium:1124477
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Change-Id: I1ba8c1de1f809f71a1c4fae9b56a8bd40f9f7e7f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392815Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69703}
      ec49e377
  15. 02 Sep, 2020 1 commit
  16. 14 Aug, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Change OffThreadIsolate to LocalIsolate · f1589bbe
      Leszek Swirski authored
      This patch introduces a new LocalIsolate and LocalFactory, which use
      LocalHeap and replace OffThreadIsolate and OffThreadFactory. This allows
      us to remove those classes, as well as the related OffThreadSpace,
      OffThreadLargeObjectSpace, OffThreadHeap, and OffThreadTransferHandle.
      OffThreadLogger becomes LocalLogger.
      
      LocalHeap behaves more like Heap than OffThreadHeap did, so this allows
      us to additionally remove the concept of "Finish" and "Publish" that the
      OffThreadIsolate had, and allows us to internalize strings directly with
      the newly-concurrent string table (where the implementation can now move
      to FactoryBase).
      
      This patch also removes the off-thread support from the deserializer
      entirely, as well as removing the LocalIsolateWrapper which allowed
      run-time distinction between Isolate and OffThreadIsolate. LocalHeap
      doesn't support the reservation model used by the deserializer, and we
      will likely move the deserializer to use LocalIsolate unconditionally
      once we figure out the details of how to do this.
      
      Bug: chromium:1011762
      
      Change-Id: I1a1a0a72952b19a8a4c167c11a863c153a1252fc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315990
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69397}
      f1589bbe
  17. 20 Mar, 2020 1 commit
  18. 09 Mar, 2020 1 commit
  19. 02 Mar, 2020 1 commit
  20. 27 Feb, 2020 1 commit
  21. 04 Feb, 2020 1 commit
  22. 29 May, 2019 1 commit
    • Michael Mclaughlin's avatar
      Improve toString(radix) for doubles near zero · 348cc6f1
      Michael Mclaughlin authored
      Currently, Number.prototype.toString(radix) often fails to produce the
      least significant bit for doubles near zero. For example, for the
      minimum double, 5e-324, toString(2) produces "0". This means that a
      user cannot reliably get the exact binary or hexdecimal value of a
      double from JavaScript using toString.
      
      This patch makes a slight amendment to the DoubleToRadixCString
      function, so that doubles where the gap to the next double is 5e-324
      (i.e. doubles less than 2**-1021), are represented exactly in binary and
      other power-of-two bases, and close to exactly otherwise. It results
      in Number.prototype.toString producing the correct binary value for all
      doubles.
      
      R=jkummerow@chromium.org, mathias@chromium.org, yangguo@chromium.org
      
      Bug: v8:9294
      Change-Id: I71506149b7c4c0eac8c38675a1ee15fb4f36f9ef
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631601
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61925}
      348cc6f1
  23. 24 May, 2019 1 commit
  24. 23 May, 2019 4 commits
  25. 21 May, 2019 1 commit
  26. 15 May, 2019 1 commit
  27. 29 Apr, 2019 2 commits
    • Clemens Hammacher's avatar
      [cleanup] Remove {StrLength} function · 423b357b
      Clemens Hammacher authored
      The {Vector} class does not use it any more. External uses should be
      converted to {size_t} instead of {int}.
      This CL removes the function from vector.h and updates all users to
      either use {size_t}, or cast to {int} explicitly. In tests, no further
      checks are needed if the string is a constant.
      
      R=mstarzinger@chromium.org
      
      Bug: v8:9183
      Change-Id: I60f99302504c74d8a7c79b147ca01d8ba61b6879
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1587393Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61092}
      423b357b
    • Clemens Hammacher's avatar
      [cleanup] Use Vector::begin instead of Vector::start · 4b0f9c85
      Clemens Hammacher authored
      Our {Vector} template provides both {start} and {begin} methods. They
      return exactly the same value. Since the {begin} method is needed for
      iteration, and is also what standard containers provide, this CL
      switches all uses of the {start} method to use {begin} instead.
      
      Patchset 1 was auto-generated by using this clang AST matcher:
          callExpr(
              callee(
                cxxMethodDecl(
                  hasName("start"),
                  ofClass(hasName("v8::internal::Vector")))
              ),
              argumentCountIs(0))
      
      Patchset 2 was created by running clang-format. Patchset 3 then
      removes the now unused {Vector::start} method.
      
      R=jkummerow@chromium.org
      TBR=mstarzinger@chromium.org,yangguo@chromium.org,verwaest@chromium.org
      
      Bug: v8:9183
      Change-Id: Id9f01c92870872556e2bb3f6d5667463b0e3e5c6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1587381Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61081}
      4b0f9c85
  28. 12 Mar, 2019 1 commit
  29. 19 Dec, 2018 1 commit
  30. 11 Dec, 2018 1 commit
  31. 04 Dec, 2018 1 commit
  32. 27 Nov, 2018 1 commit
  33. 14 Nov, 2018 1 commit