1. 01 Feb, 2021 1 commit
    • Peter Wong's avatar
      [torque] Port String.prototype.includes/indexOf and StringIndexOf · 5a2c53f9
      Peter Wong authored
      - Removed no longer used StringBuiltinAssembler methods (DispatchOnStringEncodings, PointerToStringDataAtIndex)
      - Removed no longer used Runtime functions (StringIncludes, StringIndexOf, StringIndexOfUnchecked).
      - Overall builtin code size is reduced (652 bytes on Mac x64.release build), builtin size breakdown:
      
      BEFORE
      ======
      TFS Builtin, StringIndexOf, 1092
      TFJ Builtin, StringPrototypeIncludes, 1784
      TFJ Builtin, StringPrototypeIndexOf, 1536
      Total = 4412
      
      AFTER
      =====
      TFC Builtin, StringIndexOf, 2036 (+944)
      TFJ Builtin, StringPrototypeIncludes, 1072 (-712)
      TFJ Builtin, StringPrototypeIndexOf, 652 (-884)
      Total = 3760 (-652)
      
      
      Bug: v8:8996
      Change-Id: I9a88c095e2097f7d570e58e744d6692dc524ddf4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660995
      Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72456}
      5a2c53f9
  2. 06 Nov, 2020 1 commit
    • Mythri A's avatar
      [csa][cleanup] TNodify StringAdd_CheckNone buitin · 452ca36b
      Mythri A authored
      StringAdd_CheckNone is called from Turbofan with an empty context. This
      builtin needs context when calling the StringAdd runtime function which
      could potentially throw. Turbofan does bounds check before calling this
      builtin so it is safe to pass an empty context. To enable TNodification
      of this builtin this cl adds a new type that either accepts a context
      or an empty context (Smi::Zero) and updates the builtin to use this new
      type.
      
      Bug: v8:6949, v8:11074
      Change-Id: Iff12b391ff95109649f2c81fe081e277850f60d6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523205
      Commit-Queue: Mythri Alle <mythria@chromium.org>
      Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71018}
      452ca36b
  3. 05 Nov, 2020 1 commit
  4. 06 May, 2020 1 commit
  5. 11 Nov, 2019 1 commit
  6. 05 Nov, 2019 1 commit
  7. 30 Oct, 2019 1 commit
  8. 22 Oct, 2019 1 commit
    • Igor Sheludko's avatar
      [builtins] Port String.prototype.substr to Torque · 3c57ad21
      Igor Sheludko authored
      ... and refactor String.prototype.substring.
      
      This is done to simplify cleaning up callers of ConvertToRelativeIndex()
      in a follow-up CL.
      
      This CL also introduces Smi-overflow friendly helper function
        ClampToIndexRange(index: JSAny, min: uintptr, max: uintptr): uintptr
      
      which can be used in other String builtins as a better alternative to
        NumberMin(NumberMax(value, min), max)
      pattern.
      
      Bug: v8:8996, v8:4153
      Change-Id: Ie1bb5ab305ebf851c033d109ffe9e6afb9418274
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1872392
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64463}
      3c57ad21
  9. 25 Sep, 2019 1 commit
  10. 23 Sep, 2019 1 commit
  11. 13 Sep, 2019 1 commit
  12. 04 Sep, 2019 1 commit
  13. 27 Aug, 2019 1 commit
  14. 23 Aug, 2019 1 commit
  15. 20 Aug, 2019 1 commit
  16. 19 Aug, 2019 1 commit
  17. 29 Jul, 2019 1 commit
    • Jakob Gruber's avatar
      [regexp] Restructure fast path check logic · c6b1ef0e
      Jakob Gruber authored
      Prior to this CL, the regexp fast path check is stricter than it
      needs to be. For example, adding any arbitrary property on the regexp
      prototype would move the execution of all regexp builtins in the same
      context onto the slow path. This actually happens in the real world:
      popular web frameworks commonly monkey-patch builtin prototypes to add
      functionality.
      
      The intent of this CL is to widen the fast path for regexp builtins s.t.
      modifications of the prototype that do not conflict with our
      requirements stay on the fast path.
      
      This is done by extending the current fast path check with an
      additional step. If checking the prototype map identity or
      relevant prototype property constness fails, we now compare the actual
      value of all relevant properties against the expected value. If these
      match, the prototype can be considered fast.
      
      The new step as described in the previous paragraph is part of the
      permissive fast path check (BranchIfFastRegExp_Permissive). The strict
      variant (BranchIfFastRegExp_Strict) is also still required by a few
      spots. We should refactor these to also allow the permissive check in
      follow-up work.
      
      Bug: v8:5577,chromium:977382
      Change-Id: I69b2244e68ccfbd00edf17fc326aa4b5f5d089fa
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706056
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62948}
      c6b1ef0e
  18. 01 Jul, 2019 1 commit
  19. 27 May, 2019 1 commit
    • Clemens Hammacher's avatar
      [cleanup] Replace simple typedefs by using · a335f2ae
      Clemens Hammacher authored
      This replaces all typedefs that define types and not functions by the
      equivalent "using" declaration.
      
      This was done mostly automatically using this command:
      ag -l '\btypedef\b' src test | xargs -L1 \
           perl -i -p0e 's/typedef ([^*;{}]+) (\w+);/using \2 = \1;/sg'
      
      Patchset 2 then adds some manual changes for typedefs for pointer types,
      where the regular expression did not match.
      
      R=mstarzinger@chromium.org
      TBR=yangguo@chromium.org, jarin@chromium.org
      
      Bug: v8:9183
      Change-Id: I6f6ee28d1793b7ac34a58f980b94babc21874b78
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631409
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61849}
      a335f2ae
  20. 21 May, 2019 2 commits
  21. 14 May, 2019 1 commit
  22. 09 May, 2019 1 commit
  23. 06 May, 2019 1 commit
  24. 04 Apr, 2019 1 commit
  25. 14 Mar, 2019 1 commit
  26. 14 Nov, 2018 1 commit
  27. 18 Oct, 2018 1 commit
  28. 08 Oct, 2018 1 commit
    • Hai Dang's avatar
      Reland "Add fast path for spreading primitive strings." · 760eed05
      Hai Dang authored
      This is a reland of ef2a19a2.
      Use AllocateJSArray to avoid allocating an empty fixed array.
      
      Original change's description:
      > Add fast path for spreading primitive strings.
      >
      > This improves the performance on primitive strings of
      > IterableToListWithSymbolLookup, which implements the
      > CreateArrayFromIterable bytecode. The fast path is only
      > taken if the string iterator protector is valid (that is,
      > String.prototype[Symbol.iterator] and
      > String.prototype[Symbol.iterator]().next are untouched).
      >
      > This brings spreading of primitive strings closer to the
      > performance of the string iterator optimizations.
      > (see https://docs.google.com/document/d/13z1fvRVpe_oEroplXEEX0a3WK94fhXorHjcOMsDmR-8/).
      >
      > Bug: chromium:881273, v8:7980
      > Change-Id: Ic8d8619da2f2afcc9346203613a844f62653fd7a
      > Reviewed-on: https://chromium-review.googlesource.com/1243110
      > Commit-Queue: Hai Dang <dhai@google.com>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#56329}
      
      Bug: chromium:881273, v8:7980
      Change-Id: I746c57ddfc300e1032057b5125bc824adf5c2cd3
      Reviewed-on: https://chromium-review.googlesource.com/c/1267497
      Commit-Queue: Georg Neis <neis@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56438}
      760eed05
  29. 04 Oct, 2018 1 commit
  30. 02 Oct, 2018 1 commit
  31. 13 Sep, 2018 1 commit
  32. 07 Sep, 2018 1 commit
  33. 18 Jun, 2018 1 commit
  34. 18 May, 2018 1 commit
  35. 17 May, 2018 1 commit
  36. 07 May, 2018 1 commit
    • jgruber's avatar
      [builtins] Convert CEntry/GetProperty/StringAdd stubs to builtins · d8131cd6
      jgruber authored
      Stubs and builtins are very similar. The main differences are that
      stubs can be parameterized and may be generated at runtime, whereas
      builtins are generated at mksnapshot-time and shipped with the snapshot
      (or embedded into the binary).
      
      My main motivation for these conversions is that we can generate
      faster calls and jumps to (embedded) builtins callees from (embedded)
      builtin callers. Instead of going through the builtins constants table
      indirection, we can simply do a pc-relative call/jump.
      
      This also unlocks other refactorings, e.g. removal of
      CallRuntimeDelayed.
      
      TBR=mlippautz@chromium.org
      
      Bug: v8:6666
      Change-Id: I4cd63477f19a330ec70bbf20e2af8a42fb05fabb
      Reviewed-on: https://chromium-review.googlesource.com/1044245Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53027}
      d8131cd6
  37. 05 Apr, 2018 1 commit
  38. 12 Jan, 2018 2 commits