Commit Graph

76194 Commits

Author SHA1 Message Date
Anton Bikineev
4dee3fbd37 cppgc: Provide operator==(Raw, Member) to avoid Member decompression
The operator with raw pointer allows us to avoid Member decompression,
which is more expensive than compression. It's also quite frequently
called (e.g. in HeapHashSet::find()).

The existing operator
  template <...>
  bool operator==(const Member<T1>&, const Member<T2>&);
was not called for
  GCed* raw = ...;
  member == raw;
because the compiler wouldn't deduce `T2` in `const Member<T2>` as
`GCed` when the initializer expression `raw` is of different type
(`GCed*`).

Bug: chromium:1325007
Change-Id: Ie1ee12bad28081c66f4e08a146467fd7c040bb70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757344
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81702}
2022-07-13 20:07:04 +00:00
Shu-yu Guo
7ccbd7bed8 [rab/gsab] Do not Reallocate 0-lengthed ArrayBuffers
Bug: chromium:1344014
Change-Id: I5009af963d95d96f70785593664a1145ad20c97d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760975
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81701}
2022-07-13 19:06:34 +00:00
Jakob Kummerow
1609ffa8b3 [wasm-gc] Fix endless loop in WasmGCOperatorReducer
When the control-flow aware type of a Node doesn't actually change,
then we shouldn't claim that it did (which causes later re-visiting
of the node).

Fixed: v8:13061
Change-Id: I064cedf3721a79844bfc36ad3142428bdfbaf891
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760675
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81700}
2022-07-13 16:46:14 +00:00
Jacob Abraham
5f0e6a10f3 Add prototype of Wasm Trace proposal
Implements an initial prototype of the Wasm Trace proposal. A custom
section containing offsets to functions is decoded into trace
instructions that are inserted into the function. In Liftoff, these
are directly inserted. In TurboFan, these are added as StackEffect's,
this is a work in progress.

Traces will only be decoded and added when a flag is given to V8,
currently "--experimental-wasm-instruction-tracing". If a trace is ever
not valid or an error occurs, it is safe to just throw them away.

Code Metadata Tool Convention:
https://github.com/WebAssembly/tool-conventions/blob/main/CodeMetadata.md

Design Doc:
https://docs.google.com/document/d/1739a_LXbavBnek7pa0uqhHOCz8IJ56mn2C2Yvbssvkg/edit?usp=sharing

Wasm Trace Proposal:
https://github.com/WebAssembly/instrument-tracing

Bug: chromium:1090122, chromium:1252113
Change-Id: Id4690d8deca482ff0e863761668ffabca159bd29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386604
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81699}
2022-07-13 16:42:28 +00:00
Sergey Ulanov
178c42220d [Fuchsia] Use optimize_max on Fuchsia
V8 was compiled for Fuchsia with optimize_speed instead of optimize_max
used on most other platfroms. There is no reason Fuchsia needs to be
different, so it's better to use optimize_max. It also allows to save
about 1MB on the binary size.

Bug: chromium:1343990
Change-Id: Ie4a07fbbfd8100def61bf7709d2c4e6cb74209f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759647
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81698}
2022-07-13 16:29:04 +00:00
Marja Hölttä
ce18b115c2 [rab/gsab] Decommit the memory whenever possible
Bug: v8:11111
Change-Id: Ic07628bcf6018ea9814a38a0dab3667a7d8f0d69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755145
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81697}
2022-07-13 16:14:44 +00:00
Shu-yu Guo
f4547fbe8f Fix parking for --stress-snapshot
Bug: v8:13039
Change-Id: I80c9e0ab84437f8e932c13b3cb134b9bdb74c1a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759563
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81696}
2022-07-13 15:29:34 +00:00
Victor Gomes
c0ff58e061 [maglev] Support TestReferenceEqual, TestNull and TestUndefined
Bug: v8:7700
Change-Id: I07e63a33e1ef1ab8e423bf46be1d83b8724d924d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760449
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81695}
2022-07-13 15:28:24 +00:00
Andy Wingo
74289c46bb [stringrefs] Implement stringview_iter.slice
Feature complete!

