Commit Graph

74220 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
d93662373b Update V8 DEPS.
Rolling v8/build: 3444906..d162691

Rolling v8/buildtools: e1471b2..c2e4795

Rolling v8/buildtools/linux64: git_revision:bd99dbf98cbdefe18a4128189665c5761263bcfb..git_revision:859dde4a7f34a4383179522f8e1061dcffac8691

Rolling v8/buildtools/third_party/libc++abi/trunk: 93b8dcd..e9c9bdf

Rolling v8/buildtools/third_party/libunwind/trunk: d1c7f92..cb96c63

Rolling v8/third_party/android_platform: 87b4b48..2760db4

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/389f33b..a9d86a4

Rolling v8/third_party/depot_tools: 76979da..a9c548e

Rolling v8/third_party/googletest/src: b007c54..af29db7

Rolling v8/third_party/zlib: 923f5eb..d1aa7af

Rolling v8/tools/clang: a15c2df..c8e9f23

Rolling v8/tools/luci-go: git_revision:cb424e70e75136736a86359ef070aa96425fe7a3..git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72

Rolling v8/tools/luci-go: git_revision:cb424e70e75136736a86359ef070aa96425fe7a3..git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72

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

Change-Id: I87aab148bb29806e335fa4ad10e1112c1d799a5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3567924
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@{#79728}
2022-04-04 09:01:56 +00:00
Nikolaos Papaspyrou
173885cda8 test: Remove two obsolete regression tests
This CL removes two obsolete regression tests that were taking too
long on debug engine builds.

Bug: v8:12753
Bug: v8:12754
Change-Id: I818101725caa22fb4b2ed22381f01a2dd9436fe4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563563
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79727}
2022-04-04 08:36:06 +00:00
Michael Achenbach
dfe465d1ba [foozzie] Switch wrapper to Py3
No-Try: true
Bug: chromium:1288926
Change-Id: I05402b802f6d17dfea1211a682d3ed38f83e5aeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565722
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79726}
2022-04-04 08:30:06 +00:00
Michael Achenbach
bad67f8ac5 [tools] Switch remaining deps hooks to Python3
Bug: chromium:1298903
Change-Id: Idcde256ebfc7c3446e808ee6da5118de104ef4c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565719
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79725}
2022-04-04 08:24:17 +00:00
Michael Achenbach
9a720d3898 [tools] Use arch-specific clang-format on Mac
Bug: chromium:1312860
Change-Id: I3b30e1ffea640fa1fdfdd73fc1ac1cb38d68f616
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565718
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79724}
2022-04-04 08:12:42 +00:00
Leszek Swirski
68252f8ff9 [maglev] Rename/refactor eager & lazy deopts
Make LazyDeoptInfo and EagerDeoptInfo both store a
CheckpointedInterpreterState for the bytecode position and
register frame, and make codegen store pointers to these
deopt infos instead of the checkpoint.

This opens the door to using InputLocation for lazy deopts,
same as for eager ones.

Bug: v8:7700
Change-Id: I8ff3056ff72fd9f2288d41769979c5183c3d0972
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563561
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79723}
2022-04-04 07:11:02 +00:00
jameslahm
6693641e70 [runtime] Check AvailableOptimizedCode in DisassembleFunction
In DisassembleFunction runtime, function may have available
optimized code and we could directly set the optimized code
for the function like in CompileLazy if it's not compiled,
which avoids calling Compiler::Compile and failed in
DCHECK(!function->HasAvailableOptimizedCode()).

Bug: v8:12762
Change-Id: I00001fc598f3fc96dfe86b2367e8ba88f0085fd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563448
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79722}
2022-04-04 06:46:06 +00:00
Frank Tang
b214cb7d72 [Temporal] Add Calendar.prototype.daysInWeek
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinweek

Note- this is only the non-intl version. intl version in
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinweek
will be implemented in later cl.

Bug: v8:11544
Change-Id: If54733ae7c902b4d189fc22b0800942f8748981c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439186
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79721}
2022-04-02 01:50:20 +00:00
Frank Tang
63f9f0fab5 [Temporal] Add Calendar.prototype.daysInMonth
Spect Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinmonth

