1. 03 May, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] [interpreter] Ignore stack effects after unreachable · 4423c9cc
      Clemens Hammacher authored
      During computation of the side table, ignore stack effects of
      instructions following any unconditional jump in the same block
      (|unreachable|, |br|, |br_table| or |return| jump out of the block).
      Without this fix, the current stack height might underflow, or we compute an
      unnecessarily large max_stack_height_. Note that those instruction will
      never get executed anyway.
      Hence, we don't need to store any side table information for such
      unreachable code.
      
      R=rossberg@chromium.org
      BUG=chromium:716936, chromium:715990
      
      Change-Id: I282f7f18ba1b972a112210e692f6cd05cf32308c
      Reviewed-on: https://chromium-review.googlesource.com/493266Reviewed-by: 's avatarAndreas Rossberg <rossberg@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45059}
      4423c9cc
  2. 25 Apr, 2017 2 commits
    • Clemens Hammacher's avatar
      [wasm] Move wasm-macro-gen.h to test/common/wasm · fc6d4a1f
      Clemens Hammacher authored
      This header file is only used from tests.
      Also, move the LoadStoreOpcodeOf method (only used in tests) from
      wasm-opcodes.h to wasm-macro-gen.h.
      
      R=ahaas@chromium.org
      
      Change-Id: I8d4691be494b5c1fbe3084441329850930bad647
      Reviewed-on: https://chromium-review.googlesource.com/486861
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44845}
      fc6d4a1f
    • Clemens Hammacher's avatar
      [wasm] [interpreter] Precompute side table for breaks · 92bf8327
      Clemens Hammacher authored
      Instead of dynamically tracking the block nesting, precompute the
      information statically.
      The interpreter was already using a side table to store the pc diff for
      each break, conditional break and others. The information needed to
      adjust the stack was tracked dynamically, however. This CL also
      precomputes this information, as it is statically known.
      Instead of just storing the pc diff in the side table, we now store the
      pc diff, the stack height diff and the arity of the target block.
      
      Local measurements show speedups of 5-6% on average, sometimes >10%.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: I986cfa989aabe1488f2ff79ddbfbb28aeffe1452
      Reviewed-on: https://chromium-review.googlesource.com/485482Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44837}
      92bf8327
  3. 24 Apr, 2017 1 commit
  4. 09 Jan, 2017 1 commit
  5. 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
  6. 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
  7. 25 May, 2016 1 commit
    • titzer's avatar
      [wasm] Implement an interpreter for WASM. · e4bb7ff9
      titzer authored
      This interpreter directly decodes and executes WASM binary code for
      the purpose of supporting low-level debugging. It is not currently
      integrated into the main WASM implementation.
      
      R=ahaas@chromium.org,clemensh@chromium.org,rossberg@chromium.org,binji@chromium.org
      BUG=
      
      Review-Url: https://codereview.chromium.org/1972153002
      Cr-Commit-Position: refs/heads/master@{#36497}
      e4bb7ff9