Bug: v8:12868
Change-Id: I7727071bdd062a6dae26206a65080f675ef7ee93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758226
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81694}
2022-07-13 15:26:14 +00:00
Andy Wingo
77425d0a3e [stringrefs] Implement stringview_iter.advance, stringview_iter.rewind
Bug: v8:12868
Change-Id: I2e4a1733876a817dca36e0134ba4b7549f0cf4b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757886
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81693}
2022-07-13 14:12:04 +00:00
Andy Wingo
994b64148e [stringrefs] Implement string.as_iter, stringview_iter.next
Bug: v8:12868
Change-Id: Ice7134d0ad5efddb85420543ea785253791d0258
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757885
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81692}
2022-07-13 14:03:24 +00:00
Clemens Backes
b580e58f88 [wasm] Generate better OOM locations
The exact method name is not interesting when looking at crash
statistics, and can easily be retrieved from stack traces. Instead,
print a consice string saying what we were trying to do when we ran OOM.
This is more consistent with other OOM location strings.

R=ahaas@chromium.org

Change-Id: Ic8cf70b40c304711e8b96391418019b3f697e977
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760446
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81691}
2022-07-13 13:53:19 +00:00
Samuel Groß
725ce4933c [sandbox] Verify that no EPT allocation can happen during sweeping
It is not safe to allocate ExternalPointerTable entries while the table
is being swept. This property is currently ensured by the GC. To better
catch any potential future violation of this requirement, this CL now
changes the Sweep() method to first set the freelist head to a special
marker value, which is checked in Allocate() in debug builds and will
cause a recognizable crash in release builds.

Bug: v8:10391
Change-Id: Iab69c1e97afc23ae5b2b894b2d765b82a760cdd8
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758211
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81690}
2022-07-13 13:15:14 +00:00
Leszek Swirski
30dad483aa [x64] Microoptimise comparisons against tagged values
Avoid loading objects with 64-bit movq when they are only being used to
compare against another object with a 32-bit cmp_tagged under pointer
compression.

Change-Id: Ib8ccd093fb49caea3bf1b923b83825626ba0bffc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760447
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81689}
2022-07-13 12:41:24 +00:00
Junliang Yan
db9e3428c6 s390x: [baseline] fix ptr-compr issue
Change-Id: I8f0235877f9f31a5f81467a9f0ccfbc7491faa14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757888
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81688}
2022-07-13 12:09:44 +00:00
Leszek Swirski
8d52262b59 [maglev] Support CreateArrayLiteral
Also changes CreateObjectLiteral to take the boilerplate as a constant
value, not a node.

Bug: v8:7700
Change-Id: I6852c7c4b8d361f903155c513e627ebc1af4d2f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758223
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81687}
2022-07-13 11:02:33 +00:00
Samuel Groß
e5b9fae45d Disable wasm/shared-memory-worker-gc-stress test when TSAN is enabled
TSAN may cause the sandbox to fail to obtain enough virtual address
space during initialization, thereby causing it to fall back to a
smaller backing reservation. This may then in turn cause future
WebAssembly.Memory allocations to fail.

Bug: v8:12980
Change-Id: I812ee02c5421153f1ea3b6bc371c72bc1da406a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757897
Commit-Queue: Samuel Groß <saelo@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81686}
2022-07-13 10:55:53 +00:00
Clemens Backes
0dc1bab10c Reland^2 "[flags] Enable freezing of flags"
This is a reland of commit 1ed7d0b8d1.
Fixes:
- https://crrev.com/c/3745533
- https://crrev.com/c/3758064
- https://crrev.com/c/3757709

Original change's description:
> [flags] Enable freezing of flags
>
> This enables the --freeze-flags-after-init flag globally. Note that
> tests, fuzzers, Node and other still explicitly disable the flag. The
> chrome renderer process and default d8 execution will have it enabled
> though.
>
> R=cbruni@chromium.org
>
> Bug: v8:12887
> Change-Id: I9a15ef64227e5e6e04779d8d671a2c50d99c9097
> Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695264
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81214}

Bug: v8:12887
Change-Id: Ibacb7b738a91f9a893a35a7b845ce4a6ff7bae3f
Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758224
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81685}
2022-07-13 10:49:58 +00:00
Leszek Swirski
c505520a93 [maglev] Support generic StaInArrayLiteral
Just the generic path for now, the most valuable optimisation here would
be transitioning stores but we don't yet support these.

Bug: v8:7700
Change-Id: I95e3a77cccf43bc33607a50bab1eb89fca32af06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758144
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81684}
2022-07-13 10:08:43 +00:00
Leszek Swirski
c906eec72a [maglev] Support CreateClosure
Bug: v8:7700
Change-Id: Iacdb0ecd04d7b50d7dd623feb8646c89cc4016ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757884
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81683}
2022-07-13 09:48:49 +00:00
Victor Gomes
fb945c9185 [maglev] Add SetKeyed and DefineKeyedOwn generic nodes
Bug: v8:7700
Change-Id: I49c13eb2f251b8d547826928da479fa1186a11fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757894
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81682}
2022-07-13 09:34:09 +00:00
Leszek Swirski
7cbdde4a70 [maglev] Support Sta(Current)ContextSlot
We don't even need any new IR nodes for it.

