Commit Graph

77050 Commits

Author SHA1 Message Date
Frank Tang
8d8fbee12f [test262] Roll test262
e41d581c6d..adba7dfd9c

Bug: v8:7834
Change-Id: I1150ce8da79c452b9bbf662d9486a79a64148509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824881
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82408}
2022-08-11 23:50:48 +00:00
Shu-yu Guo
58e8a8d2a2 Revert "[turboshaft] Print operator properties as custom data for turbolizer"
This reverts commit 6e0251f9e2.

Reason for revert: On suspicion of breaking node integration
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20node.js%20integration%20ng/21832/overview

Original change's description:
> [turboshaft] Print operator properties as custom data for turbolizer
>
> Bug: v8:12783
> Change-Id: Ie5812217b3e858d94174087fc492887b00dd2e9a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820581
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82401}

Bug: v8:12783
Change-Id: I3812a358c45e8e848ec1fb622a19d12f7aa6411b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827664
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>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82407}
2022-08-11 21:51:17 +00:00
Frank Tang
6033866bd4 Revert "[Temporal] Mark fixed tests"
This reverts commit d9f589730f.

Reason for revert: Break UBSAN

Original change's description:
> [Temporal] Mark fixed tests
>
> Bug: v8:11544
> Change-Id: Iefd64619e6361683e70fdac26d155aa8d27da9e5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824751
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82405}

Bug: v8:11544
Change-Id: I5501bf416345a69508a07f4bbe70bb300f49c296
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827663
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82406}
2022-08-11 21:10:17 +00:00
Frank Tang
d9f589730f [Temporal] Mark fixed tests
Bug: v8:11544
Change-Id: Iefd64619e6361683e70fdac26d155aa8d27da9e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824751
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82405}
2022-08-11 19:13:15 +00:00
Frank Tang
c54ba26acc [Temporal] Use the BigInt version of BalanceDuration
in AdjustRoundedDurationDays

Bug: v8:11544
Change-Id: I5067aba802b5051312afdd38b0f9c71bfdc14c2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825617
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82404}
2022-08-11 19:12:12 +00:00
Frank Tang
ca43e2d0f8 [Temporal] Remove unnecessary code
Remove the unnecessary int64_t version of RoundNumberToIncrement
and remove the unneeded RoundHalfAwayFromZero. Change the type of the
increment to double from int64_t.
split from cl/3750098

Bug: v8:11544
Change-Id: I591486c472e9c1343306ff9a1d0384d06fe01835
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824194
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82403}
2022-08-11 17:48:47 +00:00
Frank Tang
eb6dfc67fa [Temporal] Fix Calendar dateAdd
Sync to spec to allow BalanceDuration to throw.
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.dateadd

PR change:
https://github.com/tc39/proposal-temporal/pull/2094

split from cl/3750098

Bug: v8:11544
Change-Id: I5a73dede2335bcf3f3e61a0ce789555671e5dda5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824662
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82402}
2022-08-11 17:46:08 +00:00
Nico Hartmann
6e0251f9e2 [turboshaft] Print operator properties as custom data for turbolizer
Bug: v8:12783
Change-Id: Ie5812217b3e858d94174087fc492887b00dd2e9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820581
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82401}
2022-08-11 15:07:57 +00:00
Jakob Kummerow
e441e21260 [stringrefs] Switch GC prefix decoding to LEB
So far, we decoded instructions with the 0xFB prefix as two-byte, i.e.
a single "u8" byte following the prefix.
This patch changes that to 0xFB + LEB, which is how all prefixed
instructions are supposed to do it. Currently this makes a difference
only for the stringref proposal (instructions 0x80 through 0xb3).

It has the unfortunate consequence that all stringref instructions need
three bytes for now. We expect them to go back to a two-byte encoding
scheme (while remaining LEB compliant) when their final encoding is
decided.

Bug: v8:12868
Change-Id: I603f60adae88e9b985cb65288d9eeb7f98da8138
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825887
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82400}
2022-08-11 14:07:13 +00:00
Milad Fa
93150467c0 PPC/s390: [heap] Add shared barrier to RecordWrite builtin
Port c5d4812196