Note- this is only the non-intl version. intl version in
https://tc39.es/proposal-temporal/#sup-temporal.calendar.prototype.daysinmonth
will be implemented in later cl.

Bug: v8:11544
Change-Id: Id5d426d9c5fe1db94c15433afbad443c7056abe3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441703
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79720}
2022-04-01 22:22:30 +00:00
Anton Bikineev
e4ac08c514 cppgc: young-gen: Filter out SMIs when visiting traced nodes
Traced nodes can contain SMIs, e.g. when base::ScriptValue is
constructed. The CL filters them out when visiting V8->C++ references,
as otherwise it crashes later assuming HeapObject.

Bug: chromium:1029379
Change-Id: Idaafc92d4dc1bd14c7d1a07e2177202a8af336a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555769
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79719}
2022-04-01 22:14:50 +00:00
Milad Fa
e70ccb2f7f Disable P10 optimizations on IBMi
IBMi does not yet support prefixed instructions, p10 features need
to be disabled until OS support is available.

Change-Id: Idca7d6ebd791b06ef8f1f8419badd1a3db0f277f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3562980
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79718}
2022-04-01 20:00:30 +00:00
Frank Tang
4bbe174c88 [Temporal] Add ZonedDateTime.prototype.toPlain(MonthDay|YearMonth)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplainyearmonth
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplainmonthday

Bug: v8:11544
Change-Id: I5b109282187055df767239ff240822591f95c9a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565009
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79717}
2022-04-01 19:04:40 +00:00
Benoit Lize
da1a2d127d [builtins] Remap embedded builtins into the heap on ARM64 macOS
For short builtin calls, the builtins are copied on the heap when they
cannot be put close enough to be in range of relative calls. This costs
memory, as the embedded builtins are part of the binary, and mapped from
the binary, and as a consequence shared with all running processes.

Rather than copying the memory, we can remap it at a different address,
avoiding the memory cost. This CL does that, on ARM64 macOS only for
now.

This saves at least ~1.4MiB of memory per V8 process. See below the
output of vmmap <PID>:

[...]
Memory Tag 255             7408308000-740833c000   [  208K   144K   144K     0K] r-x/rwx SM=ZER
Memory Tag 255             740833c000-7408340000   [   16K     0K     0K     0K] ---/rwx SM=ZER
Memory Tag 255             7408344000-7408348000   [   16K     0K     0K     0K] ---/rwx SM=ZER
Memory Tag 255             7408348000-740837c000   [  208K   144K   144K     0K] r-x/rwx SM=ZER
Memory Tag 255             740837c000-740fe80000   [123.0M     0K     0K     0K] ---/rwx SM=ZER
mapped file                740fe80000-740ffe4000   [ 1424K  1328K     0K     0K] r-x/rwx SM=COW          ...pp/Contents/Frameworks/Chromium Framework.framework/Versions/102.0.4958.0/Chromium Framework
Memory Tag 255             740ffe4000-7410000000   [  112K     0K     0K     0K] ---/rwx SM=ZER

The "208K" regions are 256kiB code pages, minus the header and guard
pages, meaning that they are code chunks. The mapped file are the
remapped builtins, showing that they aren't copied, but remapped from
the binary.

Bug: chromium:1298417
Change-Id: Ia30a43e671726d01450a7db0ecb7777b34763053
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553006
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79716}
2022-04-01 17:55:21 +00:00
Dominik Inführ
5bc471f47f [heap] Support safepoint->AssertActive() for shared isolates
Lock mutex for shared isolate in global safepoints, such that e.g. the
StringTable can use isolate->heap()->safepoint()->AssertActive() even
for shared isolates.

Bug: v8:11708, v8:12749
Change-Id: I8d99203581dfa2d7225846e19fa981300f88589e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563138
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79715}
2022-04-01 17:05:41 +00:00
jameslahm
182a82832c Reland "[serialize] Fix serializing wasm backed ArrayBuffer"
Skipped test: https://crrev.com/c/3561199.
This is a reland of commit 6e2c9bb265

