1. 09 Nov, 2018 1 commit
    • Clemens Hammacher's avatar
      Extract lambda tasks to task-utils.h · 578fe721
      Clemens Hammacher authored
      This extracts the lambda tasks to an own compilation unit and header
      file. Additionally, it addresses the TODO to avoid templates and just
      store the function to execute in an std::function.
      Third, it provides the same functionality for pure (non-cancellable
      non-idle) tasks.
      Last, it removes the "Lambda" part from the methods, because we can
      actually instantiate it with anything that is invocable (function
      pointer, lambda, functor, ...).
      
      R=ahaas@chromium.org
      
      Bug: v8:8238
      Change-Id: I2f613f5b15ee208f215bbf74bd6d1d41889fd637
      Reviewed-on: https://chromium-review.googlesource.com/c/1328923
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57397}
      578fe721
  2. 08 Nov, 2018 1 commit
  3. 07 Nov, 2018 1 commit
    • Clemens Hammacher's avatar
      [wasm] Decouple wire bytes from compilation units · 014d9e4f
      Clemens Hammacher authored
      Compilation units currently contain pointers into allocated space that
      contains the code of the respective function. This requires us to keep
      the StreamingDecoder alive as long as compilation is still running
      (including tiering).
      This CL refactors this by having an additional redirection
      (WireBytesStorage) which can point to either the StreamingDecoder or
      the NativeModule. We only keep the code section buffer alive as long as
      the StreamingWireBytesStorage is still in use.
      
      I will further refactor memory ownership in a follow-up CL to not make
      the AsyncCompileJob keep the StreamingDecoder alive.
      
      R=ahaas@chromium.org
      
      Bug: v8:8343,v8:7921,v8:8050
      Change-Id: I780582c3217abf64000454f2c9c108b9ac9fbff1
      Reviewed-on: https://chromium-review.googlesource.com/c/1319588Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57317}
      014d9e4f
  4. 06 Nov, 2018 1 commit
  5. 05 Nov, 2018 1 commit
  6. 31 Oct, 2018 1 commit
  7. 30 Oct, 2018 3 commits
    • Clemens Hammacher's avatar
      [wasm] Abort compilation from background tasks · fd564737
      Clemens Hammacher authored
      This removes another liability of the finisher: to abort compilation
      and publish errors once an error state has been set by a background
      compile unit.
      This CL makes background threads set the error state directly and
      schedule a foreground task to actually publish the error (e.g. via the
      promise).
      
      R=mstarzinger@chromium.org
      
      Bug: v8:7921
      Change-Id: I7a6a7ca4f235c2ad374b6ffc434eb6ac7d5f54ae
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/1307425Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57135}
      fd564737
    • Clemens Hammacher's avatar
      [wasm] Fix memory limit checks · fac176d8
      Clemens Hammacher authored
      For memory limit checks, we should use the minimum of the
      --wasm-max-mem-pages flag and kV8MaxWasmMemoryPages. The former is a
      limit set by the user, the latter is the maximum we can handle
      internally.
      
      R=titzer@chromium.org
      
      Bug: chromium:898677
      Change-Id: I3c549f4e90dd016b5d07475d9353f30134f76dcc
      Reviewed-on: https://chromium-review.googlesource.com/c/1305274
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57127}
      fac176d8
    • Clemens Hammacher's avatar
      Reland "[wasm] Store compile errors in CompilationState" · 1ff80455
      Clemens Hammacher authored
      This is a reland of bf3d7b9a
      
      Original change's description:
      > [wasm] Store compile errors in CompilationState
      > 
      > We are currently storing compilation errors in the individual
      > compilation units and pass it to the ErrorThrower during finishing.
      > This CL changes that to store errors on the CompilationState directly.
      > From there, it is propagated to the ErrorThrower in the compilation
      > state callback.
      > This removes more work from the finisher task and slims down the
      > WasmCompilationUnits.
      > 
      > R=mstarzinger@chromium.org
      > 
      > Bug: v8:8343, v8:7921
      > Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9
      > Reviewed-on: https://chromium-review.googlesource.com/c/1303720
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#57091}
      
      Bug: v8:8343, v8:7921
      Change-Id: Iaa5c89d224cb2bcfca2d12eba305413a9ad95618
      Reviewed-on: https://chromium-review.googlesource.com/c/1304547
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57126}
      1ff80455
  8. 29 Oct, 2018 6 commits
  9. 25 Oct, 2018 5 commits
  10. 24 Oct, 2018 2 commits
  11. 23 Oct, 2018 5 commits
  12. 19 Oct, 2018 3 commits
  13. 12 Oct, 2018 2 commits
  14. 10 Oct, 2018 2 commits
    • Ben L. Titzer's avatar
      [wasm] Cache import wrappers in NativeModule · 98e3e32d
      Ben L. Titzer authored
      Now that import wrappers are no longer specialized to an index, they
      can be cached in the native module, keyed by
      (WasmImportCallKind, FunctionSig). This saves instantiation time and
      also fixes a (slow) memory leak.
      
      R=mstarzinger@chromium.org
      
      Change-Id: I5197bbfae79d6e811a01289b990db445373eea6c
      Reviewed-on: https://chromium-review.googlesource.com/c/1270943
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56526}
      98e3e32d
    • Ben L. Titzer's avatar
      [wasm] Use a tuple as the instance for JS imports · a2b34806
      Ben L. Titzer authored
      This CL refactors the implementation of WASM->JS import wrappers in order
      to make the wrapper code shareable. Instead of specializing to the import
      index, we use a tuple as the object ref in the both the import and indirect
      tables. The tuple allows the wrapper code to load both the calling
      instance and the target callable, rather than relying on code specialization.
      
      This requires some tricky codegen machinery, because WASM call descriptors
      expect an instance argument in a given register, yet the wrappers receive
      a tuple, the code generator must generate a prologue that loads the
      instance (and the callable), since it is not possible to express this at
      the graph level.
      
      R=mstarzinger@chromium.org
      CC=clemensh@chromium.org
      
      Change-Id: Id67e307f7f5089e776f5439a53b5aee4b76934b6
      Reviewed-on: https://chromium-review.googlesource.com/c/1268237
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56520}
      a2b34806
  15. 01 Oct, 2018 1 commit
  16. 25 Sep, 2018 3 commits
    • Ben L. Titzer's avatar
      [wasm] Load formal_param_count for mismatched import calls · 89f52f8a
      Ben L. Titzer authored
      For WASM import calls to JSFunctions where the arity is mismatched,
      we currently generate code that inlines the formal parameter count
      of the target function as a constant in a call to the arguments
      adapter. This CL changes this to generate code that loads the formal
      parameter count from the function at runtime in order to permit
      more sharing later.
      
      R=mstarzinger@chromium.org
      CC=clemensh@chromium.org
      
      Change-Id: I5cce97fc338f6468f9d42d48f5bc860b25fb7d73
      Reviewed-on: https://chromium-review.googlesource.com/1243108
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56220}
      89f52f8a
    • Andreas Haas's avatar
      [wasm] Notify StreamingDecoder when its AsyncCompileJob is destructed · 1a5a6c36
      Andreas Haas authored
      The lifetime of the AsyncCompileJob does not depend on the lifetime of
      the stream which feeds data into it. Multiple checks guarantee that the
      AsyncCompileJob still exists when the stream wants to call it. With
      this CL we add an additional level of defense to make sure that
      streaming does not continue after the AsyncCompileJob got destructed.
      
      It is not clear if this CL fixes the bug referenced below. However, the
      crashes there could be caused when streaming accesses the
      AsyncCompileJob after it got destructed already. I was not able though
      to find a scenario where this is possible.
      
      R=clemensh@chromium.org
      
      Bug: chromium:888170
      Change-Id: Id5c6cc34842735a3adaf3e09c57cbe923cfc2630
      Reviewed-on: https://chromium-review.googlesource.com/1241961
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56213}
      1a5a6c36
    • Ben L. Titzer's avatar
      [wasm] Introduce WasmImportCallKind enum · 7f7545cf
      Ben L. Titzer authored
      The WASM engine compiles per-import wrappers for callables imported
      into a WASM instance that have one of a number of different shapes,
      depending on the type of the imported function and whether there is
      a signature match. This CL introduces an enum with a value for each
      case in preparation for introducing a per-kind cache.
      
      R=mstarzinger@chromium.org
      CC=clemensh@chromium.org
      
      Change-Id: If9b7355ff7c57a329c096f93f3624bc3d6c74e3f
      Reviewed-on: https://chromium-review.googlesource.com/1243045
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56210}
      7f7545cf
  17. 24 Sep, 2018 1 commit
  18. 21 Sep, 2018 1 commit