Bug: v8:7700
Change-Id: I8c2844f9bc6d21b09799395f817831685be21df7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757883
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81681}
2022-07-13 09:15:38 +00:00
Camillo
67c951fa12 Reland "[maglev] Add internalized string compare fast-path"
This is a reland of commit c4301c0489:
- Fix thin string in string-compare.js with low gc interval

Original change:
- Rename TryBuildCompareOperationBranch to TryBuildCompareOperation
- Add CheckedInternalizedString conversion Node that checks for string
  inputs and extracts internalised Strings from ThinStrings
- Add BranchIfReferenceCompare Node
- Add runtime functions to create internalised and thin Strings
- Add deopt check to test/mjsunit/maglev/int32-branch.js

Bug: v8:7700
Change-Id: I9221253f6bbeef12297419495c6eaf5096e06278
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755152
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81680}
2022-07-13 09:08:58 +00:00
Marja Hölttä
1e7e85306a [rab/gsab] Tests for Array.p methods, part 11
In this part: join, toLocaleString

Bug: v8:11111
Change-Id: I66ba85c33aae61a86e162352adb2d4bcf0dbac12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757333
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81679}
2022-07-13 06:58:17 +00:00
Marja Hölttä
0c75b8136b [rab/gsab] Tests for Array.p methods, part 10
In this part: Array.from

Bug: v8:11111
Change-Id: I266126e5b6bf217b49bb87b3a744443f5a5c1b2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755137
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81678}
2022-07-13 06:17:59 +00:00
v8-ci-autoroll-builder
667b9e79a5 Update V8 DEPS (trusted-origins)
Rolling v8/build: ad70f68..78234e5

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Ib3a6f9fcaa6cd837c18356186bad1d8ea5e9da43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758705
Bot-Commit: 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/main@{#81677}
2022-07-13 04:56:18 +00:00
v8-ci-autoroll-builder
b0b4057ee3 Update V8 DEPS (trusted-versions)
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1dee059..8e95834

Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220711.1.1..version:8.20220712.1.1

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: If36aaf2dbd8456a21ec40fe901deef46090e5c74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760003
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81676}
2022-07-13 03:55:29 +00:00
Shu-yu Guo
e8b51c3ce0 [rab/gsab] Fix zeroing of transferred ArrayBuffers
Bug: v8:13066, v8:11111
Cq-Include-Trybots: luci.v8.try:v8_win_rel_ng,v8_win_dbg_ng
Change-Id: I8066e04d713ba357e816ebaef04ef45518723d35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759235
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81675}
2022-07-12 22:49:08 +00:00
Adam Klein
2d4b4ed392 [test262] Mark ArrayBuffer/prototype/transfer/from-resizable-to-larger as failing on windows/ia32
Bug: v8:13066
Change-Id: I01fe9b665a47a8780c820c32c74513b2361ece34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759229
Auto-Submit: Adam Klein <adamk@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@{#81674}
2022-07-12 21:35:38 +00:00
Jose Dapena Paz
0e7d5763ab [profiler] Emit ETW events only on a trace session.
If a tracing session starts after a script load has happened, then it is
not emitted, so the source information is not visible in ETW. This is
because we keep track of the loads already emitted, and we try to launch
traces even when recording is not happening.

To prevent this problem, this CS keeps track of when recording is
happening. So, when it starts, it will emit all the already generated
code immediately. This will add some overhead on tracing session start
if system instrumentation is enabled, but this is better than not
having instrumentation for previous symbols.

There is still one problem: for each active isolate, it calls for
replaying the event recording in an asynchronous task. So, for any
JS task that is already running when tracing start, symbols will not
be available. This makes this change less useful as, for a batch task
or any long JS code that is already running when tracing start, we
will not get symbols yet. Only after the foreground task runner runs
the task to emit the ETW events we will get the symbols resolved in
the trace.

An specific approach was required for d8 interactive shell. As, when
showing prompt, it is not processing the task runner queue, and it
is only processed when the next script is launched, it first checks
if it needs to generate ETW symbols information before running the
script.

Bug: v8:12932
Change-Id: I8b056c69cee0350f921a01c87beb9f2d51e10583
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3705541
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81673}
2022-07-12 21:34:28 +00:00
Frank Tang
f593e43a0c [Temporal] Add since/until to PlainDate/PlainTime/PlainYearMonth
Change temporal::ToTemporalTime to use default argument value
Fix negative float division bug in BalanceTime

