1. 25 May, 2016 1 commit
  2. 19 May, 2016 2 commits
  3. 12 May, 2016 3 commits
    • clemensh's avatar
      [wasm] Add UTF-8 validation · f0523e30
      clemensh authored
      Names passed for imports and exports are checked during decoding,
      leading to errors if they are no valid UTF-8. Function names are not
      checked during decode, but rather lead to undefined being returned at
      runtime if they are not UTF-8.
      
      We need to do these checks on the Wasm side, since the factory
      methods assume to get valid UTF-8 strings.
      
      R=titzer@chromium.org, yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/1967023004
      Cr-Commit-Position: refs/heads/master@{#36208}
      f0523e30
    • ahaas's avatar
      [wasm] Implement parallel compilation. · 4aec7ba1
      ahaas authored
      With this CL it is possible to compile a wasm module with multiple
      threads in parallel. Parallel compilation works as follows:
      
      1)   The main thread allocates a compilation unit for each wasm function.
      2)   The main thread spawns WasmCompilationTasks which run on the
           background threads.
      3.a) The background threads and the main thread pick one compilation unit
           at a time and execute the parallel phase of the compilation unit.
           After finishing the execution of the parallel phase, the compilation
           unit is stored in a result queue.
      3.b) If the result queue contains a compilation unit, the main thread
           dequeues it and finishes its compilation.
      4)   After the execution of the parallel phase of all compilation units has
           started, the main thread waits for all WasmCompilationTasks to finish.
      5)   The main thread finalizes the compilation of the module.
      
      I'm going to add some additional tests before committing this CL.
      
      R=titzer@chromium.org, bmeurer@chromium.org, mlippautz@chromium.org, mstarzinger@chromium.org
      
      Committed: https://crrev.com/17215438659d8ff2d7d55f95226bf8a1477ccd79
      Cr-Commit-Position: refs/heads/master@{#36178}
      
      Review-Url: https://codereview.chromium.org/1961973002
      Cr-Commit-Position: refs/heads/master@{#36207}
      4aec7ba1
    • clemensh's avatar
      [wasm] Patch trapping position into stack trace · bafa239d
      clemensh authored
      And add more tests for traps at different locations.
      
      R=titzer@chromium.org, yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/1924253002
      Cr-Commit-Position: refs/heads/master@{#36202}
      bafa239d
  4. 11 May, 2016 2 commits
    • ahaas's avatar
      Revert of [wasm] Implement parallel compilation. (patchset #6 id:100001 of... · be8c688a
      ahaas authored
      Revert of [wasm] Implement parallel compilation. (patchset #6 id:100001 of https://codereview.chromium.org/1961973002/ )
      
      Reason for revert:
      The ThreadSanitizer finds data races.
      
      Original issue's description:
      > [wasm] Implement parallel compilation.
      >
      > With this CL it is possible to compile a wasm module with multiple
      > threads in parallel. Parallel compilation works as follows:
      >
      > 1)   The main thread allocates a compilation unit for each wasm function.
      > 2)   The main thread spawns WasmCompilationTasks which run on the
      >      background threads.
      > 3.a) The background threads and the main thread pick one compilation unit
      >      at a time and execute the parallel phase of the compilation unit.
      >      After finishing the execution of the parallel phase, the compilation
      >      unit is stored in a result queue.
      > 3.b) If the result queue contains a compilation unit, the main thread
      >      dequeues it and finishes its compilation.
      > 4)   After the execution of the parallel phase of all compilation units has
      >      started, the main thread waits for all WasmCompilationTasks to finish.
      > 5)   The main thread finalizes the compilation of the module.
      >
      > I'm going to add some additional tests before committing this CL.
      >
      > R=titzer@chromium.org, bmeurer@chromium.org, mlippautz@chromium.org, mstarzinger@chromium.org
      >
      > Committed: https://crrev.com/17215438659d8ff2d7d55f95226bf8a1477ccd79
      > Cr-Commit-Position: refs/heads/master@{#36178}
      
      TBR=bmeurer@chromium.org,mlippautz@chromium.org,mstarzinger@chromium.org,titzer@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review-Url: https://codereview.chromium.org/1965243003
      Cr-Commit-Position: refs/heads/master@{#36182}
      be8c688a
    • ahaas's avatar
      [wasm] Implement parallel compilation. · 17215438
      ahaas authored
      With this CL it is possible to compile a wasm module with multiple
      threads in parallel. Parallel compilation works as follows:
      
      1)   The main thread allocates a compilation unit for each wasm function.
      2)   The main thread spawns WasmCompilationTasks which run on the
           background threads.
      3.a) The background threads and the main thread pick one compilation unit
           at a time and execute the parallel phase of the compilation unit.
           After finishing the execution of the parallel phase, the compilation
           unit is stored in a result queue.
      3.b) If the result queue contains a compilation unit, the main thread
           dequeues it and finishes its compilation.
      4)   After the execution of the parallel phase of all compilation units has
           started, the main thread waits for all WasmCompilationTasks to finish.
      5)   The main thread finalizes the compilation of the module.
      
      I'm going to add some additional tests before committing this CL.
      
      R=titzer@chromium.org, bmeurer@chromium.org, mlippautz@chromium.org, mstarzinger@chromium.org
      
      Review-Url: https://codereview.chromium.org/1961973002
      Cr-Commit-Position: refs/heads/master@{#36178}
      17215438
  5. 06 May, 2016 1 commit
    • clemensh's avatar
      [wasm] Make wasm info available on the stack trace · a4cd1eef
      clemensh authored
      This changes different locations to extract the reference to the wasm
      object and the function index from the stack trace, and make it
      available through all the APIs which process stack traces.
      The javascript CallSite object now has the new methods isWasm(),
      getWasmObject() and getWasmFunctionIndex(); the byte offset is
      available via getPosition().
      
      Function names of wasm frames should be fully functional with this
      commit, position information works reliably for calls, but not for
      traps like unreachable or out-of-bounds accesses.
      
      R=titzer@chromium.org, yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/1909353002
      Cr-Commit-Position: refs/heads/master@{#36067}
      a4cd1eef
  6. 29 Apr, 2016 2 commits
    • 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
    • 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
  7. 21 Apr, 2016 3 commits
  8. 20 Apr, 2016 4 commits
  9. 13 Apr, 2016 1 commit
  10. 31 Mar, 2016 1 commit
  11. 30 Mar, 2016 2 commits
  12. 24 Mar, 2016 4 commits
  13. 23 Mar, 2016 3 commits
  14. 21 Mar, 2016 1 commit
  15. 14 Mar, 2016 1 commit
  16. 10 Mar, 2016 2 commits
  17. 09 Mar, 2016 6 commits
  18. 08 Mar, 2016 1 commit
    • binji's avatar
      [Wasm] Convert many of the fixed-size values to LEB128. · 78f6f838
      binji authored
      This CL modifies the following to be LEB128:
      * Function table indices
      * Import table signature indices
      * Export table function indices
      * Function signature param count
      * br/br_if break depth
      * br_table target count
      * block/loop expression count
      
      Still to do:
      * Import/export names (LEB128 count + inline data)
      * Data segments (LEB128 offset + size + inline data)
      * Function header stuff (should seperate into function sig and body sections)
      * Memory access alignment + offset (still discussing)
      
      BUG=
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1775873002
      
      Cr-Commit-Position: refs/heads/master@{#34603}
      78f6f838