1. 08 Sep, 2017 2 commits
  2. 07 Sep, 2017 1 commit
    • Andreas Haas's avatar
      [wasm] Avoid executing infinite loops in the wasm fuzzers · 7b53a0e0
      Andreas Haas authored
      The wasm-async fuzzer uses the bytes provided by the fuzzer engine
      directly as wasm module bytes, compiles them with async compilation, and
      then tries to execute the "main" function of the module. This "main"
      can have an infinite loop which causes a timeout in the fuzzer. With
      this CL the "main" function is first executed with the interpreter. If
      the execution in the interpreter finishes within 16k steps, which means
      that there is no infinite loop, also the compiled code is executed.
      
      I added the raw fuzzer input as a test case because in this case I
      really want to test the fuzzer and not V8.
      
      R=clemensh@chromium.org
      
      Bug: chromium:761784
      Change-Id: Id1fe5da0da8670ec821ab9979fdb9454dbde1162
      Reviewed-on: https://chromium-review.googlesource.com/651046
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47874}
      7b53a0e0
  3. 06 Sep, 2017 1 commit
  4. 31 Aug, 2017 2 commits
  5. 30 Aug, 2017 1 commit
  6. 25 Aug, 2017 1 commit
  7. 19 Aug, 2017 5 commits
  8. 18 Aug, 2017 3 commits
  9. 10 Aug, 2017 1 commit
  10. 08 Aug, 2017 2 commits
    • Aseem Garg's avatar
      Revert "[wasm] Reland "[wasm] redirect wasm calls to js functions through a GCed table"" · aee1e1fb
      Aseem Garg authored
      This reverts commit 649b1e70.
      
      Reason for revert: A1 Jetstream bots are still failing.
      
      Original change's description:
      > [wasm] Reland "[wasm] redirect wasm calls to js functions through a GCed table"
      >
      > This reverts commit 25f03308.
      >
      > Reason for revert: Fix the cause of bot failure and reland
      >
      > Original change's description:
      > > Revert "[wasm] redirect wasm calls to js functions through a GCed table"
      > >
      > > This reverts commit eb65f35e.
      > >
      > > Reason for revert: Broke jetstream benchmark on android.
      > >
      > > BUG=chromium:750828
      > >
      > > Original change's description:
      > > > [wasm] redirect wasm calls to js functions through a GCed table
      > > >
      > > > With this patch, rather than embedding the JSReceiver address directly
      > > > in the WasmToJS wrappers, we put that in a fixed array with global handle
      > > > scope and instead embed the location of the handle and the index in the
      > > > wrapper. This ensures that the wrapper doesn't need to be patched if the
      > > > GC kicks in. This is needed to get the WASM code off the GCed heap.
      > > >
      > > > R=​mtrofin@chromium.org
      > > >
      > > > Bug:
      > > > Change-Id: Ie5a77a78cdecec51b04f702c63b8e4285e6a2d8d
      > > > Reviewed-on: https://chromium-review.googlesource.com/581682
      > > > Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      > > > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#46884}
      > >
      > > TBR=mtrofin@chromium.org,aseemgarg@google.com,aseemgarg@chromium.org,clemensh@chromium.org
      > >
      > > # Not skipping CQ checks because original CL landed > 1 day ago.
      > >
      > > Change-Id: I26f49ee0a1fe73cc5d8852ded87b56638be39ebf
      > > Reviewed-on: https://chromium-review.googlesource.com/596268
      > > Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      > > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#47059}
      >
      > R=​mtrofin@chromium.org,aseemgarg@google.com,aseemgarg@chromium.org,clemensh@chromium.org,sullivan@chromium.org
      >
      > Change-Id: I29ef35f6e612a706d9f571da3e7beb1da8b5052b
      > Bug: chromium:750828
      > Reviewed-on: https://chromium-review.googlesource.com/597010
      > Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47177}
      
      TBR=bradnelson@chromium.org,sullivan@chromium.org,mtrofin@chromium.org,aseemgarg@google.com,aseemgarg@chromium.org,clemensh@chromium.org
      
      Bug: chromium:750828
      Change-Id: I04b12c0eb0705ad809822a7d7461423be77d942a
      Reviewed-on: https://chromium-review.googlesource.com/606867
      Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      Reviewed-by: 's avatarAseem Garg <aseemgarg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47231}
      aee1e1fb
    • Mircea Trofin's avatar
      [wasm] Consolidate ownership of instantiation/specialization parameters · f9d4090b
      Mircea Trofin authored
      This CL consolidates ownership of parameters used to compile code (which
      we always specialize) in 2 places:
      - ModuleEnv for compile-time data
      - WasmCompiledModule for runtime data
      
      The parameters in question are: memory size and start; globals start; 
      address of indirect function tables (and their signatures, respectively); 
      and address to be used for wasm call sites.
      
      Ideally, we'd collapse this down to one place, however, we need
      specialization data to survive serialization. We can achieve this we get off 
      the GC heap and use a different wasm code serializer.
      
      The CL:
      - removes aliasing of parts of the specialization data, and moves
      to using ModuleEnv as a token of passing around compile-time data, instead
      of a mixture of ModuleEnv, WasmInstance, and some other structures. ModuleEnv
      is responsible for providing a consistent view of the specialization data,
      e.g. valid memory sizes (multiples of page size), and matching sized function
      tables and signatures.
      
      - removes WasmInstance, as its data is now contained by ModuleEnv.
      
      - removes ModuleBytesEnv. We now pass the wire bytes explicitly. They can't
      always be assumed as present (e.g. streaming compilation), and probably more
      refactoring may need to happen once streaming compilation lands and we
      better understand our dependencies.
      
      Change-Id: Id7e6f2cf29e51b5756eee8b6f8827fb1f375e5c3
      Reviewed-on: https://chromium-review.googlesource.com/592531
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47229}
      f9d4090b
  11. 07 Aug, 2017 2 commits
    • Mircea Trofin's avatar
      [wasm] Clarify source of runtime information for interpreter. · 3f1e32b3
      Mircea Trofin authored
      This is part of the effort to consolidate the ownership of
      wasm instantiation/specialization parameters.
      
      This change is focused solely on the interpreter part of that effort, to
      verify we're not regressing performance in interpreter benchmarks.
      
      There are two aspects being addressed:
      - dataflow-wise, we always fetch the interpreter's memory view from the
      runtime objects (i.e. WasmInstanceObject/WasmCompiledModule). This is
      consistent with how other instance-specific information is obtained
      (e.g. code, indirect functions).
      
      - representation-wise, we do not reuse ModuleEnv/WasmInstance just for
      the memory view, because it is surprising that other instance info isn't
      accessed from there. 
      
      Bug: 
      Change-Id: I536fbffd8e1f142a315fa1770ba9b08319f56a8e
      Reviewed-on: https://chromium-review.googlesource.com/602083Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47205}
      3f1e32b3
    • Clemens Hammacher's avatar
      [wasm] [debug] Implement calling imported wasm functions · c39c6eba
      Clemens Hammacher authored
      The interpreter was not able to call imported wasm functions (hitting
      UNIMPLEMENTED). This CL fixes this by creating a "CWasmEntry", which is
      signature-specific. It has JS linkage and receives the wasm code object
      to call and a buffer containing all arguments (similar to the
      interpreter entry). It loads all arguments from the buffer and calls the
      given code object.
      The c-wasm-entry code objects are cached per instance, such that we
      only create them once per signature.
      
      These wasm entry stubs will also allow us to call back to compiled code
      from the interpreter, which we might want to do to reduce the slowdown
      of executing wasm for debugging.
      
      R=titzer@chromium.org
      
      Bug: chromium:735792
      Change-Id: I7fecec3a7bec62a9de40fff115b684759b12a28b
      Reviewed-on: https://chromium-review.googlesource.com/600308
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47195}
      c39c6eba
  12. 05 Aug, 2017 1 commit
    • Aseem Garg's avatar
      [wasm] Reland "[wasm] redirect wasm calls to js functions through a GCed table" · 649b1e70
      Aseem Garg authored
      This reverts commit 25f03308.
      
      Reason for revert: Fix the cause of bot failure and reland
      
      Original change's description:
      > Revert "[wasm] redirect wasm calls to js functions through a GCed table"
      > 
      > This reverts commit eb65f35e.
      > 
      > Reason for revert: Broke jetstream benchmark on android.
      > 
      > BUG=chromium:750828
      > 
      > Original change's description:
      > > [wasm] redirect wasm calls to js functions through a GCed table
      > > 
      > > With this patch, rather than embedding the JSReceiver address directly
      > > in the WasmToJS wrappers, we put that in a fixed array with global handle
      > > scope and instead embed the location of the handle and the index in the
      > > wrapper. This ensures that the wrapper doesn't need to be patched if the
      > > GC kicks in. This is needed to get the WASM code off the GCed heap.
      > > 
      > > R=​mtrofin@chromium.org
      > > 
      > > Bug: 
      > > Change-Id: Ie5a77a78cdecec51b04f702c63b8e4285e6a2d8d
      > > Reviewed-on: https://chromium-review.googlesource.com/581682
      > > Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      > > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#46884}
      > 
      > TBR=mtrofin@chromium.org,aseemgarg@google.com,aseemgarg@chromium.org,clemensh@chromium.org
      > 
      > # Not skipping CQ checks because original CL landed > 1 day ago.
      > 
      > Change-Id: I26f49ee0a1fe73cc5d8852ded87b56638be39ebf
      > Reviewed-on: https://chromium-review.googlesource.com/596268
      > Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47059}
      
      R=mtrofin@chromium.org,aseemgarg@google.com,aseemgarg@chromium.org,clemensh@chromium.org,sullivan@chromium.org
      
      Change-Id: I29ef35f6e612a706d9f571da3e7beb1da8b5052b
      Bug: chromium:750828
      Reviewed-on: https://chromium-review.googlesource.com/597010
      Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47177}
      649b1e70
  13. 03 Aug, 2017 2 commits
  14. 02 Aug, 2017 1 commit
  15. 01 Aug, 2017 1 commit
    • Annie Sullivan's avatar
      Revert "[wasm] redirect wasm calls to js functions through a GCed table" · 25f03308
      Annie Sullivan authored
      This reverts commit eb65f35e.
      
      Reason for revert: Broke jetstream benchmark on android.
      
      BUG=chromium:750828
      
      Original change's description:
      > [wasm] redirect wasm calls to js functions through a GCed table
      > 
      > With this patch, rather than embedding the JSReceiver address directly
      > in the WasmToJS wrappers, we put that in a fixed array with global handle
      > scope and instead embed the location of the handle and the index in the
      > wrapper. This ensures that the wrapper doesn't need to be patched if the
      > GC kicks in. This is needed to get the WASM code off the GCed heap.
      > 
      > R=​mtrofin@chromium.org
      > 
      > Bug: 
      > Change-Id: Ie5a77a78cdecec51b04f702c63b8e4285e6a2d8d
      > Reviewed-on: https://chromium-review.googlesource.com/581682
      > Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46884}
      
      TBR=mtrofin@chromium.org,aseemgarg@google.com,aseemgarg@chromium.org,clemensh@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Change-Id: I26f49ee0a1fe73cc5d8852ded87b56638be39ebf
      Reviewed-on: https://chromium-review.googlesource.com/596268
      Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47059}
      25f03308
  16. 27 Jul, 2017 4 commits
    • Alexey Kozyatinskiy's avatar
      [inspector] move stack trace and scope inspection to native · c5e9416b
      Alexey Kozyatinskiy authored
      This CL moves us much closer to the point where we can remove debugger-script.js and usage of debugger context from inspector.
      There are three main parts left:
      - managing breakpoints,
      - inspecting stack and scopes (this CL),
      - LiveEdit.
      
      In this CL I moved all stack/scope inspection to native. As side effect running debugger and inspector tests are 10-20% faster (it's significant since not all of tests requesting break).
      
      R=yangguo@chromium.org,jgruber@chromium.org
      
      Bug: chromium:652939
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I409396a687e18e9c0554c0c9c35b6e1064627be8
      Reviewed-on: https://chromium-review.googlesource.com/580645Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46947}
      c5e9416b
    • Mircea Trofin's avatar
      Revert "Revert "[wasm] Consolidate function table representation."" · c2928fe4
      Mircea Trofin authored
      This reverts commit 862d605c.
      
      Reason for revert: fixed compile issue
      
      Original change's description:
      > Revert "[wasm] Consolidate function table representation."
      > 
      > This reverts commit 4a45f35f.
      > 
      > Reason for revert: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20debug%20builder/builds/25471 
      > 
      > Original change's description:
      > > [wasm] Consolidate function table representation.
      > > 
      > > This CL avoids the need to reference the function tables (and signatures)
      > > as either fixed arrays or vectors, preferring vectors.
      > > 
      > > The only place we need fixed arrays is on the compiled module, to support
      > > serialization. When we move off the GC heap, we'll also move away
      > > from fixed arrays in that last case.
      > > 
      > > The CL aids with getting wasm of the GC heap, by reducing the places 
      > > and representations we'll need to change  when changing the way we 
      > > reference fixed tables.
      > > 
      > > Bug: 
      > > Change-Id: Id4e43905a3df39062bf2839fa72dd5d9a0fe87da
      > > Reviewed-on: https://chromium-review.googlesource.com/588334
      > > Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      > > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#46917}
      > 
      > TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,ahaas@chromium.org
      > 
      > Change-Id: Ie7d04f7ec74d6d0b3783df1c78c91c100ab784f4
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Reviewed-on: https://chromium-review.googlesource.com/588627
      > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
      > Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46918}
      
      TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,ahaas@chromium.org
      
      Change-Id: Ic0ba8097c13f2b1afd263b6243360e8ab95ae474
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/588667
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46919}
      c2928fe4
    • Mircea Trofin's avatar
      Revert "[wasm] Consolidate function table representation." · 862d605c
      Mircea Trofin authored
      This reverts commit 4a45f35f.
      
      Reason for revert: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20debug%20builder/builds/25471 
      
      Original change's description:
      > [wasm] Consolidate function table representation.
      > 
      > This CL avoids the need to reference the function tables (and signatures)
      > as either fixed arrays or vectors, preferring vectors.
      > 
      > The only place we need fixed arrays is on the compiled module, to support
      > serialization. When we move off the GC heap, we'll also move away
      > from fixed arrays in that last case.
      > 
      > The CL aids with getting wasm of the GC heap, by reducing the places 
      > and representations we'll need to change  when changing the way we 
      > reference fixed tables.
      > 
      > Bug: 
      > Change-Id: Id4e43905a3df39062bf2839fa72dd5d9a0fe87da
      > Reviewed-on: https://chromium-review.googlesource.com/588334
      > Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      > Reviewed-by: Brad Nelson <bradnelson@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46917}
      
      TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,ahaas@chromium.org
      
      Change-Id: Ie7d04f7ec74d6d0b3783df1c78c91c100ab784f4
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/588627Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46918}
      862d605c
    • Mircea Trofin's avatar
      [wasm] Consolidate function table representation. · 4a45f35f
      Mircea Trofin authored
      This CL avoids the need to reference the function tables (and signatures)
      as either fixed arrays or vectors, preferring vectors.
      
      The only place we need fixed arrays is on the compiled module, to support
      serialization. When we move off the GC heap, we'll also move away
      from fixed arrays in that last case.
      
      The CL aids with getting wasm of the GC heap, by reducing the places 
      and representations we'll need to change  when changing the way we 
      reference fixed tables.
      
      Bug: 
      Change-Id: Id4e43905a3df39062bf2839fa72dd5d9a0fe87da
      Reviewed-on: https://chromium-review.googlesource.com/588334
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarBrad Nelson <bradnelson@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46917}
      4a45f35f
  17. 25 Jul, 2017 1 commit
    • Aseem Garg's avatar
      [wasm] redirect wasm calls to js functions through a GCed table · eb65f35e
      Aseem Garg authored
      With this patch, rather than embedding the JSReceiver address directly
      in the WasmToJS wrappers, we put that in a fixed array with global handle
      scope and instead embed the location of the handle and the index in the
      wrapper. This ensures that the wrapper doesn't need to be patched if the
      GC kicks in. This is needed to get the WASM code off the GCed heap.
      
      R=mtrofin@chromium.org
      
      Bug: 
      Change-Id: Ie5a77a78cdecec51b04f702c63b8e4285e6a2d8d
      Reviewed-on: https://chromium-review.googlesource.com/581682
      Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46884}
      eb65f35e
  18. 19 Jul, 2017 1 commit
  19. 14 Jul, 2017 1 commit
    • Clemens Hammacher's avatar
      Reland "[wasm] Don't store global handles in the interpreter" · b53141ec
      Clemens Hammacher authored
      This is a reland of 5648aad5.
      Previous compile error should be fixed by disabling strict aliasing
      assumptions on gyp: https://chromium-review.googlesource.com/c/571806
      
      Original change's description:
      > [wasm] Don't store global handles in the interpreter
      > 
      > Storing global handles in the interpreter is dangerous, because the
      > global handles are strong roots into the heap. The interpreter itself is
      > referenced from the heap via a Managed. Hence the interpreter keeps the
      > instance alive, while the instance keeps the Managed alive. So the GC
      > will never collect them.
      > 
      > This CL refactors this to only store the handle to the instance object
      > while executing in the interpreter, and clearing it when returning.
      > It also removes the cache of import wrappers, as it should not be
      > performance critical, but keeps lots of objects alive. If it turns out
      > to be performance critical, we will have to reintroduce such a cache
      > stored in the WasmDebugInfo object.
      > 
      > R=titzer@chromium.org
      > CC=ahaas@chromium.org
      > 
      > Bug: chromium:610330
      > Change-Id: I54b489dadc16685887c0c1a98da6fd0df5ad7cbb
      > Reviewed-on: https://chromium-review.googlesource.com/567058
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46629}
      
      TBR=titzer@chromium.org
      
      Bug: chromium:610330
      Change-Id: Ic7836b1b1a044a89f2138f0c76f92acd3a1b2f2b
      Reviewed-on: https://chromium-review.googlesource.com/570578
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46679}
      b53141ec
  20. 13 Jul, 2017 2 commits
    • Clemens Hammacher's avatar
      Revert "[wasm] Don't store global handles in the interpreter" · 199a26f7
      Clemens Hammacher authored
      This reverts commit 5648aad5.
      
      Reason for revert: Compile error on mips:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/10732
      
      Original change's description:
      > [wasm] Don't store global handles in the interpreter
      > 
      > Storing global handles in the interpreter is dangerous, because the
      > global handles are strong roots into the heap. The interpreter itself is
      > referenced from the heap via a Managed. Hence the interpreter keeps the
      > instance alive, while the instance keeps the Managed alive. So the GC
      > will never collect them.
      > 
      > This CL refactors this to only store the handle to the instance object
      > while executing in the interpreter, and clearing it when returning.
      > It also removes the cache of import wrappers, as it should not be
      > performance critical, but keeps lots of objects alive. If it turns out
      > to be performance critical, we will have to reintroduce such a cache
      > stored in the WasmDebugInfo object.
      > 
      > R=​titzer@chromium.org
      > CC=ahaas@chromium.org
      > 
      > Bug: chromium:610330
      > Change-Id: I54b489dadc16685887c0c1a98da6fd0df5ad7cbb
      > Reviewed-on: https://chromium-review.googlesource.com/567058
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46629}
      
      TBR=titzer@chromium.org,clemensh@chromium.org
      
      Change-Id: Ifadfb885f937f37bb3eab4732a97f20ff40c2583
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:610330
      Reviewed-on: https://chromium-review.googlesource.com/569962Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46630}
      199a26f7
    • Clemens Hammacher's avatar
      [wasm] Don't store global handles in the interpreter · 5648aad5
      Clemens Hammacher authored
      Storing global handles in the interpreter is dangerous, because the
      global handles are strong roots into the heap. The interpreter itself is
      referenced from the heap via a Managed. Hence the interpreter keeps the
      instance alive, while the instance keeps the Managed alive. So the GC
      will never collect them.
      
      This CL refactors this to only store the handle to the instance object
      while executing in the interpreter, and clearing it when returning.
      It also removes the cache of import wrappers, as it should not be
      performance critical, but keeps lots of objects alive. If it turns out
      to be performance critical, we will have to reintroduce such a cache
      stored in the WasmDebugInfo object.
      
      R=titzer@chromium.org
      CC=ahaas@chromium.org
      
      Bug: chromium:610330
      Change-Id: I54b489dadc16685887c0c1a98da6fd0df5ad7cbb
      Reviewed-on: https://chromium-review.googlesource.com/567058Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46629}
      5648aad5
  21. 10 Jul, 2017 2 commits
  22. 07 Jul, 2017 2 commits
    • titzer's avatar
      [wasm] Use WeakFixedArray for list of instances sharing a WasmMemoryObject. · 0a61361e
      titzer authored
      This CL refactors the WasmMemoryObject and WasmInstanceObject classes to
      use WeakFixedArray instead of using a doubly-linked list of instances. This
      simplifies the lifetime management of instances by not requiring them to
      be unlinked from this list upon GC. It also simplifies the iteration over
      the instances using a given WasmMemoryObject.
      
      Note that, contrary to my naive assumption at the outset, it is still necessary for the InstanceFinalizer (called upon a WasmInstanceObject death) to unlink itself from a WasmMemoryObject's instances list, due to finalizer ordering.
      
      R=deepti@chromium.org, mlippautz@chromium.org
      BUG=
      
      Review-Url: https://codereview.chromium.org/2972803002
      Cr-Commit-Position: refs/heads/master@{#46482}
      0a61361e
    • titzer's avatar
      [wasm] Introduce instance types for WebAssembly.* objects. · 17001a05
      titzer authored
      This CL refactors the internal representation of JavaScript-exposed
      WebAssembly objects to be more like other such objects in V8. By introducing
      a new instance type for each of the JS-exposed types, we get more robust
      typechecking without using embedder fields (which were previously used
      when these objects where instance type JS_API_OBJECT).
      
      In addition to the new instance types, the subclasses X of JSObject
      (WasmInstanceObject, WasmMemoryObject, WasmModuleObject, WasmTableObject)
      now have appropriate Is##X() methods on Object and are now robust.
      
      BUG=v8:6547
      CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
      
      Review-Url: https://codereview.chromium.org/2964943002
      Cr-Commit-Position: refs/heads/master@{#46475}
      17001a05
  23. 03 Jul, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] Decode local names for debugging · 07752032
      Clemens Hammacher authored
      When providing scope information (containing the value of local
      variables of live stack frames), decode the local variable names of all
      functions in a wasm module and store this in the WasmDebugInfo
      structure.
      Use these names to actually name the reported locals, instead of using
      the default names "param#<d>" and "local#<d>". These names are only used
      as fallbacks for locals which were not assigned a name.
      
      R=titzer@chromium.org,kozyatinskiy@chromium.org
      BUG=v8:6245
      
      Change-Id: Ibf7d30e392248ef5590177cd8b6329239b45e018
      Reviewed-on: https://chromium-review.googlesource.com/548495
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46379}
      07752032