1. 29 Sep, 2016 1 commit
  2. 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
  3. 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
  4. 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
  5. 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
  6. 31 Aug, 2016 1 commit
  7. 14 Jul, 2016 1 commit
  8. 21 Jun, 2016 1 commit
    • rossberg's avatar
      Upgrade Wasm JS API, step 1 · 386c747b
      rossberg authored
      Implements:
      - WebAssembly object,
      - WebAssembly.Module constructor,
      - WebAssembly.Instance constructor,
      - WebAssembly.compile async method,
      - and Module and Instance instance objects.
      
      Also, changes ErrorThrower to support capturing errors in a promise reject.
      
      Since we cannot yet compile without fixing the Wasm memory, and cannot validate a module without compiling, the Module constructor and compile method don't do anything yet but checking that their argument is a suitable BufferSource. Instead of a compiled module, the hidden state of a Module object currently is just that buffer.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2084573002
      Cr-Commit-Position: refs/heads/master@{#37143}
      386c747b
  9. 29 Apr, 2016 1 commit
    • titzer's avatar
      [wasm] Binary 11: Bump module version to 0xB. · ee03b721
      titzer authored
      [wasm] Binary 11: Swap the order of section name / section length.
      [wasm] Binary 11: Shorter section names.
      [wasm] Binary 11: Add a prefix for function type declarations.
      [wasm] Binary 11: Function types encoded as pcount, p*, rcount, r*
      [wasm] Fix numeric names for functions.
      
      R=rossberg@chromium.org,jfb@chromium.org,ahaas@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/1896863003
      Cr-Commit-Position: refs/heads/master@{#35897}
      ee03b721
  10. 09 Mar, 2016 1 commit
  11. 07 Mar, 2016 1 commit
  12. 03 Mar, 2016 1 commit
  13. 28 Feb, 2016 1 commit
  14. 12 Jan, 2016 1 commit
  15. 17 Dec, 2015 1 commit
  16. 11 Dec, 2015 1 commit
    • titzer's avatar
      Initial import of v8-native WASM. · 4c5b3609
      titzer authored
      As discussed in person, this adds the code from v8-native-prototype into
      V8 proper, guarded by GYP flags that do not build the code by default.
      Passing wasm=on to 'make' or setting v8_wasm as a GYP flag activates
      building of this code.
      
      An additional header file is added to and exported from the compiler
      directory, src/compiler/wasm-compiler.h. This exposes a limited interface
      with opaque Node and Graph types to the decoder to build TF graphs, as
      well as functions to compile WASM graphs.
      
      The mjsunit tests added are blacklisted because they fail without the
      WASM object exposed to JS, which is also disabled by the build config
      option.
      
      This corresponds closely to https://github.com/WebAssembly/v8-native-prototype/commit/5981e06ebc9b1e578831d03100f17ebb77970ee0, with some formatting fixes and moving some files into src/compiler.
      
      R=mstarzinger@chromium.org, bradnelson@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1504713014
      
      Cr-Commit-Position: refs/heads/master@{#32794}
      4c5b3609