1. 12 Oct, 2018 1 commit
  2. 11 Oct, 2018 1 commit
  3. 09 Aug, 2018 1 commit
    • Ben L. Titzer's avatar
      [wasm] Add WasmFeatures to enable/detect features · 6aa2a253
      Ben L. Titzer authored
      This CL introduces a set of configuration options implemented as
      a struct of booleans that together comprise the set of enabled
      or detected features. The configuration options replace command-line
      flags that were checked deep in the implementation. As such, it is
      necessary to plumb them through multiple levels of abstraction.
      
      R=ahaas@chromium.org
      CC=mstarzinger@chromium.org
      BUG=chromium:868844
      
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: I1b82f5826e4fd263f68e8cafcd923bac5818a637
      Reviewed-on: https://chromium-review.googlesource.com/1163670Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55018}
      6aa2a253
  4. 01 Aug, 2018 1 commit
  5. 04 Jun, 2018 1 commit
  6. 25 May, 2018 1 commit
  7. 24 May, 2018 1 commit
  8. 07 May, 2018 1 commit
  9. 08 Jan, 2018 2 commits
  10. 16 Oct, 2017 1 commit
  11. 05 Oct, 2017 1 commit
  12. 15 Sep, 2017 1 commit
    • Andreas Haas's avatar
      [wasm] Streaming compilation for WebAssembly. · 549692cb
      Andreas Haas authored
      In this CL I implement streaming compilation for WebAssembly,
      as described in the design doc I have sent out already.
      
      In this implementation the decoding of sections other than the
      code section is done immediately on the foreground thread.
      Eventually all decoding should happen in the background. I
      think it is acceptable to do the decoding on the foreground
      thread for now because I have finished it already, and
      decoding in the background would add even more complexity to
      this CL.
      
      Bug:v8:6785
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I285e1e5e1a5a243113c92571b25ee9bae551d0ed
      Reviewed-on: https://chromium-review.googlesource.com/631721Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48022}
      549692cb
  13. 03 Aug, 2017 1 commit
  14. 23 Jun, 2017 1 commit
    • Andreas Haas's avatar
      [wasm] In the FunctionBody, replace {base} by {offset} · 54e9f3e6
      Andreas Haas authored
      For correct error positions, the FunctionBody struct stored a {base}
      pointer to the beginning of the wasm module bytes, in addition to the
      {start} and {end} pointer of the function body within the module bytes.
      For streaming compilation, we do not have all module bytes in a single
      chunk of memory. Therefore this CL changes the FunctionBody such that it
      does not store the base pointer but the offset of the function body
      within the module. I did the same change already some time ago for the
      {Decoder}.
      
      R=clemensh@chromium.org, mtrofin@chromium.org
      
      Change-Id: I5138fbe270d0f5166a7dcc5cb8f3fe78a298bff6
      Reviewed-on: https://chromium-review.googlesource.com/544863Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46170}
      54e9f3e6
  15. 19 Jun, 2017 1 commit
  16. 22 May, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] [cleanup] Remove unused DecodeStruct type · c30cbb17
      Clemens Hammacher authored
      It was used before as a placeholder in Result<DecodeStruct*> to
      communicate that no value was returned. We actually only created a
      Results holding {nullptr} when returning such values. Thus, the whole
      struct is not needed, and we return Result<nullptr_t> instead, which
      clearly communicates that this result does not hold any value.
      
      An alternative would be to use Result<void>, but this would require
      partial specialization of the Result template, which would be overkill
      here.
      
      R=ahaas@chromium.org
      
      Change-Id: Ib07d2c4fe716c735839675d11146c47f97997d40
      Reviewed-on: https://chromium-review.googlesource.com/509551Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45464}
      c30cbb17
  17. 25 Apr, 2017 1 commit
    • 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
  18. 05 Apr, 2017 2 commits
    • Clemens Hammacher's avatar
      [wasm] [decoder] Templatize decode function for unchecked decoding · eeaceccb
      Clemens Hammacher authored
      In the C++ wasm interpreter, we decode LEB encoded immediates each time
      we execute the respective instruction. The whole instruction sequence
      was validated before, thus we know that all integers are valid.
      This CL refactors several Decoder methods to allow for either checked
      or unchecked decoding. In the checked case, an error is set if a check
      fails, in the unchecked case, a DCHECK will fail.
      
      This improves performance of the interpreter by 20.5%.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: If69efd4f6fbe19d84bfc2f4aa000f429a8e22bf5
      Reviewed-on: https://chromium-review.googlesource.com/468786
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44406}
      eeaceccb
    • Clemens Hammacher's avatar
      [wasm] [decoder] Merge checked_read_leb and consume_leb · 02b4d0e6
      Clemens Hammacher authored
      Both methods decoded a LEB128 encoded integer, but only consume_leb
      incremented the pc pointer accordingly.
      This CL implements consume_leb by using checked_read_leb.
      
      It also refactors a few things:
      1) It removes error_pt, which was only avaible in checked_read_leb.
      2) It renames the error method to errorf, since it receives a format
         string. This also avoids a name clash.
      3) It implements sign extension directly in checked_read_leb instead of
         doing this in the caller.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: I8058f57418493861e5df26d4949041f6766d5138
      Reviewed-on: https://chromium-review.googlesource.com/467150
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44405}
      02b4d0e6
  19. 10 Feb, 2017 1 commit
  20. 25 Jan, 2017 1 commit
  21. 20 Jan, 2017 1 commit
  22. 19 Jan, 2017 2 commits
  23. 06 Jan, 2017 1 commit
    • mtrofin's avatar
      [wasm] factor lower level utilties out of WasmFullDecoder · ccfb815c
      mtrofin authored
      Separated:
      - decoding of locals
      - loop assignment analysis
      - determination of opcode length
      
      as statics that work on a Decoder. Neither need the context of a
      Module, and were used in scenarios where one wasn't available either.
      
      Changed BodyLocalDecls to match the usecases for the type. In all but
      one (a printer), we want the list (in order of declaration, with
      repetitions) of types of locals.
      
      Removed a now-unnecessary constructor for the WasmFullDecoder.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2610813009
      Cr-Commit-Position: refs/heads/master@{#42115}
      ccfb815c
  24. 04 Jan, 2017 1 commit
  25. 21 Dec, 2016 2 commits
  26. 20 Dec, 2016 1 commit
  27. 22 Nov, 2016 1 commit
    • clemensh's avatar
      [wasm] Implement official wasm text format · 172f5012
      clemensh authored
      When disassembling functions for the inspector, we used an internal
      text representation before. This CL implements the official text
      format like it is understood by the spec interpreter.
      
      Example output:
      func $main (param i32) (result i32)
      block i32
        get_local 0
        i32.const 2
        i32.lt_u
        if
          i32.const -2
          return
        end
        get_local 0
        call_indirect 0
      end
      
      R=rossberg@chromium.org, titzer@chromium.org
      BUG=chromium:659715
      
      Review-Url: https://codereview.chromium.org/2520943002
      Cr-Commit-Position: refs/heads/master@{#41172}
      172f5012
  28. 26 Oct, 2016 1 commit
  29. 17 Oct, 2016 1 commit
  30. 13 Oct, 2016 1 commit
  31. 07 Oct, 2016 1 commit
  32. 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
  33. 26 Sep, 2016 1 commit
    • jgruber's avatar
      Enable component builds for fuzzers · 22606f0c
      jgruber authored
      V8 is collecting a growing amount of fuzzers, all of which take substantial
      space on the bots and in chromium build archives. This CL improves that
      situation by allowing component (shared library) builds for almost all fuzzers.
      
      The parser fuzzer is handled as an exception since it would require exporting a
      large number of additional functions.
      
      A component build results in about a 50-100x improvement in file size for each
      fuzzer (~50M-100M to around 1.1M).
      
      BUG=chromium:648864
      CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe
      
      Review-Url: https://codereview.chromium.org/2360983002
      Cr-Commit-Position: refs/heads/master@{#39709}
      22606f0c
  34. 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
  35. 20 Sep, 2016 1 commit