Original Commit Message:

    This CL adds the shared barrier to the RecordWrite builtin which is
    used in generated code for builtins, interpreted and optimized code.

    The out-of-line part of the barrier now checks whether either the
    POINTERS_TO_HERE_ARE_INTERESTING or the IN_SHARED_HEAP bit is set in
    the value object's page flags.

    Outside of marking the RecordWrite builtin now needs to check whether
    to insert into the generational or shared remembered set. Inserting
    into the shared remembered set will always call into C++ code.

    During marking the RecordWrite builtin now also needs to check whether
    this store created an old-to-shared pointer.

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

Change-Id: I850fc234fa34868c6320fc64c6dac7e2f24af1c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825891
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82399}
2022-08-11 13:41:37 +00:00
Clemens Backes
e44c745d0f Reland "[base] Add new API to protect data memory"
This is a reland of commit 9d36b2dd0d.
The test case is fixed to actually protect a part of the data section
instead of the stack (which was unintended and could lead to segfaults).

Original change's description:
> [base] Add new API to protect data memory
>
> This adds a new {base::OS::SetDataReadOnly} method, which is similar to
> {SetPermissions(kRead)}, but using another system call on Windows such
> that it works on pages in the data segment.
> {VirtualAlloc} will fail if called on a page of the data section,
> whereas {VirtualProtect} succeeds. For the general {SetPermissions}
> API we still want to use {VirtualAlloc} though, as it also changes the "committed" state of the pages.
>
> Note that we do not add a platform API for this, as the memory was
> never allocated through the platform. We just directly protect it in
> V8.
>
> R=mlippautz@chromium.org
>
> Bug: v8:12887
> Change-Id: If83bf6e5c500cc5cf08c76d04dfac5e2b4d35a2d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820482
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82349}

Bug: v8:12887
Change-Id: Ib7c24b43b53d568dafb4a56cf8db7479c784e8d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825889
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82398}
2022-08-11 13:06:07 +00:00
Jakob Linke
21af424ebc [tiering] Fix the OSR condition
The buggy version was introduced in crrev.com/c/3629149. Currently we
only use this OSR mechanic for a Turbofan target tier.

Bug: v8:7700,chromium:1352010
Change-Id: I5e6d5803c489360a6fa5cca6cca1966dd4bb5c48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825890
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82397}
2022-08-11 12:51:37 +00:00
Omer Katz
361e24bc1b [heap] Revise memento check
Explicitly check that the memento is not in the unallocated portion of
the current LAB.

Bug: v8:12612
Change-Id: Ie060f44187d2280e72e2eebb0f3c284e2d6c7446
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824337
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82396}
2022-08-11 12:34:37 +00:00
Victor Gomes
a137ba548c [maglev] Assign any location after assigning registers
Two inputs might alias the same node. If one input is assigned
any location before the second input is assigned a register, we
might have two inputs in the node in different locations.

Assigning any location later forces the inputs to point to the
same location (either a register or a stack slot).

Bug: v8:7700
Change-Id: I53e35e5d5afa7e82e2a62a9b0c551b609079c79b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825886
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82395}
2022-08-11 11:33:37 +00:00
Andreas Haas
c9f698be77 [wasm] Update spec tests
R=thibaudm@chromium.org

Bug: v8:12926
Change-Id: I10a48d2f43cd6b9eac2690a62654bdf25bd3b889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825884
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82394}
2022-08-11 11:16:17 +00:00
ishell@chromium.org
1e25804536 [ext-code-space] Remove Code <-> CodeT roundtrips in deoptimizer
Bug: v8:11880
Change-Id: Ic2dcf5f540fdd1c6c138d9535033b57d22afb1b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825885
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82393}
2022-08-11 10:55:58 +00:00
Victor Gomes
bd0c7cb643 [maglev] Support generators
Bug: v8:7700
Change-Id: Ia6036bbd8f75c825ed79a7c0e16552897da015aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822864
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82392}
2022-08-11 10:42:47 +00:00
ishell@chromium.org
b02b4001fe [ext-code-space] Remove more Code <-> CodeT roundtrips
... in compiler and other components.

