1. 14 Nov, 2016 1 commit
  2. 10 Nov, 2016 1 commit
  3. 20 Oct, 2016 1 commit
    • ahaas's avatar
      [wasm] Track in the interpreter if a NaN could have been produced. · 57b14b06
      ahaas authored
      The wasm specification does not fully specify the binary representation
      of NaN: the sign bit can be non-deterministic. The wasm-code fuzzer
      found a test case where the wasm interpreter and the compiled code
      produce a different sign bit for a NaN, and as a consequence they
      produce different results.
      
      With this CL the interpreter tracks whether it executed an instruction
      which can produce a NaN, which are div and sqrt instructions. The
      fuzzer uses this information and compares the result of the interpreter
      with the result of the compiled code only if there was no instruction
      which could have produced a NaN.
      
      R=titzer@chromium.org
      
      TEST=cctest/test-run-wasm-interpreter/TestMayProduceNaN
      BUG=chromium:657481
      
      Review-Url: https://chromiumcodereview.appspot.com/2438603003
      Cr-Commit-Position: refs/heads/master@{#40474}
      57b14b06
  4. 19 Oct, 2016 1 commit
    • titzer's avatar
      [wasm] Use a Managed<WasmModule> to hold metadata about modules. · 418b239f
      titzer authored
      This CL refactors the handling of metadata associated with WebAssembly
      modules to reduce the duplicate marshalling of data from the C++ world
      to the JavaScript world. It does this by wrapping the C++ WasmModule*
      object in a Foreign that is rooted from the on-heap WasmCompiledModule
      (which is itself just a FixedArray). Upon serialization, the C++ object
      is ignored and the original WASM wire bytes are serialized. Upon
      deserialization, the C++ object is reconstituted by reparsing the bytes.
      
      This is motivated by increasing complications in implementing the JS
      API, in particular WebAssembly.Table, which must perform signature
      canonicalization across instances.
      
      Additionally, this CL implements the proper base + offset initialization
      behavior for tables.
      
      R=rossberg@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,yangguo@chromium.org
      BUG=v8:5507, chromium:575167, chromium:657316
      
      Review-Url: https://chromiumcodereview.appspot.com/2424623002
      Cr-Commit-Position: refs/heads/master@{#40434}
      418b239f
  5. 17 Oct, 2016 1 commit
  6. 11 Oct, 2016 1 commit
  7. 05 Oct, 2016 1 commit
  8. 04 Oct, 2016 1 commit
    • ahaas's avatar
      [wasm] Adjust crash message of the correctness fuzzer to avoid clustering. · 55da769b
      ahaas authored
      The correctness fuzzer executes the input array in two different
      execution engines and compares the results. If the results don't match,
      the correctness fuzzer crashes.
      
      Since the crash signature is always the same if the results don't match,
      cluster fuzz would group all inputs which lead to non-matching results.
      
      To avoid the grouping a base64 hash has to be appended to the crash
      signature. This CL changes the text which is appended to the crash
      signature to a base64 hash.
      
      Note that I do not create a base64 hash directly because the base64
      class is not available in V8. Instead I create a string which looks
      like a base64 hash.
      
      R=mmoroz@chromium.org, aarya@chromium.org, titzer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2390233002
      Cr-Commit-Position: refs/heads/master@{#39953}
      55da769b
  9. 29 Sep, 2016 1 commit
  10. 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
  11. 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
  12. 22 Sep, 2016 1 commit
  13. 20 Sep, 2016 1 commit
  14. 17 Sep, 2016 1 commit
    • gdeepti's avatar
      [wasm] Fix test-run-wasm-module tests in debug mode. · dd3b14b7
      gdeepti authored
      test-run-wasm-module cctests broken in debug since recent refactoring changes for moving Compilation/Instantiation off the module object (https://codereview.chromium.org/2320723005). The problem here is that SetupIsolateForWasm tries to add the same property to a module_object multiple times and hits a DCHECK when this property is found on a lookup.
       - Fixed to use the setup method only once when CcTest::InitIsolateOnce is used.
       - Move setup method to test as this is only used for cctests/fuzzers. The install method should take care of this in the regular JS pipeline.
      
       R=mtrofin@chromium.org, ahaas@chromium.org
      
      Review-Url: https://codereview.chromium.org/2342263002
      Cr-Commit-Position: refs/heads/master@{#39484}
      dd3b14b7
  15. 15 Sep, 2016 1 commit
  16. 14 Sep, 2016 2 commits
  17. 12 Sep, 2016 2 commits
    • mtrofin's avatar
      [wasm] Compilation/Instantiation pipeline works off module object · 8e5ac62d
      mtrofin authored
      Moved the compilation/instantiation pipeline to work off the
      module object (JSObject), making the compiled module data (the
      FixedArray) an implementation detail. This:
      - simplifies the code by removing duplicate decode->compile->instantiate
      sequences
      - sets up the stage for "dressing up" the runtime model with
      stronger typed APIs
      - helps relanding this CL: https://codereview.chromium.org/2305903002/.
        It turns out that GCs during the cloning/instantiation events cause
      trouble, and centering the source of truth on the module object helps
      address this issue.
      
      In the process, clarified cctest setup for wasm-capable isolates,
      and changed signatures for consistency (using ModuleOrigin througout).
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2320723005
      Cr-Commit-Position: refs/heads/master@{#39360}
      8e5ac62d
    • ahaas's avatar
      [wasm] Call the wasm interpreter from the wasm-code-fuzzer. · 1521fe9c
      ahaas authored
      With this CL the wasm-code-fuzzer first decodes and interprets the test
      case generated by the fuzzer. It then compiles the test case, but only
      executes the compiled instance if the interpretation of the test case
      was successful. If the compiled instance is executed, then the result of
      the execution is compared with the result of the interpretation.
      
      Additionally this CL refactors the CompileAndRunWasmModule function in
      wasm-module.cc to resuse code in the call to the interpreter.
      
      R=titzer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2321443002
      Cr-Commit-Position: refs/heads/master@{#39351}
      1521fe9c
  18. 29 Aug, 2016 1 commit
  19. 22 Jun, 2016 1 commit
  20. 03 Mar, 2016 1 commit
  21. 02 Mar, 2016 1 commit
  22. 02 Feb, 2016 1 commit