1. 21 Jul, 2021 1 commit
  2. 09 Jul, 2021 1 commit
    • Seth Brenith's avatar
      [torque] Protect against a confusing error case · 2a6b2055
      Seth Brenith authored
      I noticed a case where Torque can generate an invalid .inc file, and I
      think that it's worth adding a check that can emit an error during
      run_torque rather than letting the developer hit a C++ compilation
      failure later.
      
      Example error message, if you add @export to StrongDescriptorArray:
      
      Torque Error: Exported class StrongDescriptorArray cannot be in the same
                    file as its parent extern class DescriptorArray
      
      Bug: v8:7793
      Change-Id: Ia69124a4177bd7a53f95442249fae88cb16e354a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3015655Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#75662}
      2a6b2055
  3. 01 Jul, 2021 1 commit
  4. 25 Jun, 2021 1 commit
  5. 16 Jun, 2021 2 commits
    • Seth Brenith's avatar
      [torque] Emit an error if a macro recursively calls itself · 6b158455
      Seth Brenith authored
      Rather than letting a recursive macro expansion cause a stack overflow
      and crash the compiler, this change updates Torque to emit an error as
      soon as the recursion is detected. Eventually it would be nice to make
      Cast macros a little more magical so they don't require so much human
      effort to maintain, but at least this way Torque displays some
      information about what went wrong. An example error message (manually
      wrapped to 72 character width) follows.
      
      src/builtins/cast.tq:157:10: Torque Error: Recursive macro call to
        callable Cast<(class Context | Undefined | Zero)>(implicit class
        Context)(Object): (class Context | Undefined | Zero)
      src/builtins/cast.tq:758:3: Torque Error: Note: in specialization
        Cast<(class Context | Undefined | Zero)> requested here
      src/builtins/cast.tq:764:10: Torque Error: Note: in specialization
        Is<(class Context | Undefined | Zero), Object> requested here
      src/builtins/torque-internal.tq:64:3: Torque Error: Note: in
        specialization UnsafeCast<(class Context | Undefined | Zero)>
        requested here
      src/objects/contexts.tq:75:10: Torque Error: Note: in specialization
        ReferenceCast<(class Context | Undefined | Zero), Object> requested
        here
      src/builtins/iterator.tq:142:16: Torque Error: Note: in specialization
        ContextSlot<class Context, class Context, (class Context | Undefined |
        Zero)> requested here
      
      Bug: v8:11727
      Change-Id: I7b5b1852dee16a6860f593f27783f6b2d9366146
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965032Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#75184}
      6b158455
    • Igor Sheludko's avatar
      [ext-code-space] Add CodeDataContainer::code field and friends · 227e9018
      Igor Sheludko authored
      ... behind the v8_enable_external_code_space build flag.
      
      This is a first CL in a row of CLs that will make CodeDataContainer
      the only type of objects that could contain references to Code objects
      (besides the Code objects embedded into the generated code).
      Eventually these changes will allow us to move Code space out of the V8
      heap cage.
      
      This CL adds |code| field to ensure that CodeDataContainer keeps the
      respective Code object alive and |code_entry_point| field that contains
      cached value of the code().InstructionStart().
      
      Bug: v8:11880
      Change-Id: Ie7ce75667d8da306797d203691b429671bc4530d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964093
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75179}
      227e9018
  6. 14 Jun, 2021 1 commit
    • Peter Kasting's avatar
      Fix -Wdeprecated-copy in V8. · 2af5cfa8
      Peter Kasting authored
      TNode has a templated constructor from TNode<U>, but this doesn't take
      precedence over the auto-generated copy constructor, which results in a
      warning being fired.  Fix by adding an explicit copy constructor that
      does what the templated constructor does, which in turn requires fixing
      some missing #includes that slipped by due to the lack of
      LazyTemplateChecks() in the autogenerated copy constructor.
      
      Bug: chromium:1213098
      Change-Id: Iad40950261af8f88396be9227355e4e013837341
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953503Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Peter Kasting <pkasting@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75133}
      2af5cfa8
  7. 07 Jun, 2021 1 commit
  8. 21 May, 2021 1 commit
  9. 10 May, 2021 1 commit
    • Nico Hartmann's avatar
      [Torque] Finalize torque-generated synchronized accessors · 8da583ee
      Nico Hartmann authored
      Torque-generated relaxed/acquire/release accessors now expect an
      additional Tag argument to be more consistent with handwritten
      accessors.
      
      Torque's annotations are renamed from @relaxedRead, @relaxedWrite,
      @acquireRead and @releaseWrite to @cppRelaxedLoad, @cppRelaxedStore,
      @cppAcquireLoad and @cppReleaseStore, repesectively. This renaming
      shall better reflect the fact that those annotations just generate
      corresponding synchronization on the generated C++ accessors
      (not CSA code) and be more consistent with the C++ side of things
      where "Load" and "Store" is used instead of "Read" and "Write".
      
      This CL uses these new annotations on a few fields in DebugInfo and
      FunctionTemplateInfo to have Torque generate accessors automatically.
      
      Bug: v8:11122
      Change-Id: Ibdf3e6b37a254605ff69ba9a50d7b1646790ea15
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876857Reviewed-by: 's avatarSeth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74463}
      8da583ee
  10. 07 May, 2021 1 commit
    • Nico Hartmann's avatar
      [Torque] Minimize #includes in torque-generated files (1) · d715a98a
      Nico Hartmann authored
      This is the 1st CL in a series of CLs with the goal to significantly
      reduce the number of includes in torque-generated files to reduce
      the build time of Torque's output.
      
      So far, all torque-generated builtins included all (197) other builtins
      generated by Torque. This CL adds tracking of definition locations to
      Torque's ImplementationVisitor that enables it to only include those
      builtins that are actually needed for compilation. This change reduces
      the number of includes for the majority of builtins by 150-180 files.
      
      Bug: v8:11528
      
      Change-Id: Id6f6dd60c9c0f197d14998e580f0fa5fbd60f194
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876859Reviewed-by: 's avatarSeth Brenith <seth.brenith@microsoft.com>
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74443}
      d715a98a
  11. 16 Apr, 2021 3 commits
    • Leszek Swirski's avatar
      Reland "[codegen] Add static interface descriptors" · 2871e05c
      Leszek Swirski authored
      This is a reland of ae0752df
      
      Reland fixes:
      
        * Remove UNREACHABLE() from constexpr switch, since we don't have a
          CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the
          enum anyway).
        * Fix IsRegisterArray trait to use public inheritance and size_t for
          std::array size.
      
      Original change's description:
      > [codegen] Add static interface descriptors
      >
      > Add a new CRTP StaticCallInterfaceDescriptor class, which provides
      > static constexpr getters for a descriptor's registers, parameter counts,
      > and so on. Each CallInterfaceDescriptor subclass is changed to extend
      > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
      > extending CallInterfaceDescriptor to still provide a dynamic lookup
      > where needed.
      >
      > StaticCallInterfaceDescriptor provides a couple of customisation points,
      > where it reads its CRTP derived descriptor's static fields and
      > functions, with default fallbacks where appropriate. With these
      > customisation points, the definition of CallInterfaceDescriptor
      > subclasses is simplified to:
      >
      >     a) Providing parameter names (as before)
      >     b) Providing parameter types (as before)
      >     c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
      >        static booleans on the class.
      >     d) Optionally providing a `registers()` method that returns a
      >        std::array<Register, N> of registers that may be used for
      >        parameters (if not provided, this defaults to the implementation
      >        specific default register set).
      >
      > Parameter registers (and register count) are automagically set based on
      > the number of parameters and number of given registers, with extra magic
      > to ignore no_reg registers (to reduce ia32 special casing). The
      > CallInterfaceDescriptorData is initialized based on these static
      > functions, rather than manual per-descriptor initializers.
      >
      > This allows us to skip loading descriptors dynamically for CallBuiltin
      > in Sparkplug, and instead lets us use a bit of template magic to
      > statically set up arguments for the calls. Any other users of statically
      > known descriptors will also benefit, thanks to C++ picking the static
      > methods over the dynamic methods on the base class when available.
      >
      > Because we can remove various virtual functions and trigger heavier
      > inlining of constantly known values, binary size slightly decreases with
      > this change.
      >
      > Note that torque-generated descriptors are changed to use the same magic,
      > rather than having Torque-specific magic, for consistency.
      >
      > Bug: v8:11420
      > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
      > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73996}
      
      TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org
      
      Bug: v8:11420
      Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74010}
      2871e05c
    • Leszek Swirski's avatar
      Revert "[codegen] Add static interface descriptors" · 5dea60d6
      Leszek Swirski authored
      This reverts commit ae0752df.
      
      Reason for revert: Predictably, constexpr issues on non-clang compilers.
      
      Original change's description:
      > [codegen] Add static interface descriptors
      >
      > Add a new CRTP StaticCallInterfaceDescriptor class, which provides
      > static constexpr getters for a descriptor's registers, parameter counts,
      > and so on. Each CallInterfaceDescriptor subclass is changed to extend
      > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
      > extending CallInterfaceDescriptor to still provide a dynamic lookup
      > where needed.
      >
      > StaticCallInterfaceDescriptor provides a couple of customisation points,
      > where it reads its CRTP derived descriptor's static fields and
      > functions, with default fallbacks where appropriate. With these
      > customisation points, the definition of CallInterfaceDescriptor
      > subclasses is simplified to:
      >
      >     a) Providing parameter names (as before)
      >     b) Providing parameter types (as before)
      >     c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
      >        static booleans on the class.
      >     d) Optionally providing a `registers()` method that returns a
      >        std::array<Register, N> of registers that may be used for
      >        parameters (if not provided, this defaults to the implementation
      >        specific default register set).
      >
      > Parameter registers (and register count) are automagically set based on
      > the number of parameters and number of given registers, with extra magic
      > to ignore no_reg registers (to reduce ia32 special casing). The
      > CallInterfaceDescriptorData is initialized based on these static
      > functions, rather than manual per-descriptor initializers.
      >
      > This allows us to skip loading descriptors dynamically for CallBuiltin
      > in Sparkplug, and instead lets us use a bit of template magic to
      > statically set up arguments for the calls. Any other users of statically
      > known descriptors will also benefit, thanks to C++ picking the static
      > methods over the dynamic methods on the base class when available.
      >
      > Because we can remove various virtual functions and trigger heavier
      > inlining of constantly known values, binary size slightly decreases with
      > this change.
      >
      > Note that torque-generated descriptors are changed to use the same magic,
      > rather than having Torque-specific magic, for consistency.
      >
      > Bug: v8:11420
      > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
      > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73996}
      
      Bug: v8:11420
      Change-Id: Ie5469c9253fc140590ac30b72db6eb1d93f86806
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831485
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#74000}
      5dea60d6
    • Leszek Swirski's avatar
      [codegen] Add static interface descriptors · ae0752df
      Leszek Swirski authored
      Add a new CRTP StaticCallInterfaceDescriptor class, which provides
      static constexpr getters for a descriptor's registers, parameter counts,
      and so on. Each CallInterfaceDescriptor subclass is changed to extend
      StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself
      extending CallInterfaceDescriptor to still provide a dynamic lookup
      where needed.
      
      StaticCallInterfaceDescriptor provides a couple of customisation points,
      where it reads its CRTP derived descriptor's static fields and
      functions, with default fallbacks where appropriate. With these
      customisation points, the definition of CallInterfaceDescriptor
      subclasses is simplified to:
      
          a) Providing parameter names (as before)
          b) Providing parameter types (as before)
          c) Optionally setting flags (like kNoContext or kAllowVarArgs) as
             static booleans on the class.
          d) Optionally providing a `registers()` method that returns a
             std::array<Register, N> of registers that may be used for
             parameters (if not provided, this defaults to the implementation
             specific default register set).
      
      Parameter registers (and register count) are automagically set based on
      the number of parameters and number of given registers, with extra magic
      to ignore no_reg registers (to reduce ia32 special casing). The
      CallInterfaceDescriptorData is initialized based on these static
      functions, rather than manual per-descriptor initializers.
      
      This allows us to skip loading descriptors dynamically for CallBuiltin
      in Sparkplug, and instead lets us use a bit of template magic to
      statically set up arguments for the calls. Any other users of statically
      known descriptors will also benefit, thanks to C++ picking the static
      methods over the dynamic methods on the base class when available.
      
      Because we can remove various virtual functions and trigger heavier
      inlining of constantly known values, binary size slightly decreases with
      this change.
      
      Note that torque-generated descriptors are changed to use the same magic,
      rather than having Torque-specific magic, for consistency.
      
      Bug: v8:11420
      Change-Id: Icc5e238b6313a08734feb564204a13226b450c22
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73996}
      ae0752df
  12. 15 Apr, 2021 1 commit
  13. 12 Apr, 2021 1 commit
    • Wenyu Zhao's avatar
      Allowing map word to be used for other state in GC header. · 5e0b94c4
      Wenyu Zhao authored
      This CL adds features to pack/unpack map words.
      
      Currently V8 cannot store extra metadata in object headers -- because V8
      objects do not have a proper header, but only a map pointer at the start
      of the object. To store per-object metadata like marking data, a side
      table is required as the per-object metadata storage.
      
      This CL enables V8 to use higher unused bits in a 64-bit map word as
      per-object metadata storage. Map pointer stores come with an extra step
      to encode the metadata into the pointer (we call it "map packing").
      Map pointer loads will also remove the metadata bits as well (we call it
      "map packing").
      
      Since the map word is no longer a valid pointer after packing, we also
      change the tag of the packed map word to make it looks like a Smi. This
      helps various GC and barrier code to correctly skip them instead of
      blindly dereferencing this invalid pointer.
      
      A ninja flag `v8_enable_map_packing` is provided to turn this
      map-packing feature on and off. It is disabled by default.
      
      * Only works on x64 platform, with `v8_enable_pointer_compression`
        set to `false`
      
      Bug: v8:11624
      Change-Id: Ia2bdf79553945e5fc0b0874c87803d2cc733e073
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247561Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73915}
      5e0b94c4
  14. 06 Apr, 2021 1 commit
    • Shu-yu Guo's avatar
      Reland^2 "[ptr-cage] Rename IsolateRoot to PtrComprCageBase" · 627b6b2f
      Shu-yu Guo authored
      This is a reland of e28dadc2
      
      The original failure was due to a stale Win32 bot. The reland failure
      was due to idempotent task deduplication returning the exact same
      failure. See crbug/1196064
      
      Original change's description:
      > [ptr-cage] Rename IsolateRoot to PtrComprCageBase
      >
      > Currently, IsolateRoot is both the address of the Isolate root and the
      > base address of the pointer compression reservation. This CL teases the
      > two uses apart by renaming IsolateRoot to PtrComprCageBase.
      >
      > - In addition to V8_COMPRESS_POINTERS, add a
      >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE (vs SHARED_CAGE).
      >
      > - Rename GetIsolate* helpers to GetPtrComprCageBase. When
      >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE is true, the helpers remain as
      >   aliases to GetPtrComprCageBase.
      >
      > - Rename kPtrComprIsolateRootAlignment to kPtrComprCageBaseAlignment.
      >
      > Bug: v8:11460
      > Change-Id: I1d715f678ce9a0b5731895612ca14f56579b1c48
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783672
      > Commit-Queue: Shu-yu Guo <syg@chromium.org>
      > Auto-Submit: Shu-yu Guo <syg@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73790}
      
      Bug: v8:11460
      No-Try: true
      Tbr: ishell@chromium.org
      Tbr: rmcilroy@chromium.org
      Change-Id: Id69311cf3267ebe1297fff159de0be48b15b65a3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2806546Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73795}
      627b6b2f
  15. 05 Apr, 2021 4 commits
    • Shu-yu Guo's avatar
      Revert "Reland "[ptr-cage] Rename IsolateRoot to PtrComprCageBase"" · 562c4251
      Shu-yu Guo authored
      This reverts commit 15c78b45.
      
      Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32/32277/overview
      
      Original change's description:
      > Reland "[ptr-cage] Rename IsolateRoot to PtrComprCageBase"
      >
      > This is a reland of e28dadc2
      >
      > Relanding to see if Win32 rel failures from
      > https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32/32275/overview
      > were infra flakes. Could not repro on try bots.
      >
      > Original change's description:
      > > [ptr-cage] Rename IsolateRoot to PtrComprCageBase
      > >
      > > Currently, IsolateRoot is both the address of the Isolate root and the
      > > base address of the pointer compression reservation. This CL teases the
      > > two uses apart by renaming IsolateRoot to PtrComprCageBase.
      > >
      > > - In addition to V8_COMPRESS_POINTERS, add a
      > >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE (vs SHARED_CAGE).
      > >
      > > - Rename GetIsolate* helpers to GetPtrComprCageBase. When
      > >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE is true, the helpers remain as
      > >   aliases to GetPtrComprCageBase.
      > >
      > > - Rename kPtrComprIsolateRootAlignment to kPtrComprCageBaseAlignment.
      > >
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783672
      > > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      >
      > No-Try: true
      > Bug: v8:11460
      > Tbr: ishell@chromium.org
      > Tbr: rmcilroy@chromium.org
      > Change-Id: I0a8c3a48999d6737c8c64d2c2703607f14f3fdd0
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2806169
      > Reviewed-by: Shu-yu Guo <syg@chromium.org>
      > Commit-Queue: Shu-yu Guo <syg@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73792}
      
      Bug: v8:11460
      Change-Id: Ifee92d622c43a91c15f45ef94ff739237bd2024b
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2806545
      Auto-Submit: Shu-yu Guo <syg@chromium.org>
      Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73793}
      562c4251
    • Shu-yu Guo's avatar
      Reland "[ptr-cage] Rename IsolateRoot to PtrComprCageBase" · 15c78b45
      Shu-yu Guo authored
      This is a reland of e28dadc2
      
      Relanding to see if Win32 rel failures from
      https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32/32275/overview
      were infra flakes. Could not repro on try bots.
      
      Original change's description:
      > [ptr-cage] Rename IsolateRoot to PtrComprCageBase
      >
      > Currently, IsolateRoot is both the address of the Isolate root and the
      > base address of the pointer compression reservation. This CL teases the
      > two uses apart by renaming IsolateRoot to PtrComprCageBase.
      >
      > - In addition to V8_COMPRESS_POINTERS, add a
      >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE (vs SHARED_CAGE).
      >
      > - Rename GetIsolate* helpers to GetPtrComprCageBase. When
      >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE is true, the helpers remain as
      >   aliases to GetPtrComprCageBase.
      >
      > - Rename kPtrComprIsolateRootAlignment to kPtrComprCageBaseAlignment.
      >
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783672
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      
      No-Try: true
      Bug: v8:11460
      Tbr: ishell@chromium.org
      Tbr: rmcilroy@chromium.org
      Change-Id: I0a8c3a48999d6737c8c64d2c2703607f14f3fdd0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2806169Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73792}
      15c78b45
    • Francis McCabe's avatar
      Revert "[ptr-cage] Rename IsolateRoot to PtrComprCageBase" · 07a9ff4d
      Francis McCabe authored
      This reverts commit e28dadc2.
      
      Reason for revert: failed test262 tests;; see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32/32275/steps?succeeded=true&debug=false
      
      Original change's description:
      > [ptr-cage] Rename IsolateRoot to PtrComprCageBase
      >
      > Currently, IsolateRoot is both the address of the Isolate root and the
      > base address of the pointer compression reservation. This CL teases the
      > two uses apart by renaming IsolateRoot to PtrComprCageBase.
      >
      > - In addition to V8_COMPRESS_POINTERS, add a
      >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE (vs SHARED_CAGE).
      >
      > - Rename GetIsolate* helpers to GetPtrComprCageBase. When
      >   V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE is true, the helpers remain as
      >   aliases to GetPtrComprCageBase.
      >
      > - Rename kPtrComprIsolateRootAlignment to kPtrComprCageBaseAlignment.
      >
      > Bug: v8:11460
      > Change-Id: I1d715f678ce9a0b5731895612ca14f56579b1c48
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783672
      > Commit-Queue: Shu-yu Guo <syg@chromium.org>
      > Auto-Submit: Shu-yu Guo <syg@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73790}
      
      Bug: v8:11460
      Change-Id: I19d0e28194fcdb28e89f129a7694ca3fe29fa17a
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2806168
      Auto-Submit: Francis McCabe <fgm@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#73791}
      07a9ff4d
    • Shu-yu Guo's avatar
      [ptr-cage] Rename IsolateRoot to PtrComprCageBase · e28dadc2
      Shu-yu Guo authored
      Currently, IsolateRoot is both the address of the Isolate root and the
      base address of the pointer compression reservation. This CL teases the
      two uses apart by renaming IsolateRoot to PtrComprCageBase.
      
      - In addition to V8_COMPRESS_POINTERS, add a
        V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE (vs SHARED_CAGE).
      
      - Rename GetIsolate* helpers to GetPtrComprCageBase. When
        V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE is true, the helpers remain as
        aliases to GetPtrComprCageBase.
      
      - Rename kPtrComprIsolateRootAlignment to kPtrComprCageBaseAlignment.
      
      Bug: v8:11460
      Change-Id: I1d715f678ce9a0b5731895612ca14f56579b1c48
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2783672
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Auto-Submit: Shu-yu Guo <syg@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73790}
      e28dadc2
  16. 25 Mar, 2021 1 commit
  17. 23 Mar, 2021 1 commit
  18. 22 Mar, 2021 2 commits
  19. 15 Mar, 2021 2 commits
  20. 11 Mar, 2021 1 commit
    • Seth Brenith's avatar
      [torque] Add option for printing Torque IR · ad0e581c
      Seth Brenith authored
      While working on the Torque compiler, I've sometimes found it difficult
      to understand Torque's intermediate representation and how it
      corresponds to the output. In this change, I propose adding a build flag
      that instructs Torque to emit comments describing its IR, interspersed
      in the generated code. This is particularly useful for seeing the stack
      management instructions (Peek, Poke, and DeleteRange) which don't emit
      any corresponding C++ code.
      
      Bug: v8:7793
      Change-Id: I24bdec47da76c9bd751b928d3cd92aa513dc6593
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2748040Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#73352}
      ad0e581c
  21. 09 Mar, 2021 2 commits
  22. 08 Mar, 2021 1 commit
  23. 03 Mar, 2021 1 commit
  24. 24 Feb, 2021 1 commit
    • Seth Brenith's avatar
      [torque] Add a way to specify that a class field is optional · c2d419a3
      Seth Brenith authored
      Currently, some ScopeInfo fields are defined as indexed fields with a
      length of either one or zero, because the field might be present or it
      might not. Based on comments in https://crrev.com/c/v8/v8/+/2601880 ,
      this strategy is not sustainable and we need a better way to represent
      optional fields so that we don't have to pass zero when accessing their
      only element. This change is a proposal to fix that problem.
      
      Syntax:
      
      I'm proposing using a question mark because TypeScript does, and Torque
      syntax looks somewhat like TypeScript. I don't feel strongly about this
      though, and I'm open to other suggestions.
        field_name?[condition_expression]: FieldType;
      
      Internal Torque compiler representation:
      
      Internally, I've updated the Torque compiler to still treat these fields
      as indexed, but with an extra flag saying they're optional. When getting
      a LocationReference for a field access expression on an optional field,
      Torque produces a Slice like it would for any other indexed field and
      subsequently calls AtIndex(0) to get a Reference.
      
      AtIndex can crash the process if the index is out of bounds (which is
      good), so some other parts of the Torque compiler need minor adjustments
      so that it doesn't take references to optional fields unless it actually
      needs them.
      
      Initialization:
      
      This proposal doesn't include any changes to initialization logic, so an
      optional field can still be initialized using '...' and an iterator.
      Perhaps we could introduce an Optional<T> struct for prettier
      initialization in a future change.
      
      Bug: v8:7793
      Change-Id: I37649495f4c259e685261f53e4cf2859da66a31f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2706306
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73018}
      c2d419a3
  25. 23 Feb, 2021 2 commits
  26. 19 Feb, 2021 1 commit
    • Seth Brenith's avatar
      Revert "Remove 'length' field from ScopeInfo" · 6c922e39
      Seth Brenith authored
      This reverts commit f731e13f.
      
      Reason for revert: perf regressions, chromium:1179757
      
      Original change's description:
      > Remove 'length' field from ScopeInfo
      >
      > ScopeInfo has a vestigial 'length' field from when it used to be a
      > FixedArray. This change removes that field, which saves some memory.
      >
      > More specifically:
      >
      > - Make ScopeInfo inherit from HeapObject, not FixedArrayBase which
      >   supplied the 'length' field.
      > - Privatize the FixedArray-style functions that provide access to
      >   ScopeInfo fields by index, and move them from scope-info-inl.h to
      >   scope-info.cc. Those functions are still used pretty heavily during
      >   initialization (ScopeInfo::Create, etc.), but at least we can avoid
      >   presenting them to the rest of the world.
      > - Change FactoryBase::NewScopeInfo to allocate the updated object shape.
      >   It maintains the existing behavior of filling the newly-allocated
      >   object with undefined, even though that's not a valid ScopeInfo and
      >   further initialization is required.
      > - Move part of AccessorAssembler::ScriptContextTableLookup into a new
      >   Torque macro, because it used to rely on casting ScopeInfo to
      >   FixedArrayBase.
      > - In V8HeapExplorer::AddEntry, don't claim that ScopeInfo objects are
      >   arrays. I think it makes more sense to list them under "(system)" in
      >   the dev tools, like most other V8 internal types.
      >
      > Bug: v8:8952
      > Change-Id: I8278e3a90027d4409f0d268da0fe7080754c6b8c
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2601880
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Mythri Alle <mythria@chromium.org>
      > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      > Cr-Commit-Position: refs/heads/master@{#72830}
      
      Bug: v8:8952
      Change-Id: I00a69da79e5ac6aaae4436a41ce773ae014cc775
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2706086
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Auto-Submit: Seth Brenith <seth.brenith@microsoft.com>
      Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72855}
      6c922e39
  27. 17 Feb, 2021 1 commit
    • Seth Brenith's avatar
      Remove 'length' field from ScopeInfo · f731e13f
      Seth Brenith authored
      ScopeInfo has a vestigial 'length' field from when it used to be a
      FixedArray. This change removes that field, which saves some memory.
      
      More specifically:
      
      - Make ScopeInfo inherit from HeapObject, not FixedArrayBase which
        supplied the 'length' field.
      - Privatize the FixedArray-style functions that provide access to
        ScopeInfo fields by index, and move them from scope-info-inl.h to
        scope-info.cc. Those functions are still used pretty heavily during
        initialization (ScopeInfo::Create, etc.), but at least we can avoid
        presenting them to the rest of the world.
      - Change FactoryBase::NewScopeInfo to allocate the updated object shape.
        It maintains the existing behavior of filling the newly-allocated
        object with undefined, even though that's not a valid ScopeInfo and
        further initialization is required.
      - Move part of AccessorAssembler::ScriptContextTableLookup into a new
        Torque macro, because it used to rely on casting ScopeInfo to
        FixedArrayBase.
      - In V8HeapExplorer::AddEntry, don't claim that ScopeInfo objects are
        arrays. I think it makes more sense to list them under "(system)" in
        the dev tools, like most other V8 internal types.
      
      Bug: v8:8952
      Change-Id: I8278e3a90027d4409f0d268da0fe7080754c6b8c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2601880Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#72830}
      f731e13f
  28. 11 Feb, 2021 2 commits
  29. 09 Feb, 2021 1 commit