1. 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
  2. 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
  3. 13 Feb, 2020 1 commit
  4. 12 Feb, 2020 2 commits
  5. 13 Sep, 2019 1 commit
  6. 24 May, 2019 1 commit
  7. 25 Sep, 2018 2 commits
    • Ross McIlroy's avatar
      Reland "[Compile] Refactor BackgroundCompileTask to enable its use by CompilerDispatcher" · dc204cc6
      Ross McIlroy authored
      This is a reland of 31228a69
      
      TBR=yangguo@chromium.org,verwaest@chromium.org
      
      Original change's description:
      > [Compile] Refactor BackgroundCompileTask to enable its use by CompilerDispatcher
      >
      > Splits background compilation data out of ScriptStreamingData and into
      > BackgroundCompileTask. Also makes BackgroundCompileTask no longer a sub-class
      > of ScriptStreamingTask, and instead have ScriptStreamingTask delegate to a
      > BackgroundCompileTask.
      >
      > As part of this change, we now create the CharacterStream on the main thread,
      > and therefore have to set the (thread-local) runtime_call_stats on the already
      > created CharacterStream when the BackgroundCompileTask is run on the background
      > thread. As such, changes to CharacterStream were needed to feed the
      > runtime_call_stats through appropriately.
      >
      > Deprecates Source::GetCachedData and StreamedSource::GetCachedData since they are
      > no longer used, and the streamed source never has cached data (streaming is
      > suppressed if cached data is available). Also removes Utf8ChunkedStream which
      > is dead code.
      >
      > BUG=v8:8041, v8:8015
      > TBR=yangguo@chromium.org
      >
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      > Change-Id: Ifcc723ebf930a1dc01135fcb70929d6168471cb3
      > Reviewed-on: https://chromium-review.googlesource.com/1236353
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#56182}
      
      Bug: v8:8041, v8:8015
      Change-Id: Ied5132c537d4c25c6e355f289c2a9cc1f8ff98e9
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1242097
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56201}
      dc204cc6
    • Maya Lekova's avatar
      Revert "[Compile] Refactor BackgroundCompileTask to enable its use by CompilerDispatcher" · 875480d2
      Maya Lekova authored
      This reverts commit 31228a69.
      
      Reason for revert: Introduces new pretty consistent flakes on Linux sanitizers, one of which block LKGR. Please see https://crbug.com/v8/8219
      
      Original change's description:
      > [Compile] Refactor BackgroundCompileTask to enable its use by CompilerDispatcher
      > 
      > Splits background compilation data out of ScriptStreamingData and into
      > BackgroundCompileTask. Also makes BackgroundCompileTask no longer a sub-class
      > of ScriptStreamingTask, and instead have ScriptStreamingTask delegate to a
      > BackgroundCompileTask.
      > 
      > As part of this change, we now create the CharacterStream on the main thread,
      > and therefore have to set the (thread-local) runtime_call_stats on the already
      > created CharacterStream when the BackgroundCompileTask is run on the background
      > thread. As such, changes to CharacterStream were needed to feed the
      > runtime_call_stats through appropriately.
      > 
      > Deprecates Source::GetCachedData and StreamedSource::GetCachedData since they are
      > no longer used, and the streamed source never has cached data (streaming is
      > suppressed if cached data is available). Also removes Utf8ChunkedStream which
      > is dead code.
      > 
      > BUG=v8:8041, v8:8015
      > TBR=yangguo@chromium.org
      > 
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      > Change-Id: Ifcc723ebf930a1dc01135fcb70929d6168471cb3
      > Reviewed-on: https://chromium-review.googlesource.com/1236353
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#56182}
      
      TBR=rmcilroy@chromium.org,yangguo@chromium.org,verwaest@chromium.org
      
      Change-Id: Ib05bcbde2e9a588bd4008d2155f75cdac5cc47f5
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8041, v8:8015
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1241958Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56187}
      875480d2
  8. 24 Sep, 2018 1 commit
    • Ross McIlroy's avatar
      [Compile] Refactor BackgroundCompileTask to enable its use by CompilerDispatcher · 31228a69
      Ross McIlroy authored
      Splits background compilation data out of ScriptStreamingData and into
      BackgroundCompileTask. Also makes BackgroundCompileTask no longer a sub-class
      of ScriptStreamingTask, and instead have ScriptStreamingTask delegate to a
      BackgroundCompileTask.
      
      As part of this change, we now create the CharacterStream on the main thread,
      and therefore have to set the (thread-local) runtime_call_stats on the already
      created CharacterStream when the BackgroundCompileTask is run on the background
      thread. As such, changes to CharacterStream were needed to feed the
      runtime_call_stats through appropriately.
      
      Deprecates Source::GetCachedData and StreamedSource::GetCachedData since they are
      no longer used, and the streamed source never has cached data (streaming is
      suppressed if cached data is available). Also removes Utf8ChunkedStream which
      is dead code.
      
      BUG=v8:8041, v8:8015
      TBR=yangguo@chromium.org
      
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Ifcc723ebf930a1dc01135fcb70929d6168471cb3
      Reviewed-on: https://chromium-review.googlesource.com/1236353
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56182}
      31228a69
  9. 21 Aug, 2018 1 commit
    • Toon Verwaest's avatar
      [scanner] Go back to untemplatized scanning with buffering · fcfd995a
      Toon Verwaest authored
      This reverts the following 3 CLs:
      
      Revert "[scanner] Templatize scan functions by encoding"
      Revert "[asm] Remove invalid static cast of character stream"
      Revert "[scanner] Prepare CharacterStreams for specializing scanner and parser by character type"
      
      The original idea behind this work was to avoid copying, converting and
      buffering characters to be scanned by specializing the scanner functions. The
      additional benefit was for scanner functions to have a bigger window over the
      input. Even though we can get a pretty nice speedup from having a larger
      window, in practice this rarely helps. The cost is a larger binary.
      
      Since we can't eagerly convert utf8 to utf16 due to memory overhead, we'd also
      need to have a specialized version of the scanner just for utf8. That's pretty
      complex, and likely won't be better than simply bulk converting and buffering
      utf8 as utf16.
      
      Change-Id: Ic3564683932a0097e3f9f51cd88f62c6ac879dcb
      Reviewed-on: https://chromium-review.googlesource.com/1183190Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55258}
      fcfd995a
  10. 20 Aug, 2018 1 commit
  11. 16 Aug, 2018 1 commit
  12. 01 Aug, 2018 1 commit
  13. 05 Jul, 2018 2 commits
  14. 04 Jul, 2018 1 commit
  15. 16 Mar, 2017 1 commit
    • bradnelson's avatar
      [wasm][asm.js] Adding custom asm.js lexer. · 4c3217e1
      bradnelson authored
      Adding a custom lexer for asm.js parsing.
      It takes advantage of a number of asm.js properties to simply things:
      * Assumes 'use asm' is the only string.
      * Does not handle unicode for now (tools don't emit it).
      * Combines global + local string table with lexer.
      
      R=marja@chromium.org,vogelheim@chromium.org,kschimpf@chromium.org
      
      BUG=v8:4203
      BUG=v8:6090
      
      Review-Url: https://codereview.chromium.org/2751693002
      Cr-Commit-Position: refs/heads/master@{#43874}
      4c3217e1
  16. 27 Jan, 2017 1 commit
  17. 05 Dec, 2016 1 commit
  18. 16 Sep, 2016 1 commit
    • vogelheim's avatar
      Rework scanner-character-streams. · 642d6d31
      vogelheim authored
      - Smaller, more consistent streams API (Advance, Back, pos, Seek)
      - Remove implementations from the header, in favor of creation functions.
      
      Observe:
      - Performance:
        - All Utf16CharacterStream methods have an inlinable V8_LIKELY w/ a
          body of only a few instructions. I expect most calls to end up there.
        - There used to be performance problems w/ bookmarking, particularly
          with copying too much data on SetBookmark w/ UTF-8 streaming streams.
          All those copies are gone.
        - The old streaming streams implementation used to copy data even for
          2-byte input. It no longer does.
        - The only remaining 'slow' method is the Seek(.) slow case for utf-8
          streaming streams. I don't expect this to be called a lot; and even if,
          I expect it to be offset by the gains in the (vastly more frequent)
          calls to the other methods or the 'fast path'.
        - If it still bothers us, there are several ways to speed it up.
      - API & code cleanliness:
        - I want to remove the 'old' API in a follow-up CL, which should mostly
          delete code, or replace it 1:1.
        - In a 2nd follow-up I want to delete much of the UTF-8 handling in Blink
          for streaming streams.
        - The "bookmark" is now always implemented (and mostly very fast), so we
          should be able to use it for more things.
      - Testing & correctness:
        - The unit tests now cover all stream implementations,
          and are pretty good and triggering all the edge cases.
        - Vastly more DCHECKs of the invariants.
      
      BUG=v8:4947
      
      Review-Url: https://codereview.chromium.org/2314663002
      Cr-Commit-Position: refs/heads/master@{#39464}
      642d6d31
  19. 23 Aug, 2016 1 commit
    • vogelheim's avatar
      Remove unused Utf8ToUtf16CharacterStream. · e954e954
      vogelheim authored
      - The static method CopyChars was actually used and has been extracted.
      - It was used in tests, where it's been replaced w/ ExternalOneByteString...
      - Only one test actually relied on Utf8 handling (as opposed to ASCII only),
        and that was the test testing Utf8ToUtf16CharacterStream itself.
      
      +66 -277 LOC :)
      
      BUG=v8:4947
      
      Review-Url: https://codereview.chromium.org/2256273002
      Cr-Commit-Position: refs/heads/master@{#38824}
      e954e954
  20. 29 Jul, 2016 1 commit
  21. 03 May, 2016 1 commit
    • vogelheim's avatar
      Fix ExternalTwobyteStringUtf16CharacterStream::PushBack(kEndOfInput) · 57f0a521
      vogelheim authored
      PushBack(end-of-input) is a little weird, but since
      Utf16CharacterStream::Advance will advance pos_m, but not buffer_cursor_
      when at the end of the stream, pushing back the end-of-input token needs
      to do the exact inverse.
      
      (The reason Advance does not advance buffer_cursor_ is that buffer_cursor_ is often dereferenced
       directly to access memory and so always needs to point to, well, memory.)
      (The PushBack implementation for all other streams looks correct.)
      
      R=rossberg@chromium.org
      BUG=chromium:607903
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/1941843002
      Cr-Commit-Position: refs/heads/master@{#35968}
      57f0a521
  22. 26 Nov, 2015 1 commit
  23. 04 Nov, 2015 1 commit
  24. 30 Sep, 2015 1 commit
  25. 16 Sep, 2015 1 commit
  26. 20 Aug, 2015 1 commit
  27. 27 May, 2015 1 commit
    • vogelheim's avatar
      Fix DCHECK on SetBookmark. · 21e6831e
      vogelheim authored
      The DCHECK was a lie. The idea was that - when a bookmark is set -
      the scanner must clearly be at a character boundary and hence the
      bookmark does not need to save a 'partial' UTF-8 code point. The
      first part is true - the Scanner is always at a character boundary -
      but the 'partial' UTF-8 code point is at the end of a block, not at
      the current character position of the Scanner.
      Hence, the 'partial' character needs to be saved as well.
      
      jkummerow: Thanks for noticing.
      
      BUG=chromium:470930
      R=jochen@chromium.org, jkummerow@chromium.org
      LOG=N
      
      Review URL: https://codereview.chromium.org/1154773004
      
      Cr-Commit-Position: refs/heads/master@{#28661}
      21e6831e
  28. 26 May, 2015 1 commit
  29. 06 May, 2015 1 commit
  30. 20 Apr, 2015 1 commit
  31. 05 Feb, 2015 1 commit
  32. 12 Dec, 2014 1 commit
  33. 29 Oct, 2014 1 commit
  34. 12 Sep, 2014 1 commit
  35. 11 Sep, 2014 2 commits