1. 20 Aug, 2020 2 commits
  2. 17 Aug, 2020 1 commit
  3. 06 Apr, 2020 1 commit
  4. 30 Mar, 2020 1 commit
  5. 26 Mar, 2020 1 commit
  6. 17 Mar, 2020 1 commit
  7. 27 Feb, 2020 1 commit
  8. 25 Feb, 2020 1 commit
    • Andreas Haas's avatar
      Reland "[wasm] The name of a custom section can cause a validation error" · 7a318130
      Andreas Haas authored
      This is a reland of 03d5a7ba
      
      Nothing changed here compared to the original test. The tests on the
      blink side were invalid, I fixed them in https://crrev.com/c/2066907.
      
      Original change's description:
      > [wasm] The name of a custom section can cause a validation error
      >
      > The WebAssembly spec defines that the name of a custom section can cause
      > a validation error. The streaming decoder, however, used a separate
      > Decoder object to decode the name, and thereby avoided a validation
      > error. With this CL the streaming decoder uses the main decoder to
      > decode the name of the custom section.
      >
      > In addition this CL removes the test mjsunit/regress/wasm/regress-789952.
      > This test defined an invalid WebAssembly module and expected it to
      > compile. As it is a regression test, it makes no sense to fix the test.
      > The module is invalid because it defines the length of the custom section
      > to be '0', so there are no bytes in the custom section for its name.
      >
      > R=clemensb@chromium.org
      > CC=thibaudm@chromium.org
      >
      > Bug: v8:10126
      > Change-Id: I8cfc77c9a5916570d5362d5922e0179a29774da8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041446
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66348}
      
      Bug: v8:10126
      Change-Id: I48aaed8eb9899da1703030fb6809fe46a6e66191
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069325
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66431}
      7a318130
  9. 24 Feb, 2020 1 commit
  10. 19 Feb, 2020 2 commits
    • Michael Achenbach's avatar
      Revert "[wasm] The name of a custom section can cause a validation error" · 43accc8b
      Michael Achenbach authored
      This reverts commit 03d5a7ba.
      
      Reason for revert: Needs rebaseline:
      https://ci.chromium.org/p/v8/builders/ci/V8%20Blink%20Linux/3243
      
      Original change's description:
      > [wasm] The name of a custom section can cause a validation error
      > 
      > The WebAssembly spec defines that the name of a custom section can cause
      > a validation error. The streaming decoder, however, used a separate
      > Decoder object to decode the name, and thereby avoided a validation
      > error. With this CL the streaming decoder uses the main decoder to
      > decode the name of the custom section.
      > 
      > In addition this CL removes the test mjsunit/regress/wasm/regress-789952.
      > This test defined an invalid WebAssembly module and expected it to
      > compile. As it is a regression test, it makes no sense to fix the test.
      > The module is invalid because it defines the length of the custom section
      > to be '0', so there are no bytes in the custom section for its name.
      > 
      > R=​clemensb@chromium.org
      > CC=​thibaudm@chromium.org
      > 
      > Bug: v8:10126
      > Change-Id: I8cfc77c9a5916570d5362d5922e0179a29774da8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041446
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66348}
      
      TBR=ahaas@chromium.org,clemensb@chromium.org
      
      Change-Id: I5a7ea265ce47b9e685a5056bb83db6dc58f774a9
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10126
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2065168Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66356}
      43accc8b
    • Andreas Haas's avatar
      [wasm] The name of a custom section can cause a validation error · 03d5a7ba
      Andreas Haas authored
      The WebAssembly spec defines that the name of a custom section can cause
      a validation error. The streaming decoder, however, used a separate
      Decoder object to decode the name, and thereby avoided a validation
      error. With this CL the streaming decoder uses the main decoder to
      decode the name of the custom section.
      
      In addition this CL removes the test mjsunit/regress/wasm/regress-789952.
      This test defined an invalid WebAssembly module and expected it to
      compile. As it is a regression test, it makes no sense to fix the test.
      The module is invalid because it defines the length of the custom section
      to be '0', so there are no bytes in the custom section for its name.
      
      R=clemensb@chromium.org
      CC=thibaudm@chromium.org
      
      Bug: v8:10126
      Change-Id: I8cfc77c9a5916570d5362d5922e0179a29774da8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041446
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66348}
      03d5a7ba
  11. 24 Jan, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Implement toString of exported functions · 003f622a
      Clemens Backes authored
      We currently print asm.js functions converted to wasm as
      "function foo() { [native code] }", even though without asm to wasm
      translation we get the proper source code. This is an observable
      difference that should not be, and also foozzie finds this frequently in
      different variations.
      
      This CL makes us remember the start position (position of the "function"
      token) and end position (right behind the closing "}") of each function
      we transform to wasm. These offsets, together with the Script that
      contained the function, allows us to reconstruct the source code of the
      function for the {toString()} method.
      
      R=jkummerow@chromium.org
      
      Bug: chromium:667678
      Change-Id: If22471cad4cefdfc67f6d1b8fda85aa0eeb411bd
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016582
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65972}
      003f622a
  12. 22 Jan, 2020 1 commit
  13. 21 Jan, 2020 1 commit
    • Clemens Backes's avatar
      Move decoded asm.js offset table off-heap · 87f09404
      Clemens Backes authored
      The asm.js offset table exists in two forms: Delta-encoded in a byte
      array, as generated during asm translation, and decoded, for faster
      lookup.
      This CL moves the encoded version from the {AsmWasmData} and
      {WasmModuleObject} to the {WasmModule}, and stores it off-heap in a C++
      array instead of a {ByteArray}.
      Also, it moves the decoded version off-heap by storing it in a C++ data
      structure that makes lookup easy, instead of encoding it again in
      another {ByteArray}.
      
      This change is a nice refactoring in itself, but it also prepares adding
      more information to the offset table. For reconstructing the source code
      of an asm.js function, we will need to store the start and end offsets
      of the whole function as well (see linked bug).
      
      R=jkummerow@chromium.org
      
      Bug: chromium:667678
      Change-Id: I79b789c3122dd8ba803cedc6bfdcc3d4b1fa0fd4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2011108
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65900}
      87f09404
  14. 16 Jan, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Move decoded local names off-heap · c0ee1e28
      Clemens Backes authored
      We were decoding the names of locals into a C++ data structure, and then
      generated a FixedArray out of that, stored in the on-heap WasmDebugInfo.
      In order to support name lookup for debugging with Liftoff, where no
      WasmDebugInfo will be present, this CL refactors the C++ data structure
      to allow direct lookups and stores it in the C++ DebugInfo structure.
      
      With this CL, the names are still only used from the old
      interpreter-based debugging path. A follow-up CL will then also use it
      from Liftoff.
      
      R=thibaudm@chromium.org
      
      Bug: v8:10019
      Change-Id: I1397021b5d69b9346fc26f5e83653360f428c5e7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002541
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65819}
      c0ee1e28
  15. 13 Sep, 2019 1 commit
  16. 08 Jul, 2019 2 commits
  17. 24 May, 2019 1 commit
  18. 29 Mar, 2019 1 commit
  19. 18 Mar, 2019 1 commit
  20. 23 Oct, 2018 1 commit
  21. 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
  22. 01 Aug, 2018 1 commit
  23. 24 Jul, 2018 1 commit
  24. 20 Jul, 2018 1 commit
  25. 18 Jul, 2018 1 commit
  26. 18 Jun, 2018 1 commit
    • Clemens Hammacher's avatar
      [wasm] Store WasmModule in shared_ptr during async compilation · 6be6ec00
      Clemens Hammacher authored
      We currently store the {WasmModule} (generated during decoding) in a
      unique_ptr and pass ownership to the {WasmModuleObject} after
      compilation.
      I plan to move the {Managed<NativeModule>} from {WasmCompiledModule} to
      {WasmModuleObject}, which will force us to create the
      {WasmModuleObject} *before* compilation, so that the {CompilationState}
      is available during compilation.
      
      This CL prepares that refactoring by storing the {WasmModule} in a
      {shared_ptr} in the {AsyncCompileJob}. Note that it will eventually be
      stored in a {shared_ptr} in the {Managed} anyway.
      
      R=titzer@chromium.org
      
      Change-Id: Iac5e3c1067af2801e938f77a455a68807801526a
      Reviewed-on: https://chromium-review.googlesource.com/1104117
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53801}
      6be6ec00
  27. 19 Apr, 2018 1 commit
    • Clemens Hammacher's avatar
      [wasm] Tear apart the WasmCompilationUnit · 0da7ec58
      Clemens Hammacher authored
      This refactoring is a big step towards separating Turbofan-related code
      from backend independent code. This will allow us to include way less
      headers from "src/compiler" at various places.
      
      The {WasmCompilationUnit} contained information for Turbofan
      compilation, and for Liftoff compilation. This CL tears this apart, such
      that {WasmCompilationUnit} holds backend-independent information, plus
      a pointer to either {LiftoffCompilationUnit} or
      {TurbofanWasmCompilationUnit}. These pointers are opaque, so that
      {function-compiler.h}, defining {WasmCompilationUnit}, does not need to
      include any Turbofan specific or Liftoff specific headers.
      
      R=ahaas@chromium.org, titzer@chromium.org, mstarzinger@chromium.org
      
      Bug: v8:7570, v8:6600
      Change-Id: I024c9a23508ee1b4b3cbe1d068c8e785d732daca
      Reviewed-on: https://chromium-review.googlesource.com/1016640
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52684}
      0da7ec58
  28. 16 Mar, 2018 1 commit
  29. 13 Mar, 2018 1 commit
    • Stephan Herhut's avatar
      [wasm] Parse function names on demand · 49a1a9a4
      Stephan Herhut authored
      Function names are optional in wasm and might not be present for most
      functions. Instead of storing an empty name with each function, this
      change loads names, if present, on first access of the name.
      
      This also fixes an inconsistency with streaming compilation. Under
      streaming compilation, functions are compiled before parsing the name
      section. Hence, they always received an empty name. With this change,
      assignment of names is typically deferred until the whole module was
      parsed.
      
      Bug: chromium:820291
      Change-Id: I86d76aa40b7c45897d152725547795c8b6b9b9ba
      Reviewed-on: https://chromium-review.googlesource.com/955647
      Commit-Queue: Stephan Herhut <herhut@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51909}
      49a1a9a4
  30. 11 Jan, 2018 1 commit
  31. 13 Oct, 2017 1 commit
  32. 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
  33. 14 Sep, 2017 1 commit
  34. 28 Aug, 2017 1 commit
    • Michael Starzinger's avatar
      [asm.js] Correctly set minimum memory size to zero. · 89f839e5
      Michael Starzinger authored
      This makes sure the minimum memory size for WebAssembly modules derived
      from asm.js is set to zero. It allows instatiation without allocating an
      underlying memory, when such memory is unused. It also fixes a bug in
      patching of embedded memory sizes for asm.js modules.
      
      R=ahaas@chromium.org
      TEST=mjsunit/regress/regress-crbug-759327
      BUG=chromium:759327
      
      Change-Id: If5a965b96a03cbb5ba15bc41fbaf359f74961f41
      Reviewed-on: https://chromium-review.googlesource.com/637912
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47646}
      89f839e5
  35. 19 Aug, 2017 2 commits
  36. 18 Aug, 2017 1 commit