Bug: v8:11880
Change-Id: I3a51c33499e7c7169f171c4be0600d7822dafc27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825883
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82391}
2022-08-11 10:20:32 +00:00
Jakob Kummerow
89567f1cf7 [test][wasm] Add regression test for crbug-1320614
Bug: chromium:1320614
Change-Id: I3cd76a105c0cd5e7d0cf089dc60cb79b07863243
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825882
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82390}
2022-08-11 10:07:19 +00:00
Omer Katz
1b2f325878 [heap] Fix allocation site updating with MinorMC
Updates when moving a whole page were done only on new to new moves.
For MinorMC we need to update on new to old moves.

Bug: v8:12612
Change-Id: Icf7b98a005ec2f9ee3863ffa15ebe44fdfc64289
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824338
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82389}
2022-08-11 10:06:06 +00:00
Lu Yahan
41cc719643 [riscv32] fix wasm-spec-test/i64.js
Change-Id: Ib6982c7f9509cfcb24fcdcd4726caab5a642faa0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824663
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82388}
2022-08-11 10:05:02 +00:00
Simon Zünd
aa101ca18f [debug] Fix scope for class member initializer
This CL removes the bailout when trying to collect the scope info
for the class member initializer function. While this might not have
worked previously, now we only need to tweak the scope search
slightly to fix this. Class member initializer functions never
have their own context but instead us the class context. That means
that most of the logic in debug-scopes.cc doesn't really matter and we
only need to initialize the ScopeIterator properly with the class
context and the member initializer JSFunction.

Note that this still does not fully fix bug 1350842. That is because
we still run into a DCHECk when paused at a `new class { ... }`
statement. We'll fix that in a separate CL.

R=bmeurer@chromium.org

Bug: chromium:1350842
Change-Id: Id128b10676a5aa8a77309735e755e485f2c14446
Fixed: chromium:1246889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825881
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82387}
2022-08-11 09:49:02 +00:00
Jakob Kummerow
606e7022b8 Harden Isolate::InstallConditionalFeatures
This function should properly forward any exceptions it encounters,
instead of silently swallowing them. Being an API function, that
means moving them from "pending" to "scheduled" state.

Fixed: v8:13123
Change-Id: I20b0782fd806e456f14dda84100000c857481d09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825880
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82386}
2022-08-11 09:36:02 +00:00
Dominik Inführ
c1955197c1 [heap] Use AdvanceOnAllocation() in ReportExternalMemoryPressure()
Heap::ReportExternalMemoryPressure() uses a slightly different
behavior for incremental marking steps than AdvanceFromTask() or
AdvanceOnAllocation(). This CL switches this method to use
AdvanceOnAllocation().

Bug: v8:12775
Change-Id: If9bb2c2cf3048196286e4b1443129025fbfdf984
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825780
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82385}
2022-08-11 08:52:43 +00:00
Victor Gomes
fe55a47642 [maglev] Support generic GetIterator
Bug: v8:7700
Change-Id: I9f22a94ca5edfc733045dbf8b00738807b876f45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3823132
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82384}
2022-08-11 08:47:33 +00:00
Jakob Linke
8b4272c2ca [compiler] Merge all CompileFoo_Bar runtime functions
There's no need to decode the tiering state in generated code - merge
these runtime functions and decode in the new generic CompileOptimized
runtime function instead.

CompileMaglev_Synchronized
CompileMaglev_Concurrent
CompileTurbofan_Synchronized
CompileTurbofan_Concurrent

->

CompileOptimized

Bug: v8:7700
Change-Id: I36f3964bb5bb72b35f65f454c3ad3db0656c14bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825877
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82383}
2022-08-11 08:38:52 +00:00
Liviu Rau
99beb35bd7 [infra] Run mb validate with python3
Bug: v8:13148
Change-Id: Ia1e3b37012297c6e1e4a7647e913b54669600a37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824343
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#82382}
2022-08-11 07:46:02 +00:00
Darius M
de04959f17 [compiler] Remove delayed string constants
StringConstantXXX were introduced when we switched to concurrent
compilation, as a way to build strings in Turbofan in a background
thread, without having to actually allocate them on the main heap
from the background. See https://crrev.com/c/1221807.

Now that we have local heaps, we can actually allocate strings from
the background, making StringConstantXXX useless.

Moreover, we would fold constant string concatenations into
ConsString, which sounds a bit dubious for performance. Now, small
constant string concatenations will be folded into SeqStrings, while
larger ones will remain ConsString, just to avoid the quadratic
worst-case.