Original change's description:
> [serialize] copy bytes for non detachable array_buffer
> in WriteJSArrayBuffer when array_buffer is not in
> array_buffer_transfer_map_
>
> According to https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
> steps 13.3.2-4, should normally serialize array buffer which
> is not detachable.
>
> Bug: v8:12703
> Change-Id: I4554c5d07ae85e1a96a728ebba04c6a071575f6f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518910
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79466}

Bug: v8:12703
Change-Id: I1ad1b8159ac7b13011831a4590e8577e954db946
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557689
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79714}
2022-04-01 14:59:50 +00:00
Dominik Inführ
ca5055625f [heap] Remove sweeping_slot_set_ from MemoryChunk
Since the new space is always empty after a full GC, the old-to-new
remembered set is also always empty after a full GC. This means we can
get rid of the sweeping_slot_set_.

This slot set was used to allow the main thread to insert into the
old-to-new remembered set non-atomically. The sweeping slot set was
owned by the sweeper, which deletes slots in free memory from it. The
main thread would start with an empty old-to-new remembered set. After
sweeping both slot sets are merged again.

The sweeper now needs to behave differently during a GC. When sweeping
a page during full GC, the sweeper needs to delete old-to-new-slots in
free memory.

Outside of the GC the sweeper isn't allowed to remove from the
old-to-new slots anymore. This would race with the main thread that adds
slots to that remembered set while the sweeper is running. However,
there should be no recorded slots in free memory. DCHECKing this is
tricky though, because we would need to synchronize with the main
thread right-trimming objects and at least String::MakeThin only deletes
slots after the map release-store.

Bug: v8:12760
Change-Id: Ic0301851a714e894c3040595f456ab93b5875c81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560638
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79713}
2022-04-01 14:21:40 +00:00
Manos Koukoutos
c3ed607d63 [wasm-gc] Implement runtime-type canonicalization
Add an array of canonical rtts on the isolate. Each wasm instance
copies its rtts from there, based on the type index -> canonical index
mapping in the module.

Bug: v8:7748
Change-Id: I0958686c51ecab15a3215a0da3bee1ad6d543cb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548821
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79712}
2022-04-01 13:49:01 +00:00
Thibaud Michaud
d36f596e8a [sim] Increase the simulator's stack limit margin
The current safety margin between the JS stack limit and the actual
boundary of the stack space reserved by the simulator can be overrun by
a large frame.
Raise this margin to 4KiB, corresponding to the "large frame" threshold.
This ensures that the stack check is executed before the frame is
allocated if the frame is larger than this margin.

R=clemensb@chromium.org

Bug: chromium:1308333
Change-Id: I3e1a51bb36c630c7e37e58679971392dada2a83e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560435
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79711}
2022-04-01 12:01:14 +00:00
Dominik Inführ
c3ee94d848 [heap] Initialize invalidated_slots_[OLD_TO_SHARED]
While this field isn't used, inititialize it to null.

Bug: v8:11708
Change-Id: I9698e73183f49ef54b8978383e1406e5cf765c75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3562982
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79710}
2022-04-01 11:24:01 +00:00
Yuly Novikov
ca2a787a0b Fix build with Windows 10 20348 SDK
Bug: chromium:1292528
Change-Id: If4da2ec92afb7b4fe9942778eca385344b9b6409
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563539
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79709}
2022-04-01 11:20:41 +00:00
Liviu Rau
08efa27a0a Add new owner to branch cut artifact
Change-Id: I34cc92cf75e242db5a0873635989c097afd245bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564563
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79708}
2022-04-01 10:50:51 +00:00
Igor Sheludko
c4e66b89b4 [runtime] Fix handling of interceptors, pt.3
... in JSObject::DefineOwnPropertyIgnoreAttributes().
Don't execute interceptor again if it declined to handle the operation.

Bug: chromium:1311641
Change-Id: If61ed40665ff7d81e96fa6bf29bbb5dfbeadfcc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3562979
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79707}
2022-04-01 10:36:01 +00:00
Liu Yu
28f5698277 [loong64][mips][runtime] ClobberDoubleRegisters rewritten
Port daa3ce759f

