1. 24 Nov, 2020 1 commit
  2. 09 Sep, 2020 1 commit
    • Martin Bidlingmaier's avatar
      [regexp] Support more quantifiers in experimental engine · f2a832ca
      Martin Bidlingmaier authored
      Previously to this commit only quantifiers of the form /<x>*/, i.e.
      arbitrarily often greedy repetition, were implemented.  Now a much
      larger class is supported, e.g. + and ? and their non-greedy variants.
      Because it came up repeatedly during the implementation, the commit also
      adds the Label and DeferredLabel classes to patch JMP and FORK target
      addresses more easily.
      
      Still not supported are the following quantifiers:
      - Possessive quantifiers, where I'm not entirely sure whether they could
        be implemented in principle. Re2 doesn't support them.
      - Quantifiers with large but finite numbers for min and max numbers of
        repetitions, as in e.g. /<x>{9000, 90000}/. These are currently
        limited to some small value. This is because the body of such
        repetitions is unrolled explicitly, so the size of the bytecode is
        linear in the number of repetitions.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
      Bug: v8:10765
      Change-Id: Id04d893252588abb0f80c3cb33cfc707f6601ea0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2387575
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69759}
      f2a832ca
  3. 10 Jul, 2020 1 commit
  4. 08 Jul, 2020 1 commit
  5. 10 Jun, 2020 1 commit
  6. 12 Mar, 2020 1 commit
    • Iain Ireland's avatar
      [regexp] Cache min/max-match for RegExpCapture/Group · 9b5141ca
      Iain Ireland authored
      Unlike the other RegExpTree types, RegExpCapture and RegExpGroup don't
      cache their min/maxMatch value. Instead, they compute it by recursing
      on the min/maxMatch of the body node. In pathological cases, with
      sufficiently small stacks, this can cause stack overflow. (In
      SpiderMonkey's case, it was a worker on 32-bit x86.)
      
      It's easy enough to just precompute the value when the body is set.
      
      R=jgruber@chromium.org
      
      Bug: v8:10303
      Change-Id: I4ba3d301d9a4a3f3c0cb94966148b747a4092d26
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2090192
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66673}
      9b5141ca
  7. 16 Oct, 2019 1 commit
  8. 27 Jun, 2019 1 commit
    • Jakob Gruber's avatar
      [regexp] Refactor BoyerMoorePositionInfo uses · ad68a376
      Jakob Gruber authored
      BoyerMoorePositionInfo is a simple wrapper around a bitset and an
      associated ContainedInLattice field. This CL refactors bitset-related
      operations that used to be implemented naively (e.g.: loop over all
      bits to find a single set bit, or to generate a union of two bitsets).
      
      Instead, use more suitable methods from base::bits and std::bitset.
      
      Drive-by: Remove dead class members.
      Drive-by: Zero the ByteArray with memset.
      
      Bug: v8:9359
      Change-Id: I33923c7d216320f4e3d7e4a6df2967f4aa86ab05
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1667407
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62419}
      ad68a376
  9. 17 Jun, 2019 1 commit
    • Jakob Gruber's avatar
      [regexp] Rewrite certain Assertion sequences · c51e4f3c
      Jakob Gruber authored
      RegExp assertions (e.g.: '^', '$', '\b', ...) sequences have certain
      properties that this rewriter exploits:
      
      1. They are zero-width and order-independent, thus one can remove all
      duplicate assertions.
      2. If a subsequence is guaranteed to fail, the entire sequence fails.
      Any sequence always known to fail (e.g. containing both '\b' and '\B')
      can be rewritten to a single node that triggers failure.
      
      This CL generalizes the previous optimization for repeated assertions
      to be order-independent, i.e. assertions only have to be in the same
      sequence but not next to each other.
      
      Bug: v8:6515, v8:6126
      Change-Id: I3f92f081ce8a55ad8c34c269a09a6686e3b008f3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1657925
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62201}
      c51e4f3c
  10. 23 May, 2019 2 commits
  11. 03 Apr, 2019 1 commit
  12. 02 Apr, 2019 1 commit
  13. 28 Jan, 2019 1 commit
    • Jakob Kummerow's avatar
      [ubsan] Fix Clusterfuzz-found bugs · a8aa4b4e
      Jakob Kummerow authored
      Smi::LexicographicCompare: signed integer overflow on negation.
      Drive-by improvement: reduce number of branches.
      
      RegExpQuantifier: signed integer overflow on multiplication.
      
      DateCache::DaylightSavingsOffsetInMs: signed integer overflow
      on addition.
      
      Bug: v8:3770,chromium:923466,chromium:923642,chromium:923626
      Change-Id: If7d995a13893d1315449ee0bab8b5f2553e170f5
      Reviewed-on: https://chromium-review.googlesource.com/c/1436229Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59143}
      a8aa4b4e
  14. 18 Sep, 2018 1 commit
  15. 11 Sep, 2018 1 commit
  16. 18 Dec, 2017 1 commit
  17. 09 Nov, 2017 1 commit
  18. 06 Nov, 2017 2 commits
  19. 03 Nov, 2017 2 commits
  20. 13 Oct, 2017 1 commit
  21. 28 Aug, 2017 1 commit
    • jgruber's avatar
      [regexp] Shortcut case-folding of entire non-bmp range · 4735f85f
      jgruber authored
      When the range of all non-bmp characters is passed to
      AddUnicodeCaseEquivalents, icu::UnicodeSet::closeOver dutifully tries to
      case-fold every single character in that range. Since we already know
      this to be a nop, we can simply return instead.
      
      This improves compilation time of /ui regexps by around 100x.
      
      Bug: v8:6727
      Change-Id: I79d73c77d6a54cbb5ad2cad0355214ed712b59b9
      Reviewed-on: https://chromium-review.googlesource.com/635303
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47636}
      4735f85f
  22. 25 Jul, 2017 1 commit
  23. 12 Jun, 2017 1 commit
  24. 12 Apr, 2017 1 commit
  25. 28 Feb, 2017 1 commit
  26. 18 Jan, 2017 1 commit
  27. 20 Sep, 2016 1 commit
  28. 15 Jun, 2016 1 commit
  29. 25 Apr, 2016 1 commit
  30. 09 Mar, 2016 1 commit
    • yangguo's avatar
      [regexp] fix bogus assertion in CharacterRange constructor. · d1f68f77
      yangguo authored
      The CharacterRange constructor checks the input for validity. However,
      CharacterRange::Singleton also uses the constructor and may have
      kEndMarker as input, causing the check to fail.
      
      The solution is to move the check to CharacterRange::Range and
      consistently use it across the code base.
      
      R=jkummerow@chromium.org
      BUG=chromium:593282
      LOG=N
      
      Review URL: https://codereview.chromium.org/1776013003
      
      Cr-Commit-Position: refs/heads/master@{#34626}
      d1f68f77
  31. 07 Mar, 2016 2 commits
  32. 27 Jan, 2016 1 commit
  33. 25 Jan, 2016 1 commit
  34. 21 Jan, 2016 3 commits