1. 29 Apr, 2022 3 commits
  2. 28 Apr, 2022 29 commits
  3. 27 Apr, 2022 8 commits
    • Frank Tang's avatar
      [Temporal] Add PlainDateTime.from · f09026a6
      Frank Tang authored
      Also add AOs: ToTemporalDateTime, ParseTemporalDateTimeString,
      InterpretTemporalDateTimeFields
      
      Spec Text:
      https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.from
      https://tc39.es/proposal-temporal/#sec-temporal-totemporaldatetime
      https://tc39.es/proposal-temporal/#sec-temporal-parsetemporaldatetimestring
      https://tc39.es/proposal-temporal/#sec-temporal-interprettemporaldatetimefields
      
      Bug: v8:11544
      Change-Id: I3cf5c7c0f876dd8f384d62a47d7b24d8780bf03f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538667Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Frank Tang <ftang@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80240}
      f09026a6
    • Adam Klein's avatar
      Revert "[rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)" · 10807c9f
      Adam Klein authored
      This reverts commit 9d31f866.
      
      Reason for revert: crashes on Mac/arm64 bots:
      https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/5923/overview
      
      Original change's description:
      > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1)
      >
      > ... for V8 code space. The feature is currently disabled.
      >
      > In order to use fast W^X permission switching we must allocate
      > executable pages with readable writable executable permissions (RWX).
      > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      > permission changing of RWX memory pages. This means that the code page
      > headers must be allocated with RWX permissions too because otherwise
      > it wouldn't be possible to allocate a large code page over the freed
      > regular code page and vice versa.
      >
      > When enabled, the new machinery works as follows:
      >
      > 1) when memory region is reserved for allocating executable pages, the
      >    whole region is committed with RWX permissions and then decommitted,
      > 2) since reconfiguration of RWX page permissions is not allowed on
      >    MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
      >    to change them,
      > 3) the request to set RWX permissions in the executable page region
      >    just recommits the pages without changing permissions (see (1), they
      >    were already allocated as RWX and then discarded),
      > 4) in order to make executable pages inaccessible one must use
      >    OS::DiscardSystemPages() instead of OS::DecommitPages() or
      >    setting permissions to kNoAccess because the latter two are not
      >    allowed by the MacOS (see (2)).
      > 5) since code space page headers are allocated as RWX pages it's also
      >    necessary to switch between W^X modes when updating the data in the
      >    page headers (i.e. when marking, updating stats, wiring pages in
      >    lists, etc.). The new CodePageHeaderModificationScope class is used
      >    in the respective places. On unrelated configurations it's a no-op.
      >
      > The fast permission switching can't be used for V8 configuration with
      > enabled pointer compression and disabled external code space because
      > a) the pointer compression cage has to be reserved with MAP_JIT flag
      >    which is too expensive,
      > b) in case of shared pointer compression cage if the code range will
      >    be deleted while the cage is still alive then attempt to configure
      >    permissions of pages that were previously set to RWX will fail.
      >
      > This also CL extends the unmapper unit tests with permissions tracking
      > for discarded pages.
      >
      > Bug: v8:12797
      > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303
      > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#80238}
      
      Bug: v8:12797
      Change-Id: Ic07948e036db36326d464a2a901d052aa060a406
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3611665
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Auto-Submit: Adam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80239}
      10807c9f
    • Igor Sheludko's avatar
      [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1) · 9d31f866
      Igor Sheludko authored
      ... for V8 code space. The feature is currently disabled.
      
      In order to use fast W^X permission switching we must allocate
      executable pages with readable writable executable permissions (RWX).
      However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further
      permission changing of RWX memory pages. This means that the code page
      headers must be allocated with RWX permissions too because otherwise
      it wouldn't be possible to allocate a large code page over the freed
      regular code page and vice versa.
      
      When enabled, the new machinery works as follows:
      
      1) when memory region is reserved for allocating executable pages, the
         whole region is committed with RWX permissions and then decommitted,
      2) since reconfiguration of RWX page permissions is not allowed on
         MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts
         to change them,
      3) the request to set RWX permissions in the executable page region
         just recommits the pages without changing permissions (see (1), they
         were already allocated as RWX and then discarded),
      4) in order to make executable pages inaccessible one must use
         OS::DiscardSystemPages() instead of OS::DecommitPages() or
         setting permissions to kNoAccess because the latter two are not
         allowed by the MacOS (see (2)).
      5) since code space page headers are allocated as RWX pages it's also
         necessary to switch between W^X modes when updating the data in the
         page headers (i.e. when marking, updating stats, wiring pages in
         lists, etc.). The new CodePageHeaderModificationScope class is used
         in the respective places. On unrelated configurations it's a no-op.
      
      The fast permission switching can't be used for V8 configuration with
      enabled pointer compression and disabled external code space because
      a) the pointer compression cage has to be reserved with MAP_JIT flag
         which is too expensive,
      b) in case of shared pointer compression cage if the code range will
         be deleted while the cage is still alive then attempt to configure
         permissions of pages that were previously set to RWX will fail.
      
      This also CL extends the unmapper unit tests with permissions tracking
      for discarded pages.
      
      Bug: v8:12797
      Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80238}
      9d31f866
    • Camillo Bruni's avatar
      [runtime] DHECK that builtins correctly return the exception object · 1332c740
      Camillo Bruni authored
      Runtime and Builtin function should always return the exception object
      as a marker if there is a pending_exception on the current isolate.
      
      Change-Id: I7c255aa501800384c288664a9ca6578afbe0a103
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610449Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80237}
      1332c740
    • Camillo Bruni's avatar
      [counters] Remove unused counters from V8 · e5c1ada3
      Camillo Bruni authored
      Change-Id: Iec93e286c8067453cc1f9a978fa09b8734999f83
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596159Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80236}
      e5c1ada3
    • Clemens Backes's avatar
      [wasm] Fix termination on breakpoint · bbdb8916
      Clemens Backes authored
      If the debug handler (called via {OnDebugBreak}) requests termination of
      the isolate, this would only get considered on the next stack check,
      where it is turned into a proper termination exception.
      
      Handling this correctly is further complicated by the {DebugScope}
      blocking any handling of interrupts via the included
      {PostponeInterruptsScope}.
      
      Hence this CL refactors the code to call any debug handlers in a second
      function which has the {DebugScope}, and to check for interrupts after
      leaving that scope.
      
      R=thibaudm@chromium.org
      CC=bmeurer@chromium.org
      
      Bug: chromium:1319343
      Change-Id: Ia2df0f2610d50eedc6437841c4bf1d2ad3ac9125
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605228Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80235}
      bbdb8916
    • Milad Fa's avatar
      [wasm] skip spec-test on ppc · bf582f16
      Milad Fa authored
      Tests runs out of code space on ppc as size exceeds 32MB.
      More details can be found under the comment section of this CL:
      https://crrev.com/c/3605814.
      
      Bug: v8:11577
      Change-Id: Iadfbc3b9618a0873f5f08a030b799d5761946671
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610628
      Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80234}
      bf582f16
    • Frank Tang's avatar
      [Temporal] Correct typo and extra space · 19e733fd
      Frank Tang authored
      Bug: v8:7834
      Change-Id: Iedd97d665df91ccbdceaaeb68d936b210c31b662
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3611662Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Frank Tang <ftang@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#80233}
      19e733fd