Bug: v8:11798
Change-Id: I693b98309b62bd1cb9c7d0d1cac1b28189085d5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523580
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79706}
2022-04-01 10:22:50 +00:00
Marja Hölttä
3fd463c6f9 [rab / gsab] Fix .maxByteLength for wasm memory buffers
Bug: v8:11111,v8:12746,chromium:1307480
Change-Id: I7775776ae98c3727b435aca4f269400ff8e31c53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560440
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79705}
2022-04-01 08:12:41 +00:00
v8-ci-autoroll-builder
2d1611d92b Update ICU
Rolling v8/third_party/icu: 493fb32..5fb4338

Remove deprecated android related targets (Mohamed Heikal)
https://chromium.googlesource.com/chromium/deps/icu/+/5fb4338

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

Change-Id: I256b8496be046011fe8e612f7e4d839795d7a3dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565165
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@{#79704}
2022-04-01 05:48:39 +00:00
Frank Tang
b295ec2dc5 [test262] Roll test262
f7fb969..4c7c246

Bug: v8:7834
Change-Id: Ic1ea873e635a761dd4cd36a9dde20d481055425e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561904
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79703}
2022-04-01 01:20:59 +00:00
Adam Klein
32f285533e Revert "[osr] Basic support for concurrent OSR"
This reverts commit 3ce690eef2.

Reason for revert: failures on CrOS MSan build: https://crbug.com/1312188

Original change's description:
> [osr] Basic support for concurrent OSR
>
> This CL adds basic support behind --concurrent-osr,
> disabled by default.
>
> When enabled:
> 1) the first OSR request starts a concurrent OSR compile job.
> 2) on completion, the code object is inserted into the OSR cache.
> 3) the next OSR request picks up the cached code (assuming the request
>    came from the same JumpLoop bytecode).
>
> We add a new osr optimization marker on the feedback vector to
> track whether an OSR compile is currently in progress.
>
> One fundamental issue remains: step 3) above is not guaranteed to
> hit the same JumpLoop, and a mismatch means the OSR'd code cannot
> be installed. This will be addressed in a followup by targeting
> specific bytecode offsets for the install request.
>
> This change is based on fanchen.kong@intel.com's earlier
> change crrev.com/c/3369361, thank you!
>
> Bug: v8:12161
> Change-Id: Ib162906dd4b6ba056f62870aea2990f1369df235
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548820
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79685}

Bug: v8:12161, chromium:1312188
Change-Id: Iac1e3fd67ecc658a1cdee8f4d13354c097ed6697
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564983
Auto-Submit: Adam Klein <adamk@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79702}
2022-04-01 00:13:40 +00:00
Adam Klein
ef83c9e85d Revert "Address comments from [osr] Basic support for concurrent OSR"
This reverts commit dc9b48e406.

Reason for revert: https://crbug.com/1312188

Original change's description:
> Address comments from `[osr] Basic support for concurrent OSR`
>
> - Unhandlify OSROptimizedCodeCache::GetOptimizedCode.
> - Unstatic-fy FeedbackVector::SetOptimizedCode.
> - Remove frame-walking logic during the OSR tierup decision.
>
> Bug: v8:12161
> Change-Id: I4fa8c972cb50d369b17898ba57e1909c86e933df
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560478
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79686}

Bug: v8:12161, chromium:1312188
Change-Id: Ia64c4204f9f65f19aa858c61f32658cee310033e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564990
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@{#79701}
2022-04-01 00:11:19 +00:00
Adam Klein
b591fccb2a Revert "Refactor OSROptimizedCodeCache"
This reverts commit d368dcf4ae.

Reason for revert: https://crbug.com/1312188

Original change's description:
> Refactor OSROptimizedCodeCache
>
> Tweak a few names, remove a few GetIsolate calls, other minor
> usability refactors.
>
> It may be worth taking a closer look at the impl in the future,
> currently the design choices don't seem ideal (see the added TODO
> on top of the class).
>
> Bug: v8:12161
> Change-Id: Ib34e372aa58a30c68c9c5cdd0d1da0ec3e86717c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560447
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79687}

