1. 27 Jan, 2022 1 commit
  2. 25 Jan, 2022 1 commit
  3. 24 Jan, 2022 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc] Preliminary changes for array.init_from_data · 3f17f96f
      Manos Koukoutos authored
      Changes:
      - Rename kWasmTrapDataSegmentDropped to the more accurate ~OutOfBounds.
      - Drop unused argument from {WasmCompiler::ArrayInit}.
      - Rename {Factory::NewWasmArray} -> NewWasmArrayFromElements.
      - Add error handling to {InitExprInterface}.
      - Allow the data count section to appear anywhere in the module under
        --experimental-wasm-gc. Add the same capability in
        wasm-module-builder.js.
      - Add {WasmArray::MaxLength(uint32_t element_size_log2)}.
      - Add kTrapArrayTooLarge in wasm-module-builder.js.
      - Small test improvements in gc-nominal.js.
      
      Bug: v8:7748
      Change-Id: I68ca0e8b08f906503f0d82e5866395018d216382
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401593Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78730}
      3f17f96f
  4. 21 Jan, 2022 1 commit
  5. 20 Jan, 2022 1 commit
    • Nico Hartmann's avatar
      Revert "[Torque] Generalize Torque literals to larger size" · 362e265d
      Nico Hartmann authored
      This reverts commit 757830b0.
      
      Reason for revert: Speculatively revert due to a number of
      performance regressions
      
      Original change's description:
      > [Torque] Generalize Torque literals to larger size
      >
      > Previously, literals in Torque were stored as double values, which
      > made it impossible to precisely represent 64 bit integer values.
      > This CL replaces the old literal expression with an integer and
      > floating point literal expression that are unbounded in size. We
      > allow implicit conversion of these literals to arbitary integer
      > and floating point types respectively and insert a corresponding
      > bounds check into generated CSA.
      >
      > Bug: v8:7793
      > Change-Id: I46c231aab92bc2f0c26955d1876079f306b358c6
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329792
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78671}
      
      Bug: v8:7793
      Change-Id: I9896e28b3c69b8cf2488bf93e993ec320d8c5d2e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401866Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78706}
      362e265d
  6. 18 Jan, 2022 1 commit
  7. 17 Jan, 2022 1 commit
  8. 15 Dec, 2021 1 commit
  9. 14 Dec, 2021 2 commits
  10. 06 Dec, 2021 1 commit
  11. 17 Nov, 2021 1 commit
    • Tobias Tebbi's avatar
      [builtins] add Torque fast-path for String.prototype.localeCompare · 6181ce59
      Tobias Tebbi authored
      This fast path works for ASCII-only strings and is similar to the
      existing fast-path in C++. Important differences:
      - The locale check is done at Turbofan optimization time instead of
        at runtime
      - Use tables of size 256 instead of 128 to save a bounds-check when
        handling one-byte strings.
      - It first performs an equality check that's optimized for detecting
        inequality quickly by comparing the strings from both ends. If the
        equality check succeeds, we are done. Otherwise chances are high
        that the strings differ according to collation level L1 already.
        Therefore, we first do an L1 check and perform the L3 check
        only when L1 didn't find a difference. This is based on the assumption
        that few strings are identical except for different capitalization.
      - Use the Torque version of string flattening instead of the runtime
        version.
      
      Bug: v8:12196
      Change-Id: I2d043c1138846783f6d567b736d34063ba9301e5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268465Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77946}
      6181ce59
  12. 04 Nov, 2021 1 commit
  13. 28 Oct, 2021 1 commit
    • Tobias Tebbi's avatar
      Reland "[turbofan] extend type asserts to cover all JS types" · 392078fb
      Tobias Tebbi authored
      This is a reland of 45227ffd
      Differences:
      - Handle one more flags conflict in variants.py.
      - Disallow %VerifyType without --concurrent-recompilation.
      
      Original change's description:
      > [turbofan] extend type asserts to cover all JS types
      >
      > Extend type assertions to all types covering JavaScript values.
      > This is achieved by allocating type representations on the heap using
      > newly defined HeapObject subclasses. To allocate these in the compiler,
      > we disable concurrent compilation for the --assert-types flag for now.
      >
      > Fix two type errors that came up with the existing tests:
      > 1. JSCreateKeyValueArray has type Array (i.e., a JSArray) instead of
      >    OtherObject.
      > 2. OperationTyper::NumberToString(Type) can type the result as the
      >    HeapConstant Factory::zero_string(). However, NumberToString does
      >    not always produce this string. To avoid regressions, the CL keeps
      >    the HeapConstant type and changes the runtime and builtin code to
      >    always produce the canonical "0" string.
      >
      > A few tests were failing because they check for truncations to work
      > and prevent deoptimization. However, AssertType nodes destroy all
      > truncations (which is by design), so these tests are incompatible
      > and now disabled for the assert_types variant.
      >
      > Drive-by fix: a few minor Torque issues that came up.
      >
      > Change-Id: If03b7851f7e6803a2f69edead4fa91231998f764
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3234717
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Omer Katz <omerkatz@chromium.org>
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#77565}
      
      Change-Id: I5b3c6745c6ad349ff8c2b199d9afdf0a9b5a7392
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3247035
      Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77596}
      392078fb
  14. 27 Oct, 2021 2 commits
    • Maya Lekova's avatar
      Revert "[turbofan] extend type asserts to cover all JS types" · 54f90462
      Maya Lekova authored
      This reverts commit 45227ffd.
      
      Reason for revert: Breaks on gc_stress mode, see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/35988/overview
      
      Original change's description:
      > [turbofan] extend type asserts to cover all JS types
      >
      > Extend type assertions to all types covering JavaScript values.
      > This is achieved by allocating type representations on the heap using
      > newly defined HeapObject subclasses. To allocate these in the compiler,
      > we disable concurrent compilation for the --assert-types flag for now.
      >
      > Fix two type errors that came up with the existing tests:
      > 1. JSCreateKeyValueArray has type Array (i.e., a JSArray) instead of
      >    OtherObject.
      > 2. OperationTyper::NumberToString(Type) can type the result as the
      >    HeapConstant Factory::zero_string(). However, NumberToString does
      >    not always produce this string. To avoid regressions, the CL keeps
      >    the HeapConstant type and changes the runtime and builtin code to
      >    always produce the canonical "0" string.
      >
      > A few tests were failing because they check for truncations to work
      > and prevent deoptimization. However, AssertType nodes destroy all
      > truncations (which is by design), so these tests are incompatible
      > and now disabled for the assert_types variant.
      >
      > Drive-by fix: a few minor Torque issues that came up.
      >
      > Change-Id: If03b7851f7e6803a2f69edead4fa91231998f764
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3234717
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Omer Katz <omerkatz@chromium.org>
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#77565}
      
      Change-Id: Ia779a11fc811846194c7a8d1e40b372b265e7ea4
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3247034
      Auto-Submit: Maya Lekova <mslekova@chromium.org>
      Owners-Override: Maya Lekova <mslekova@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/main@{#77566}
      54f90462
    • Tobias Tebbi's avatar
      [turbofan] extend type asserts to cover all JS types · 45227ffd
      Tobias Tebbi authored
      Extend type assertions to all types covering JavaScript values.
      This is achieved by allocating type representations on the heap using
      newly defined HeapObject subclasses. To allocate these in the compiler,
      we disable concurrent compilation for the --assert-types flag for now.
      
      Fix two type errors that came up with the existing tests:
      1. JSCreateKeyValueArray has type Array (i.e., a JSArray) instead of
         OtherObject.
      2. OperationTyper::NumberToString(Type) can type the result as the
         HeapConstant Factory::zero_string(). However, NumberToString does
         not always produce this string. To avoid regressions, the CL keeps
         the HeapConstant type and changes the runtime and builtin code to
         always produce the canonical "0" string.
      
      A few tests were failing because they check for truncations to work
      and prevent deoptimization. However, AssertType nodes destroy all
      truncations (which is by design), so these tests are incompatible
      and now disabled for the assert_types variant.
      
      Drive-by fix: a few minor Torque issues that came up.
      
      Change-Id: If03b7851f7e6803a2f69edead4fa91231998f764
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3234717Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77565}
      45227ffd
  15. 05 Oct, 2021 1 commit
  16. 30 Sep, 2021 3 commits
  17. 29 Sep, 2021 2 commits
    • Maya Lekova's avatar
      Revert "[torque] Get rid of @noVerifier annotation" · 8679a4e1
      Maya Lekova authored
      This reverts commit 94958172.
      
      Reason for revert: Breaks arm/arm64 ports, e.g. https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim/30120/blamelist
      
      Original change's description:
      > [torque] Get rid of @noVerifier annotation
      >
      > As one small step toward reducing annotations, I propose that all
      > classes get generated verifiers unless they've opted out of C++ class
      > generation via @doNotGenerateCppClass, and that generated verifiers
      > always verify every Torque-defined field. If a generated verifier is
      > incorrect, such as for JSFunction or DataHandler, we can just avoid
      > calling it and hand-code the verification.
      >
      > Bug: v8:7793
      > Change-Id: I7c0edb660574d0c688a59c7e90c41ee7ad464b42
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3171758
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      > Cr-Commit-Position: refs/heads/main@{#77145}
      
      Bug: v8:7793
      Change-Id: I56da8a9726d23470e927be1be5e7bcede1399861
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3194262
      Auto-Submit: Maya Lekova <mslekova@chromium.org>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Owners-Override: Maya Lekova <mslekova@chromium.org>
      Reviewed-by: 's avatarSeth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/main@{#77146}
      8679a4e1
    • Seth Brenith's avatar
      [torque] Get rid of @noVerifier annotation · 94958172
      Seth Brenith authored
      As one small step toward reducing annotations, I propose that all
      classes get generated verifiers unless they've opted out of C++ class
      generation via @doNotGenerateCppClass, and that generated verifiers
      always verify every Torque-defined field. If a generated verifier is
      incorrect, such as for JSFunction or DataHandler, we can just avoid
      calling it and hand-code the verification.
      
      Bug: v8:7793
      Change-Id: I7c0edb660574d0c688a59c7e90c41ee7ad464b42
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3171758Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/main@{#77145}
      94958172
  18. 11 Aug, 2021 1 commit
  19. 09 Aug, 2021 1 commit
  20. 20 Jul, 2021 1 commit
    • Seth Brenith's avatar
      [cleanup] Use @generateCppClass on more classes · 334b94e1
      Seth Brenith authored
      Most Torque-defined extern classes already use @generateCppClass. As
      Nico pointed out in [1], it would be nice to convert the remaining
      classes and remove this option. This change converts most of those
      remaining classes. I know that the future of Torque-defined classes is a
      subject of some debate right now, but I think that it's worth doing a
      few mechanical changes to reduce the existing variety of options.
      
      Changes that don't exactly follow the usual pattern:
      1. BigIntBase, MutableBigInt: we can define these without a body, and
         then Torque treats them as "really external" rather than "kind of
         external, but with some Torque-generated parts".
      2. RegExpMatchInfo: moved its inline functions into a separate file,
         which the generated -tq.cc file requires.
      
      [1] https://docs.google.com/document/d/1q_gZLnXd4bGnCx3IUfbln46K3bSs9UHBGasy9McQtHI/edit#
      
      Bug: v8:8952
      Change-Id: I84c7958a295caa0bab847683c05022e18c921cad
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3027742Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#75817}
      334b94e1
  21. 15 Jul, 2021 1 commit
  22. 24 Jun, 2021 1 commit
  23. 31 May, 2021 1 commit
  24. 17 May, 2021 1 commit
  25. 10 May, 2021 1 commit
  26. 06 May, 2021 1 commit
    • Fanchen Kong's avatar
      Collect receiver to feedback for prototype.apply · 519c82ce
      Fanchen Kong authored
      When a function is invoked by prototype.apply, it may undergo following transformation in the JSCallReducer:
      	receiver.apply(this, args) ->
      	this.receiver(...args) Since the new target (also the receiver of apply()) is not collected to the feedback slot, further speculative optimization on the new target is not available if the new target
      is not a heapconstant.
      
      With this CL, the receiver will be collected to the feedback instead of the target if the target is a prototype.apply. It may improve the performance of the following usecase by ~80%.
      
      function reduceArray(func, arr, r) {
          for (var i = 0, len = arr.length; i < len; i++) {
                  r = func.apply(null, r, arr[i]);
          }
          return r;
      }
      
      var a = 0; for (var i = 0; i < 10000000; i++) {
          a += reduceArray(Math.imul, [5,6,2,3,7,6,8,3,7,9,2,5,], 1);
      }
      console.log(a);
      
      This CL also improves the runTime score of JetStream2/richards-wasm by ~45% in default, ~60% with --turbo-inline-js-wasm-calls.
      
      Change-Id: I542eb8d3fcb592f4e0993af93ba1af70e89c3982
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639813
      Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74413}
      519c82ce
  27. 31 Mar, 2021 1 commit
    • Igor Sheludko's avatar
      Reland "[dict-proto] SIMD support for SwissNameDictionary in Torque" · 4cd6ad9e
      Igor Sheludko authored
      This is a reland of 856e8577
      The diff compared to the first attempt is that the tests that
      require SSSE3/AVX are not run when these CPU features are not
      available.
      
      Original change's description:
      > [dict-proto] SIMD support for SwissNameDictionary in Torque
      >
      > This CL adds a Torque-counterpart for swiss_table::GroupSse2Impl in
      > Torque. This allows the Torque version of SwissNameDictionary to use
      > SSE for lookups, rather than needing to bailout to the runtime on
      > x64/ia32.
      >
      > Bug: v8:11330
      > Change-Id: I74e3f97c460a8b89031016967ec0e545265016a9
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2787485
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
      > Reviewed-by: Zhi An Ng <zhin@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73727}
      
      Bug: v8:11330
      Cq-Include-Trybots: luci.v8.try:v8_linux_optional_rel_ng
      Change-Id: Ibfa5ae5a39333778ea0d0406d5ea4ad683ad0dbe
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2794431Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73740}
      4cd6ad9e
  28. 30 Mar, 2021 2 commits
  29. 29 Mar, 2021 1 commit
  30. 25 Mar, 2021 1 commit
  31. 24 Mar, 2021 1 commit
  32. 22 Mar, 2021 1 commit
  33. 15 Mar, 2021 1 commit
  34. 08 Mar, 2021 1 commit
    • Frank Emrich's avatar
      [dict-proto] SwissNameDictionary rollout in runtime code, pt. 3 · 416fae86
      Frank Emrich authored
      This CL is part of a series that makes SwissNameDictionary available
      as a new property backing store. Previously, the flag
      v8_dict_mode_prototypes allows selecting between NameDictionary and
      OrderedNameDictionary as the backing store used for all dictionary
      mode objects. This series of CLs changes this such that enabling the
      flag causes SwissNameDictionary being used instead of
      OrderedNameDictionary. The behavior for when the flag is not set
      remains unchanged (= use NameDictionary).
      
      This particular CL just collects many small changes, including some
      CSA changes where runtime calls are necessary.
      
      Bug: v8:11388
      Change-Id: I38fd18098fc641a5d92a986da251a6b3ac09411a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739642
      Commit-Queue: Frank Emrich <emrich@google.com>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73257}
      416fae86