1. 01 Jun, 2021 1 commit
  2. 09 Apr, 2020 3 commits
  3. 30 Jan, 2019 1 commit
  4. 27 Jun, 2018 1 commit
  5. 04 May, 2018 1 commit
    • Michael Starzinger's avatar
      Reland "[wasm] Maintain link from Instance to Module." · 56e8b099
      Michael Starzinger authored
      This is a reland of a0c57368
      
      Original change's description:
      > [wasm] Maintain link from Instance to Module.
      > 
      > This moves the link from a {WasmInstanceObject} to its corresponding
      > {WasmModuleObject} into the right place and also makes it strong. This
      > ensures that an instance always keeps the underlying module alive and
      > hence removes the situation of an "orphaned instance".
      > 
      > R=clemensh@chromium.org
      > 
      > Change-Id: Id59f6a49740af8ef0248679c3d2c696bb9776944
      > Reviewed-on: https://chromium-review.googlesource.com/1041691
      > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52942}
      
      Change-Id: I9854400bfc1d22bd258f17118fcb7460cdc3acd5
      Reviewed-on: https://chromium-review.googlesource.com/1043786Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52985}
      56e8b099
  6. 03 May, 2018 2 commits
  7. 06 Apr, 2018 1 commit
  8. 04 Apr, 2018 2 commits
    • Ben Titzer's avatar
      Revert "[wasm] Merge the WasmContext into WasmInstanceObject" · 8adb94fc
      Ben Titzer authored
      This reverts commit 57bf0bfe.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [wasm] Merge the WasmContext into WasmInstanceObject
      > 
      > This change makes lifetime management of WasmCode much simpler.
      > By using the WasmInstanceObject as the context for WASM code execution,
      > including the pointer to the memory base and indirect function tables,
      > this keeps the instance alive when WASM code is on the stack, since
      > the instance object is passed as a parameter and spilled onto the stack.
      > This is in preparation of sharing the code between instances and
      > isolates.
      > 
      > Bug: v8:7424
      > 
      > Change-Id: Ic2e4b7bcc2feb20001d0553a615a8a9dff36317e
      > Reviewed-on: https://chromium-review.googlesource.com/958520
      > Commit-Queue: Ben Titzer <titzer@chromium.org>
      > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52361}
      
      TBR=mstarzinger@chromium.org,titzer@chromium.org,ahaas@chromium.org,clemensh@chromium.org
      
      Change-Id: I653e27b46dbc43ad773eda4292d521a508f42d79
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7424
      Reviewed-on: https://chromium-review.googlesource.com/995418Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52364}
      8adb94fc
    • Ben L. Titzer's avatar
      [wasm] Merge the WasmContext into WasmInstanceObject · 57bf0bfe
      Ben L. Titzer authored
      This change makes lifetime management of WasmCode much simpler.
      By using the WasmInstanceObject as the context for WASM code execution,
      including the pointer to the memory base and indirect function tables,
      this keeps the instance alive when WASM code is on the stack, since
      the instance object is passed as a parameter and spilled onto the stack.
      This is in preparation of sharing the code between instances and
      isolates.
      
      Bug: v8:7424
      
      Change-Id: Ic2e4b7bcc2feb20001d0553a615a8a9dff36317e
      Reviewed-on: https://chromium-review.googlesource.com/958520
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52361}
      57bf0bfe
  9. 19 Aug, 2017 2 commits
    • Mircea Trofin's avatar
      Revert "Revert "[wasm] Reference indirect tables as addresses of global handles"" · b22fb03a
      Mircea Trofin authored
      This reverts commit af37f6b9.
      
      Reason for revert: Reverted dependency fixed.
      
      Original change's description:
      > Revert "[wasm] Reference indirect tables as addresses of global handles"
      > 
      > This reverts commit 186099d4.
      > 
      > Reason for revert: Need to revert:
      > https://chromium-review.googlesource.com/c/613880
      > 
      > Original change's description:
      > > [wasm] Reference indirect tables as addresses of global handles
      > > 
      > > This sets us up for getting the wasm code generation off the GC heap.
      > > We reference tables as global handles, which have a stable address. This
      > > requires an extra instruction when attempting to make an indirect call,
      > > per table (i.e. one for the signature table and one for the function
      > > table).
      > > 
      > > Bug: 
      > > Change-Id: I83743ba0f1dfdeba9aee5d27232f8823981288f8
      > > Reviewed-on: https://chromium-review.googlesource.com/612322
      > > Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      > > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#47444}
      > 
      > TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org
      > 
      > Change-Id: Ic3dff87410a51a2072ddc16cfc83a230526d4c56
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Reviewed-on: https://chromium-review.googlesource.com/622568
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47450}
      
      TBR=bradnelson@chromium.org,machenbach@chromium.org,titzer@chromium.org,mtrofin@chromium.org
      
      Change-Id: I3dc5dc8be26b5462703edac954cbedbb8f504c1e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/622035Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47455}
      b22fb03a
    • Michael Achenbach's avatar
      Revert "[wasm] Reference indirect tables as addresses of global handles" · af37f6b9
      Michael Achenbach authored
      This reverts commit 186099d4.
      
      Reason for revert: Need to revert:
      https://chromium-review.googlesource.com/c/613880
      
      Original change's description:
      > [wasm] Reference indirect tables as addresses of global handles
      > 
      > This sets us up for getting the wasm code generation off the GC heap.
      > We reference tables as global handles, which have a stable address. This
      > requires an extra instruction when attempting to make an indirect call,
      > per table (i.e. one for the signature table and one for the function
      > table).
      > 
      > Bug: 
      > Change-Id: I83743ba0f1dfdeba9aee5d27232f8823981288f8
      > Reviewed-on: https://chromium-review.googlesource.com/612322
      > Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47444}
      
      TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org
      
      Change-Id: Ic3dff87410a51a2072ddc16cfc83a230526d4c56
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/622568Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47450}
      af37f6b9
  10. 18 Aug, 2017 1 commit
  11. 20 Dec, 2016 1 commit
  12. 03 Nov, 2016 1 commit
    • mstarzinger's avatar
      [wasm] Fix compiled-module-management lifetime issues. · e637154b
      mstarzinger authored
      This makes sure the test in question does not rely on specific lifetime
      characteristics for local variables within a function. Note that these
      lifetimes are not specified by JavaScript and are not observable within
      JavaScript proper. The natives syntax however makes it observable.
      
      BUG=v8:5345
      TEST=mjsunit/wasm/compiled-module-management
      R=mtrofin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2474053002
      Cr-Commit-Position: refs/heads/master@{#40733}
      e637154b
  13. 31 Oct, 2016 1 commit
  14. 20 Oct, 2016 2 commits
  15. 06 Oct, 2016 3 commits
  16. 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
  17. 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
  18. 12 Sep, 2016 1 commit
    • mtrofin's avatar
      [wasm] reuse the first compiled module. · b4dc310a
      mtrofin authored
      This change avoids needing to keep around an unused compiled
      module. Instead, the result of compiling the wasm bytes is
      given to the first instance. The module object and that instance object
      point to the same compiled module. Instances are, then, cloned from
      the compiled module the module object points to. When an instance is
      collected, we make sure that the module object still has a clone
      available, and, if the last instance is GC-ed, we also reset the compiled
      module so that it does not reference its heap, so that it (==heap) may
      be collected.
      
      This is achieved by linking the clones in a double-linked list and
      registering a finalizer for each. When we create an instance, we tie it
      in the front of the list, making the module object point to it (O(1)). When
      the finalizer is called, we relink the list over the dying object (O(1)). The
      costliest operation is finalizing the last instance, since we need to visit
      all wasm functions and reset heap references.
      
      BUG=v8:5316
      
      Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af
      Review-Url: https://codereview.chromium.org/2305903002
      Cr-Original-Commit-Position: refs/heads/master@{#39153}
      Cr-Commit-Position: refs/heads/master@{#39361}
      b4dc310a
  19. 05 Sep, 2016 2 commits
    • machenbach's avatar
      Revert of [wasm] reuse the first compiled module (patchset #12 id:220001 of... · 359a00bf
      machenbach authored
      Revert of [wasm] reuse the first compiled module (patchset #12 id:220001 of https://codereview.chromium.org/2305903002/ )
      
      Reason for revert:
      mac gc stress failures:
      https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/8341
      
      Original issue's description:
      > [wasm] reuse the first compiled module.
      >
      > This change avoids needing to keep around an unused compiled
      > module. Instead, the result of compiling the wasm bytes is
      > given to the first instance. The module object and that instance object
      > point to the same compiled module. Instances are, then, cloned from
      > the compiled module the module object points to. When an instance is
      > collected, we make sure that the module object still has a clone
      > available, and, if the last instance is GC-ed, we also reset the compiled
      > module so that it does not reference its heap, so that it (==heap) may
      > be collected.
      >
      > This is achieved by linking the clones in a double-linked list and
      > registering a finalizer for each. When we create an instance, we tie it
      > in the front of the list, making the module object point to it (O(1)). When
      > the finalizer is called, we relink the list over the dying object (O(1)). The
      > costliest operation is finalizing the last instance, since we need to visit
      > all wasm functions and reset heap references.
      >
      > BUG=v8:5316
      >
      > Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af
      > Cr-Commit-Position: refs/heads/master@{#39153}
      
      TBR=bradnelson@chromium.org,verwaest@chromium.org,vogelheim@chromium.org,yangguo@chromium.org,mtrofin@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5316
      
      Review-Url: https://codereview.chromium.org/2306403002
      Cr-Commit-Position: refs/heads/master@{#39154}
      359a00bf
    • mtrofin's avatar
      [wasm] reuse the first compiled module. · 01f5af51
      mtrofin authored
      This change avoids needing to keep around an unused compiled
      module. Instead, the result of compiling the wasm bytes is
      given to the first instance. The module object and that instance object
      point to the same compiled module. Instances are, then, cloned from
      the compiled module the module object points to. When an instance is
      collected, we make sure that the module object still has a clone
      available, and, if the last instance is GC-ed, we also reset the compiled
      module so that it does not reference its heap, so that it (==heap) may
      be collected.
      
      This is achieved by linking the clones in a double-linked list and
      registering a finalizer for each. When we create an instance, we tie it
      in the front of the list, making the module object point to it (O(1)). When
      the finalizer is called, we relink the list over the dying object (O(1)). The
      costliest operation is finalizing the last instance, since we need to visit
      all wasm functions and reset heap references.
      
      BUG=v8:5316
      
      Review-Url: https://codereview.chromium.org/2305903002
      Cr-Commit-Position: refs/heads/master@{#39153}
      01f5af51