1. 31 Jul, 2017 3 commits
    • Jakob Gruber's avatar
      Revert "[builtins] Remove Builtins::Name() accessors" · 17a26c0b
      Jakob Gruber authored
      This reverts commit 2f79e035.
      
      Reason for revert: Conflicts with successor CL.
      
      Original change's description:
      > [builtins] Remove Builtins::Name() accessors
      > 
      > Instead of auto-generating the Name() convenience accessor, use a macro to
      > avoid wasting code space.
      > 
      >   BUILTIN_CODE(isolate, Name)
      > 
      > expands to
      > 
      >   isolate->builtins()->builtin_handle(Builtins::kName);
      > 
      > This reduces the size of libv8.so by 134,752 bytes on a x64 release build.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idff7ee5c45e344e73412c0f47e92553c7c7ff75f
      > Reviewed-on: https://chromium-review.googlesource.com/593607
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47010}
      
      TBR=yangguo@chromium.org,ahaas@chromium.org,jgruber@chromium.org,bmeurer@chromium.org
      
      Change-Id: Ia9ef5c755b26c3f4e143d87a7c51033614ea435e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/594048Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47012}
      17a26c0b
    • jgruber's avatar
      [builtins] Remove Builtins::Name() accessors · 2f79e035
      jgruber authored
      Instead of auto-generating the Name() convenience accessor, use a macro to
      avoid wasting code space.
      
        BUILTIN_CODE(isolate, Name)
      
      expands to
      
        isolate->builtins()->builtin_handle(Builtins::kName);
      
      This reduces the size of libv8.so by 134,752 bytes on a x64 release build.
      
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Idff7ee5c45e344e73412c0f47e92553c7c7ff75f
      Reviewed-on: https://chromium-review.googlesource.com/593607Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47010}
      2f79e035
    • Clemens Hammacher's avatar
      Revert "[wasm] Allow for arbitrarily long error messages" · 20d25f40
      Clemens Hammacher authored
      This reverts commit 072d0e3e.
      
      Reason for revert: Performance regressions (https://crbug.com/749041).
      
      Original change's description:
      > [wasm] Allow for arbitrarily long error messages
      > 
      > We currently have a fixed limit of 256 characters for error messages
      > generated in the decoder. However, we sometimes embed names in it,
      > which makes it easy to generate a crash by using long names (e.g. for
      > exports) in invalid wasm modules.
      > This CL fixes this by switching to a stream based interface, allowing
      > to pass arbitrary objects to be printed. With this interface, we can
      > easily limit the length of output later.
      > 
      > R=​titzer@chromium.org
      > 
      > Bug: chromium:740023
      > Change-Id: I2848c31c63a015157e2a3a9458b54e523060cd69
      > Reviewed-on: https://chromium-review.googlesource.com/565282
      > Reviewed-by: Ben Titzer <titzer@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46860}
      
      TBR=titzer@chromium.org,clemensh@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: chromium:740023, chromium:749041
      Change-Id: I005a60d55dcf01d350230f8d98f715bab9c43886
      Reviewed-on: https://chromium-review.googlesource.com/593807
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47008}
      20d25f40
  2. 27 Jul, 2017 6 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
      [wasm] Explicit opt-out of stack checks and traps · be915fd7
      Mircea Trofin authored
      We've been passing a context to the compiler, which turns out to be
      solely used to determine if we're executing in a specific cctest configuration.
      
      This change adds a configuration to the graph builder that we can use to
      explicitly opt out of stack checks and traps. CcTests default to opting out,
      except for the few that don't.
      
      Bug: 
      Change-Id: I4724e31c2a62e9b3ab4feadb788287c374b39f53
      Reviewed-on: https://chromium-review.googlesource.com/585779Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Mircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46943}
      be915fd7
    • 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
    • Karl Schimpf's avatar
      Fix missing (function decoding time/function size) UMA metrics. · 23e882eb
      Karl Schimpf authored
      Check for these UMA stats were in functions only used for testing. Moved the
      checks to code inside module decoding.
      
      Note that the module decoder is used both to validate and generate the
      intermediate (turbofan) graph of function bodies.  This CL assumes
      that the validation phase (of function bodies) is the correct place to
      track decoding time.
      
      Bug: v8:6361
      Change-Id: I791281daae96473d53cb8ae332fff8bb2673bf6c
      Reviewed-on: https://chromium-review.googlesource.com/586974
      Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46915}
      23e882eb
  3. 26 Jul, 2017 1 commit
  4. 25 Jul, 2017 3 commits
  5. 24 Jul, 2017 1 commit
  6. 19 Jul, 2017 2 commits
  7. 18 Jul, 2017 5 commits
  8. 14 Jul, 2017 2 commits
    • 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
    • Clemens Hammacher's avatar
      [wasm] Update signature map on indirect calls · 883db26e
      Clemens Hammacher authored
      The code was already there, but there was a bug in it: Because of the
      missing reference, we were only updating a *copy* of the signature map,
      hence the update had no effect.
      This intentially is a minimal CL, in order to allow for easy
      backmerging.
      More mitigations and tests are coming in a separate CL.
      
      R=titzer@chromium.org
      
      Change-Id: Ifb462093f4b8f4d5380b6774636537c67c2b676c
      Reviewed-on: https://chromium-review.googlesource.com/570278Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46664}
      883db26e
  9. 13 Jul, 2017 7 commits
    • sreten.kovacevic's avatar
      [wasm] Fix issue with wasm-spec-tests on mips big endian · 050dec2b
      sreten.kovacevic authored
      Found issue with BuildChangeEndianness. There is difference between load and store case.
      
      Load depends primarily on MachineRepresentation, while store depends on ValueType.
      
      TEST=wasm-spec-tests/tests/endianness
      TEST=wasm-spec-tests/tests/memory
      TEST=wasm-spec-tests/tests/memory_trap
      
      Bug: 
      Change-Id: I437f611107daad2f425a67fcc068e874822e0f58
      Reviewed-on: https://chromium-review.googlesource.com/558882Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
      Cr-Commit-Position: refs/heads/master@{#46645}
      050dec2b
    • Igor Sheludko's avatar
      [runtime] Use custom maps for function closures ... · 42ba9ef7
      Igor Sheludko authored
      ... that have computed name and/or require home object.
      
      This should give us the opportunity to implement initialization
      of name and home object values in a stub.
      
      Bug: v8:6459
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I47a1a2c185e120e86c793733cce737811f895291
      Reviewed-on: https://chromium-review.googlesource.com/512802Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Reviewed-by: 's avatarAndreas Rossberg <rossberg@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46638}
      42ba9ef7
    • 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
    • Clemens Hammacher's avatar
      [wasm] Fix wrong DCHECK · 485786b4
      Clemens Hammacher authored
      It's ok that the instance of the called code object is different from
      the caller instance. This happens if one instance calls an exported
      function of another instance.
      
      R=ahaas@chromium.org
      
      Bug: chromium:739768
      Change-Id: I6afa8332a9b33fe32e9332cdca573053f058421d
      Reviewed-on: https://chromium-review.googlesource.com/568494Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46624}
      485786b4
    • Clemens Hammacher's avatar
      [wasm] Fix --wasm-trace-decoder output · aa3f32d8
      Clemens Hammacher authored
      It used to be module-relative, but since we switched to decoding
      sections individually, the offsets would be section-relative.
      This CL fixes this by adding the buffer offset to the reported
      locations.
      
      R=ahaas@chromium.org
      
      Change-Id: I27240832e5cbd625d6b952678503252017dd83f3
      Reviewed-on: https://chromium-review.googlesource.com/568488
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46623}
      aa3f32d8
    • Clemens Hammacher's avatar
      [wasm] Fix DCHECK · c7be8081
      Clemens Hammacher authored
      The DCHECK is supposed to check that the read in the next line does not
      read out of bounds. Hence we have to use {pc} and not {pc_}.
      I accidentally triggered this while writing an unrelated test case, but
      now fail to reproduce.
      
      R=ahaas@chromium.org
      
      Change-Id: Ia3fa9a9874866dc14180b22b9af526459fbda495
      Reviewed-on: https://chromium-review.googlesource.com/568487Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46621}
      c7be8081
  10. 12 Jul, 2017 2 commits
  11. 10 Jul, 2017 8 commits