1. 13 Feb, 2022 1 commit
  2. 08 Feb, 2022 1 commit
  3. 03 Feb, 2022 1 commit
    • Clemens Backes's avatar
      [wasm] Implement bulk memory operations on memory64 · 18469ec4
      Clemens Backes authored
      This makes the bulk memory operations respect the memory type, i.e.
      using i64 values for memory offsets if memory64 is enabled.
      
      The called C functions now expect memory offsets to be passed as
      {uintptr_t}, such that we can address any memory on all systems. For
      64-bit memories on 32-bit systems, the upper half of the 64-bit value is
      checked in compiled code before passing the lower half to the C
      function.
      
      Liftoff support turned out to be a bit harder than expected, because we
      cannot hold three 64-bit values in registers on ia32 (not enough
      registers...). Thus implement that in a follow-up CL.
      
      R=thibaudm@chromium.org
      
      Bug: v8:10949, chromium:1281995
      Change-Id: Ie77636145f94cc579d479c4e7c346ba3c682679d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427206Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78918}
      18469ec4
  4. 02 Feb, 2022 1 commit
  5. 31 Jan, 2022 2 commits
  6. 27 Jan, 2022 1 commit
    • Manos Koukoutos's avatar
      [wasm-gc] Implement iso-recursive types · fe531e1f
      Manos Koukoutos authored
      This CL replaces the equirecursive type system for wasm-gc with the
      isorecursive hybrid type system presented here:
      https://github.com/WebAssembly/gc/issues/257.
      
      In broad strokes, this includes the following changes:
      - In the module decoder, remove equirecursive types. Implement recursive
        type groups, subtype definitions, and function/struct/array
        definitions. Treat nominal modules as syntactic sugar of an
        isorecursive module, where all types belong in the same recursive
        group.
      - Remove rtt.sub and all related infrastructure.
      - Change subtyping to work with explicit supertypes only.
      - Add ValidSubtypeDefinition in subtyping, to check that subtype
        declarations are valid during decoding.
      - Remove the subtyping cache.
      - Add support for functions to have specific signature index in
        WasmModuleBuilder and in test-gc.cc.
      - Adapt tests.
      
      Current restrictions:
      - Recursive groups are not stored beyond decoding.
      - Type canonicalization is not implemented. No tests relying on types
        being considered identical post-canonicalization.
      - No cross-module subtyping is possible. Tests relying on cross-module
        subtyping have been commented out.
      
      Bug: v8:7748
      Change-Id: I69fd04ecc5611f6230c95d5c89d1c520163fffae
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3416239Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78816}
      fe531e1f
  7. 26 Jan, 2022 1 commit
  8. 19 Jan, 2022 1 commit
    • Manos Koukoutos's avatar
      Reland "[wasm] Various small cleanups/fixes" · 069d62eb
      Manos Koukoutos authored
      This is a reland of f1c2a208
      
      Changes compared to original:
      Revert test change which used simd and caused problems in multiple test
      configurations.
      
      Original change's description:
      > [wasm] Various small cleanups/fixes
      >
      > Changes:
      > - Fix a bug in objects-printer where array elements were not treated as
      >   tagged pointers.
      > - Fix a few TODOs, mainly in the wasm interpreter.
      > - Improve documentation, small refactorings.
      >
      > Change-Id: I1d70ad454b3a0693b9b784b17395434d81d01b61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383136
      > Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78656}
      
      Change-Id: I91f4fed5fbc91acb8b42413a6f40a8202bd43096
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398111Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78677}
      069d62eb
  9. 18 Jan, 2022 1 commit
    • Maya Lekova's avatar
      Revert "[wasm] Various small cleanups/fixes" · b1e12d70
      Maya Lekova authored
      This reverts commit f1c2a208.
      
      Reason for revert: Breaks some tests on no-sse configuration, please see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/45243/overview
      
      Original change's description:
      > [wasm] Various small cleanups/fixes
      >
      > Changes:
      > - Fix a bug in objects-printer where array elements were not treated as
      >   tagged pointers.
      > - Fix a few TODOs, mainly in the wasm interpreter.
      > - Improve documentation, small refactorings.
      >
      > Change-Id: I1d70ad454b3a0693b9b784b17395434d81d01b61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383136
      > Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78656}
      
      Change-Id: Ic698177259bb14b4c251a4212c79cc0d945b07f8
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398109
      Auto-Submit: Maya Lekova <mslekova@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Owners-Override: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78657}
      b1e12d70
  10. 17 Jan, 2022 1 commit
  11. 13 Jan, 2022 1 commit
  12. 12 Jan, 2022 2 commits
  13. 11 Jan, 2022 1 commit
  14. 10 Jan, 2022 1 commit
    • Manos Koukoutos's avatar
      Reland "[wasm] Fast paths in EvaluateInitExpression" · 05f6d3f9
      Manos Koukoutos authored
      This is a reland of be6bd4f4.
      The reason for revert was two bots timing out. On further inspection,
      the timeouts seem unrelated.
      
      Original change's description:
      > [wasm] Fast paths in EvaluateInitExpression
      >
      > We add fast paths for the most common types of expressions in
      > {EvaluateInitExpression} to improve instantiation time. We fall back to
      > full expression decoding for less common operators, or for expressions
      > with operands.
      >
      > Bug: chromium:1284557
      > Change-Id: I39a1816176974058b801cdad6eaaa6da156cea04
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3367627
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78497}
      
      Bug: chromium:1284557
      Change-Id: I209458c1fa36ae41899434b90759ebe3fe5e2a57
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3375545Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78529}
      05f6d3f9
  15. 05 Jan, 2022 2 commits
  16. 13 Dec, 2021 1 commit
  17. 02 Dec, 2021 1 commit
  18. 01 Oct, 2021 1 commit
  19. 30 Sep, 2021 1 commit
    • Clemens Backes's avatar
      [wasm] Fix error message for missing stack arguments · 68ab78e2
      Clemens Backes authored
      We currently could produce the error message 'not enough arguments on
      the stack for block, expected 0 more'. This CL fixes this by printing
      the available number of arguments and the needed number, and adds
      DCHECKs to catch similar miscomputations in the future.
      
      It also adds a new test that produced the broken error before, and
      includes the expected failure message in a few more tests for
      robustness.
      
      R=manoskouk@chromium.org
      
      Change-Id: Ia08863889ae36ae0a05d96d36e92295b7159a01e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3194264Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77167}
      68ab78e2
  20. 24 Sep, 2021 1 commit
  21. 20 Sep, 2021 2 commits
  22. 17 Sep, 2021 1 commit
  23. 15 Sep, 2021 1 commit
  24. 13 Sep, 2021 1 commit
  25. 07 Sep, 2021 1 commit
  26. 06 Sep, 2021 1 commit
  27. 25 Aug, 2021 1 commit
  28. 16 Aug, 2021 1 commit
  29. 04 Aug, 2021 1 commit
  30. 29 Jul, 2021 1 commit
  31. 12 Jul, 2021 1 commit
  32. 07 Jul, 2021 2 commits
  33. 30 Jun, 2021 3 commits
    • Manos Koukoutos's avatar
      Reland "[wasm] Refactor initializer expression handling" · 7981dc33
      Manos Koukoutos authored
      This is a reland of 071a1acf
      
      Changes compared to original:
      Expect SIMD test to fail if SIMD is not supported.
      
      Original change's description:
      > [wasm] Refactor initializer expression handling
      >
      > Design doc: https://bit.ly/3xPxWUe
      >
      > This CL introduces two main changes:
      > - Initializer expressions are now decoded by WasmFullDecoder. With
      >   wasm-gc, initializer expressions are no longer just constants, and
      >   require complex decoding (including stack tracking). This resulted in
      >   extensive code duplication.
      > - Initializer expressions are not stored explicitly by module-decoder as
      >   an AST (WasmInitExpr), but rather as a WireBytesRef, and are decoded
      >   again during module instantiation. This should reduce memory
      >   consumption for globals and other module elements with initializer
      >   expressions (which has been observed in the 40MB range in some
      >   real-world benchmarks.
      >
      > Summary of changes:
      > - Add a static parameter {kFunctionBody, kInitExpression} to the
      >   WasmDecoder. Use it to specialize validation to function bodies/init.
      >   expressions.
      > - Introduce a new Interface for the WasmFullDecoder for init.
      >   expressions.
      > - Differentiate between constant and non-constant opcodes in
      >   WasmFullDecoder.
      > - Change representation of init. expressions in WasmModule to
      >   WireBytesRef.
      > - Reimplement EvaluateInitExpression in module-instantiate to re-decode
      >   initializer expressions.
      > - Remove some now-invalid module decoder tests.
      >
      > Pending changes:
      > - Also refactor initializer expressions for element segment entries.
      > - Reintroduce deleted tests.
      >
      > Bug: v8:11895
      > Change-Id: I76512bfe1386c8338667d30fa6db93880a1e4b42
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972910
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75476}
      
      Bug: v8:11895
      Change-Id: I2dface5ff28d5a2d439a65d3e5cb83135c061bb9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2997722
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75492}
      7981dc33
    • Deepti Gandluri's avatar
      Revert "[wasm-simd] Pass decode if SSSE3 flag is set" · a83fcd80
      Deepti Gandluri authored
      This reverts commit 0d059e07.
      
      Reason for revert: Reverting as CheckHardwareSupportsSimd already contains the SSSE3 check.
      
      Original change's description:
      > [wasm-simd] Pass decode if SSSE3 flag is set
      >
      > Change-Id: Iafe2b5635287fea5bd3c687b4ed897edbce4b0aa
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2798978
      > Reviewed-by: Zhi An Ng <zhin@chromium.org>
      > Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73781}
      
      Change-Id: Ib227af90f2f35a7e63cb64acea8bbca9ff8ddd62
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2998503
      Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75491}
      a83fcd80
    • Clemens Backes's avatar
      Revert "[wasm] Refactor initializer expression handling" · 5756c40e
      Clemens Backes authored
      This reverts commit 071a1acf.
      
      Reason for revert: Breaks on nosse: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/42795/overview
      
      Original change's description:
      > [wasm] Refactor initializer expression handling
      >
      > Design doc: https://bit.ly/3xPxWUe
      >
      > This CL introduces two main changes:
      > - Initializer expressions are now decoded by WasmFullDecoder. With
      >   wasm-gc, initializer expressions are no longer just constants, and
      >   require complex decoding (including stack tracking). This resulted in
      >   extensive code duplication.
      > - Initializer expressions are not stored explicitly by module-decoder as
      >   an AST (WasmInitExpr), but rather as a WireBytesRef, and are decoded
      >   again during module instantiation. This should reduce memory
      >   consumption for globals and other module elements with initializer
      >   expressions (which has been observed in the 40MB range in some
      >   real-world benchmarks.
      >
      > Summary of changes:
      > - Add a static parameter {kFunctionBody, kInitExpression} to the
      >   WasmDecoder. Use it to specialize validation to function bodies/init.
      >   expressions.
      > - Introduce a new Interface for the WasmFullDecoder for init.
      >   expressions.
      > - Differentiate between constant and non-constant opcodes in
      >   WasmFullDecoder.
      > - Change representation of init. expressions in WasmModule to
      >   WireBytesRef.
      > - Reimplement EvaluateInitExpression in module-instantiate to re-decode
      >   initializer expressions.
      > - Remove some now-invalid module decoder tests.
      >
      > Pending changes:
      > - Also refactor initializer expressions for element segment entries.
      > - Reintroduce deleted tests.
      >
      > Bug: v8:11895
      > Change-Id: I76512bfe1386c8338667d30fa6db93880a1e4b42
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972910
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75476}
      
      Bug: v8:11895
      Change-Id: I9fcfdedad73ef21beb9632f50305b8e678a2dff6
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2997582
      Auto-Submit: Clemens Backes <clemensb@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/master@{#75484}
      5756c40e