1. 04 Sep, 2018 1 commit
    • Mike Stanton's avatar
      [builtins] Enable Torque Array.prototype.splice · fd334b32
      Mike Stanton authored
      Before, splice was implemented with a C++ fast path and a
      comprehensive JavaScript version.
      
      This impl. is entirely in Torque with a fastpath for SMI,
      DOUBLE and OBJECT arrays, and a comprehensive slow path.
      The same level of "sparse" array support as given by the
      array.js implementation is included.
      
      This reland addresses several issues:
      
      * Removed "sparse" array support from splice.
      * Addressed ClusterFuzz issue 876443:
        The test and code that uses the fix is in this CL.
        The fix in isolation can be seen here:
        https://chromium-review.googlesource.com/c/v8/v8/+/1199403
      * Removed dead code in elements.cc
      
      BUG=chromium:876443, v8:8131, v8:1956, v8:7221
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I2d4a66c24ba1edabeca34e27e6ff8ee6136ed5f1
      Reviewed-on: https://chromium-review.googlesource.com/1201783
      Commit-Queue: Michael Stanton <mvstanton@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55610}
      fd334b32
  2. 29 Aug, 2018 1 commit
  3. 28 Aug, 2018 1 commit
  4. 27 Aug, 2018 2 commits
    • Sathya Gunasekaran's avatar
      [Intl] Correctly pass usage option to Collator · 59c03fef
      Sathya Gunasekaran authored
      The spec specifies that search and standard can not be valid values
      for the collation extension keyword. Instead users are expected to use
      the options bag to set the correct usage options.
      
      But, ICU expects the usage option to be set through the collation
      extension value.
      
      In this patch, we set the usage option using the collation extension
      value in ICU. For resolvedOptions, we filter out this extension value
      using ICU to be spec compatible.
      
      Previously, we stored the usage option on the JSCollator instance. But
      this patch changes the logic to just look it up from the icu::Collator
      when required. This saves one word of memory.
      
      This fails a test262 that was incorrectly fixed. A follow on patch
      will fix the test262 test.
      
      Bug: v8:5751
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I8c66c6286287e686f4cd152fa1301f9d51c38654
      Reviewed-on: https://chromium-review.googlesource.com/1180488Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55437}
      59c03fef
    • Brian Stell's avatar
      Replace the JS version of supportedLocalesOf with the C++ version. · 6b3fde42
      Brian Stell authored
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I5f6adec8857398f82598295e86d2559c96363647
      
      Bug: v8:7955, v8:7869, v8:5751
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I5f6adec8857398f82598295e86d2559c96363647
      Reviewed-on: https://chromium-review.googlesource.com/1184046
      Commit-Queue: Brian Stell <bstell@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55434}
      6b3fde42
  5. 24 Aug, 2018 1 commit
  6. 22 Aug, 2018 1 commit
    • Tobias Tebbi's avatar
      Revert "[builtins] Reland Array.prototype.splice() Torque implementation." · e99a1092
      Tobias Tebbi authored
      This reverts commit cdaaa311.
      
      Reason for revert: chromium:876445 chromium:876453 chromium:876443
      
      Original change's description:
      > [builtins] Reland Array.prototype.splice() Torque implementation.
      > 
      > Before, splice was implemented with a C++ fast path and a
      > comprehensive JavaScript version.
      > 
      > This impl. is entirely in Torque with a fastpath for SMI,
      > DOUBLE and OBJECT arrays, and a comprehensive slow path.
      > The same level of "sparse" array support as given by the
      > array.js implementation is included.
      > 
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Ia7334a30b401988309e9909cfa0069da0bb6fb9f
      > Reviewed-on: https://chromium-review.googlesource.com/1169466
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#55263}
      
      TBR=mvstanton@chromium.org,jgruber@chromium.org,tebbi@chromium.org
      
      Change-Id: I5b750a98e671b7284474ffcabc6b4d37a9d1219e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1184741Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55289}
      e99a1092
  7. 21 Aug, 2018 1 commit
  8. 09 Aug, 2018 1 commit
  9. 08 Aug, 2018 2 commits
    • Mike Stanton's avatar
      [builtins] Enable Torque Array.prototype.splice · ff4fa92e
      Mike Stanton authored
      Before, splice was implemented with a C++ fast path and a
      comprehensive JavaScript version.
      
      This impl. is entirely in Torque with a fastpath for SMI,
      DOUBLE and OBJECT arrays, and a comprehensive slow path.
      The same level of "sparse" array support as given by the
      array.js implementation is included.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Ibfa3407ed75b9ad15ac54cce446b3952e38f90a9
      Reviewed-on: https://chromium-review.googlesource.com/1039190Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Michael Stanton <mvstanton@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54974}
      ff4fa92e
    • Sathya Gunasekaran's avatar
      [Intl] Optimize Intl.Collator · 363fe1eb
      Sathya Gunasekaran authored
      This patch ports most of the Intl.Collator from JS to C++.
      
      The Intl.Collator object no longer stores all the resolved
      values. Instead these are looked up on demand as part of
      Intl.Collator.prototype.resolvedOptions(), saving several words. In
      the future, we can cache the result of the resolvedOptions as well.
      
      In this patch, we use ICU to do parsing of the unicode extension in
      the bcp47 language tag instead of using a custom extension parser.
      
      This patch also fixes several spec compliance bugs as well.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Iaaa7be4a628404da1bd83d882e04a2c6de70ebd9
      Bug: v8:5751, v8:7480
      Reviewed-on: https://chromium-review.googlesource.com/1165084
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54965}
      363fe1eb
  10. 03 Aug, 2018 1 commit
  11. 31 Jul, 2018 1 commit
    • Jungshik Shin's avatar
      Fix canonicalization of grandfathered tags · f24b575d
      Jungshik Shin authored
      ICU maps a few grandfathered tags to made-up values even when there
      is no preferred value entry in the IANA language tag registry. [1]
      
      1. Check for grandfathered tags without preferred value upfront
         and return them as they're.
      2. Lowercase the input before structural validity check to simplify
         check for grandfathered tag without preferred value as well
         as regexps used in the structural validity check.
      
      intl/general/grandfathered_tags_without_preferred_value is added and
      intl/general/language_tags_with_preferred_values is changed to check
      for case-insensitive matching of grandfathered tags.
      
      [1] https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
      
      Bug: v8:7669
      Test: test262/intl402/Intl/getCanonicalLocales/preferred-grandfathered
      Test: intl/general/grandfathered_tags_without_preferred_value
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Ie0520de8712928300fd71fe152909789483ec256
      Reviewed-on: https://chromium-review.googlesource.com/1156529
      Commit-Queue: Jungshik Shin <jshin@chromium.org>
      Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54829}
      f24b575d
  12. 30 Jul, 2018 1 commit
  13. 18 Jul, 2018 2 commits
  14. 17 Jul, 2018 2 commits
  15. 16 Jul, 2018 1 commit
  16. 12 Jul, 2018 1 commit
  17. 11 Jul, 2018 1 commit
  18. 10 Jul, 2018 3 commits
  19. 28 Jun, 2018 1 commit
    • Caitlin Potter's avatar
      [runtime] perform type conversion earlier in IntegerIndexedElementSet · 6c585ef0
      Caitlin Potter authored
      When storing an indexed property in a typed array, it's necessary to
      convert the value to a Number (or to a Bigint) before performing the
      bounds check, per
      https://tc39.github.io/ecma262/#sec-integerindexedelementset.
      
      This CL adds appropriate type conversions in
      Object::SetPropertyInternal (which technically is reached after the
      bounds check has already occurred, but this isn't observable yet ---
      In the future, once OOB accesses on TypedArrays actually throw, this
      will need to be refactored again), and in StoreFastElementStub, and
      ElementsTransitionAndStoreStub (via CSA::EmitElementStore).
      
      The change was not necessary in TurboFan, as
      JSNativeContextSpecialization already performs the value conversion
      before the boundscheck.
      
      The result is some fixed test262 tests, and some new test coverage
      for this behaviour in mjsunit.
      
      BUG=v8:7896, v8:5327
      R=neis@chromium.org, jkummerow@chromium.org, gsathya@chromium.org
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Ibe6bec24c72ef6a4fd3e77d5bcafa03737f4c5e3
      Reviewed-on: https://chromium-review.googlesource.com/1117372
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54096}
      6c585ef0
  20. 27 Jun, 2018 2 commits
  21. 26 Jun, 2018 2 commits
  22. 25 Jun, 2018 1 commit
  23. 22 Jun, 2018 1 commit
  24. 21 Jun, 2018 2 commits
  25. 12 Jun, 2018 2 commits
  26. 11 Jun, 2018 3 commits
  27. 08 Jun, 2018 1 commit
  28. 07 Jun, 2018 1 commit
    • Simon Zünd's avatar
      Reland "[array] Use random middle element to determine pivot during sorting" · 3896cdc2
      Simon Zünd authored
      This is a reland of 91bab558
      
      This CL contains two major changes w.r.t to the original CL:
      
      The random state is removed from the Smi root list and we pre-seed the RNG
      on each sort with the length of the array.
      
      To cut down on the length of the arguments list and to keep track of the
      random state across recursive calls, we move most of the sort arguments into
      a FixedArray and reload from the array for each recursion.
      
      Original change's description:
      > [array] Use random middle element to determine pivot during sorting
      >
      > This CL adds a "random state" to the Smi Root list and implements a
      > basic Linear congruential pseudo random number generator in Torque.
      >
      > The RNG is used to determine the pivot element for sorting. This will
      > prevent the worst cases for certain data layouts.
      >
      > Drive-by-fix: Make sorting of ranges and execution pauses for profviz
      > deterministic by adding a secondary sorting criteria.
      >
      > Bug: v8:7382
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Ieb871e98e74bdb803f821b0cd35d2f67ee0f2868
      > Reviewed-on: https://chromium-review.googlesource.com/1082193
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Commit-Queue: Simon Zünd <szuend@google.com>
      > Cr-Commit-Position: refs/heads/master@{#53524}
      
      Bug: v8:7382
      Change-Id: Ia7bef7ed1c0e904ffe43bc428e702f64f9c6a60b
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1087888Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Simon Zünd <szuend@google.com>
      Cr-Commit-Position: refs/heads/master@{#53583}
      3896cdc2