1. 01 Jun, 2021 1 commit
  2. 27 Mar, 2020 1 commit
  3. 26 Mar, 2020 1 commit
    • Ng Zhi An's avatar
      [wasm] Speed up some tests in grow-memory · efb1b5e4
      Ng Zhi An authored
      Rework testMemoryGrowPreservesDataMemOp tests so that they only test the
      first and last 5 offsets within the page, instead of every offset.
      
      Slight logic change: instead of storing the value C - offset (where C is
      a constant that is different for 32 and 16 memops), we store just the
      value offset. This allows us to combine the logic for all 3 memops (32,
      16, and 8). But we need to add a modulo so that in the 8 bit case, we
      don't store a value that exceeds the maximum (the other cases will never
      hit a case that exceeds the max).
      
      Bug: v8:7783
      Change-Id: Ibfdc77555ba2ca26391eba303050a03538f6012d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117633Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66879}
      efb1b5e4
  4. 24 Mar, 2020 1 commit
    • Ng Zhi An's avatar
      [wasm] Speed up some tests in grow-memory · 30c3ea66
      Ng Zhi An authored
      Rework the testMemoryGrowReadWrite and testMemoryGrowZeroInitialSize
      tests. Combine the different sized tests (32, 16, 8 bit integers) into a
      single base tests, taking in function arguments to specify which
      load/store function to call from the module exports.
      
      Also reduced the number of checks made in each test. Previously the test
      was asserting on every single valid offset. Now it checks the first 5
      and the last 5 of each page of memory. From a quick local test using
      `time`, it speeds up this test on x64 from ~40s to ~20s.
      
      There is more work to be done: there are other tests below that also
      assert on each offset, we can change those in a future patch.
      
      The goal is to be able to run this on arm simulators
      sufficiently quickly, and not require to mark this test as slow.
      
      Bug: v8:7783
      Change-Id: I2b17cf1811de6c26332d7e8f91efbbac3e89f6e3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116601Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66848}
      30c3ea66
  5. 28 Feb, 2020 1 commit
  6. 08 Oct, 2019 1 commit
  7. 30 Jan, 2019 1 commit
  8. 29 Oct, 2018 1 commit
  9. 29 Aug, 2018 1 commit
  10. 17 Aug, 2017 2 commits
    • Enrico Bacis's avatar
      [wasm] Add tests for grow_memory inside functions · d74ec7ef
      Enrico Bacis authored
      This CL introduces 6 tests that verify that the effects of a grow_memory
      instruction executed inside a function are visible also from the caller of
      the function.
      
      The tests verify that:
      
       * the current_memory instruction returns the correct value after
       returning from a function that grew memory;
      
       * accessing a memory page that has been created inside a function does
       not trap in the caller;
      
       * when a function grows the memory and then store something in the grown
       memory, the caller always reads from the grown memory. This checks that
       the memory start address gets updated in the caller (the memory buffer
       could in fact be relocated by the grow_memory instruction).
      
      These tests are implemented for direct and indirect function calls.
      
      R=ahaas@chromium.org,clemensh@chromium.org
      
      Change-Id: Iac8db0fa7a6dd6f530e090af5423fc165d87e863
      Reviewed-on: https://chromium-review.googlesource.com/616150
      Commit-Queue: Enrico Bacis <enricobacis@google.com>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47398}
      d74ec7ef
    • Enrico Bacis's avatar
      [wasm] Fix grow-memory on exported memory · 8ee06838
      Enrico Bacis authored
      The WASM spec maximum memory size is higher than internal V8 maximum object
      size. When a memory object grows above this limit (and only in that case), we
      should signal an error.
      
      This worked for not-exported memory; however when growing exported memory, the
      code was comparing the V8 memory limit with the maximum number of pages defined
      in the module, instead of the current number of pages + the number of new
      required pages. This lead to signaling errors even when growing exported memory
      below the V8 limit if the maximum number of pages specified in the module was
      higher than the V8 limit.
      
      GrowMemoryBuffer already checks that we do not grow a memory buffer past the
      maximum size specified as parameter, so we can pass it the minimum between the
      the V8 limit and the maximum number of pages specified in the module.
      
      This CL introduces a test in test/mjsunit/wasm/import-memory.js that triggers
      the problematic path and a patch to fix it.
      
      R=ahaas@chromium.org,clemensh@chromium.org,gdeepti@chromium.org
      
      Change-Id: I5a8da420418b394d61e1ba3cdf4408c3c09e61b6
      Reviewed-on: https://chromium-review.googlesource.com/600217Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Enrico Bacis <enricobacis@google.com>
      Cr-Commit-Position: refs/heads/master@{#47395}
      8ee06838
  11. 16 Jun, 2017 1 commit
  12. 14 Jun, 2017 2 commits
  13. 18 Jan, 2017 1 commit
  14. 08 Nov, 2016 1 commit
  15. 26 Oct, 2016 1 commit
  16. 20 Oct, 2016 1 commit
  17. 14 Oct, 2016 3 commits
  18. 29 Sep, 2016 2 commits
  19. 28 Sep, 2016 1 commit
  20. 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
  21. 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
  22. 12 Sep, 2016 1 commit
  23. 02 Sep, 2016 1 commit
  24. 30 Aug, 2016 1 commit
  25. 04 Aug, 2016 1 commit
  26. 28 Jun, 2016 1 commit