1. 01 Sep, 2016 1 commit
    • mtrofin's avatar
      [wasm] consolidate wasm and asm.js module compilation sequence · 5f8a6ec4
      mtrofin authored
      This unblocks avoiding the separate code template.
      In the upcoming CL doing away with code templates, We need to track instances
      through the module object, which needs to be separate from the compiled module
      data, which is then shared with the first instance.
      
      This CL ensures we have the object available in the asm.js scenario, too.
      
      Note that this CL also unifies the error messaging when module
      decoding fails.
      
      BUG=v8:5316
      
      Review-Url: https://codereview.chromium.org/2299873002
      Cr-Commit-Position: refs/heads/master@{#39097}
      5f8a6ec4
  2. 31 Aug, 2016 1 commit
  3. 23 Aug, 2016 1 commit
  4. 22 Aug, 2016 1 commit
  5. 19 Aug, 2016 1 commit
  6. 09 Aug, 2016 1 commit
  7. 04 Aug, 2016 1 commit
  8. 14 Jul, 2016 2 commits
  9. 13 Jul, 2016 1 commit
  10. 01 Jul, 2016 2 commits
  11. 28 Jun, 2016 4 commits
    • mtrofin's avatar
      Revert "Revert "[wasm] Complete separation of compilation and instantiation"" · 9d6014ad
      mtrofin authored
      This reverts commit 1eb1dfab.
      
      The original compilation separation change avoided associating a heap
      for the wasm instance if memory was not provided, nor needed. The
      grow memory CL assumed the old behavior, where a memory buffer was
      always present, but may have had a zero size.
      
      The 2CLS  landed shortly after one another. We decided to treat the
      grow memory as the race condition winner, so this CL here re-lands
      compilation separation, plus adjusts grow memory to deal with
      the undefined mem buffer.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2102193003
      Cr-Commit-Position: refs/heads/master@{#37352}
      9d6014ad
    • mtrofin's avatar
      Revert "[wasm] Complete separation of compilation and instantiation" · 1eb1dfab
      mtrofin authored
      This reverts commit 0c7ee927.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2103983003
      Cr-Commit-Position: refs/heads/master@{#37351}
      1eb1dfab
    • bradnelson's avatar
      [wasm] Require wasm explicit asm instantiation to be of a function. · 58920e04
      bradnelson authored
      We were not checking that the string passed to instantiateFromAsm
      contains a function declaration (any declaration was allowed).
      
      Fixes crash.
      
      BUG=620649
      BUG=v8:4203
      R=aseemgarg@chromium.org
      
      Review-Url: https://codereview.chromium.org/2109533002
      Cr-Commit-Position: refs/heads/master@{#37349}
      58920e04
    • mtrofin's avatar
      [wasm] Complete separation of compilation and instantiation · 0c7ee927
      mtrofin authored
      Support for serializing/deserializing the compiled wasm module.
      
      We want to reuse the javascript snapshotting mechanics, at least in the
      short term, when we still use the JS heap for the compiled wasm code.
      Given that a module may be compiled in one v8 instance and then
      instantiated later, in a different instance, whatever information we need
      at instantiation time must also be serializable.
      
      We currently hold on to the un-decoded wasm bytes, for enabling
      debugging scenarios. This imposes a ~20% penalty on the memory
      requirements of the wasm compiled code. We do not need this data
      otherwise, for runtime, and it is sensible to consider eventually loading it
      on demand. Therefore, I intentionally avoided relying on it and re-
      decoding the wasm module data, and instead saved the information
      necessary to support instantiation.
      
      Given how whatever we need to persist must be serializable, the CL
      uses a structure made out of serializable objects (fixed arrays mostly)
      for storing this information. I preferred going this route rather than
      adding more wasm-specific support to the serializer, given that we want
      to eventually move off the JS heap, and therefore the serializer.
      
      Additionally, it turns out this extra information is relatively not complex:
      minimal structure, little nesting depth, mostly simple data like numbers
      or byte blobs, or opaque data like compiled functions.
      
      This CL also moves export compilation ahead of instantiation time.
      
      This change added a helper getter to FixedArray, to make typed retrieval
      of elements easier.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2094563002
      Cr-Commit-Position: refs/heads/master@{#37348}
      0c7ee927
  12. 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
  13. 06 Jun, 2016 1 commit
  14. 25 May, 2016 1 commit
  15. 20 May, 2016 1 commit
  16. 11 May, 2016 1 commit
  17. 04 May, 2016 1 commit
  18. 03 May, 2016 1 commit
  19. 29 Apr, 2016 1 commit
    • titzer's avatar
      [wasm] Binary 11: WASM AST is now postorder. · 2aa4656e
      titzer authored
      [wasm] Binary 11: br_table takes a value.
      [wasm] Binary 11: Add implicit blocks to if arms.
      [wasm] Binary 11: Add arities to call, return, and breaks
      [wasm] Binary 11: Add experimental version.
      
      This CL changes the encoder, decoder, and tests to use a postorder
      encoding of the AST, which is more efficient in decode time and
      space.
      
      R=bradnelson@chromium.org,rossberg@chromium.org,binji@chromium.org
      BUG=chromium:575167
      LOG=Y
      
      Review-Url: https://codereview.chromium.org/1830663002
      Cr-Commit-Position: refs/heads/master@{#35896}
      2aa4656e
  20. 01 Apr, 2016 1 commit
  21. 21 Mar, 2016 1 commit
    • jfb's avatar
      wasm: add flag to dump modules · ed76b66a
      jfb authored
      Flags --dump_wasm_module and --dump_wasm_module_path=/path/to/folder allow us to run a bunch of tests and capture all of the wasm module files including the ones that come from the .js and .cc tests which are built on the fly, as well as the asm2wasm tests.
      
      The files are all uniquely named `HASH.{ok,failed}.wasm`.
      
      This will be especilly useful for fuzz testing, but could also be used for other tests including non-V8 tests.
      
      For now I manually hacked tools/testrunner/local/execution.py so that tools/run-tests.py can output the modules. We may want to ad a flag to run-tests.py proper if this turns out to be useful.
      
      R=bradnelson@chromium.org, titzer@chromium.org, kcc@chromium.org
      
      Review URL: https://codereview.chromium.org/1816583003
      
      Cr-Commit-Position: refs/heads/master@{#34968}
      ed76b66a
  22. 09 Mar, 2016 1 commit
  23. 08 Mar, 2016 1 commit
  24. 07 Mar, 2016 1 commit
  25. 27 Feb, 2016 1 commit
  26. 23 Feb, 2016 1 commit
  27. 16 Feb, 2016 1 commit
  28. 12 Feb, 2016 1 commit
  29. 03 Feb, 2016 1 commit
  30. 01 Feb, 2016 1 commit
  31. 20 Jan, 2016 1 commit
  32. 14 Jan, 2016 2 commits
  33. 13 Jan, 2016 2 commits