Change-Id: I0479d16aa5691c9d774187c4cc0d03ff4fe2b4f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3811291
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82381}
2022-08-11 07:41:53 +00:00
Feng Yu
aff4d490ce [test] Migrate cctest/test-web-snapshots to unittests/
Bug: v8:12781
Change-Id: I2077523dad94bfcc5696e8bc05df496c7f3aa419
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813072
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82380}
2022-08-11 07:02:42 +00:00
jameslahm
a784ec8ae7 Reland "[maglev] Support LdaModuleVariable and StaModuleVariable"
This is a reland of commit 532ca59910

Fix interger overflow when result_location is invalid in
MaglevCompiler::InReturnValues.

Original change's description:
> [maglev] Support LdaModuleVariable and StaModuleVariable
>
> Bug: v8:7700
> Change-Id: I036ac71324e0c1c96a4da4aacdb5a6718726db31
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3821203
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: 王澳 <wangao.james@bytedance.com>
> Cr-Commit-Position: refs/heads/main@{#82347}

Bug: v8:7700
Change-Id: I24f56691eefd1c6cb695fedd3b5c14264bb17943
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824942
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82379}
2022-08-11 06:57:23 +00:00
Jakob Linke
4be7742f56 [compiler] Extend Maglev tiering tracing
Add tracing for ML compilation begin and end events.

Drive-by: Slight refactors of related tracing functions for other tiers.

Bug: v8:7700
Change-Id: I8d7633c63642fc6d4418c71d87955cf3bcf1d496
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825779
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82378}
2022-08-11 06:55:42 +00:00
Simon Zünd
dc84c235a1 [debug] Simplify debug scope search
The CL https://crrev.com/c/3807594 changed the scope retrieval search
to a DFS over the scope tree. This makes it no longer necessary to
special case for the `DefaultBaseConstructor` scope so we can delete
that code.

A separate follow-up will prune the DFS slightly but not as much as
we tried to initially.

R=kimanh@chromium.org

Bug: chromium:1348186
Change-Id: Ia54bd5e301aaeb195953b1384077cd30b6b6ef59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825777
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82377}
2022-08-11 06:50:53 +00:00
Jakob Linke
c927137d78 [maglev] Abort compilation when deps fail to install
.. and allow recompilation attempts in the future. This roughly matches
Turbofan behavior, which also aborts and may later recompile.

Deps can fail e.g. when the heap state changes concurrently during the
compilation process.

Bug: v8:7700
Change-Id: I517adcca7ec5a7dff14b7ca7dba766e74564bd01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825778
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82376}
2022-08-11 06:48:28 +00:00
Dominik Inführ
c5d4812196 [heap] Add shared barrier to RecordWrite builtin
This CL adds the shared barrier to the RecordWrite builtin which is
used in generated code for builtins, interpreted and optimized code.

The out-of-line part of the barrier now checks whether either the
POINTERS_TO_HERE_ARE_INTERESTING or the IN_SHARED_HEAP bit is set in
the value object's page flags.

Outside of marking the RecordWrite builtin now needs to check whether
to insert into the generational or shared remembered set. Inserting
into the shared remembered set will always call into C++ code.

During marking the RecordWrite builtin now also needs to check whether
this store created an old-to-shared pointer.

Bug: v8:11708
Change-Id: Iaca4c3c0650aece4326936d7d63754a23cd0a028
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779679
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82375}
2022-08-11 06:39:42 +00:00
jiepan
e9c1884e81 [turbofan][x64] Use leaq for Int64Mul if possiable
Change-Id: Ic81be39ed0666c708f9129bef1e75268afc7faf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807123
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#82374}
2022-08-11 06:36:12 +00:00
Jakob Linke
68c158ab20 [compiler] Refactor Finalize* signatures
.. to match behavior. According to the old signatures, the functions
returned bool (they actually returned CompilationJob::Status). This only
worked because return values are unused. Change to void return type
instead.

Drive-by: Code reuse in FinalizeMaglevCompilationJob.

