1. 11 Aug, 2020 1 commit
    • Clemens Backes's avatar
      Reland "[wasm] Ensure that only TurboFan code is serialized" · cdd984ef
      Clemens Backes authored
      This is a reland of 60ee70bb.
      The wasm c-api flakes were fixed in https://crrev.com/c/2349293.
      
      Original change's description:
      > [wasm] Ensure that only TurboFan code is serialized
      >
      > We have the implicit assumption that Liftoff code will never be
      > serialized, and we start relying on that when implementing new features
      > (debugging, dynamic tiering).
      >
      > This CL makes the serializer fail if the module contains any Liftoff
      > code. Existing tests are changed to ensure that we fully tiered up
      > before serializing a module (similar to the logic in Chromium).
      > The "wasm-clone-module" test needs to serialize the module before
      > enabling the debugger.
      >
      > Note that chrome currently only serializes a module after it fully
      > tiered up, so that should be fine. If other embedders need the ability
      > to serialize a module in an arbitrary state, we will have to fix this
      > later. With this CL we will be on the safe side though and (gracefully)
      > fail serialization instead of accidentally serializing Liftoff code.
      >
      > R=ahaas@chromium.org
      >
      > Bug: v8:10777
      > Change-Id: I1245e5f7fda3447a544c1e3525e1239cde759174
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336799
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69276}
      
      Bug: v8:10777
      Change-Id: I2a7c1429812ca46d88a2902b8e0a7b7e3d638b56
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349290Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69335}
      cdd984ef
  2. 07 Aug, 2020 1 commit
    • Leszek Swirski's avatar
      Revert "[wasm] Ensure that only TurboFan code is serialized" · cf325b5a
      Leszek Swirski authored
      This reverts commit 60ee70bb.
      
      Reason for revert: wasm-api-tests/WasmCapiTest.Serialize starts flaking: https://crbug.com/v8/10784
      
      Original change's description:
      > [wasm] Ensure that only TurboFan code is serialized
      > 
      > We have the implicit assumption that Liftoff code will never be
      > serialized, and we start relying on that when implementing new features
      > (debugging, dynamic tiering).
      > 
      > This CL makes the serializer fail if the module contains any Liftoff
      > code. Existing tests are changed to ensure that we fully tiered up
      > before serializing a module (similar to the logic in Chromium).
      > The "wasm-clone-module" test needs to serialize the module before
      > enabling the debugger.
      > 
      > Note that chrome currently only serializes a module after it fully
      > tiered up, so that should be fine. If other embedders need the ability
      > to serialize a module in an arbitrary state, we will have to fix this
      > later. With this CL we will be on the safe side though and (gracefully)
      > fail serialization instead of accidentally serializing Liftoff code.
      > 
      > R=​ahaas@chromium.org
      > 
      > Bug: v8:10777
      > Change-Id: I1245e5f7fda3447a544c1e3525e1239cde759174
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336799
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69276}
      
      TBR=ahaas@chromium.org,clemensb@chromium.org
      
      Change-Id: Ic1349375bd562bb0a2724c39c27ef3247461c97b
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10777
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2342845Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69284}
      cf325b5a
  3. 06 Aug, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Ensure that only TurboFan code is serialized · 60ee70bb
      Clemens Backes authored
      We have the implicit assumption that Liftoff code will never be
      serialized, and we start relying on that when implementing new features
      (debugging, dynamic tiering).
      
      This CL makes the serializer fail if the module contains any Liftoff
      code. Existing tests are changed to ensure that we fully tiered up
      before serializing a module (similar to the logic in Chromium).
      The "wasm-clone-module" test needs to serialize the module before
      enabling the debugger.
      
      Note that chrome currently only serializes a module after it fully
      tiered up, so that should be fine. If other embedders need the ability
      to serialize a module in an arbitrary state, we will have to fix this
      later. With this CL we will be on the safe side though and (gracefully)
      fail serialization instead of accidentally serializing Liftoff code.
      
      R=ahaas@chromium.org
      
      Bug: v8:10777
      Change-Id: I1245e5f7fda3447a544c1e3525e1239cde759174
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336799
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69276}
      60ee70bb
  4. 08 Oct, 2019 2 commits
  5. 21 May, 2019 1 commit
  6. 13 Mar, 2019 1 commit
  7. 12 Mar, 2019 1 commit
  8. 30 Jan, 2019 1 commit
  9. 10 Oct, 2018 1 commit
  10. 02 Jul, 2018 2 commits
  11. 28 Jun, 2018 1 commit
  12. 04 Jun, 2018 1 commit
    • Michael Starzinger's avatar
      [wasm] Make stack check independent of the Isolate. · c96ac82c
      Michael Starzinger authored
      This makes stack checks in WasmCode independent of the underlying
      Isolate by loading the limit address from the WasmInstanceObject instead
      of embedding it into the instruction stream. It hence removes the last
      use of the Isolate field from WasmGraphBuilder.
      
      Additionally this introduces the notion of a "runtime stub" which
      represents stub code global to the NativeModule that can be directly
      called from each WasmCode in the same module. These stubs can act as
      trampolines via which Isolate-independent WasmCode can enter other V8
      builtins or runtime functions that remain Isolate-dependent. They will
      eventually replace the current "trampoline" in a NativeModule.
      
      R=titzer@chromium.org
      BUG=v8:7424
      
      Change-Id: Ie1f5582ee656b1ab7716ea06316d6e21a0268e74
      Reviewed-on: https://chromium-review.googlesource.com/1078732
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53487}
      c96ac82c
  13. 23 Jan, 2018 1 commit
  14. 05 Sep, 2017 1 commit
  15. 29 Mar, 2017 1 commit
    • mtrofin's avatar
      [wasm] Fix serialization after instantiation · f2531acb
      mtrofin authored
      The regression comes from attempting to serialize a module with memory
      requirements after instantiation - which is what happens in common emscripten
      scenarios, where the module is obtained from WebAssembly.instantiate(buffer). We then try and serialize the JSArrayBuffer
      representing the instance memory. That operation fails.
      
      Added regression test and also extended the test to cover the other 2
      instance-specific values - globals and tables.
      
      Added a discussion on WasmCompiledModule (comments) explaining design decisions.
      
      BUG=chromium:705562
      
      Review-Url: https://codereview.chromium.org/2784453002
      Cr-Commit-Position: refs/heads/master@{#44250}
      f2531acb
  16. 17 Jan, 2017 1 commit
  17. 12 Jan, 2017 1 commit
  18. 09 Jan, 2017 1 commit
  19. 21 Dec, 2016 1 commit
  20. 20 Dec, 2016 1 commit
  21. 28 Oct, 2016 1 commit
  22. 26 Oct, 2016 1 commit
  23. 22 Oct, 2016 1 commit
  24. 06 Oct, 2016 3 commits
  25. 27 Sep, 2016 1 commit
    • titzer's avatar
      [wasm] Master CL for Binary 0xC changes. · 28392ab1
      titzer authored
      [0xC] Convert to stack machine semantics.
      [0xC] Use section codes instead of names.
      [0xC] Add elements section decoding.
      [0xC] Decoding of globals section.
      [0xC] Decoding of memory section.
      [0xC] Decoding of imports section.
      [0xC] Decoding of exports section.
      [0xC] Decoding of data section.
      [0xC] Remove CallImport bytecode.
      [0xC] Function bodies have an implicit block.
      [0xC] Remove the bottom label from loops.
      [0xC] Add signatures to blocks.
      [0xC] Remove arities from branches.
      Add tests for init expression decoding.
      Rework compilation of import wrappers and how they are patched.
      Rework function indices in debugging.
      Fix ASM->WASM builder for stack machine.
      Reorganize asm.js foreign functions due to import indices change.
      
      R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
      Review-Url: https://codereview.chromium.org/2345593003
      Cr-Original-Commit-Position: refs/heads/master@{#39678}
      Cr-Commit-Position: refs/heads/master@{#39795}
      28392ab1
  26. 23 Sep, 2016 2 commits
    • machenbach's avatar
      Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of... · e1eee748
      machenbach authored
      Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of https://codereview.chromium.org/2345593003/ )
      
      Reason for revert:
      Main suspect for tsan:
      https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11893
      
      Also changes layout tests:
      https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10036
      
      +mips builder:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4032
      
      Original issue's description:
      > [wasm] Master CL for Binary 0xC changes.
      >
      > [0xC] Convert to stack machine semantics.
      > [0xC] Use section codes instead of names.
      > [0xC] Add elements section decoding.
      > [0xC] Decoding of globals section.
      > [0xC] Decoding of memory section.
      > [0xC] Decoding of imports section.
      > [0xC] Decoding of exports section.
      > [0xC] Decoding of data section.
      > [0xC] Remove CallImport bytecode.
      > [0xC] Function bodies have an implicit block.
      > [0xC] Remove the bottom label from loops.
      > [0xC] Add signatures to blocks.
      > [0xC] Remove arities from branches.
      > Add tests for init expression decoding.
      > Rework compilation of import wrappers and how they are patched.
      > Rework function indices in debugging.
      > Fix ASM->WASM builder for stack machine.
      > Reorganize asm.js foreign functions due to import indices change.
      >
      > R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      > BUG=chromium:575167
      > LOG=Y
      >
      > Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
      > Cr-Commit-Position: refs/heads/master@{#39678}
      
      TBR=ahaas@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,rossberg@chromium.org,bradnelson@google.com,titzer@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=chromium:575167
      
      Review-Url: https://codereview.chromium.org/2361053004
      Cr-Commit-Position: refs/heads/master@{#39685}
      e1eee748
    • titzer's avatar
      [wasm] Master CL for Binary 0xC changes. · 76eb976a
      titzer authored
      [0xC] Convert to stack machine semantics.
      [0xC] Use section codes instead of names.
      [0xC] Add elements section decoding.
      [0xC] Decoding of globals section.
      [0xC] Decoding of memory section.
      [0xC] Decoding of imports section.
      [0xC] Decoding of exports section.
      [0xC] Decoding of data section.
      [0xC] Remove CallImport bytecode.
      [0xC] Function bodies have an implicit block.
      [0xC] Remove the bottom label from loops.
      [0xC] Add signatures to blocks.
      [0xC] Remove arities from branches.
      Add tests for init expression decoding.
      Rework compilation of import wrappers and how they are patched.
      Rework function indices in debugging.
      Fix ASM->WASM builder for stack machine.
      Reorganize asm.js foreign functions due to import indices change.
      
      R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/2345593003
      Cr-Commit-Position: refs/heads/master@{#39678}
      76eb976a
  27. 16 Sep, 2016 1 commit
  28. 09 Aug, 2016 1 commit