1. 28 May, 2020 1 commit
  2. 26 May, 2020 1 commit
    • Seth Brenith's avatar
      Revert "[torque][cleanup] Use more precise field types in a few classes" · 16cb2d94
      Seth Brenith authored
      This reverts commit 4e5fabae.
      
      Reason for revert: performance regressions chromium:1085305, chromium:1084978
      
      Original change's description:
      > [torque][cleanup] Use more precise field types in a few classes
      > 
      > This change updates some Torque-defined classes to include more precise
      > field types where possible. It also updates those classes to use
      > @generateCppClass. One field was removed because it's unused
      > (PrototypeInfo::validity_cell), and two fields in StackFrameInfo
      > actually became less precise because they're based on Script::name,
      > which is an embedder-provided untyped Local<Value>. (Automatically
      > generated accessors pointed out this bug easily.)
      > 
      > This change also includes a couple of minor fixes in Torque.
      > 
      > Change-Id: Ib2bc6c7165bb3612b6d344c0686a94165a568277
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2199640
      > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67907}
      
      TBR=ulan@chromium.org,tebbi@chromium.org,verwaest@chromium.org,seth.brenith@microsoft.com
      
      Change-Id: I720821d8dc84ea0d79eb137f1c2507f75df9a107
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211322Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67972}
      16cb2d94
  3. 19 May, 2020 1 commit
  4. 18 Mar, 2020 1 commit
  5. 02 Mar, 2020 1 commit
  6. 21 Feb, 2020 1 commit
  7. 20 Feb, 2020 1 commit
  8. 19 Feb, 2020 2 commits
  9. 18 Feb, 2020 2 commits
  10. 15 Nov, 2019 1 commit
  11. 29 Aug, 2019 1 commit
    • Seth Brenith's avatar
      [cleanup][torque] Use @generateCppClass in some simple cases, part 2 · a5811358
      Seth Brenith authored
      This patch is mostly mechanical. A few changes in
      implementation-visitor.cc might be worth mentioning:
      - Don't generate both field offset macros and class definitions for the
        same class. This was mostly just to keep me from forgetting to remove
        the DEFINE_FIELD_OFFSET_CONSTANTS part when converting classes, but
        also helpfully flagged that FixedArrayBase wasn't using the generated
        class that it requested.
      - Generate forward declarations for all tq-defined classes in
        internal-class-definitions-tq.h. This is helpful for making things
        compile when classes have fields of other class types.
      - When generating accessors for union types, use the nearest class type
        that contains the entire union rather than plain Object. This is
        important for compile-time type safety. It also required a few minor
        fixes elsewhere (isolate.cc, modules.cc, scope-info.cc,
        source-text-module.cc, and a correction of the field types in
        CallHandlerInfo to match how they're set in api.cc).
      
      Change-Id: I3b9280e30779ce57fb9f3629eecfec898e26d708
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1774976Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#63458}
      a5811358
  12. 05 Aug, 2019 1 commit
  13. 29 Jul, 2019 3 commits
    • Clemens Hammacher's avatar
      Reland "[utils] Make BitField final" · 0cabc6a0
      Clemens Hammacher authored
      This is a reland of 658ff200
      
      Original change's description:
      > [utils] Make BitField final
      > 
      > We have hundreds of classes that derive from {BitField} without adding
      > any functionality. This CL switches all such occurrences to 'using'
      > declarations instead.
      > 
      > Before:
      >   class MyBitField : public BitField<int, 6, 4, MyEnum> {};
      > After:
      >   using MyBitField = BitField<int, 6, 4, MyEnum>;
      > 
      > This might reduce compilation time by reducing the number of existing
      > classes.
      > 
      > The old pattern is forbidden now by making {BitField} final.
      > 
      > R=yangguo@chromium.org
      > 
      > Bug: v8:9396, v8:7629
      > Change-Id: I8a8364707e8eae0bb522af2459c160e3293eecbb
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722565
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#62956}
      
      Bug: v8:9396, v8:7629
      Change-Id: Ic68541af9d1e8d0340691970922f282b24a9767f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1724379Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62959}
      0cabc6a0
    • Clemens Hammacher's avatar
      Revert "[utils] Make BitField final" · 753a07db
      Clemens Hammacher authored
      This reverts commit 658ff200.
      
      Reason for revert: Fails no-i18n bot: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20noi18n%20-%20debug/27826
      
      Original change's description:
      > [utils] Make BitField final
      > 
      > We have hundreds of classes that derive from {BitField} without adding
      > any functionality. This CL switches all such occurrences to 'using'
      > declarations instead.
      > 
      > Before:
      >   class MyBitField : public BitField<int, 6, 4, MyEnum> {};
      > After:
      >   using MyBitField = BitField<int, 6, 4, MyEnum>;
      > 
      > This might reduce compilation time by reducing the number of existing
      > classes.
      > 
      > The old pattern is forbidden now by making {BitField} final.
      > 
      > R=​yangguo@chromium.org
      > 
      > Bug: v8:9396, v8:7629
      > Change-Id: I8a8364707e8eae0bb522af2459c160e3293eecbb
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722565
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#62956}
      
      TBR=yangguo@chromium.org,clemensh@chromium.org
      
      Change-Id: I50234a09c77aa89fdcf1e01c2497cc08d3ac79a8
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9396, v8:7629
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1724377Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62958}
      753a07db
    • Clemens Hammacher's avatar
      [utils] Make BitField final · 658ff200
      Clemens Hammacher authored
      We have hundreds of classes that derive from {BitField} without adding
      any functionality. This CL switches all such occurrences to 'using'
      declarations instead.
      
      Before:
        class MyBitField : public BitField<int, 6, 4, MyEnum> {};
      After:
        using MyBitField = BitField<int, 6, 4, MyEnum>;
      
      This might reduce compilation time by reducing the number of existing
      classes.
      
      The old pattern is forbidden now by making {BitField} final.
      
      R=yangguo@chromium.org
      
      Bug: v8:9396, v8:7629
      Change-Id: I8a8364707e8eae0bb522af2459c160e3293eecbb
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722565Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#62956}
      658ff200
  14. 09 Jul, 2019 1 commit
  15. 23 May, 2019 1 commit
  16. 14 May, 2019 1 commit
    • Sigurd Schneider's avatar
      [torque] Introduce @abstract annotation for Torque classes · 4d05884e
      Sigurd Schneider authored
      This annotation indicates that the class itself is not instantiated,
      and does not have its own instance type: The instance types that
      logically belong to the class are the instance types of the derived
      classes.
      
      Currently, we need the indication @dirtyInstantiatedAbstractClass
      for several classes that are used as both, abstract base classes
      and concrete classes. The prime example is JSObject which is the
      base for many other classes, and also serves as the class to allocate
      plain JSObjects. The annotation is purposefully ugly because in the
      future we should refactor code to make it unnecessary.
      
      Another annotation we introduce is @hasSameInstanceTypeAsParent,
      which indicates another design pattern that currently occurs in the
      code-base: Some Torque classes have the same instance types as their
      parent class, but rename some fields, or possibly have a different map.
      In such cases, the parent class is not abstract and the derived classes
      can be seen as refinements of this class (that, for example, narrows the
      type of a field). In the future, Torque should accomodate this pattern
      better, but at moment we are content with just indicating where it is
      used.
      
      Bug: v8:7793
      Change-Id: I1892dcc7325250df75d80308bf3d767d6d43bcc2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607761
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61495}
      4d05884e
  17. 08 Mar, 2019 1 commit
  18. 14 Feb, 2019 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Introduce a CallFunctionTemplate builtin. · a2d9924c
      Benedikt Meurer authored
      When calling into API callbacks from TurboFan optimized, we can
      currently only take a fast-path when TurboFan is able to find some
      information about the receiver in the graph, or when the API callback
      specifies that it neither requires an access check (aka "accepts any
      receiver") nor an interface check (aka "compatible receiver check").
      
      This change introduces a new CallFunctionTemplate builtin that sits
      in front of the CallApiCallback builtin and does both the access as well
      as the interface check as necessary (and raises appropriate exceptions).
      This way TurboFan can still call into the API callback via the fast-path
      even without ahead knowledge about the receiver, which is significantly
      faster than the generic call machinery for API callbacks.
      
      On the test case from the Angular team[1], the interesting metrics
      improve from
      
        DOM_mono: 0.273 ms
        DOM_mega: 0.571 ms
        DOM_call: 0.649 ms
      
      to
      
        DOM_mono: 0.264 ms
        DOM_mega: 0.572 ms
        DOM_call: 0.368 ms
      
      so the DOM_call is only about **1.4 times slower** than the DOM_mono and
      about **1.5 times faster** than the DOM_mega case (compared to **2.4
      times slower**). Execution time in the DOM_call was reduced by around
      **~45%**.
      
      Currently this new code path is limited to TurboFan optimized code, but
      the idea is to eventually migrate the API calls from baseline to also
      use the new CSA functionality, but there are lot's of subleties to take
      into account, so starting with small changes to get coverage for the
      basic building blocks.
      
      [1]: https://mhevery.github.io/perf-tests/DOM-megamorphic.html
      
      Bug: v8:8820
      Change-Id: Ie1029cf182ce05a6e519fd9a9d4fa825db8adb4c
      Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
      Reviewed-on: https://chromium-review.googlesource.com/c/1470129
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59598}
      a2d9924c
  19. 13 Feb, 2019 1 commit
  20. 09 Jan, 2019 1 commit
  21. 26 Dec, 2018 1 commit
  22. 20 Dec, 2018 1 commit
  23. 18 Dec, 2018 1 commit
  24. 17 Dec, 2018 1 commit
  25. 14 Dec, 2018 1 commit
  26. 08 Dec, 2018 1 commit
  27. 22 Nov, 2018 2 commits
  28. 13 Nov, 2018 1 commit
  29. 07 Nov, 2018 1 commit
  30. 13 Sep, 2018 1 commit
  31. 16 Jul, 2018 1 commit
    • Dan Elphick's avatar
      [explicit isolates] Remove nearly all GetIsolates in api.cc · 8a011b57
      Dan Elphick authored
      This marks the following methods as V8_DEPRECATE_SOON and adds new
      versions that take Isolate* as their first parameter:
      PrimitiveArray::Set
      PrimitiveArray::Get
      StackTrace::GetFrame
      String::Write
      String::WriteOneByte
      String::WriteUtf8
      String::Concat
      StringObject::New
      
      Additionally StackFrameInfo, Module and TemplateInfo are marked as
      NeverReadOnlySpaceObject so their GetIsolates calls are safe.
      
      In api.cc, ContextFromHeapObject is split into
      ContextFromNeverReadOnlySpaceObject and UnsafeContextFromHeapObject,
      where the latter uses the deprecated methods but is only called from
      methods that were themselves already marked V8_DEPRECATE_SOON.
      
      Deprecation warnings for using HeapObject::GetHeap/GetIsolate are
      suppressed for all the uses in V8_DEPRECATE_SOON methods so that stats
      produced using tools/collect_deprecation_stats.sh don't show them.
      
      Bug: v8:7786
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: I48799b5599711661b14d0cd04f21a0a00322da4a
      Reviewed-on: https://chromium-review.googlesource.com/1136641
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54469}
      8a011b57
  32. 27 Apr, 2018 1 commit