Bug: v8:7700
Change-Id: I45f75121c230063dec96a5197cc9fdc3b64aae6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822683
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82373}
2022-08-11 06:23:25 +00:00
Simon Zünd
bd5e4b215c Add regression test to check Runtime.getProperties for native functions
We have a bug report from 2018 that no longer reproduces on ToT.
This CL adds a regression bug regardless to make sure we don't
re-introduce the bug that got fixed as a side-effect.

R=kimanh@chromium.org

Fixed: chromium:1246896
Change-Id: I8f9fdcbf7051b23e03cbbfc572771a410f70ad37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822668
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82372}
2022-08-11 06:22:22 +00:00
Liviu Rau
9aa28daafe [test] Refactor testrunner (5)
- Unify old Pool interface with the new context related interface
 - Add single threaded execution pool
 - Defer task killing back to OS context
 - Defer process listing in indicators back to OS context

Bug: v8:12785
Cq-Include-Trybots: luci.v8.try:v8_numfuzz_dbg_ng,v8_numfuzz_ng,v8_numfuzz_tsan_ng,v8_android_arm64_n5x_rel_ng
Change-Id: I8ffe01c5d567411203f69ecc451c718ff35d81c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3781347
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#82371}
2022-08-11 05:55:52 +00:00
v8-ci-autoroll-builder
4e5757e72b Update V8 DEPS (trusted-origins)
Rolling v8/build: 93068bf..9497cae

Rolling v8/buildtools: b11e87a..11459ac

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

Change-Id: I2650d015cf87ae06e8e985fa9ddc603daa90c5c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824286
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@{#82370}
2022-08-11 04:54:32 +00:00
v8-ci-autoroll-builder
0b0067f8b4 Update V8 DEPS (trusted-versions)
Rolling v8/buildtools/linux64: git_revision:3d773bba0927e67eae8fdaee5e28b0f6203d3bee..git_revision:c8c63300ac8ecb66d8126af5407257209ae59044

Rolling v8/buildtools/third_party/libc++/trunk: fe1bc75..4d0f32e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/743fa6c..47666e0

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220809.0.1..version:9.20220810.1.1

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

Change-Id: I2673b770c93fdc18431dddf7614b041f3ba90963
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824284
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@{#82369}
2022-08-11 03:55:12 +00:00
Shu-yu Guo
b6d4d9be9c Reland^2 "[shared-struct] Add Atomics.Condition"
This is a reland of commit b1020a4345

Changes since revert:
- Fixed global safepoint interrupts in
https://chromium-review.googlesource.com/c/v8/v8/+/3820913

Original change's description:
> Reland "[shared-struct] Add Atomics.Condition"
>
> This is a reland of commit e2066ff6bf
>
> Changes since revert:
> - Rebased against c991852491, which
>   uses the external pointer table for the WaiterQueueNode stored
>   in the state field when compressing pointers. This relaxes
>   the alignment requirement of the state field to be 4-bytes when
>   compressing pointers.
> - Moved the state field into the JSSynchronizationPrimitive base
>   class, since alignment and padding can now be made simpler.
>
> Original change's description:
> > [shared-struct] Add Atomics.Condition
> >
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Reviewed-by: Adam Klein <adamk@chromium.org>
>
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763787
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>

Bug: v8:12547
Change-Id: Ibc6de74c7853e4ea766ff2c70f92339ba69f2675
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820901
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82368}
2022-08-11 00:12:22 +00:00
Frank Tang
267889f6c2 [Temporal] Fix bug in ScanCalendarDateTimeTimeRequired
Split from cl/3822342
Should advance the length of the TimeZone

Spec Text:
https://tc39.es/proposal-temporal/#prod-CalendarDateTimeTimeRequired

Bug: v8:11544
Change-Id: Ic16a16ac41c29cb04136030b2f2c8b78022f8241
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824879
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82367}
2022-08-10 23:44:12 +00:00
Shu-yu Guo
2e87bf5ac8 [heap] Set interrupt when requesting global safepoints
Bug: v8:11708
Change-Id: Iac70ab6701e691b2975856be69892daadd814f70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820913
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82366}
2022-08-10 23:17:24 +00:00
Omer Katz
7a2612691c [heap] Revise page iterations
mark-compact.cc: Iterate over all new space pages.
heap-layout-tracer.cc: Iterate over the paged new space.

