1. 24 Mar, 2022 6 commits
  2. 23 Mar, 2022 7 commits
  3. 21 Mar, 2022 3 commits
  4. 19 Mar, 2022 1 commit
  5. 18 Mar, 2022 1 commit
    • jameslahm's avatar
      [d8] Don't call WaitForRunningWorkers in quit() · d8c9b089
      jameslahm authored
      There are problems calling WaitForRunningWorkers when we
      call quit().
      First, suppose the main thread first calls quit(),
      and the worker thread calls quit() after the main
      thread calls quit(), then sched_yield to wait for
      quit_once_ updated to ONCE_STATE_DONE. However
      the main thread is WaitForRunningWorkers to wait
      for the worker thread to join, thus causing deadlock.
      
      Second, suppose the worker thread calls quit() and empty
      the running_workers_ by WaitForRunningWorkers, then
      the main thread calls `onExit(isolate, true)` to dispose
      the platform and other global data, which will crash other
      running workers.
      
      Bug: v8:12219
      Change-Id: I333e5aad431daefb1c163f69e66d8e9d5e9bf754
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518908Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79525}
      d8c9b089
  6. 17 Mar, 2022 5 commits
  7. 16 Mar, 2022 1 commit
  8. 15 Mar, 2022 1 commit
  9. 14 Mar, 2022 6 commits
  10. 10 Mar, 2022 2 commits
  11. 09 Mar, 2022 5 commits
    • legendecas's avatar
      [heap] Fix incorrect from space committed size · bbd800c6
      legendecas authored
      NewSpace page operations like RemovePage, PrependPage, and
      EnsureCurrentCapacity should account for committed page size.
      
      This may happen when a page was promoted from the new space to
      old space on mark-compact.
      
      Also, add DCHECKs on Commit and Uncommit to ensure the final
      committed page size is the same as the current state.
      
      Bug: v8:12657
      Change-Id: I7aebc1fd3f51f177ae2ef6420f757f0c573e126b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504766Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
      Cr-Commit-Position: refs/heads/main@{#79426}
      bbd800c6
    • legendecas's avatar
      [extensions] Fix dcheck failures in getV8Statistics · b9535429
      legendecas authored
      HeapObjectIterator creates a SafepointScope which requires the heap to
      allow garbage collection. This collides with the outer
      DisallowGarbageCollection scope. HeapObjectIterator already ensures
      there is no allocation during its lifetime, so there is no need to
      create an outer DisallowGarbageCollection scope.
      
      Code::source_position_table requires their kind not equals to
      CodeKind::BASELINE.
      
      This also exposes the statistics extension through flag
      --expose-statistics.
      
      Bug: v8:12657
      Change-Id: I1bf11cf499285a742dd99ec8c228ebc36152b597
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3496552Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
      Cr-Commit-Position: refs/heads/main@{#79425}
      b9535429
    • Clemens Backes's avatar
      Reland "[asm] Reject import calls with too many parameters" · 9b810b9f
      Clemens Backes authored
      This is a reland of commit a664aef0.
      The test is made ~25x faster by using integer parameters instead of
      floating point.
      
      Original change's description:
      > [asm] Reject import calls with too many parameters
      >
      > The asm parser was missing a check for too many parameters for calls to
      > imported functions. For regular functions this check implicitly existed
      > because the limit was checked at the function declaration, and the call
      > site needs to match the declared parameter count.
      >
      > R=mslekova@chromium.org
      >
      > Bug: chromium:1302596
      > Change-Id: I0d35e70a66d682ee8fdecf5c8ea4d2b1419ce684
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3509393
      > Reviewed-by: Maya Lekova <mslekova@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79415}
      
      Bug: chromium:1302596
      Change-Id: I138561742b38939a1c2c9a69a6fa508d4f3a028d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513613Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79424}
      9b810b9f
    • Clemens Backes's avatar
      Revert "[asm] Reject import calls with too many parameters" · 9d96ebbb
      Clemens Backes authored
      This reverts commit a664aef0.
      
      Reason for revert: Times out on CFI: https://cr-buildbucket.appspot.com/build/8820170241901030897
      
      Original change's description:
      > [asm] Reject import calls with too many parameters
      >
      > The asm parser was missing a check for too many parameters for calls to
      > imported functions. For regular functions this check implicitly existed
      > because the limit was checked at the function declaration, and the call
      > site needs to match the declared parameter count.
      >
      > R=​mslekova@chromium.org
      >
      > Bug: chromium:1302596
      > Change-Id: I0d35e70a66d682ee8fdecf5c8ea4d2b1419ce684
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3509393
      > Reviewed-by: Maya Lekova <mslekova@chromium.org>
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#79415}
      
      Bug: chromium:1302596
      Change-Id: I743647f739e0cc93b2e99145086dbbb7d2660c79
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3512853
      Auto-Submit: Clemens Backes <clemensb@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/main@{#79417}
      9d96ebbb
    • Clemens Backes's avatar
      [asm] Reject import calls with too many parameters · a664aef0
      Clemens Backes authored
      The asm parser was missing a check for too many parameters for calls to
      imported functions. For regular functions this check implicitly existed
      because the limit was checked at the function declaration, and the call
      site needs to match the declared parameter count.
      
      R=mslekova@chromium.org
      
      Bug: chromium:1302596
      Change-Id: I0d35e70a66d682ee8fdecf5c8ea4d2b1419ce684
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3509393Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79415}
      a664aef0
  12. 08 Mar, 2022 2 commits
    • Joyee Cheung's avatar
      [ic] name Set/Define/Store property operations more consistently · 0d1ffe30
      Joyee Cheung authored
      For background and reasoning, see
      https://docs.google.com/document/d/1jvSEvXFHRkxg4JX-j6ho3nRqAF8vZI2Ai7RI8AY54gM/edit
      This is the first step towards pulling the DefineNamedOwn operation out
      of StoreIC.
      
      Summary of the renamed identifiers:
      
      Bytecodes:
      
      - StaNamedProperty -> SetNamedProperty: calls StoreIC and emitted for
        normal named property sets like obj.x = 1.
      - StaNamedOwnProperty -> DefineNamedOwnProperty: calls
        DefineNamedOwnIC (previously StoreOwnIC), and emitted for
        initialization of named properties in object literals and named
        public class fields.
      - StaKeyedProperty -> SetKeyedProperty: calls KeyedStoreIC and emitted
        for keyed property sets like obj[x] = 1.
      - StaKeyedPropertyAsDefine -> DefineKeyedOwnProperty: calls
        DefineKeyedOwnIC (previously KeyedDefineOwnIC) and emitted for
        initialization of private class fields and computed public class
        fields.
      - StaDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral: calls
        DefineKeyedOwnPropertyInLiteral runtime function (previously
        DefineDataPropertyInLiteral) and emitted for initialization of keyed
        properties in object literals and static class initializers. (note
        that previously the StoreDataPropertyInLiteral runtime function name
        was taken by object spreads and array literal creation instead)
      - LdaKeyedProperty -> GetKeyedProperty, LdaNamedProperty ->
        GetNamedProperty, LdaNamedPropertyFromSuper ->
        GetNamedPropertyFromSuper: we drop the Sta prefix for the property
        store operations since the accumulator use is implicit and to make
        the wording more natural, for symmetry the Lda prefix for the
        property load operations is also dropped.
      
      opcodes:
      
      - (JS)StoreNamed -> (JS)SetNamedProperty: implements set semantics for
        named properties, compiled from SetNamedProperty (previously
        StaNamedProperty) and lowers to StoreIC or Runtime::kSetNamedProperty
      - (JS)StoreNamedOwn -> (JS)DefineNamedOwnProperty: implements define
        semantics for initializing named own properties in object literal and
        public class fields, compiled from DefineNamedOwnProperty (previously
        StaNamedOwnProperty) and lowers to DefineNamedOwnIC
        (previously StoreOwnIC)
      - (JS)StoreProperty -> (JS)SetKeyedProperty: implements set semantics
        for keyed properties, only compiled from SetKeyedProperty(previously
        StaKeyedProperty) and lowers to KeyedStoreIC
      - (JS)DefineProperty -> (JS)DefineKeyedOwnProperty: implements define
        semantics for initialization of private class fields and computed
        public class fields, compiled from DefineKeyedOwnProperty (previously
        StaKeyedPropertyAsDefine) and calls DefineKeyedOwnIC (previously
        KeyedDefineOwnIC).
      - (JS)StoreDataPropertyInLiteral ->
        (JS)DefineKeyedOwnPropertyInLiteral: implements define semantics for
        initialization of keyed properties in object literals and static
        class initializers, compiled from DefineKeyedOwnPropertyInLiteral
        (previously StaDataPropertyInLiteral) and calls the
        DefineKeyedOwnPropertyInLiteral runtime function (previously
        DefineDataPropertyInLiteral).
      
      Runtime:
      - DefineDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral:
        following the bytecode/opcodes change, this is used by
        DefineKeyedOwnPropertyInLiteral (previously StaDataPropertyInLiteral)
        for object and class literal initialization.
      - StoreDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral_Simple:
        it's just a simplified version of DefineDataPropertyInLiteral that
        does not update feedback or perform function name configuration.
        This is used by object spread and array literal creation. Since we
        are renaming DefineDataPropertyInLiteral to
        DefineKeyedOwnPropertyInLiteral, rename this simplified version with
        a `_Simple` suffix. We can consider merging it into
        DefineKeyedOwnPropertyInLiteral in the future. See
        https://docs.google.com/document/d/1jvSEvXFHRkxg4JX-j6ho3nRqAF8vZI2Ai7RI8AY54gM/edit?disco=AAAAQQIz6mU
      - Other changes following the bytecode/IR changes
      
      IC:
      
      - StoreOwn -> DefineNamedOwn: used for initialization of named
        properties in object literals and named public class fields.
        - StoreOwnIC -> DefineNamedOwnIC
        - StoreMode::kStoreOwn -> StoreMode::kDefineNamedOwn
        - StoreICMode::kStoreOwn -> StoreICMode::kDefineNamedOwn
        - IsStoreOwn() -> IsDefineNamedOwn()
      - DefineOwn -> DefineKeyedOwn: IsDefineOwnIC() was already just
        IsDefineKeyedOwnIC(), and IsAnyDefineOwn() includes both named and
        keyed defines so we don't need an extra generic predicate.
        - StoreMode::kDefineOwn -> StoreMode::kDefineKeyedOwn
        - StoreICMode::kDefineOwn -> StoreICMode::kDefineKeyedOwn
        - IsDefineOwn() -> IsDefineKeyedOwn()
        - IsDefineOwnIC() -> IsDefineKeyedOwnIC()
        - Removing IsKeyedDefineOwnIC() as its now a duplicate of
          IsDefineKeyedOwnIC()
      - KeyedDefineOwnIC -> DefineKeyedOwnIC,
        KeyedDefineOwnGenericGenerator() -> DefineKeyedOwnGenericGenerator:
        make the ordering of terms more consistent
      - IsAnyStoreOwn() -> IsAnyDefineOwn(): this includes the renamed and
        DefineNamedOwn and DefineKeyedOwn. Also is_any_store_own() is
        removed since it's just a duplicate of this.
      - IsKeyedStoreOwn() -> IsDefineNamedOwn(): it's unclear where the
        "keyed" part came from, but it's only used when DefineNamedOwnIC
        (previously StoreOwnIC) reuses KeyedStoreIC, so rename it accordingly
      
      Interpreter & compiler:
      - BytecodeArrayBuilder: following bytecode changes
          - StoreNamedProperty -> SetNamedProperty
        - StoreNamedOwnProperty -> DefineNamedOwnProperty
        - StoreKeyedProperty -> SetKeyedProperty
        - DefineKeyedProperty -> DefineKeyedOwnProperty
        - StoreDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral
      - FeedbackSlotKind:
        - kDefineOwnKeyed -> kDefineKeyedOwn: make the ordering of terms more
          consistent
        - kStoreOwnNamed -> kDefineNamedOwn: following the IC change
        - kStoreNamed{Sloppy|Strict} -> kSetNamed{Sloppy|Strict}: only
          used in StoreIC for set semantics
        - kStoreKeyed{Sloppy|Strict} -> kSetKeyed{Sloppy|Strict}: only used
          in KeyedStoreIC for set semantics
        - kStoreDataPropertyInLiteral -> kDefineKeyedOwnPropertyInLiteral:
          following the IC change
      - BytecodeGraphBuilder
        - StoreMode::kNormal, kOwn -> NamedStoreMode::kSet, kDefineOwn: this
          is only used by BytecodeGraphBuilder::BuildNamedStore() to tell the
          difference between SetNamedProperty and DefineNamedOwnProperty
          operations.
      
      Not changed:
      
      - StoreIC and KeyedStoreIC currently contain mixed logic for both Set
        and Define operations, and the paths are controlled by feedback. The
        plan is to refactor the hierarchy like this:
        ```
        - StoreIC
          - DefineNamedOwnIC
          - SetNamedIC (there could also be a NamedStoreIC if that's helpful)
          - KeyedStoreIC
            - SetKeyedIC
            - DefineKeyedOwnIC
            - DefineKeyedOwnICLiteral (could be merged into DefineKeyedOwnIC)
            - StoreInArrayLiteralIC
          - ...
        ```
        StoreIC and KeyedStoreIC would then contain helpers shared by their
        subclasses, therefore it still makes sense to keep the word "Store"
        in their names since they would be generic base classes for both set
        and define operations.
      - The Lda and Sta prefixes of bytecodes not involving object properties
        (e.g. Ldar, Star, LdaZero) are kept, since this patch focuses on
        property operations, and distinction between Set and Define might be
        less relevant or nonexistent for bytecodes not involving object
        properties. We could consider rename some of them in future patches
        if that's helpful though.
      
      Bug: v8:12548
      Change-Id: Ia36997b02f59a87da3247f20e0560a7eb13077f3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3481475Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Joyee Cheung <joyee@igalia.com>
      Cr-Commit-Position: refs/heads/main@{#79409}
      0d1ffe30
    • Victor Gomes's avatar
      [maglev] Implement StoreField · 53f20f3d
      Victor Gomes authored
      Bug: v8:7700
      Change-Id: I5827612419b938758b25d1f504e4576016583d4c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497364Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Auto-Submit: Victor Gomes <victorgomes@chromium.org>
      Commit-Queue: Victor Gomes <victorgomes@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#79404}
      53f20f3d