Promise.{all,allSettled,any,race} should check resolve is a function before
opening their iteratable.
PR: https://github.com/tc39/ecma262/pull/1912
PR for Promise.any: https://github.com/tc39/proposal-promise-any/pull/65
This CL includes the following cleanup changes:
- Made it more explicit that the constructor is a Constructor.
- Removed unnecessary nested try blocks (a try can have both a catch and a label).
- Moved commonly used definitions out of promise-race.tq where they don't belong.
- Made the parameter order of PerformPromiseAll match the spec.
Bug: v8:10578
Change-Id: I9deb5d5106db7350a0d0ad52f165ff2469e7074b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232544
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68260}
The {NONE} reloc info is the one used most often, i.e. for every
assembler call that takes an {Immediate} on x64 which is not
relocatable.
Hence assign value 0 to {NONE} such that constructing such immediates is
faster and also checking for this most common case is faster.
R=ishell@chromium.org
Bug: v8:10576
Change-Id: I3c048710b80dd31fa5b5d3b1415d72a24d95cb90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237136
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68259}
Avoid going through the {WasmDebugInfo}, which existed for debugging in
the interpreter in production. Instead, tests now instantiate the
interpreter directly.
This will unblock the removal of the whole {WasmDebugInfo}, and finally
moving the interpreter to the test directory.
R=ahaas@chromium.org
Bug: v8:10389
Change-Id: I8ae76a1d5bff716c129781b11a15369a80b13603
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235543
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68258}
The reference stack was set by the scope, and reset when leaving the
scope, in order to avoid leaking objects via cycles in the reference
tree, involving global handles which are considered strong roots.
Since the interpreter cannot call out to JS any more, we cannot create
such cycles any more. Hence, the ReferenceStackScope is removed, and the
FixedArray for the reference stack is allocated as a global handle
instead.
This will unblock removing the WasmDebugInfo object, which was used by
the ReferenceStackScope before this CL.
R=ahaas@chromium.org
Bug: v8:10389
Change-Id: I2e3c6a03750846679eecd9e6a07042db962aad9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235542
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68257}
Fix dcheck failure where committed was smaller than used memory. This was because of background threads allocating between calculating both stats and used memory could already be larger due to those background allocations. Avoid this first calculating used memory and committed memory afterwards.
Bug: v8:10563, v8:10315
Change-Id: Ic07970f607941140e3028bddde3e365b66aa4b5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237138
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68256}
Rename CreateFillerObjectFromSweeper to CreateFillerObjectAtBackground.
Also use CreateFillerObjectAtBackground in PagedSpace::Free since this
is used from both main and background threads.
Bug: v8:10315
Change-Id: I1dc8ca2b1c81bdfd192c0ae8d8547eb577f3f8c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235534
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68255}
A previous CL removed the kNoThrow flags from both
SpeculativeBigIntAdd and SpeculativeBigIntSubtract. This introduced a
bug, because the JSTypeHintLowering phase, where these operators are
introduced during inlining, does not support the generation of throwing
operators.
Since these operators always deoptimize in case of an error, instead of
throwing the exception directly, it is safe to mark them as kNoThrow.
Bug: chromium:1091461
No-Try: true
No-Tree-Checks: true
Change-Id: I551616b0c462647574e5af8824d9ed7b3252659d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235113
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68254}
Added wasm tracing support for turbofan with the flag --trace-wasm.
The test suite was updated accordingly.
R=clemensb@chromium.org
Bug: v8:10559
Change-Id: Ie6ee2a05142081416d8572d4d72dcd315e0bf285
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235536
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Arnaud Robin <arobin@google.com>
Cr-Commit-Position: refs/heads/master@{#68253}
Return no value when global memory scheduling is off. Previously
returned new_space->Capacity()+1 since this value was used in the
callers to compare the result to.
Bug: v8:10315
Change-Id: I7c7289ee9319fe9c791c3cb9b9b46cca54815904
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235704
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68251}
This CL
* Adds the xadd instruction to the ia32 assembler and disassembler;
* Implements the AtomicAdd instructions, except AtomicAddU64, on ia32;
R=clemensb@chromium.org
Bug: v8:10108
Change-Id: Ic8653a9f96148282951104fefb4185c4c0db89a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232719
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68247}
There are at least three equivalence classes where this assertion
should not actually hold:
'\u0390\u1fd3', // ΐΐ
'\u03b0\u1fe3', // ΰΰ
'\ufb05\ufb06', // ſtst
Bug: v8:10591
Change-Id: I26cb43d2e67c54e689f1831ea13be46c73d5e92d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231595
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68246}
This allows fast call callbacks to be created in cases where C++
templates cannot be used, for example C or Rust.
Bug: chromium:1052746
Change-Id: I90122444297f6c00428cd7345e0c0c7eca010716
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235914
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gus Caplan <me@gus.host>
Cr-Commit-Position: refs/heads/master@{#68239}
This is a little cleanup to use the {GraphAssembler} for implementing
{TraceMemoryOperation}. The {GraphAssembler} needs to be extended by a
straight-forward {StackSlot} method.
R=tebbi@chromium.orgCC=arobin@google.com
Bug: v8:10123
Change-Id: Ic872870bfd8609bb09383a0458b5c08fd7586993
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232556
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68238}
This reverts commit 31c6619353.
Reason for revert: Speculative revert for lots of timeouts on the
tree, some seem heap related, e.g.
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20cfi/25151
Original change's description:
> [heap] Expand new space in safepoint
>
> Move expansion of the new space into the safepoint. Otherwise background
> threads race with the main thread when accessing the new space capacity.
> This will most likely also be required to allow the allocation of new
> space objects from background threads.
>
> Bug: v8:10315
> Change-Id: Ia8ac0c9f582876b655eaf4e35082aeadfbdb830e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235532
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68226}
TBR=ulan@chromium.org,dinfuehr@chromium.org
Change-Id: I8da9aa000090a9bff43bb15b7bb55bb5a3138fe5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235539
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68237}
Adds allocation-based heap growing strategy that triggers GC based on
some limit. The limit is computed based on previous live memory and a
constant growing factor.
For invoking GC, we support two modes: with and without conservative
stack scanning. Without conservative stack scanning, an invoker makes
sure that we schedule a GC without stack using the existing platform.
Bug: chromium:1056170
Change-Id: I1808aeb5806a6ddd5501b556d6b6b129a85b9cda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228887
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68235}
Not sure why I chose to specify temporaries in the instruction selector,
this isn't needed since arm64 has sufficient scratch registers to go
around.
Bug: v8:8460
Change-Id: I57659915e5ad79eaae79024e7a6c9e6237f49416
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231594
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68234}
Object materialization did not correctly deal with a mismatch between
current representation of a field value and expected representation.
This is an attempt to repair the situation.
Bug: chromium:1084820
Change-Id: Ib337cbaf5e36a5a616b6a6cb0ddf51018d49b96a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228330
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68231}
If --turbo-nci is enabled, use binary op builtins with feedback
collection during generic lowering.
Bug: v8:8888
Change-Id: I307dc742488982bdc68006be5bcd1da8e68768f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228614
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68227}
Move expansion of the new space into the safepoint. Otherwise background
threads race with the main thread when accessing the new space capacity.
This will most likely also be required to allow the allocation of new
space objects from background threads.
Bug: v8:10315
Change-Id: Ia8ac0c9f582876b655eaf4e35082aeadfbdb830e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235532
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68226}
Rolling v8/build: 3142ebd..8bce03b
Rolling v8/third_party/aemu-linux-x64: ij0nEFLmrqJqEp81i5YIDjeQ8epXhPrtAI0otT1OId0C..WCiGqc2IsqMVCcj8UruU8vGLvhfosP46CB3tAy6N2boC
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/92c6c3e..69b4144
Rolling v8/third_party/depot_tools: 02dbd01..cf2d770
Rolling v8/third_party/googletest/src: cb44c86..4fe0180
Rolling v8/tools/clang: fab9ca5..3c04a1bTBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
Change-Id: If1eeb990b78e5503daafc760e1dfe23b8b112e15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2234022
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#68221}
Port 2f7f90b5ee
Original Commit Message:
This reverts commit dfbbb4a531.
Reason for revert: Bitmask added post 84 cut, so it is not part of origin trial. Therefore it is still a post-mvp.
Original change's description:
> [wasm-simd] Add bitmask to SIMD MVP
>
> This removes the post-mvp flag for bitmask, since it was accepted into
> the proposal, see https://github.com/WebAssembly/simd/pull/201.
>
> Bug: v8:10308
> Change-Id: I4ced43a6484660125d773bc9de46bdea9f72b13b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216532
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67993}
R=zhin@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N
Change-Id: I2076f24c2e232ca071b9dc62c9f23d3eb7acfa72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233406
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68219}
- Uses fast path technique to speed up F64x2Min/Max on x64.
Bug: v8:8639
Change-Id: I766752ba9c515bbeb94709460429a71d9f34fd2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232940
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68217}
This reverts commit dfbbb4a531.
Reason for revert: Bitmask added post 84 cut, so it is not part of origin trial. Therefore it is still a post-mvp.
Original change's description:
> [wasm-simd] Add bitmask to SIMD MVP
>
> This removes the post-mvp flag for bitmask, since it was accepted into
> the proposal, see https://github.com/WebAssembly/simd/pull/201.
>
> Bug: v8:10308
> Change-Id: I4ced43a6484660125d773bc9de46bdea9f72b13b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216532
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67993}
TBR=gdeepti@chromium.org,zhin@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: v8:10308
Change-Id: I53294be4ea816f37c7cc5f545afb572538dd4770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233183
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68216}
This change is needed to implement {struct,array}.get_{s,u}.
Some functionality in wasm-compiler was factored out to helper functions
LoadWithAlignment and StoreWithValueType.
Bug: v8:7748
Change-Id: I2a04d09d40532f2389cc82b4c9ee3d8e003c5101
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231347
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68215}
If multiple workers are sharing the same module, the DevTools frontend
will set the same breakpoints in all of them, but one after another.
This CL tries to avoid repeated recompilation of that function in most
cases. Only if we need special source positions for stack rewriting, we
need to compile a special version.
R=thibaudm@chromium.org
Bug: v8:10359
Change-Id: I06114d6feb2030b75dcbde91c62b822f1807ad6e
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231339
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68213}
When the last debugger is disabled, we tier up the module to TurboFan.
Doing this in the background creates problems with profiling, where the
debugger is disabled before starting to profile, in order to guarantee
profiling of top-tier code.
Hence this CL changes the logic such that we only return from the
{TierUpAllModulesPerIsolate} methods once tier up is complete. Since
the DevTools frontend disables all debuggers before starting a profile,
this will ensure that all new calls execute TurboFan code.
Because of this change, the {TriggerRecompilation} method is renamed to
{RecompileForTiering}.
The test cases stay unchanged (do a busy wait until tier up is done),
because in the multi-isolates tests it is not guaranteed that tier up is
complete after disabling a single debugger.
R=thibaudm@chromium.org
Bug: v8:10580
Change-Id: I75c4b97825f856f562cfa656c11293d3b964898b
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232539
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68212}
This reverts commit 81c34968a7 and also
490f3580a3 which depends on the former.
Reason for revert: Break CFI tests in chromium https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/17438
Original change's description:
> [heap] Make ReadOnlySpace use bump pointer allocation
>
> This changes ReadOnlySpace to no longer be a PagedSpace but instead it
> is now a BaseSpace. BasicSpace is a new base class that Space inherits
> from and which has no allocation methods and does not dictate how the
> pages should be held.
>
> ReadOnlySpace unlike Space holds its pages as a
> std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses
> BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and
> cannot be held in a heap::List. This is desirable since with pointer
> compression we would like to remap these pages to different memory
> addresses which would be impossible with a heap::List.
>
> Since ReadOnlySpace no longer uses most of the code from the other
> Spaces it makes sense to simplify its memory allocation to use a simple
> bump pointer and always allocate a new page whenever an allocation
> exceeds the remaining space on the final page.
>
> Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68137}
TBR=ulan@chromium.org,delphick@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I68c9834872e55eb833be081f8ff99b786bfa9894
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232552
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68211}