Bug: v8:12612
Change-Id: I4d8dfc48632908a80793a77c211020452c675ecf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3823134
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82365}
2022-08-10 22:43:22 +00:00
Shu-yu Guo
0dc6e03727 [compiler] Park main thread while awaiting compile tasks
Currently a deadlock can result on heap teardown during the shared heap
verification which performs a global safepoint. The heap teardown awaits
compile tasks, while the compile helper thread is waiting on a
global safepoint.

Bug: v8:11708
Change-Id: I8328a4b142cb9045bfaf592ac4f4dd259ba0d397
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820354
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82364}
2022-08-10 21:43:52 +00:00
Frank Tang
3f0c44148d [Temporal] Fix ToRelativeTemporalObject
Change to use Handle<Object> instead of Handle<String>
for calendar and offset_string.

Spec text:
https://tc39.es/proposal-temporal/#sec-temporal-torelativetemporalobject

Bug: v8:11544
Change-Id: Ia9051f176e0e91a362b0c6b9edf6fea5a53ddcf2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3808256
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82363}
2022-08-10 21:30:22 +00:00
Milad Fa
d4e3fa9a32 PPC/s390: [masm] Move tiering logic to macro-assembler
Port ca33c73e7c

Original Commit Message:

    .. since these functions will also be used by Maglev codegen.

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

Change-Id: Icccc06b76cd61902900b0deecbfe1fbe46202235
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822670
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#82362}
2022-08-10 20:47:21 +00:00
Camillo
e9bd3c64c1 Reland "[d8] Dump stack trace on d8 tests timeouts on posix systems"
This is a reland of commit 5592bad963

- Disable timeout signal handler with --fuzzing
- Properly initialize sigaction object

Original change's description:
> [d8] Dump stack trace on d8 tests timeouts on posix systems
>
> - Add a SIGTERM handler in d8 that dupms the stack trace
> - Send SIGTERM before SIGKILL in the test runner
>
> Bug: v8:13115
> Change-Id: I75285f33caabab61ff6ae83c1fbc6faf45cf595a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791906
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82173}

Bug: v8:13115
Change-Id: I115cc3f671ebe11ba204e75a6fc358ca3477e950
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820221
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82361}
2022-08-10 20:46:15 +00:00
Shu-yu Guo
b0929a9350 Revert "[base] Add new API to protect data memory"
This reverts commit 9d36b2dd0d.

Reason for revert: Win64 crashes
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20debug/43496/overview

Original change's description:
> [base] Add new API to protect data memory
>
> This adds a new {base::OS::SetDataReadOnly} method, which is similar to
> {SetPermissions(kRead)}, but using another system call on Windows such
> that it works on pages in the data segment.
> {VirtualAlloc} will fail if called on a page of the data section,
> whereas {VirtualProtect} succeeds. For the general {SetPermissions}
> API we still want to use {VirtualAlloc} though, as it also changes the "committed" state of the pages.
>
> Note that we do not add a platform API for this, as the memory was
> never allocated through the platform. We just directly protect it in
> V8.
>
> R=​mlippautz@chromium.org
>
> Bug: v8:12887
> Change-Id: If83bf6e5c500cc5cf08c76d04dfac5e2b4d35a2d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820482
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82349}

Bug: v8:12887
Change-Id: I86fffa60d6766dcdaf44f57f18266fec22eb9016
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824409
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>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82360}
2022-08-10 20:45:12 +00:00
Pierre Langlois
d380c9a6df [tools][system-analyzer] Add support for apkEmbeddedLibrary and targetRootFS
The system analyzer relies on server-side processing to symbolize C++
addresses, using lws-middleware.js:

    ws --stack system-analyzer/lws-middleware.js lws-static cors

This does not work on Android however, given the log file refers to the
stripped apk file rather than the unstripped libchrome.so binary. This
CL adds the --apk-embedded-library option to the middleware script to
make this work:

    ws --stack system-analyzer/lws-middleware.js lws-static cors  \
        --apk-embedded-library=/path/to/out/android/lib.unstripped/libchrome.so

Also, for completeness, add the --target option to set targetRootFS.

Bug: v8:10644
Change-Id: I7bb73adf49e3af8eaa88a5e2c81ec913023ac1a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3823133
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82359}
2022-08-10 17:03:56 +00:00