1. 07 Feb, 2022 1 commit
    • Dominik Inführ's avatar
      [json, parsing] Switch to internal GC callbacks · becce45b
      Dominik Inführ authored
      We have two different kinds of GC prologues/epilogues. The user-exposed
      one in Heap and the internal one in LocalHeap. During parsing and in
      the JSON parser we were using the former. While this is definitely
      correct and at the time of implementation it was the only existing
      mechanism, I believe the internal callbacks are now a better fit for
      these use cases.
      
      Internal callbacks are simpler since they don't allow allocations, which
      allows us to run them during the GC safepoint. The user-exposed
      interfaces are allowed to allocate and are run either before or after
      the safepoint. Such allocations could cause recursive GCs, which is
      impossible for internal callbacks.
      
      Bug: v8:12545
      Change-Id: Ie697556cec9aa77b2f70704445aa5bd58e0a381a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3435188Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78971}
      becce45b
  2. 02 Dec, 2021 2 commits
  3. 11 Oct, 2021 1 commit
    • Leszek Swirski's avatar
      [scanner] Make position a parameter of ReadBlock · 3e9ba672
      Leszek Swirski authored
      It's not obvious for Utf16CharacterStream::ReadBlock that the block it
      has to read is implicitly the one at the current pos(), and it was
      slightly odd how ReadBlockAt had to fiddle with buffer_* values to make
      pos() return the desired value before ReadBlock is called -- especially
      since ReadBlock would usually overwrite those changes.
      
      Instead, we can just make ReadBlock take an explicit position, and get
      rid of ReadBlockAt entirely.
      
      As a drive-by, I was always confused by what the various buffer_*
      actually mean (especially the difference between buffer_cursor_ and
      buffer_pos_) so document them with some ASCII art.
      
      Change-Id: I610019089920692f54e01ae979c0ba827779e414
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3217194
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77315}
      3e9ba672
  4. 15 Sep, 2021 1 commit
  5. 24 Aug, 2021 1 commit
    • Dan Elphick's avatar
      Reland "[include] Split out v8.h" · ec06bb6c
      Dan Elphick authored
      This is a reland of d1b27019
      
      Fixes include:
      Adding missing file to bazel build
      Forward-declaring classing before friend-classing them to fix win/gcc
      Add missing v8-isolate.h include for vtune builds
      
      Original change's description:
      > [include] Split out v8.h
      >
      > This moves every single class/function out of include/v8.h into a
      > separate header in include/, which v8.h then includes so that
      > externally nothing appears to have changed.
      >
      > Every include of v8.h from inside v8 has been changed to a more
      > fine-grained include.
      >
      > Previously inline functions defined at the bottom of v8.h would call
      > private non-inline functions in the V8 class. Since that class is now
      > in v8-initialization.h and is rarely included (as that would create
      > dependency cycles), this is not possible and so those methods have been
      > moved out of the V8 class into the namespace v8::api_internal.
      >
      > None of the previous files in include/ now #include v8.h, which means
      > if embedders were relying on this transitive dependency then it will
      > give compile failures.
      >
      > v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      > that Chrome continue to compile but that change will be reverted once
      > those transitive #includes in chrome are changed to include it directly.
      >
      > Full design:
      > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      >
      > Bug: v8:11965
      > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76424}
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit
      Bug: v8:11965
      Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76460}
      ec06bb6c
  6. 23 Aug, 2021 2 commits
    • Dan Elphick's avatar
      Revert "[include] Split out v8.h" · 44fe02ce
      Dan Elphick authored
      This reverts commit d1b27019.
      
      Reason for revert: Broke vtune build, tsan build and possibly others
      
      Original change's description:
      > [include] Split out v8.h
      >
      > This moves every single class/function out of include/v8.h into a
      > separate header in include/, which v8.h then includes so that
      > externally nothing appears to have changed.
      >
      > Every include of v8.h from inside v8 has been changed to a more
      > fine-grained include.
      >
      > Previously inline functions defined at the bottom of v8.h would call
      > private non-inline functions in the V8 class. Since that class is now
      > in v8-initialization.h and is rarely included (as that would create
      > dependency cycles), this is not possible and so those methods have been
      > moved out of the V8 class into the namespace v8::api_internal.
      >
      > None of the previous files in include/ now #include v8.h, which means
      > if embedders were relying on this transitive dependency then it will
      > give compile failures.
      >
      > v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      > that Chrome continue to compile but that change will be reverted once
      > those transitive #includes in chrome are changed to include it directly.
      >
      > Full design:
      > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      >
      > Bug: v8:11965
      > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76424}
      
      Bug: v8:11965
      Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Owners-Override: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76428}
      44fe02ce
    • Dan Elphick's avatar
      [include] Split out v8.h · d1b27019
      Dan Elphick authored
      This moves every single class/function out of include/v8.h into a
      separate header in include/, which v8.h then includes so that
      externally nothing appears to have changed.
      
      Every include of v8.h from inside v8 has been changed to a more
      fine-grained include.
      
      Previously inline functions defined at the bottom of v8.h would call
      private non-inline functions in the V8 class. Since that class is now
      in v8-initialization.h and is rarely included (as that would create
      dependency cycles), this is not possible and so those methods have been
      moved out of the V8 class into the namespace v8::api_internal.
      
      None of the previous files in include/ now #include v8.h, which means
      if embedders were relying on this transitive dependency then it will
      give compile failures.
      
      v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      that Chrome continue to compile but that change will be reverted once
      those transitive #includes in chrome are changed to include it directly.
      
      Full design:
      https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      
      Bug: v8:11965
      Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76424}
      d1b27019
  7. 24 Jun, 2021 3 commits
  8. 09 Jun, 2021 1 commit
  9. 12 Apr, 2021 1 commit
  10. 02 Mar, 2021 1 commit
    • Leszek Swirski's avatar
      [scanner] Add a stream for windows-1252 · 0390795f
      Leszek Swirski authored
      Add a Utf16CharacterStream for windows-1252, which uses a table to
      covert from windows-1252 to the appropriate uc16 character. This fixes
      issues where windows-1252 encoded source was treated like latin-1.
      
      This introduces a new encoding type in the API, so embedders will have
      to opt-in to using this new stream.
      
      Fixed: v8:9315
      Change-Id: I2e847c2d4f1727281f6be24b4743d77bb232a62d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2729338
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73134}
      0390795f
  11. 26 Nov, 2020 1 commit
  12. 24 Nov, 2020 1 commit
  13. 20 Nov, 2020 1 commit
  14. 14 Oct, 2020 1 commit
  15. 13 Feb, 2020 1 commit
  16. 12 Feb, 2020 2 commits
  17. 18 Sep, 2019 1 commit
    • Clemens Hammacher's avatar
      Reland^2 "Remove all custom CopyCharsUnsigned implementations" · 3b808dee
      Clemens Hammacher authored
      This is an unmodified reland of
      9febc505. Nosnap bots do not block
      LKGR any more: https://crbug.com/v8/9737#c10.
      
      Original change's description:
      > Reland "Remove all custom CopyCharsUnsigned implementations"
      >
      > This is a reland of 5d8c4890
      >
      > Original change's description:
      > > Remove all custom CopyCharsUnsigned implementations
      > >
      > > It's unclear whether the custom implementation have any advantage over
      > > the standard library one's.
      > > Since we update our toolchain and standard library regularly, it might
      > > well be the case that the custom implementations are slower by now.
      > >
      > > Thus this CL removes all {CopyCharsUnsigned} implementations and
      > > implements {CopyChars} generically using {std::copy_n}.
      > >
      > > Note that this does not touch the {MemMove} and {MemCopy} functions
      > > yet, as we have seen regressions when trying to remove them before
      > > (https://crbug.com/v8/8675#c5).
      > >
      > > R=leszeks@chromium.org
      > >
      > > Bug: v8:9396
      > > Change-Id: I97a183afebcccd2fbb567bdba02e827331475608
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1800577
      > > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#63808}
      >
      > Bug: v8:9396
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      > Change-Id: I9cd754ebe6b802bb4aabd6d2a448de41da040874
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807357
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63823}
      
      TBR=leszeks@chromium.org
      
      Bug: v8:9396
      Change-Id: I793524d76b8b9c93d2a98c73e8d72967880fe1cf
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809362
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63857}
      3b808dee
  18. 17 Sep, 2019 2 commits
    • Adam Klein's avatar
      Revert "Reland "Remove all custom CopyCharsUnsigned implementations"" · 24c35b92
      Adam Klein authored
      This reverts commits 9febc505
      (along with followup commit 60624b56).
      
      Reason for revert: Breaks win32 nosnap shared, blocking lkgr & roll:
      https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20nosnap%20-%20shared/35145
      
      nosnap bots may be deprecated, but as long as they're in LKGR
      we need to mind them.
      
      Original change's description:
      > Reland "Remove all custom CopyCharsUnsigned implementations"
      >
      > This is a reland of 5d8c4890
      >
      > Original change's description:
      > > Remove all custom CopyCharsUnsigned implementations
      > >
      > > It's unclear whether the custom implementation have any advantage over
      > > the standard library one's.
      > > Since we update our toolchain and standard library regularly, it might
      > > well be the case that the custom implementations are slower by now.
      > >
      > > Thus this CL removes all {CopyCharsUnsigned} implementations and
      > > implements {CopyChars} generically using {std::copy_n}.
      > >
      > > Note that this does not touch the {MemMove} and {MemCopy} functions
      > > yet, as we have seen regressions when trying to remove them before
      > > (https://crbug.com/v8/8675#c5).
      > >
      > > R=leszeks@chromium.org
      > >
      > > Bug: v8:9396
      > > Change-Id: I97a183afebcccd2fbb567bdba02e827331475608
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1800577
      > > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#63808}
      >
      > Bug: v8:9396
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      > Change-Id: I9cd754ebe6b802bb4aabd6d2a448de41da040874
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807357
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63823}
      
      TBR=leszeks@chromium.org,clemensh@chromium.org
      
      Change-Id: Ic53ab2293d5dc7722a1121d1aa1159328a6ed8f5
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9396
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1808035Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63854}
      24c35b92
    • Clemens Hammacher's avatar
      Reland "Remove all custom CopyCharsUnsigned implementations" · 9febc505
      Clemens Hammacher authored
      This is a reland of 5d8c4890
      
      Original change's description:
      > Remove all custom CopyCharsUnsigned implementations
      >
      > It's unclear whether the custom implementation have any advantage over
      > the standard library one's.
      > Since we update our toolchain and standard library regularly, it might
      > well be the case that the custom implementations are slower by now.
      >
      > Thus this CL removes all {CopyCharsUnsigned} implementations and
      > implements {CopyChars} generically using {std::copy_n}.
      >
      > Note that this does not touch the {MemMove} and {MemCopy} functions
      > yet, as we have seen regressions when trying to remove them before
      > (https://crbug.com/v8/8675#c5).
      >
      > R=leszeks@chromium.org
      >
      > Bug: v8:9396
      > Change-Id: I97a183afebcccd2fbb567bdba02e827331475608
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1800577
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63808}
      
      Bug: v8:9396
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
      Change-Id: I9cd754ebe6b802bb4aabd6d2a448de41da040874
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807357Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63823}
      9febc505
  19. 16 Sep, 2019 2 commits
    • Adam Klein's avatar
      Revert "Remove all custom CopyCharsUnsigned implementations" · 0aac347e
      Adam Klein authored
      This reverts commit 5d8c4890.
      
      Reason for revert: Fails on UBSan bot:
      https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/7946
      
      Original change's description:
      > Remove all custom CopyCharsUnsigned implementations
      > 
      > It's unclear whether the custom implementation have any advantage over
      > the standard library one's.
      > Since we update our toolchain and standard library regularly, it might
      > well be the case that the custom implementations are slower by now.
      > 
      > Thus this CL removes all {CopyCharsUnsigned} implementations and
      > implements {CopyChars} generically using {std::copy_n}.
      > 
      > Note that this does not touch the {MemMove} and {MemCopy} functions
      > yet, as we have seen regressions when trying to remove them before
      > (https://crbug.com/v8/8675#c5).
      > 
      > R=​leszeks@chromium.org
      > 
      > Bug: v8:9396
      > Change-Id: I97a183afebcccd2fbb567bdba02e827331475608
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1800577
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63808}
      
      TBR=leszeks@chromium.org,clemensh@chromium.org
      
      Change-Id: Ia16da942c7c28ba71076d1e3b0b8a6388a4ba359
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9396
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1806103Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63810}
      0aac347e
    • Clemens Hammacher's avatar
      Remove all custom CopyCharsUnsigned implementations · 5d8c4890
      Clemens Hammacher authored
      It's unclear whether the custom implementation have any advantage over
      the standard library one's.
      Since we update our toolchain and standard library regularly, it might
      well be the case that the custom implementations are slower by now.
      
      Thus this CL removes all {CopyCharsUnsigned} implementations and
      implements {CopyChars} generically using {std::copy_n}.
      
      Note that this does not touch the {MemMove} and {MemCopy} functions
      yet, as we have seen regressions when trying to remove them before
      (https://crbug.com/v8/8675#c5).
      
      R=leszeks@chromium.org
      
      Bug: v8:9396
      Change-Id: I97a183afebcccd2fbb567bdba02e827331475608
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1800577
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63808}
      5d8c4890
  20. 13 Aug, 2019 1 commit
  21. 07 Jun, 2019 1 commit
  22. 06 Jun, 2019 1 commit
  23. 24 May, 2019 1 commit
  24. 23 May, 2019 3 commits
  25. 21 May, 2019 1 commit
  26. 20 May, 2019 1 commit
  27. 17 May, 2019 2 commits
  28. 24 Apr, 2019 1 commit
  29. 03 Apr, 2019 1 commit
  30. 29 Mar, 2019 1 commit