Also implement:
DifferenceTemporalPlainDate, DifferenceTemporalPlainYearMonth and DifferenceTemporalPlainTime

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplaindate
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplaintime
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplainyearmonth


Bug: v8:11544
Change-Id: Ic717c69f4e399bc0ed4aaaaff4578cb329223205
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3741000
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81672}
2022-07-12 19:18:28 +00:00
Shu-yu Guo
6387763c67 [rab/gsab] Implement ArrayBuffer.prototype.transfer
Bug: v8:11111
Change-Id: I5174d1ef9225d603850aa25e65484fe9ee06317a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3750323
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81671}
2022-07-12 19:16:58 +00:00
Matthias Liedtke
2935b22fe2 [wasm-gc] Add 'none' type for nullref
This adds a new type 'none' as part of the WASM GC MVP.
The type can only be used in combination with a nullable reference, e.g.
'ref.null none'.
A 'nullref' is implicitly convertible to any nullable reference type.

Bug: v8:7748
Change-Id: Ic5ab6cc27094b3c9103ce3584452daa34633612f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755136
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81670}
2022-07-12 17:54:58 +00:00
Andy Wingo
8eb07e4916 [stringrefs] Implement stringview_wtf8.slice
Bug: v8:12868
Change-Id: I93595dfc168b6e4702b67bdd7355a1f7c18caa46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757332
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81669}
2022-07-12 16:54:08 +00:00
Nikolaos Papaspyrou
d0a4c900ba heap: Fix bug in ReadOnlySpaceObjectIterator
ReadOnlySpaceObjectIterator did not iterate through objects, because of
a bug in the initialization of `cur_addr_` and `cur_end_`. This CL also
merges methods `Next` and `FromCurrentPage`.

Change-Id: Id56bff279216c7a5982d984d80b649bd0c915959
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758225
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81668}
2022-07-12 16:35:48 +00:00
Milad Fa
192d8c172a Fix target and endianness detection on PPC/s390
This patch fixes machine detection on nodejs where the build
pipeline may not use gn and as a result certain macros
will not get set.

More details can be found in this comment:
https://github.com/nodejs/node-v8/issues/223#issuecomment-1180505313

Change-Id: I0cbfc736b28bc130acbdc2cf2e27bbf687be463c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757944
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81667}
2022-07-12 15:14:19 +00:00
Andy Wingo
e8610ab883 [stringrefs] Implement stringview_wtf8.encode
Bug: v8:12868
Change-Id: I714fffec248114a7ff61479f122a7df538e8e8d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755140
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81666}
2022-07-12 15:07:58 +00:00
Shu-yu Guo
902759b8d7 [change-array-by-copy] Initialize elements in Array.prototype.toSpliced
The fast path of Array#toSpliced currently does not correctly initialize
the elements range in the copy's FixedArray elements that will hold the
inserted items. A GC can occur between the initial allocation of the
elements before the inserted items are copied into it, which will fail
heap verification.

This CL also refactors CSA's FillFixedArrayWithSmiZero method to support
only zeroing a portion of a FixedArray instead of the entire thing.

Bug: v8:13035
Change-Id: I1bdb77d3b27f682620b45caa5a9c10ea0072a6ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3750321
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81665}
2022-07-12 14:39:18 +00:00
Leszek Swirski
f1eb47dc54 [maglev] Add CreateFunctionContext support
Add a CreateFunctionContext implementation (which calls the same builtin
used by Sparkplug), and fix our deopt checkpoints to include the context
as a pseudo-register, so that Push/PopContext work with deopts.

Bug: v8:7700
Change-Id: Ia3efd105683f6922181b9f4c7db0bac6a3a5fcec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757683
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81664}
2022-07-12 12:52:57 +00:00
Andreas Haas
ff27a7969c [wasm] Push the instance only twice in the lazy-compile builtin
The wasm instance got pushed three times in the lazy-compile builtin:
1) as part of the parameters;
2) as a parameter for the runtime function;
3) to load the jump table address after the runtime function;

The third push can be avoided by loading the jump table address after
all parameters get loaded from the stack again.

R=clemensb@chromium.org

