1. 05 Nov, 2018 1 commit
  2. 25 Apr, 2018 1 commit
  3. 04 Apr, 2018 1 commit
    • Jungshik Shin's avatar
      Reland "Implement a new spec for timezone offset calculation" · 1d3a87bd
      Jungshik Shin authored
      This is a reland of dbdede01
      after a webkit layout test (geolocation-api/timestamp.html) was
      fixed by
      https://chromium-review.googlesource.com/c/chromium/src/+/994343 .
      
      Original change's description:
      > Implement a new spec for timezone offset calculation
      >
      > https://github.com/tc39/ecma262/pull/778 was recently merged
      > to Ecma 262.
      >
      > It changes the way to convert between "local time" and UTC in such
      > a way that it'd work for all timezones whether or not there has
      > been any change in the timezone offset of the standard time. For
      > instance, Europe/Moscow and some parts of US state of Indiana have
      > changed the standard (non-DST) timezone offset a few times. The
      > previous spec assumes that the the standard timezone offset is
      > constant, but the new spec take into account the offset change
      > history.
      >
      > In addition, it specifies a new way to calculate the timezone
      > offset during a timezone transition (either in and
      > out of DST or timezone offset shift).
      >
      > During a negative transition (e.g.  fall backward / getting
      > out of DST), repeated times are to be interpreted as if the
      > offset before the transition is in effect.
      >
      > During a positive transition (e.g. spring forward / getting
      > into DST), skipped times are to be treated similarly. That
      > is, they are to be interpreted as if the offset before the
      > transition is in effect.
      >
      > With icu-timezone-data, v8 is compliant to the new spec for the
      > past and the future as well as now whether or not the standard
      > timezone offset of a given timezone has changed over time
      > (e.g. Europe/Moscow, Pacific/Apia). With icu-timezone-data,
      > Australia/Lord_Howe (30 minute DST change) also works per spec.
      >
      > Without icu-timezone-data, it works only for timezones of which
      > the standard timezone offset is the same as the current offset
      > (e.g. most North American timezones other than parts of Indiana)
      > and of which the DST shift is an hour. For instance, it doesn't work
      > for Europe/Moscow in 2010 when the standard timezone offset was
      > +4h because the current (2018) standard timezone offset is +3h. Neither
      > does it for Lord Howe in Australia with the DST shift of 0.5 hr.
      >
      > This CL used to require one of the two ICU CLs below, but not
      > any more.
      >
      >   https://chromium-review.googlesource.com/c/chromium/deps/icu/+/572652
      >   https://chromium-review.googlesource.com/851265  (a proposed CL to the
      >   upstream ICU).
      >
      > Bug: v8:3547,chromium:417640,v8:5714
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Ib162295da5bee31b2390bd0918157014aebd3e33
      > Reviewed-on: https://chromium-review.googlesource.com/572148
      > Commit-Queue: Jungshik Shin <jshin@chromium.org>
      > Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52332}
      
      Bug: v8:3547, chromium:417640, v8:5714
      Change-Id: I47536c111143f75e3cfeecf5d9761c43a98a10f5
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Reviewed-on: https://chromium-review.googlesource.com/995971
      Commit-Queue: Jungshik Shin <jshin@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52372}
      1d3a87bd
  4. 03 Apr, 2018 2 commits
    • Clemens Hammacher's avatar
      Revert "Implement a new spec for timezone offset calculation" · 965edc0e
      Clemens Hammacher authored
      This reverts commit dbdede01.
      
      Reason for revert: Fails webkit_tests, blocks roll: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064
      
      Original change's description:
      > Implement a new spec for timezone offset calculation
      > 
      > https://github.com/tc39/ecma262/pull/778 was recently merged
      > to Ecma 262.
      > 
      > It changes the way to convert between "local time" and UTC in such
      > a way that it'd work for all timezones whether or not there has
      > been any change in the timezone offset of the standard time. For
      > instance, Europe/Moscow and some parts of US state of Indiana have
      > changed the standard (non-DST) timezone offset a few times. The
      > previous spec assumes that the the standard timezone offset is
      > constant, but the new spec take into account the offset change
      > history.
      > 
      > In addition, it specifies a new way to calculate the timezone
      > offset during a timezone transition (either in and
      > out of DST or timezone offset shift).
      > 
      > During a negative transition (e.g.  fall backward / getting
      > out of DST), repeated times are to be interpreted as if the
      > offset before the transition is in effect.
      > 
      > During a positive transition (e.g. spring forward / getting
      > into DST), skipped times are to be treated similarly. That
      > is, they are to be interpreted as if the offset before the
      > transition is in effect.
      > 
      > With icu-timezone-data, v8 is compliant to the new spec for the
      > past and the future as well as now whether or not the standard
      > timezone offset of a given timezone has changed over time
      > (e.g. Europe/Moscow, Pacific/Apia). With icu-timezone-data,
      > Australia/Lord_Howe (30 minute DST change) also works per spec.
      > 
      > Without icu-timezone-data, it works only for timezones of which
      > the standard timezone offset is the same as the current offset
      > (e.g. most North American timezones other than parts of Indiana)
      > and of which the DST shift is an hour. For instance, it doesn't work
      > for Europe/Moscow in 2010 when the standard timezone offset was
      > +4h because the current (2018) standard timezone offset is +3h. Neither
      > does it for Lord Howe in Australia with the DST shift of 0.5 hr.
      > 
      > This CL used to require one of the two ICU CLs below, but not
      > any more.
      > 
      >   https://chromium-review.googlesource.com/c/chromium/deps/icu/+/572652
      >   https://chromium-review.googlesource.com/851265  (a proposed CL to the
      >   upstream ICU).
      > 
      > Bug: v8:3547,chromium:417640,v8:5714
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Ib162295da5bee31b2390bd0918157014aebd3e33
      > Reviewed-on: https://chromium-review.googlesource.com/572148
      > Commit-Queue: Jungshik Shin <jshin@chromium.org>
      > Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52332}
      
      TBR=adamk@chromium.org,littledan@chromium.org,mlippautz@chromium.org,jshin@chromium.org
      
      Change-Id: I6b3bf4427c761b106280d565a3912cd8e25cf87e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:3547, chromium:417640, v8:5714
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/994192Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52338}
      965edc0e
    • Jungshik Shin's avatar
      Implement a new spec for timezone offset calculation · dbdede01
      Jungshik Shin authored
      https://github.com/tc39/ecma262/pull/778 was recently merged
      to Ecma 262.
      
      It changes the way to convert between "local time" and UTC in such
      a way that it'd work for all timezones whether or not there has
      been any change in the timezone offset of the standard time. For
      instance, Europe/Moscow and some parts of US state of Indiana have
      changed the standard (non-DST) timezone offset a few times. The
      previous spec assumes that the the standard timezone offset is
      constant, but the new spec take into account the offset change
      history.
      
      In addition, it specifies a new way to calculate the timezone
      offset during a timezone transition (either in and
      out of DST or timezone offset shift).
      
      During a negative transition (e.g.  fall backward / getting
      out of DST), repeated times are to be interpreted as if the
      offset before the transition is in effect.
      
      During a positive transition (e.g. spring forward / getting
      into DST), skipped times are to be treated similarly. That
      is, they are to be interpreted as if the offset before the
      transition is in effect.
      
      With icu-timezone-data, v8 is compliant to the new spec for the
      past and the future as well as now whether or not the standard
      timezone offset of a given timezone has changed over time
      (e.g. Europe/Moscow, Pacific/Apia). With icu-timezone-data,
      Australia/Lord_Howe (30 minute DST change) also works per spec.
      
      Without icu-timezone-data, it works only for timezones of which
      the standard timezone offset is the same as the current offset
      (e.g. most North American timezones other than parts of Indiana)
      and of which the DST shift is an hour. For instance, it doesn't work
      for Europe/Moscow in 2010 when the standard timezone offset was
      +4h because the current (2018) standard timezone offset is +3h. Neither
      does it for Lord Howe in Australia with the DST shift of 0.5 hr.
      
      This CL used to require one of the two ICU CLs below, but not
      any more.
      
        https://chromium-review.googlesource.com/c/chromium/deps/icu/+/572652
        https://chromium-review.googlesource.com/851265  (a proposed CL to the
        upstream ICU).
      
      Bug: v8:3547,chromium:417640,v8:5714
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Ib162295da5bee31b2390bd0918157014aebd3e33
      Reviewed-on: https://chromium-review.googlesource.com/572148
      Commit-Queue: Jungshik Shin <jshin@chromium.org>
      Reviewed-by: 's avatarDaniel Ehrenberg <littledan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52332}
      dbdede01
  5. 26 Feb, 2018 1 commit
  6. 02 Feb, 2018 1 commit
  7. 18 Oct, 2017 1 commit
  8. 13 Oct, 2017 1 commit
  9. 11 Apr, 2017 3 commits
  10. 11 Mar, 2017 1 commit
    • littledan's avatar
      [date] Add a cache for timezone names to DateCache · 7e87f446
      littledan authored
      To speed up Date.prototype.toString(), this patch adds a cache in
      the DateCache for the string short name representing the time zone.
      Because time zones in a particular location just have two short names
      (for DST and standard time), and the DateCache already understands
      whether a time is in DST or not, it is possible to keep the result
      of OS::LocalTimezone around and select between the two based on
      whether the time is DST or not.
      
      In local microbenchmarks (calling Date.prototype.toString() in a
      loop), I observed a 6-10% speedup with this patch. In the browser,
      the speedup may be even greater as the system call needs to do
      some extra work to break out of the sandbox. I don't think the
      microbenchmark is extremely unrealistic; in any real program which
      calls Date.prototype.toString() multiple times, the cache should
      hit almost all of the time, as time zone changes are rare.
      
      The proximate motivation for this patch was to enable ICU as a
      backend for timezone information, which is drafted at
      https://codereview.chromium.org/2724373002/
      The ICU implementation of OS::LocalTimezone is even slower than
      the system call one, but this patch makes their performance
      indistinguishable on the microbenchmark.
      
      In the tz database, many timezones actually do have a number of different
      historical names. For example, America/Anchorage went through a number of
      changes, from AST to AHST to YST to AKST. However, both ICU and the
      Linux OS interfaces just report the modern timezone name in tests
      for the appropriate timezone name, even for historical times. I can
      see why this would be:
      - For ICU, CLDR only has two short names in the data file: the one for
        dst and non-dst
      - For Linux, the timezone names do seem to make it into the
        /etc/localtime file. However, glibc assumes there are only two relevant
        names and selects between them, as you can see in its implementation
        of localtime_r:
        http://bazaar.launchpad.net/~vcs-imports/glibc/master/view/head:/time/tzset.c#L573
      So, this cache should be valid until we switch to a more accurate source
      of short timezone names.
      
      BUG=v8:6031
      
      Review-Url: https://codereview.chromium.org/2726253002
      Cr-Commit-Position: refs/heads/master@{#43730}
      7e87f446
  11. 03 Mar, 2017 1 commit
    • littledan's avatar
      [date] Refactor TimezoneCache to be separate from the OS · ccfe50b9
      littledan authored
      This refactoring is preparatory work to enable ICU to be the backend
      for timezone information rather than system calls. In the process, a
      bit of code duplication that was inserted in the Solaris port patch is
      eliminated here among modern POSIX backends.
      
      One possible performance downside of this patch is that it introduces
      a virtual method call for operations which were previously not virtual
      methods. However, a couple factors mitigate this effect:
      - The DateCache minimizes the need for calls into the TimezoneCache
      - These calls were already not very high performance, as they included
        a system call which requires an RPC to get out of the sandbox, and
        they are surrounded by C++ builtins, which require a JS to C++
        transition.
      - A future transition to ICU, enabled by this refactoring, may improve
        performance by eliminating the system call.
      
      BUG=v8:6031
      
      Review-Url: https://codereview.chromium.org/2731463003
      Cr-Commit-Position: refs/heads/master@{#43588}
      ccfe50b9
  12. 05 Jan, 2016 1 commit
    • bmeurer's avatar
      [runtime] Migrate several Date builtins to C++. · 065e9c53
      bmeurer authored
      Almost all of the Date builtins always call into C++ at least once
      anyway, so parsing, compiling and executing the JavaScript wrappers
      is just a waste of time.  The most important part here is the Date
      constructor itself, which is one of the blockers for new.target in
      TurboFan, because compiling the Date constructor takes too much time
      with TurboFan (for no reason since we end up in C++ anway).
      
      R=cbruni@chromium.org
      
      Review URL: https://codereview.chromium.org/1556333002
      
      Cr-Commit-Position: refs/heads/master@{#33109}
      065e9c53
  13. 30 Dec, 2015 1 commit
  14. 30 Sep, 2015 1 commit
  15. 09 Oct, 2014 1 commit
  16. 02 Sep, 2014 1 commit
  17. 04 Aug, 2014 1 commit
  18. 30 Jun, 2014 1 commit
  19. 03 Jun, 2014 1 commit
  20. 29 Apr, 2014 1 commit
  21. 14 Mar, 2014 1 commit
  22. 10 Mar, 2014 1 commit
  23. 07 Mar, 2014 1 commit
  24. 09 Mar, 2012 2 commits