1. 07 Jul, 2022 1 commit
  2. 13 May, 2022 1 commit
  3. 09 May, 2022 1 commit
  4. 26 Apr, 2022 1 commit
  5. 21 Mar, 2022 1 commit
  6. 14 Feb, 2022 1 commit
    • Victor Gomes's avatar
      Reland "[runtime] Refactor TransitionsAccessor" · 24ff6e28
      Victor Gomes authored
      This is a reland of c927ada7
      
      Fix: Recalculate encoding after an allocation (that can potentially
      trigger GC) in EnsureHasFullTransitionArray.
      
      Original change's description:
      > [runtime] Refactor TransitionsAccessor
      >
      > Problems:
      > - The class uses a bare Map field, but some methods can trigger GC
      > causing it to have a potential dangling pointer in case of map
      > compaction.
      > - Some methods invalidate the object state and should not be used again.
      > - Complicate logic with a no_gc and a gc aware constructors. Some
      > methods can only be called if the object is constructed with a
      > particular constructor (e.g, Insert and PutPrototypeTransition).
      >
      > Note: Most usages of this class is done by constructing an object and
      > calling a single method:
      > `TransitionAccessor(...).Method(...)`
      > So we can easily change them to a static method.
      >
      > This CL:
      > 1. Adds DISALLOW_GARBAGE_COLLECTION to the class.
      > 2. Makes methods that can trigger GC static.
      > 3. Creates static helper functions that wrap the class in a different
      > scope, since TransitionsAccessor now forces the scope to disallow gc.
      > 4. Removes now unnecessary "Reload" logic.
      >
      > Bug: chromium:1295133, v8:12578
      > Change-Id: I85484e7235fbd5e69894e26f5e1c491c6f69635e
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3450416
      > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Commit-Queue: Victor Gomes <victorgomes@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79051}
      
      Bug: chromium:1295133, v8:12578
      Change-Id: If3880c2480433b78567870c8d14508d6ad9eccbd
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3460405Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Auto-Submit: Victor Gomes <victorgomes@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79069}
      24ff6e28
  7. 11 Feb, 2022 2 commits
    • Deepti Gandluri's avatar
      Revert "[runtime] Refactor TransitionsAccessor" · 7c602011
      Deepti Gandluri authored
      This reverts commit c927ada7.
      
      Reason for revert: GC stress failures: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/37276/overview
      
      Original change's description:
      > [runtime] Refactor TransitionsAccessor
      >
      > Problems:
      > - The class uses a bare Map field, but some methods can trigger GC
      > causing it to have a potential dangling pointer in case of map
      > compaction.
      > - Some methods invalidate the object state and should not be used again.
      > - Complicate logic with a no_gc and a gc aware constructors. Some
      > methods can only be called if the object is constructed with a
      > particular constructor (e.g, Insert and PutPrototypeTransition).
      >
      > Note: Most usages of this class is done by constructing an object and
      > calling a single method:
      > `TransitionAccessor(...).Method(...)`
      > So we can easily change them to a static method.
      >
      > This CL:
      > 1. Adds DISALLOW_GARBAGE_COLLECTION to the class.
      > 2. Makes methods that can trigger GC static.
      > 3. Creates static helper functions that wrap the class in a different
      > scope, since TransitionsAccessor now forces the scope to disallow gc.
      > 4. Removes now unnecessary "Reload" logic.
      >
      > Bug: chromium:1295133, v8:12578
      > Change-Id: I85484e7235fbd5e69894e26f5e1c491c6f69635e
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3450416
      > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Commit-Queue: Victor Gomes <victorgomes@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79051}
      
      Bug: chromium:1295133, v8:12578
      Change-Id: Ia567cdcae73bc7fdfaf08b62eeeb899d6a933e21
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3456682
      Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79052}
      7c602011
    • Victor Gomes's avatar
      [runtime] Refactor TransitionsAccessor · c927ada7
      Victor Gomes authored
      Problems:
      - The class uses a bare Map field, but some methods can trigger GC
      causing it to have a potential dangling pointer in case of map
      compaction.
      - Some methods invalidate the object state and should not be used again.
      - Complicate logic with a no_gc and a gc aware constructors. Some
      methods can only be called if the object is constructed with a
      particular constructor (e.g, Insert and PutPrototypeTransition).
      
      Note: Most usages of this class is done by constructing an object and
      calling a single method:
      `TransitionAccessor(...).Method(...)`
      So we can easily change them to a static method.
      
      This CL:
      1. Adds DISALLOW_GARBAGE_COLLECTION to the class.
      2. Makes methods that can trigger GC static.
      3. Creates static helper functions that wrap the class in a different
      scope, since TransitionsAccessor now forces the scope to disallow gc.
      4. Removes now unnecessary "Reload" logic.
      
      Bug: chromium:1295133, v8:12578
      Change-Id: I85484e7235fbd5e69894e26f5e1c491c6f69635e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3450416Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Victor Gomes <victorgomes@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79051}
      c927ada7
  8. 17 Jan, 2022 2 commits
  9. 22 Dec, 2021 1 commit
    • Shu-yu Guo's avatar
      [compiler] Fix typing JSLoadNamed of private brands · d19a707d
      Shu-yu Guo authored
      Private method loads are compiled to a named load of a private brand,
      which always loads a BlockContext. This BlockContext holds the private
      methods common to all instances of a class. TurboFan currently considers
      JSLoadNamed to be of Type::NonInternal(). Private methods break this
      assumption, since BlockContext is of Type::OtherInternal().
      
      This CL changes the typing of JSLoadNamed of private brands to be
      Type::OtherInternal().
      
      Bug: v8:12500
      Change-Id: I91f39747bf9422bd419d299f44152f567d8be8db
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3351167Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78431}
      d19a707d
  10. 15 Nov, 2021 1 commit
  11. 13 Oct, 2021 1 commit
    • Joyee Cheung's avatar
      [class] Add IC support for defining class fields to replace runtime call · 713ebae3
      Joyee Cheung authored
      Introduces several new runtime mechanics for defining private fields,
      including:
        - Bytecode StaKeyedPropertyAsDefine
        - Builtins StoreOwnIC{Trampoline|Baseline|_NoFeedback}
        - Builtins KeyedDefineOwnIC{Trampoline|Baseline|_Megamorphic}
        - TurboFan IR opcode JSDefineProperty
      
      These new operations can reduce a runtime call per class field into a
      more traditional Store equivalent. In the microbenchmarks, this
      results in a substantial win over the status quo (~8x benchmark score
      for single fields with the changes, ~20x with multiple fields).
      
      The TurboFan JSDefineProperty op is lowered in
      JSNativeContextSpecialization, however this required some hacks.
      Because private fields are defined as DONT_ENUM when added to the
      object, we can't find a suitable transition using the typical data
      property (NONE) flags. I've added a mechanism to specify the required
      PropertyAttributes for the transition we want to look up.
      
      Details:
      
      New bytecodes:
        - StaKeyedPropertyAsDefine, which is essentially StaKeyedProperty
          but with a different IC builtin (KeyedDefineOwnIC). This is a
          bytecode rather than a flag for the existing StaKeyedProperty in
          order to avoid impacting typical keyed stores in any way due to
          additional branching and testing.
      
      New builtins:
        - StoreOwnIC{TTrampoline|Baseline|_NoFeedback} is now used for
          StaNamedOwnProperty. Unlike the regular StoreIC, this variant will
          no longer look up the property name in the prototype.
          In adddition, this CL changes an assumption that
          StoreNamedOwnProperty can't result in a map transition, as we
          can't rely on the property already being present in the Map due
          to an object literal boilerplate.
      
          In the context of class features, this replaces the runtime
          function %CreateDataProperty().
      
        - KeyedDefineOwnIC{Trampoline|Baseline|_Megamorphic} is used by the
          new StaKeyedPropertyAsDefine bytecode. This is similar to an
          ordinary KeyedStoreIC, but will not check the prototype for
          setters, and for private fields, will take the slow path if the
          field already exists.
      
          In the context of class features, this replaces the runtime
          function %AddPrivateField().
      
      TurboFan IR:
        - JSDefineProperty is introduced to represent a situation where we
          need to use "Define" semantics, in particular, it codifies that we
          do not consult the prototype chain, and the semantics relating to
          private fields are implied as well.
      
      R=leszeks@chromium.org, syg@chromium.org, rmcilroy@chromium.org
      
      Bug: v8:9888
      Change-Id: Idcc947585c0e612f9e8533aa4e2e0f8f0df8875d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2795831Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Joyee Cheung <joyee@igalia.com>
      Cr-Commit-Position: refs/heads/main@{#77377}
      713ebae3
  12. 28 Sep, 2021 1 commit
  13. 17 Sep, 2021 1 commit
  14. 07 Sep, 2021 1 commit
  15. 31 Aug, 2021 1 commit
  16. 17 Aug, 2021 1 commit
  17. 12 Aug, 2021 1 commit
  18. 09 Aug, 2021 2 commits
  19. 02 Aug, 2021 1 commit
  20. 30 Jul, 2021 1 commit
  21. 29 Jul, 2021 1 commit
  22. 28 Jul, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Pass actual type/rep into dependencies · ffd68240
      Jakob Gruber authored
      .. instead of recalculating them at the risk of getting different
      answers.
      
      In a concurrent setting, repeated type/rep calculations are not
      guaranteed to return the same answer. Instead, calculate them once and
      pass them into dependency creation methods.
      
      Note with this CL we now get the type/rep off the holder map and not
      the field owner map. The results should be identical and behavior
      should not change (verified by CHECKs).
      
      Bug: v8:7790
      Change-Id: I2b4c3bb8907082c69448ca743d3c8740cd8f71f3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3055306Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75951}
      ffd68240
  23. 26 Jul, 2021 1 commit
  24. 22 Jul, 2021 1 commit
  25. 20 Jul, 2021 3 commits
  26. 18 Jun, 2021 1 commit
  27. 16 Jun, 2021 1 commit
  28. 11 Jun, 2021 1 commit
    • Dan Elphick's avatar
      [build] Reduce size of inline header cycles · c26965bd
      Dan Elphick authored
      This removes/replaces header includes with the aim of shrinking the
      size of the inline header cycle. Specifically before this CL, there was
      a single Strongly-Connected Component comprising 60 header files from
      src/objects and src/heap.
      
      Now there are two 2 SCCs. The src/heap SCC has 6 files and depends on
      the src/objects SCC, which has 50 files. Additionally some previously
      implicit dependencies have been added.
      
      Dependencies calculated using:
      git grep "#include \"" *.h *.cc | sed 's/:#include "/ /;s/".*$//' | \
      awk 'BEGIN {print "digraph deps {" } END {print "}"} {print "\""$1"\" -> \""$2"\""}'
      
      SCCs found using sccmap from graphviz.
      
      Also removes unused Cell::FromValueAddress method.
      
      Change-Id: Ib19d00ccd14e490ee64d57be4d99b1b3686ac32a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951734Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75103}
      c26965bd
  29. 09 Jun, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] RawFastPropertyAt without serialization · 9bfd401e
      Jakob Gruber authored
      This is a step towards making JSObjectRef non-serialized.
      
      Change JSObjectRef::RawFastPropertyAt to use a direct load with
      relaxed semantics. Special handling of `uninitialized` sentinel values
      is moved to the only use-site.
      
      A new lock `boilerplate_migration_access` protects against concurrent
      boilerplate migrations while we are iterating over properties.
      
      Bug: v8:7790
      Change-Id: Ic9de54ca16c1f3364d497a77058cfa33d48dd4a4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928184
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75033}
      9bfd401e
  30. 25 May, 2021 1 commit
  31. 17 May, 2021 2 commits
  32. 04 May, 2021 1 commit
  33. 03 May, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Introduce TryMakeRef/MakeRef factory functions · ca7f2852
      Jakob Gruber authored
      In the near future we'll have more cases where Ref construction is not
      guaranteed to succeed. Currently, we don't have convenient patterns to
      support optional construction. This CL adds the following helpers:
      
       base::Optional<FooRef> ref = TryMakeRef(broker, o);
       if (!ref.has_value()) return {};  // bailout
       // .. use ref.
      
      Or, in the case where construction is guaranteed to succeed:
      
       FooRef ref = MakeRef(broker, o);
       // .. use ref.
      
      Bug: v8:7790
      Change-Id: I759235c314056c080d79ec413125d3957452c64c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859169Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74325}
      ca7f2852
  34. 26 Apr, 2021 1 commit