1. 13 Dec, 2021 1 commit
    • Patrick Thier's avatar
      Reland "[turbofan] Improve StoreStoreElimination" · e926da45
      Patrick Thier authored
      This is a reland of 863bc2b8
      
      Diff to original:
      - Don't eliminate GC observable stores that were temporarily
        unobservable during traversal.
      - Skip the previously added test for single-generation
      - Add new test
      
      Original change's description:
      > [turbofan] Improve StoreStoreElimination
      >
      > Previously, StoreStoreElimination handled allocations as
      > "can observe anything". This is pretty conservative and prohibits
      > elimination of repeated double stores to the same field.
      > With this CL allocations are changed to "observes initializing or
      > transitioning stores".
      > This way it is guaranteed that initializing stores to a freshly created
      > object or stores that are part of a map transition are not eliminated
      > before allocations (that can trigger GC), but allows elimination of
      > non-initializing, non-transitioning, unobservable stores in the
      > presence of allocations.
      >
      > Bug: v8:12200
      > Change-Id: Ie1419696b9c8cb7c39aecf38d9f08102177b2c0f
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295449
      > Commit-Queue: Patrick Thier <pthier@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Maya Lekova <mslekova@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78230}
      
      Bug: v8:12200, chromium:1276923, v8:12477
      Change-Id: Ied45ee28ac12b370f7b232d2d338f93e10fea6b4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320460Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Patrick Thier <pthier@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78349}
      e926da45
  2. 10 Dec, 2021 3 commits
  3. 09 Dec, 2021 4 commits
    • Michael Lippautz's avatar
      cppgc: Advance deprecation arounds write barrier · 3afcbf5c
      Michael Lippautz authored
      Advance deprecations and remove fully deprecated code.
      
      Bug: v8:12165
      Change-Id: I2cf1715d6878ff65e5b9beaddb8df7aec780b21e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3328781
      Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Commit-Queue: Anton Bikineev <bikineev@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78329}
      3afcbf5c
    • Manos Koukoutos's avatar
      [wasm][turbofan] Immutable object operators · 4113cf64
      Manos Koukoutos authored
      Design doc: bit.ly/36MfD6Y
      
      We introduce simplified operators LoadImmutableFromObject and
      InitializeImmutableInObject. These are lowered to Loads and Stores like
      LoadFromObject and StoreToObject.
      We split CsaLoadElimination::AbstractState in two HalfStates,
      which represent the mutable and immutable component of the state.
      Immutable operators in the effect chain modify the immutable half-state,
      and plain operators modify the mutable half-state. The immutable part is
      maintained through write effects and loop headers. Immutable
      initializations do not lookup and kill previous overlapping stores,
      assuming each offset cannot be initialized more than once.
      
      Bug: v8:11510
      
      Change-Id: I0f5feca3354fdd3bdc1f511cc5214ec51e1407ad
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268728Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78325}
      4113cf64
    • Marja Hölttä's avatar
      [rab / gsab] Add RAB / GSAB support to TA.p.indexOf & lastIndexOf · bd2fce57
      Marja Hölttä authored
      Bug: v8:11111
      Change-Id: I243832c05b6eb1ba2f13dc98f9b8fb177b351112
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3315438Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78317}
      bd2fce57
    • Joyee Cheung's avatar
      Revert "[class] implement reparsing of class instance member initializers" · f668e9f7
      Joyee Cheung authored
      This reverts commit 91f08378.
      
      Reason for revert: It's a fairly big change, and the clusterfuzz
      found some bugs. Will reland with the fix after M98 branch point.
      
      Original change's description:
      > [class] implement reparsing of class instance member initializers
      >
      > Previously, since the source code for the synthetic class instance
      > member initializer function was recorded as the span from the first
      > initializer to the last initializer, there was no way to reparse the
      > class and recompile the initializer function. It was working for
      > most use cases because the code for the initializer function was
      > generated eagarly and it was usually alive as long as the class was
      > alive, so the initializer wouldn't normally be lazily parsed. This
      > didn't work, however, when the class was snapshotted with
      > v8::SnapshotCreator::FunctionCodeHandling::kClear,
      > becuase then we needed to recompile the initializer when the class
      > was instantiated. This patch implements the reparsing so that
      > these classes can work with FunctionCodeHandling::kClear.
      >
      > This patch refactors ParserBase::ParseClassLiteral() so that we can
      > reuse it for both parsing the class body normally and reparsing it
      > to collect initializers. When reparsing the synthetic initializer
      > function, we rewind the scanner to the beginning of the class, and
      > parse the class body to collect the initializers. During the
      > reparsing, field initializers are parsed with the full parser while
      > methods of the class are pre-parsed.
      >
      > A few notable changes:
      >
      > - Extended the source range of the initializer function to cover the
      >   entire class so that we can rewind the scanner to parse the class
      >   body to collect initializers (previously, it starts from the first
      >   field initializer and ends at the last initializer). This resulted
      >   some expectation changes in the debugger tests, though the
      >   initializers remain debuggable.
      > - A temporary ClassScope is created during reparsing. After the class
      >   is reparsed, we use the information from the ScopeInfo to update
      >   the allocated indices of the variables in the ClassScope.
      >
      > Bug: v8:10704
      > Change-Id: Ifb6431a1447d8844f2a548283d59158742fe9027
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2988830
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Commit-Queue: Joyee Cheung <joyee@igalia.com>
      > Cr-Commit-Position: refs/heads/main@{#78299}
      
      Bug: v8:10704
      Change-Id: I039cb728ebf0ada438a8f26c7d2c2547dbe3bf2d
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3325328
      Auto-Submit: Joyee Cheung <joyee@igalia.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78315}
      f668e9f7
  4. 08 Dec, 2021 10 commits
    • Shu-yu Guo's avatar
      Revert "[wasm] Add --wasm-dynamic-tiering to --future" · 780d9b88
      Shu-yu Guo authored
      This reverts commit cb9e8608.
      
      Reason for revert: Causing timeouts on Wasm tests on TSAN and
      also seems to cause some deadlock issue on shared isolate GC:
      https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/6847/overview
      
      Original change's description:
      > [wasm] Add --wasm-dynamic-tiering to --future
      >
      > R=​jkummerow@chromium.org
      >
      > Bug: v8:12281
      > Change-Id: Ic1a2534aef4b6335c068636ee4e3aa10300fca53
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322767
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#78309}
      
      Bug: v8:12281
      Change-Id: Idf2bea0907daea645be922f0db776caa9dff07a3
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3325023
      Auto-Submit: Shu-yu Guo <syg@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@{#78311}
      780d9b88
    • Andreas Haas's avatar
      [wasm] Add --wasm-dynamic-tiering to --future · cb9e8608
      Andreas Haas authored
      R=jkummerow@chromium.org
      
      Bug: v8:12281
      Change-Id: Ic1a2534aef4b6335c068636ee4e3aa10300fca53
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322767Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78309}
      cb9e8608
    • Leszek Swirski's avatar
      [compiler-dispatcher] Move Job pointer to SFI · 3b9091c8
      Leszek Swirski authored
      Reduce the enqueuing cost of compiler-dispatcher jobs by getting rid of
      the sets and hashmaps, and instead:
      
        1. Turning the pending job set into a queue, and
        2. Making the SharedFunctionInfo's UncompiledData hold a pointer to
           the LazyCompilerDispatcher::Job, instead of maintaining an
           IdentityMap from one to the other.
      
      To avoid bloating all UncompiledData, this adds two new UncompiledData
      subclasses, making it four subclasses total, for with/without Preparse
      data and with/without a Job pointer. "should_parallel_compile"
      FunctionLiterals get allocated an UncompiledData with a job pointer by
      default, otherwise enqueueing a SFI without a job pointer triggers a
      reallocation of the UncompiledData to add a job pointer.
      
      Since there is no longer a set of all Jobs (aside from one for
      debug-only), we need to be careful to manually clear the Job pointer
      from the UncompiledData whenever we finish a Job (whether successfully
      or by aborting) and we have to make sure that we implicitly can reach
      all Jobs via the pending/finalizable lists, or the set of currently
      running jobs.
      
      Change-Id: I3aae78e6dfbdc74f5f7c1411de398433907b2705
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3314833Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78302}
      3b9091c8
    • Camillo Bruni's avatar
      [d8] Use explicit variable to track Worker state · 14d6d58a
      Camillo Bruni authored
      The explicit state_ variable is used to prevent undefined behaviour
      by double-joining the worker thread.
      
      Bug: chromium:1276382
      Change-Id: I338cfdb4a587eb57fec5a5a28b42371584c99102
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3318669Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78300}
      14d6d58a
    • Joyee Cheung's avatar
      [class] implement reparsing of class instance member initializers · 91f08378
      Joyee Cheung authored
      Previously, since the source code for the synthetic class instance
      member initializer function was recorded as the span from the first
      initializer to the last initializer, there was no way to reparse the
      class and recompile the initializer function. It was working for
      most use cases because the code for the initializer function was
      generated eagarly and it was usually alive as long as the class was
      alive, so the initializer wouldn't normally be lazily parsed. This
      didn't work, however, when the class was snapshotted with
      v8::SnapshotCreator::FunctionCodeHandling::kClear,
      becuase then we needed to recompile the initializer when the class
      was instantiated. This patch implements the reparsing so that
      these classes can work with FunctionCodeHandling::kClear.
      
      This patch refactors ParserBase::ParseClassLiteral() so that we can
      reuse it for both parsing the class body normally and reparsing it
      to collect initializers. When reparsing the synthetic initializer
      function, we rewind the scanner to the beginning of the class, and
      parse the class body to collect the initializers. During the
      reparsing, field initializers are parsed with the full parser while
      methods of the class are pre-parsed.
      
      A few notable changes:
      
      - Extended the source range of the initializer function to cover the
        entire class so that we can rewind the scanner to parse the class
        body to collect initializers (previously, it starts from the first
        field initializer and ends at the last initializer). This resulted
        some expectation changes in the debugger tests, though the
        initializers remain debuggable.
      - A temporary ClassScope is created during reparsing. After the class
        is reparsed, we use the information from the ScopeInfo to update
        the allocated indices of the variables in the ClassScope.
      
      Bug: v8:10704
      Change-Id: Ifb6431a1447d8844f2a548283d59158742fe9027
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2988830Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Joyee Cheung <joyee@igalia.com>
      Cr-Commit-Position: refs/heads/main@{#78299}
      91f08378
    • Marja Hölttä's avatar
      [web snapshots] Add two-byte string support · 4181e3c9
      Marja Hölttä authored
      Bug: v8:11525
      Change-Id: I7dee1987160d3811054a7be43280993630bca5be
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320426Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78295}
      4181e3c9
    • Thibaud Michaud's avatar
      [wasm] Mark roots for stack switching · efae96fb
      Thibaud Michaud authored
      Treat all stack pointers as roots:
      - Maintain a global linked-list of StackMemories
      - Update StackFrameIterator to process inactive stacks
      - Visit roots in all inactive stacks (including root marking and root
      pointer updating).
      
      Drive-by:
      - Fix some issues uncovered by the test
      - Refactor the builtin constants
      
      R=mlippautz@chromium.org,ahaas@chromium.org
      
      Bug: v8:12191
      Change-Id: I5b6381f9818166e2eabf80dd59135673dddb2afc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310932Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78291}
      efae96fb
    • Leszek Swirski's avatar
      [compiler] Introduce ReusableUnoptimizedCompileState · b3e1eb0c
      Leszek Swirski authored
      Introduce a ReusableUnoptimizedCompileState class, passed to ParseInfo,
      which stores a couple of pointers and most importantly the Zone and
      AstValueFactory of the parse. This allows the Zone and AstValueFactory
      to be reused across multiple parses, rather than re-initialising
      per-Parse.
      
      With this, we can amend the LazyCompileDispatcher to initialise one
      LocalIsolate, Zone and AstValueFactory per background thread loop,
      rather than one per compile task, which allows us to reduce per-task
      costs and re-use the AstValueFactory's string table and previous String
      internalizations.
      
      Change-Id: Ia0e29c4e31fbe29af57674ebb10916865d38b2ce
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313106Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78289}
      b3e1eb0c
    • Lu Yahan's avatar
      [riscv64]Implement webassembly simd swizzle/TruncSat/extadd/S128LOAD · 4ae67baf
      Lu Yahan authored
      Add func UseImmediate64(int64_t imm) into instruction-selector-impl
      Bug: v8:11976
      
      Change-Id: I274ab59cc6d9a9cdc8b4081a7c418c56c3e8f5b7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312453Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
      Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
      Cr-Commit-Position: refs/heads/main@{#78288}
      4ae67baf
    • Benedikt Meurer's avatar
      [inspector] Consistent frame function name in V8 Inspector and API. · 54584461
      Benedikt Meurer authored
      On the way to a cheaper and more scalable stack frame representation
      for the inspector (crbug/1258599), this removes the need to expose
      both what was called "function name" and what was called "function
      debug name" on a v8::StackFrame instance.
      
      The reason to having a distinction between that the V8 API exposes
      and what the inspector exposes as frame function name is that after
      the initial refactoring around v8::internal::StackFrameInfo, some
      wasm cctests would still dig into the implementation details and
      insist on seeing the "function name" rather than the "function
      debug name". This CL now addresses that detail in the wasm cctests
      and going forward unifies the function names used by the inspector
      and the V8 API (which is not only needed for internal consistency
      and reduced storage requirements in the future, but also because
      Blink for example uses v8 API and v8_inspector API interchangeably
      and assumes that they agree, even though at this point Blink
      luckily wasn't paying attention to the function name):
      
      - The so-called "detailed stack trace", which is produced for the
        inspector and exposed by the v8 API, always yields the "function
        debug name" (which for example in case of wasm will be a WAT
        compatible name),
      - while the so-called "simple stack trace", which is what is used
        to implement the CallSite API and underlies Error.stack continues
        to stick to the "function name" which in case of wasm is not
        WAT compatible).
      
      Bug: chromium:1258599
      Change-Id: Ib15d038f3ec893703d0f7b03f6e7573a38e82b39
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312274Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78283}
      54584461
  5. 07 Dec, 2021 7 commits
  6. 06 Dec, 2021 7 commits
  7. 04 Dec, 2021 2 commits
  8. 03 Dec, 2021 5 commits
  9. 02 Dec, 2021 1 commit