Bug: v8:12161, chromium:1312188
Change-Id: Ieb3a91682845a23536fdfdf3208af74b3c6585f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564989
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@{#79700}
2022-04-01 00:09:10 +00:00
Frank Tang
05a58f2687 [Temporal] Add Calendar.prototype.inLeapYear
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.inleapyear

Note- this is only the non-intl version. intl version in
https://tc39.es/proposal-temporal/#sup-temporal.calendar.prototype.inleapyear
will be implemented in later cl.


Bug: v8:11544
Change-Id: I0f30d45ed6d742acaeaa2f7ddf5b393ef7fa5437
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3531561
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79699}
2022-03-31 23:57:53 +00:00
Frank Tang
3f3a427f48 [Temporal] Add Calendar.prototype.dayOfWeek
Also add AO: ToISODayOfWeek
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dayofweek
https://tc39.es/proposal-temporal/#sec-temporal-toisodayofweek

Note- this is only the non-intl version. intl version in
https://tc39.es/proposal-temporal/#sup-temporal.calendar.prototype.dayofweek
will be implemented in later cl.


Bug: v8:11544
Change-Id: I0b3448209741e4aa56cd8170a331d837853bff17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3531564
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79698}
2022-03-31 23:56:49 +00:00
Shu-yu Guo
db44515379 Only run Set/Map grow failure tests on x64 release bots
These tests are too slow to be generally run.

Bug: v8:12741
Change-Id: I142a81a90558942a61b8582756b9227e6d8d634e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3558558
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79697}
2022-03-31 18:35:59 +00:00
Milad Fa
f4a2eda7b4 PPC/s390: [write-barrier] Add debug check for cleared weak refs in write barrier
Port dbff2a67b9

R=dmercadier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I6b34e6cd502012474c619bbcb1e473ee4f7472db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564278
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79696}
2022-03-31 17:50:49 +00:00
jameslahm
1b999119b7 [compiler] Fix inducing variable in LoopVariableOptimizer
In JSCallReducer::ReduceArrayPrototypeShift, when disable
FLAG_turbo_loop_variable, typer cannot infer loop phi variable
is in [1, kMaxCopyElements-1], and will break in representing
kRepFloat64 (Range(1, inf)) to kRepWord64 when converting
input for kLoadElement. So we need to add type guard for loop
variable. And we need to use loop phi variable when using
NumberLessThan to check terminate and updating phi loop variable,
otherwise which will break inducing variables in LoopVariableOptimizer.

Bug: v8:12632, chromium:1308241, chromium:1308029, chromium:1308087
Change-Id: I9f96e696f1103f39e633890b17b87bfb28b1dbc4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3546577
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79695}
2022-03-31 16:51:39 +00:00
Joyee Cheung
cf5ce194b2 [ic] name Set/Define/Store property operations more consistently pt.2
As a follow-up of
https://chromium-review.googlesource.com/c/v8/v8/+/3481475,
this renames a few more operations related to property stores to keep
them consistent and adds comments to explain about what they do.

Summary of the renamed identifiers:

- SetPropertyInLiteral -> CreateDataProperty: this implements
  [[CreateDataProperty]] in the spec which does [[DefineOwnProperty]]
  instead of [[Set]], so rename for clarity.
- IsStoreIC(), IsStoreICKind() -> IsSetNamedIC(), IsSetNamedICKind():
  these only check whether the feedback kind is kSetNamedSloppy or
  kSetNamedStrict, so the scope can be narrowed.
- StoreMode::kOrdinary -> StoreMode::kSet: this implements [[Set]]
  in the spec and is used by both KeyedStoreIC and
  StoreIC to set the properties when there is no feedback.
- StoreMode::kInLiteral -> StoreMode::kDefineKeyedOwnInLiteral:
  this implements [[CreateDataProperty]] while expecting the receiver
  to be a JSObject created by us (the `InLiteral` part). Prepend
  `DefineKeyedOwn` to it so that it's more aligned with other
  StoreModes - it should be possible to just merge this into the
  more generic StoreMode::kDefineKeyedOwn later.
