1. 28 May, 2019 1 commit
  2. 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
  3. 24 May, 2019 1 commit
  4. 23 May, 2019 2 commits
  5. 18 Feb, 2019 1 commit
  6. 13 Feb, 2019 1 commit
  7. 10 Jan, 2019 1 commit
  8. 27 Nov, 2018 1 commit
  9. 20 Nov, 2018 1 commit
  10. 09 Nov, 2018 1 commit
  11. 05 Nov, 2018 1 commit
  12. 12 Oct, 2018 1 commit
  13. 09 Oct, 2018 1 commit
  14. 28 Sep, 2018 1 commit
  15. 27 Sep, 2018 1 commit
  16. 17 Sep, 2018 2 commits
  17. 15 Sep, 2018 1 commit
  18. 14 Sep, 2018 2 commits
  19. 12 Sep, 2018 1 commit
  20. 10 Sep, 2018 1 commit
  21. 30 Aug, 2018 1 commit
  22. 22 Aug, 2018 1 commit
  23. 12 Jul, 2018 1 commit
  24. 06 Jun, 2018 1 commit
  25. 22 May, 2018 1 commit
  26. 06 Mar, 2018 1 commit
  27. 02 Mar, 2018 1 commit
  28. 01 Mar, 2018 1 commit
    • Clemens Hammacher's avatar
      Fix is_trivially_copyable check for MSVC and older stdlibc++ · 9dd6f0d0
      Clemens Hammacher authored
      MSVC 2015 and 2017 implement std::is_trivially_copyable, but not
      correctly. Hence, reimplement it using more low-level primitives.
      
      For stdlibc++ versions below 5.0, we already have a workaround for the
      missing support of std::is_trivially_copyable, but this is an unsound
      approximation, because it is ignoring move constructor, move assignment
      and copy assignment. Therefore, do not use this approximation for
      asserting trivial copyability of a type.
      
      Finally, add unittests for the new is_trivially_copyable
      implementations.
      
      R=mstarzinger@chromium.org
      CC=loorongjie@gmail.com
      
      Change-Id: I9ee56a65882e8c94b72c9a2d484edd27963a5d89
      Reviewed-on: https://chromium-review.googlesource.com/941521Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51651}
      9dd6f0d0
  29. 28 Feb, 2018 1 commit
    • Nico Weber's avatar
      Make v8 build with -Wmicrosoft-cast under clang-cl. · 58b386c4
      Nico Weber authored
      gcc and clang (and the standard) don't allow implicit conversion of
      function pointers to object pointers. MSVC does allow that, and since
      system headers require this to work, clang-cl allows it too -- but
      it emits a -Wmicrosoft-cast warning (which we currently suppress in
      the Chromium build, but which we want to enable.)
      
      As a side effect, when printing a function pointer to a stream, MSVC
      (and clang-cl) will pick the operator<<(void*) overload, while gcc
      and clang will pick operator<<(bool) since the best allowed conversion
      they find is from function pointer to bool.
      
      To prevent the clang-cl warning, we need to make sure that we never
      directly print a function pointer to a stream. In v8, this requires
      two changes:
      
      1. Give PrintCheckOperand() an explicit specialization for function
         pointers and explicitly cast to void* there.  This ports
         https://codereview.chromium.org/2515283002/ to V8, and also fixes a
         bug on non-Windows where DCHECK() of function pointers would print
         "(1 vs 1)" instead of the function's addresses.
         (The bug remains with member function pointers,
         where it's not clear what to print instead of the 1.)
      
      2. has_output_operator<T> must not use operator<< on its argument
         in an evaluated context if T is a function pointer.  This patch
         modifies has_output_operator<> to use an unevaluated context instead,
         which is simpler than the current approach (and matches what Chromium's
         base does), but changes behavior    in minor (boring) ways
         (see template-utils-unittest.cc), since operator<<() is now
         called with a temporary and only operator<<() implementations callable
         with a temporary are considered.
         A more complicated but behavior-preserving alternative would be to
         add an explicit specialization for function pointers. You can see
         this variant in patch set 1 on gerrit.
      
      Bug: chromium:550065
      Change-Id: Idc2854d6c258b7fc0b959604006d8952a79eca3d
      Reviewed-on: https://chromium-review.googlesource.com/940004
      Commit-Queue: Nico Weber <thakis@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51636}
      58b386c4
  30. 02 Feb, 2018 1 commit
    • Gabriel Charette's avatar
      Bring Time(Delta)::Min/Max() and related helpers to V8. · db73d446
      Gabriel Charette authored
      Copied as-is modulo compile tweaks from Chromium's base.
      
      Copied tests highlighting existing overflow issues with V8's impl...
      
      TimeDelta::Max() will initially be used in V8 to flag events that
      never triggered in a TimedHistogram.
      
      Also constexpr'ed a few things while I was in there, it's harmless
      at worst and helps a little at best.
      Ideally would constexpr all the Time*::From*() methods like in
      Chromium but that has inlining implications and I don't know the
      impact that could have on V8.
      
      Bug: chromium:807606
      Change-Id: If5aa92759d985be070e12af4dd20f0159169048b
      Reviewed-on: https://chromium-review.googlesource.com/899342Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Commit-Queue: Gabriel Charette <gab@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51073}
      db73d446
  31. 01 Feb, 2018 1 commit
    • Gabriel Charette's avatar
      Make TimeTicks::Now() high-resolution whenever possible with low-latency. · 954146a5
      Gabriel Charette authored
      It was already always high-resolution on POSIX but was never high
      resolution on Windows. Windows does support low latency high-resolution
      timers for the majority of our user base.
      
      TimeTicks::HighResolutionNow() was only explicitly requested in testing
      frameworks. As such I left the call in place but made it DCHECK that
      it's running on a Windows machine on which high-resolution clocks are
      used. This confirms that none of our test fleet has regressed with this
      change (the previous HighResolutionNow() used to be slightly more
      aggressive and also do it in a few configurations where we now fallback
      to low-resolution now).
      
      This implementation was copied as-is (modulo minor v8 API
      compatibility tweaks). These implementations were the same in the
      past but had diverged when, sadly, the same bug was fixed separately
      years apart, in Chromium and V8:
      chromium: https://codereview.chromium.org/1284053004 + https://codereview.chromium.org/2393953003
      v8: https://codereview.chromium.org/1304873011
      
      This is a prerequisite to add metrics around parallel task execution
      (low-resolution clocks are useless at that level, but we also don't want
      to incur high-latency clocks on machines that can't afford it cheaply).
      
      Bug: chromium:807606
      Change-Id: Id18e7be895d8431ebd0e565a1bdf358fe7838489
      Reviewed-on: https://chromium-review.googlesource.com/897485Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Commit-Queue: Gabriel Charette <gab@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51027}
      954146a5
  32. 15 Dec, 2017 1 commit
    • Bill Budge's avatar
      [Memory] Create memory management API in v8::internal. · a449f09f
      Bill Budge authored
      - Creates a memory management API in v8::internal, which corresponds
        to the existing one in base::OS.
      - Implements the new API in terms of the old one.
      - Changes all usage of the base::OS API to the one in v8::internal. This
        includes all tests, except platform and OS tests.
      - Makes OS:: methods private.
      - Moves all LSAN calls into the v8::internal functions.
      
      Bug: chromium:756050
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Iaa3f022e3e12fdebf937f3c76b6c6455014beb8a
      Reviewed-on: https://chromium-review.googlesource.com/794856
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#50139}
      a449f09f
  33. 02 Dec, 2017 1 commit
    • Mathias Bynens's avatar
      Normalize casing of hexadecimal digits · 822be9b2
      Mathias Bynens authored
      This patch normalizes the casing of hexadecimal digits in escape
      sequences of the form `\xNN` and integer literals of the form
      `0xNNNN`.
      
      Previously, the V8 code base used an inconsistent mixture of uppercase
      and lowercase.
      
      Google’s C++ style guide uses uppercase in its examples:
      https://google.github.io/styleguide/cppguide.html#Non-ASCII_Characters
      
      Moreover, uppercase letters more clearly stand out from the lowercase
      `x` (or `u`) characters at the start, as well as lowercase letters
      elsewhere in strings.
      
      BUG=v8:7109
      TBR=marja@chromium.org,titzer@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org,yangguo@chromium.org,mlippautz@chromium.org
      NOPRESUBMIT=true
      
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I790e21c25d96ad5d95c8229724eb45d2aa9e22d6
      Reviewed-on: https://chromium-review.googlesource.com/804294
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49810}
      822be9b2
  34. 01 Dec, 2017 1 commit
  35. 17 Nov, 2017 2 commits
  36. 16 Nov, 2017 1 commit
    • Bill Budge's avatar
      [Memory] Add base::OS::SetPermissions method. · 0df1471a
      Bill Budge authored
      - Adds SetPermissions method which returns bool result.
      - Eliminates Guard, SetReadAndWritable, SetReadAndExecutable, and
        SetReadWriteAndExecutable methods.
      - Adds some Fuchsia memory allocation implementation.
      - Some minor fixes in usage of OS::AllocatePageSize and
        OS::CommitPageSize.
      - Adds DCHECKs for sanitizing parameters to OS::Allocate/Free.
      
      Bug: chromium:756050
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I966ec6f029dd0371d70eca20bae197d87956f8b5
      Reviewed-on: https://chromium-review.googlesource.com/760657
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49430}
      0df1471a