1. 05 Oct, 2021 1 commit
  2. 04 Oct, 2021 1 commit
  3. 01 Oct, 2021 1 commit
  4. 24 Sep, 2021 1 commit
  5. 21 Sep, 2021 1 commit
  6. 15 Sep, 2021 1 commit
  7. 10 Sep, 2021 2 commits
  8. 07 Sep, 2021 1 commit
  9. 02 Sep, 2021 2 commits
  10. 24 Aug, 2021 1 commit
  11. 19 Aug, 2021 1 commit
  12. 16 Aug, 2021 2 commits
    • Clemens Backes's avatar
      [wasm] Remove a long-living CodeSpaceWriteScope · a8609e06
      Clemens Backes authored
      The {CodeSpaceWriteScope} in {InstanceBuilder::Build} was kept open
      while processing imports, which could compile another wasm module via
      {compiler::ResolveWasmImportCall} and
      {WasmEngine::SyncCompileTranslatedAsmJs}. This leads to errors since
      {CodeSpaceWriteScope}s for different modules cannot be held open at the
      same time.
      
      This CL fixes that by only opening the {CodeSpaceWriteScope} for the
      actual compilation of import wrappers.
      
      Drive-by: Only call {ProcessImports} if there are imports to be
      processed, to avoid some of the overhead of {ProcessImports} and
      {CompileImportWrappers}.
      
      R=jkummerow@chromium.org
      
      Bug: chromium:1239522
      Change-Id: Ifbaf64a4be92088ae4a3fd7e9700a33397b2a967
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097283
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76311}
      a8609e06
    • Jakob Kummerow's avatar
      [wasm-gc] Fix max array length · bb5870d6
      Jakob Kummerow authored
      The static limit didn't account for possible S128 elements.
      This patch makes the limit element type specific.
      
      Fixed: chromium:1237024
      Change-Id: Ic1e37656e2882c0eb7ea6400c83e4094eb747e88
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097269Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76303}
      bb5870d6
  13. 09 Aug, 2021 2 commits
  14. 03 Aug, 2021 1 commit
  15. 29 Jul, 2021 1 commit
  16. 24 Jul, 2021 1 commit
    • Clemens Backes's avatar
      Reland "[liftoff][arm64] Zero-extend offsets also for SIMD" · 5e90a612
      Clemens Backes authored
      This is a reland of b99fe75c.
      The test is now skipped on non-SIMD hardware.
      
      Original change's description:
      > [liftoff][arm64] Zero-extend offsets also for SIMD
      >
      > This extends https://crrev.com/c/2917612 also for SIMD, which
      > (sometimes) uses the special {GetMemOpWithImmOffsetZero} method.
      > As part of this CL, that method is renamed to {GetEffectiveAddress}
      > which IMO is a better name. Also, it just returns a register to make the
      > semantic of that function obvious in the signature.
      >
      > Drive-by: When sign extending to 32 bit, only write to the W portion of
      >           the register. This is a bit cleaner, and I first thought that
      >           this would be the bug.
      >
      > R=jkummerow@chromium.org
      > CC=​thibaudm@chromium.org
      >
      > Bug: chromium:1231950, v8:12018
      > Change-Id: Ifaefe1f18e3a00534a30c99e3c37ed09d9508f6e
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3049073
      > Reviewed-by: Zhi An Ng <zhin@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75898}
      
      TBR=zhin@chromium.org
      CC=jkummerow@chromium.org, thibaudm@chromium.org
      
      Bug: chromium:1231950, v8:12018
      Change-Id: I662b62fafe99389be7a6c23b970fdf3768f866cf
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3051610Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75901}
      5e90a612
  17. 23 Jul, 2021 2 commits
    • Michael Achenbach's avatar
      Revert "[liftoff][arm64] Zero-extend offsets also for SIMD" · 7b455bf2
      Michael Achenbach authored
      This reverts commit b99fe75c.
      
      Reason for revert:
      https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/43105
      
      Original change's description:
      > [liftoff][arm64] Zero-extend offsets also for SIMD
      >
      > This extends https://crrev.com/c/2917612 also for SIMD, which
      > (sometimes) uses the special {GetMemOpWithImmOffsetZero} method.
      > As part of this CL, that method is renamed to {GetEffectiveAddress}
      > which IMO is a better name. Also, it just returns a register to make the
      > semantic of that function obvious in the signature.
      >
      > Drive-by: When sign extending to 32 bit, only write to the W portion of
      >           the register. This is a bit cleaner, and I first thought that
      >           this would be the bug.
      >
      > R=​jkummerow@chromium.org
      > CC=​​thibaudm@chromium.org
      >
      > Bug: chromium:1231950, v8:12018
      > Change-Id: Ifaefe1f18e3a00534a30c99e3c37ed09d9508f6e
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3049073
      > Reviewed-by: Zhi An Ng <zhin@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#75898}
      
      Bug: chromium:1231950, v8:12018
      Change-Id: I4e7a9d6fa6809b7c4d9be919cd5698737d784849
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3049085
      Auto-Submit: Michael Achenbach <machenbach@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@{#75900}
      7b455bf2
    • Clemens Backes's avatar
      [liftoff][arm64] Zero-extend offsets also for SIMD · b99fe75c
      Clemens Backes authored
      This extends https://crrev.com/c/2917612 also for SIMD, which
      (sometimes) uses the special {GetMemOpWithImmOffsetZero} method.
      As part of this CL, that method is renamed to {GetEffectiveAddress}
      which IMO is a better name. Also, it just returns a register to make the
      semantic of that function obvious in the signature.
      
      Drive-by: When sign extending to 32 bit, only write to the W portion of
                the register. This is a bit cleaner, and I first thought that
                this would be the bug.
      
      R=jkummerow@chromium.org
      CC=​thibaudm@chromium.org
      
      Bug: chromium:1231950, v8:12018
      Change-Id: Ifaefe1f18e3a00534a30c99e3c37ed09d9508f6e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3049073Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75898}
      b99fe75c
  18. 14 Jul, 2021 1 commit
  19. 09 Jul, 2021 1 commit
  20. 07 Jul, 2021 1 commit
  21. 01 Jul, 2021 1 commit
  22. 30 Jun, 2021 1 commit
  23. 07 Jun, 2021 1 commit
  24. 01 Jun, 2021 2 commits
  25. 25 May, 2021 1 commit
    • Clemens Backes's avatar
      [wasm] Clean up spec'ed max memory vs dynamic max · 2d04a627
      Clemens Backes authored
      There are two different limits for the maximum memory size in
      WebAssembly:
      1) A 4GB limit which is the same on all platforms, and is observable for
      JS programs. It is used to limit the allowed declared maximum size of a
      wasm memory.
      2) A potentially lower limit (2GB on 32-bit systems, 4GB otherwise)
      which can be further limited using a command-line flag. This limit is
      used whenever actually allocating or growing a wasm memory. This limit
      is not directly observable, but we make sure that no wasm memory will
      ever be bigger than this limit.
      
      The second limit is the one we should check against when allocating or
      growing memory, while the first limit should be used when validating
      a module (or the parameters for WebAssembly.Memory). The compiler can
      rely on no memory being bigger than the second limit, which again is
      never bigger than the first limit.
      
      This CL adds some more documentation to the two limits, and cleans up
      all usages.
      This also makes {kPlatformMaxPages} and {kMaxMemoryPagesAtRuntime}
      obsolete.
      
      R=jkummerow@chromium.org
      
      Bug: chromium:1207263
      Change-Id: I43541aafd3f497d1c368bd9400e9bc667bdfd3d9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910787
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74742}
      2d04a627
  26. 05 May, 2021 2 commits
    • Benedikt Meurer's avatar
      [wasm] Consider only function names from the name section. · e3f21e6d
      Benedikt Meurer authored
      As per WebAssembly Web API[1], the engine should only consider names
      from the name section to synthesize function names in the context of
      call stacks. We previously also added support to harvest the exports
      table here in an attempt to improve the DevTools debugging experience,
      but that needs a separate fix specifically for the inspector (which
      should also take into account the imports to harvest names).
      
      [1]: https://webassembly.github.io/spec/web-api/index.html#conventions
      
      Fixed: chromium:1164305
      Change-Id: I4bde5c8398a5164f1d8ac9060ad3743ed494c41e
      Bug: chromium:1159307, chromium:1164241, chromium:1071432
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2874464
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74382}
      e3f21e6d
    • Manos Koukoutos's avatar
      [wasm][test] Initializer exprs. for element segments · 8d6da6d5
      Manos Koukoutos authored
      Element segments and tables in tests used an ad-hoc mechanism to
      describe the different types of initializer expressions, e.g. an number
      which could denote either the value of a constant or the index of a
      global. This CL tidies up and generalizes the test infrastructure by
      directly using WasmInitExpr in those cases.
      
      Additional changes:
      - Introduce WasmElemSegment class.
      - Remove obsolete --experimental-wasm-bulk-memory flag from tests.
      - Rename WasmInitExpr.type -> kind.
      - Remove dependency of wasm-module-builder from mjsunit.js (except in
        assertTraps).
      
      Change-Id: I716254a04ceea9ceb8ac6b848e12e1637f618f0d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2857638
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74368}
      8d6da6d5
  27. 29 Apr, 2021 1 commit
  28. 27 Apr, 2021 2 commits
  29. 26 Apr, 2021 2 commits
  30. 23 Apr, 2021 1 commit
    • Clemens Backes's avatar
      [wasm] Abort wrapper compilation on isolate shutdown · 8c3c89b0
      Clemens Backes authored
      JS-to-Wasm wrappers embed heap constants (like the undefined value), and
      those heap values are being accessed during compilation for tracing.
      This is not a data race, since those values are read-only. But if the
      isolate dies while we are compiling those wrappers, we might read from
      the heap after it has been free'd.
      
      Ideally we would not access the isolate or the heap at all during
      compilation, but delaying all tracing until the "finalization" phase is
      not feasible, and removing the heap value printing from tracing would
      significantly regress quality of this tracing.
      
      Hence this CL only fixes the actual issue: That we keep compiling
      wrappers when the isolate is already gone. It does so by introducing an
      {OperationsBarrier} per isolate that is being taken by each thread that
      executes wrapper compilation, and is used for waiting for background
      threads to finish before the isolate shuts down.
      Additionally, we actually cancel all compilation if a module dies (or
      the isolate shuts down) before it finished baseline compilation. In this
      state, the module cannot be shared between isolates yet, so it's safe to
      fully cancel all compilation. This cancellation is not strictly
      necessary, but it will reduce the time we are blocked while waiting for
      wrapper compilation to finish (because no new compilation will start).
      
      R=thibaudm@chromium.org
      CC=manoskouk@chromium.org
      
      Bug: v8:11626, chromium:1200231
      Change-Id: I5b19141d22bd0cb00ba84ffa53fb07cf001e13cc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846881Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74142}
      8c3c89b0
  31. 21 Apr, 2021 1 commit
    • Manos Koukoutos's avatar
      [wasm][refactor] Simplify/unify parts of the function decoder · c4113c47
      Manos Koukoutos authored
      Changes:
      - Remove TypeCheckBranchResult. Change TypeCheckBranch() to return bool.
        Refactor call sites to reflect this (decouple current code
        reachability check from type check).
      - Unify TypeCheckBranch(), TypeCheckFallthrough(), and the type-checking
        part of Return() into TypeCheckStackAgainstMerge().
      - Make sure all TypeCheck* functions are only called within VALIDATE.
      - In graph-builder-interface, rename end_env -> merge_env to reflect
        its function for loops.
      - Change expected error messages in some tests.
      
      Change-Id: I857edc18db9c2454ad12d539ffe7a10e96367710
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2839560Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74100}
      c4113c47