- KeyedStoreGenericAssembler::SetProperty ->
  KeyedStoreGenericAssembler::StoreProperty: these helpers are used by
  both define and set operations, distinguished with the StoreMode,
  so rename it to the more generic StoreProperty.

Bug: v8:12548
Change-Id: Iccef673c1dc707bbdbf010f02f7db1e9ec32b3e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557690
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#79694}
2022-03-31 16:45:39 +00:00
Hans Wennborg
8ba70dfea5 Remove set but otherwise unused variable
Recent Clang versions have enhanced -Wunused-but-set-variable which now
warns about this.

Bug: chromium:1309955
Change-Id: If5c1ce77bdcdb1e04eed4ae9e10ee1d7f2e8658d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563139
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79693}
2022-03-31 16:37:14 +00:00
Manos Koukoutos
cfa8d0b35a Reland "[wasm-gc] Implement isorecursive canonicalization"
This is a reland of commit e76ad5c6d9

Changes compared to original:
- Move invocation of LAZY_INSTANCE_INITIALIZER to a static global
  variable, as some builds were failing with a function-level static.
- Drive-by: Improve documentation a bit.

Original change's description:
> [wasm-gc] Implement isorecursive canonicalization
>
> This implements isorecursive canonicalization for static types.
>
> Not implemented in this CL:
> - Runtime type canonicalization.
> - Cross-module signature canonicalization for purposes of call_indirect.
>
> Bug: v8:7748
> Change-Id: I6214f947444eea8d7b15a29b35c94c3d07ddb525
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3541925
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79665}

Bug: v8:7748
Change-Id: I493fba1906491762f7d8bae50108e3e4a743391d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560480
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79692}
2022-03-31 15:45:49 +00:00
Al Muthanna Athamina
54469edfb2 Re-enabling some migrated test files
Bug: chromium:1306474
Change-Id: Id01949dc413ca5af5132827001fbe380f8477368
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557250
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79691}
2022-03-31 14:44:19 +00:00
Leszek Swirski
b48e2ac6d8 [maglev] Add a mixin class for lazy deopt
Bug: v8:7700
Change-Id: Ib2ea6be1e9a69c724e526287e05de0e65029b672
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560441
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79690}
2022-03-31 13:41:41 +00:00
Stephen Roettger
a8beac553b Deprecate some signature checks
Deprecate signature checks in
* Template::SetNativeDataProperty
* ObjectTemplate::SetAccessor
These are not used in Chrome and require some complicated check in the IC code, which we want to remove.

Change-Id: I413fafc8658e922fd590e7fe200600a624f019a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557253
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Stephen Röttger <sroettger@google.com>
Cr-Commit-Position: refs/heads/main@{#79689}
2022-03-31 12:11:21 +00:00
Leszek Swirski
0df9606dca [maglev] Add lazy deopts
Nodes can now hold a LazyDeoptSafepoint which stores the frame state in
case they trigger a lazy deopt. OpProperties have a new CanLazyDeopt
bit, and codegen emits a safepoint table entry + lazy deopt for all
nodes with this bit. Also, we now check the deoptimized code bit on
entry into the maglev compiled function.

An example use of these lazy deopts is added as a PropertyCell fast path
for LdaGlobal, which adds a code dependency on the property cell.

Bug: v8:7700
Change-Id: I663db38dfa7325d38fc6d5f079d263a958074e36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557251
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79688}
2022-03-31 11:48:40 +00:00
Jakob Gruber
d368dcf4ae Refactor OSROptimizedCodeCache
Tweak a few names, remove a few GetIsolate calls, other minor
usability refactors.

It may be worth taking a closer look at the impl in the future,
currently the design choices don't seem ideal (see the added TODO
on top of the class).

Bug: v8:12161
Change-Id: Ib34e372aa58a30c68c9c5cdd0d1da0ec3e86717c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560447
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79687}
2022-03-31 10:11:00 +00:00
Jakob Gruber
dc9b48e406 Address comments from [osr] Basic support for concurrent OSR
- Unhandlify OSROptimizedCodeCache::GetOptimizedCode.
- Unstatic-fy FeedbackVector::SetOptimizedCode.
- Remove frame-walking logic during the OSR tierup decision.