Bug: v8:13049, v8:12926
Change-Id: I6117cfbbabc6250bf40732b6921c0e629fd85fa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755138
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81663}
2022-07-12 10:35:07 +00:00
Clemens Backes
efd5442b62 [wasm] Exit early on section ordering problems
If we detect out-of-order sections, we should not enter the individual
decoding functions, because they might make assumptions that are not
true in the error case.
In this case, a DCHECK was firing if we call {DecodeFunctionSection}
twice.

R=ahaas@chromium.org

Bug: chromium:1342274
Change-Id: I3d9d8c8c604aeeb92b9766f07d4b5464f4c8d72c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755112
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81662}
2022-07-12 09:15:17 +00:00
Danylo Boiko
df98f6f4e1 [turboshaft][turbolizer] Changed type of blocks Ids in JSON output
Bug: v8:12783
Change-Id: I718ba43c63d8010f9a512e6bd47ea58fbb4970ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756142
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81661}
2022-07-12 09:07:59 +00:00
Patrick Thier
1895e44d83 [string] Ensure ThinString's don't have a forwarding index
With the flag --always-use-forwarding-table we could end up turning a
String into a ThinString that had a forwarding index set.
This could happen when a String with a forwarding index is externalized.

Bug: chromium:1337469
Change-Id: Iea05586f61e2b78d83d04d5d2e94c4dca2892c1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735164
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81660}
2022-07-12 08:57:31 +00:00
ishell@chromium.org
7671274dc1 [baseline] Temporarily disable concurrent sparkplug
... in order to prepare for smoother rollout via the finch flag.

Bug: v8:12054, chromium:1343515
Change-Id: I24f51b73daa35c8de6967e8eb088dd3bee95fc4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755120
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81659}
2022-07-12 08:34:21 +00:00
Marja Hölttä
7f11bf4e90 [error messages] Enhance the "unexpected identifier" error message
Bug: chromium:1338838
Change-Id: I1b8c54b460d272b19a4faa180a491e725bee4b79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726147
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81658}
2022-07-12 06:44:27 +00:00
Marja Hölttä
d385d4116b [rab/gsab] Tests for Array.p methods, part 9
In this part: splice, flat, flatMap

Bug: v8:11111
Change-Id: Ide06c1137c6b4def70d09d479cfbedfb2d7c8450
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755106
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81657}
2022-07-12 06:40:19 +00:00
Richard Wang
1e1cdca1f4 Update reclient version, allow mac to checkout reclient, add mac builder
Mac builder added per https://chromium-review.googlesource.com/c/v8/v8/+/3755921/comments/dc378d70_002b4107

Bump the re-client version to match the same one chromium is currently using: https://source.chromium.org/chromium/chromium/src/+/main:DEPS;l=265;drc=11428e8ebaf6a78020d442da479b5b0daa0dffb5

The older version of re-client 0.40.0.40ff5a5 will not work when attempting to use it in a recipe targeting mac

The version bump has been tested successfully with V8 Official Linux64 (reclient) dd361303d1/+/build.proto and V8 Linux64 - builder (reclient) 758cd57ad9/+/build.proto

Bug: b:238283947
Change-Id: I88e306f930c030173813b591e63a363da2d47cf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3752430
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Richard Wang <richardwa@google.com>
Cr-Commit-Position: refs/heads/main@{#81656}
2022-07-12 06:03:53 +00:00
v8-ci-autoroll-builder
c3e0ad47b1 Update V8 DEPS (trusted-origins)
Rolling v8/build: 0b8f9f6..ad70f68

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I962a4a1199600207f3fbb6c7403acda9f0a8f340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755216
Bot-Commit: 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/main@{#81655}
2022-07-12 04:47:30 +00:00
v8-ci-autoroll-builder
59b05cb50a Update V8 DEPS (trusted-versions)
Rolling v8/buildtools/linux64: git_revision:03ce92df5f9875bd9929b564be4b612713569aa9..git_revision:9ef321772ecc161937db69acb346397e0ccc484d

Rolling v8/third_party/depot_tools: 1601b3e..d22bf60

Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220710.3.1..version:8.20220711.1.1

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I0c21f66a912363189a438b6f764c46c4b306cb14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755215
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81654}
2022-07-12 03:45:23 +00:00
Luis Fernando Pardo Sixtos
6217722303 Remove CreateSharedArray declaration
Removing dead code.

Change-Id: Ib477003cddb02441304efcb0400d511d235d07e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756381
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Luis Fernando Pardo Sixtos <lpardosixtos@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#81653}
2022-07-12 01:39:23 +00:00