Bug: v8:12161
Change-Id: I4fa8c972cb50d369b17898ba57e1909c86e933df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560478
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79686}
2022-03-31 10:01:50 +00:00
Jakob Gruber
3ce690eef2 [osr] Basic support for concurrent OSR
This CL adds basic support behind --concurrent-osr,
disabled by default.

When enabled:
1) the first OSR request starts a concurrent OSR compile job.
2) on completion, the code object is inserted into the OSR cache.
3) the next OSR request picks up the cached code (assuming the request
   came from the same JumpLoop bytecode).

We add a new osr optimization marker on the feedback vector to
track whether an OSR compile is currently in progress.

One fundamental issue remains: step 3) above is not guaranteed to
hit the same JumpLoop, and a mismatch means the OSR'd code cannot
be installed. This will be addressed in a followup by targeting
specific bytecode offsets for the install request.

This change is based on fanchen.kong@intel.com's earlier
change crrev.com/c/3369361, thank you!

Bug: v8:12161
Change-Id: Ib162906dd4b6ba056f62870aea2990f1369df235
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548820
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79685}
2022-03-31 09:58:40 +00:00
Darius M
dbff2a67b9 [write-barrier] Add debug check for cleared weak refs in write barrier
Change-Id: I7f0d040b6e27ef5d24818c5c79aad9aa4b56ed2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560050
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79684}
2022-03-31 07:26:10 +00:00
v8-ci-autoroll-builder
4dc4852f96 Update ICU
Rolling v8/third_party/icu: a9359a8..493fb32

Add eu, gl to CrOS ICU (mlcui)
https://chromium.googlesource.com/chromium/deps/icu/+/493fb32

Cleanup more -Wunused-but-set-variable warnings (Gulfem Savrun Yeniceri)
https://chromium.googlesource.com/chromium/deps/icu/+/a84f25c

Cleanup -Wunused-but-set-variable in warnings (Gulfem Savrun Yeniceri)
https://chromium.googlesource.com/chromium/deps/icu/+/5aab8af

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

Change-Id: I65361315616dd9df84eb90cb747f73b417852c9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3562383
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@{#79683}
2022-03-31 05:49:21 +00:00
Frank Tang
803d1d3961 [Temporal] Add Calendar.prototype.monthsInYear
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.monthsinyear

Note- this is only the non-intl version. intl version in
https://tc39.es/proposal-temporal/#sup-temporal.calendar.prototype.monthsinyear
will be implemented in later cl.


Bug: v8:11544
Change-Id: Ibf7a9f1e64ce638f745df2649ee3a69dc9e08139
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3531559
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79682}
2022-03-31 00:18:23 +00:00
Frank Tang
eb9a19a0a1 [Temporal] Add Calendar.prototype.dayOfYear
Also add AO: ToISODayOfYear
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dayofyear
https://tc39.es/proposal-temporal/#sec-temporal-toisodayofyear

Note- this is only the non-intl version. intl version in
https://tc39.es/proposal-temporal/#sup-temporal.calendar.prototype.dayofyear
will be implemented in later cl.



Bug: v8:11544
Change-Id: I5e5f9ea93cc0577df8d9b228efe5c3a97d118b88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3531566
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79681}
2022-03-30 22:16:50 +00:00
Adam Klein
ac4c2afc7f Skip mjsunit/shared-memory/shared-struct-atomics-workers under stress_snapshot
Bug: v8:12749
Change-Id: I33d0313625c38f9634ffba5ed358c1782811ddde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561184
Commit-Queue: Adam Klein <adamk@chromium.org>
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@{#79680}
2022-03-30 17:35:20 +00:00
Victor Gomes
932c5b7a1a [maglev] Fix updating accumulator in ForEachValue
Bug: v8:7700
Change-Id: I43ef07414326ee656b36e17aa739ae0015c88d57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560640
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79679}
2022-03-30 15:27:50 +00:00