Commit Graph

74205 Commits

Author SHA1 Message Date
Pan, Tao
4fbe840818 [cleanup] Unify getting native context of JSFunction object
There are two kinds of method to get native context of JSFunction
object, directly calling to native_context() and calling
context().native_context(). Replace all context().native_context()
with native_context().

Change-Id: Ia7a7e64648446002717d38fafecd2420f622325e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3541468
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Tao Pan <tao.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#79663}
2022-03-30 02:36:11 +00:00
Shu-yu Guo
21cfbf047e [rab/gsab] Support RAB/GSABs in context snapshot
Bug: v8:11111, v8:12731, v8:12742
Change-Id: I2679c0e64faca25a2c16e15fd3a5c727eb941c92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3551894
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79662}
2022-03-29 22:37:49 +00:00
Shu-yu Guo
b8b9013541 [infra] Band-aid presubmit for new cpplint.py messages
Bug: v8:12743
Change-Id: I4a36c0b794759d47eb9436714dfd2417fc45dcd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3558327
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79661}
2022-03-29 22:33:19 +00:00
Michael Achenbach
2637f50227 [CQ] Experiment to speed up the debug builder
No-Try: true
Bug: v8:11428
Change-Id: Ib5ccee00f1e010f94a9d504478553dd47a2998a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557252
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79660}
2022-03-29 18:17:39 +00:00
Adam Klein
7cc6e6a4e0 Skip failing mjsunit/regress/regress-crbug-1307310 in stress_snapshot
Bug: v8:12742
Change-Id: If96908f8585a5789c09d98bb8ca06f9a9fb6fc7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3558310
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79659}
2022-03-29 17:21:30 +00:00
Leszek Swirski
4edaa94835 [maglev] Fix RootConstant<Undefined> and Call order
The "undefined" node has to be in the CFG graph before the "Call" node.

Bug: v8:7700
Change-Id: I137cde1d884e87e72fd4d6a22d5105168c8fb6cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557331
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79658}
2022-03-29 17:15:19 +00:00
Milad Fa
f859193aed PPC/s390: [deoptimizer] Remove non-fixed-size deopts
Port 0a110021d2

Original Commit Message:

    All architectures have kSupportsFixedDeoptExitSizes = true, so we can
    remove kSupportsFixedDeoptExitSizes entirely and always have fixed-size
    deopts.

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

Change-Id: If33d936ea59e6add15b835793637fc50f28d07fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557254
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79657}
2022-03-29 16:26:59 +00:00
Leszek Swirski
ba70eaec3d [maglev] Pass complete bitfield to Node constructors
Change the NodeBase bitfield to be initialised by NodeBase::Allocate,
and threaded through Node constructors as a complete bitfield instead of
the input_count.

This means that we can centralise changes to the bitfield, as well as
the setting of the opcode.

Bug: v8:7700
Change-Id: I848369339f3e43ba85d435c14d525d63907181e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555773
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79656}
2022-03-29 15:49:30 +00:00
Toon Verwaest
ecc3c6367f [maglev] CompactInterpreterFrameState fixes
Bug: v8:7700
Change-Id: I1efa298a25bf15c104a57db3ec7cc4d7e36861eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553102
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79655}
2022-03-29 13:59:48 +00:00
Leszek Swirski
0a110021d2 [deoptimizer] Remove non-fixed-size deopts
All architectures have kSupportsFixedDeoptExitSizes = true, so we can
remove kSupportsFixedDeoptExitSizes entirely and always have fixed-size
deopts.

Change-Id: Ib696f6d2431f60677cc7fa2193ee27b9b0f80bc8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550268
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79654}
2022-03-29 12:54:58 +00:00
Victor Gomes
0bfd4cc1d7 [maglev] Build Call IR nodes
Bug: v8:7700
Change-Id: I60b47808360430ecfde528cf6429fcc24e84fc31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555766
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79653}
2022-03-29 12:16:28 +00:00
Camillo Bruni
54bb4b2e3f [tools][system-analyzer] Cleaner tooltips
- Always show the navigation buttons
- Format code with fixed-width font
- Limit the property-table height for more compact tooltips

Bug: v8:10644
Change-Id: I0a0f30056455371bad12b2c679d184948c5b52de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555772
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79652}
2022-03-29 11:43:08 +00:00
Al Muthanna Athamina
95a85701fd Allow V8 to run all unittests presubmit
Search for all files with testing naming convention and run that on v8_presubmit.
Also modify all PRESUBMIT files in the tools directory to include any test file
with the appropriate naming convention.

Bug: chromium:1306474
Change-Id: I61c1b7c71badbbc3b99705289588aa8280824d66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532266
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79651}
2022-03-29 11:14:09 +00:00
Camillo Bruni
58836f7327 [api] Add warning comment about changing FatalProcessOutOfMemory
The signature of FatalProcessOutOfMemory is used extracting V8 specific
crash information from chrome minidumps.

Change-Id: I625a9ca1f1628c6ddd34cf794cc4205b012ef23e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532267
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79650}
2022-03-29 11:03:41 +00:00
Leszek Swirski
4fd61de7c1 [maglev] Fix over application return stack cleanup
Under over-application (passing more arguments into a function than its
formal parameter count), we need to use the passed argc to clean up the
stack, rather than the formal parameter count. Fix Maglev's Return node
code to do the appropriate check and dynamic sized return.

Bug: v8:7700
Change-Id: I36037d29e14323b336974d4b75b75f5702ce8a28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555767
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79649}
2022-03-29 10:39:28 +00:00
jameslahm
9641ce6438 [compiler] Optimize String#includes
This CL adds the reduction for String#includes
and merges the reduction of String#indexOf and
String#includes in JSCallReducer.

This CL does two things:
- Add StringIndexOfIncludesVariant to distinguish
String#indexOf and String#includes.
- Add ReduceStringPrototypeIndexOfIncludes to reduce
for String#indexOf and String#includes.

Bug: v8:12732
Change-Id: Ied75485cf1511956e97ef986fc34a711aae3d1ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3552279
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79648}
2022-03-29 10:24:08 +00:00
Thibaud Michaud
1e948174dc [wasm][liftoff] Fix stack move width for full pointers
R=jkummerow@chromium.org

Bug: chromium:1307946
Change-Id: I5827f6ce3e854b440c027f8f4862f5a43b088e01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553111
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79647}
2022-03-29 09:47:38 +00:00
Marja Hölttä
8c94b7ec7b [rab/gsab] Fix the rab gsab TA initial map
Bug: v8:11111,chromium:1307310
Change-Id: I41175d759e71d2016880eae1cd42e420ee9cc229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3540262
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79646}
2022-03-29 07:31:41 +00:00
Arthur Eubanks
133acba828 Remove set but otherwise unused variables
Recent Clang versions have enhanced -Wunused-but-set-variable which now
warns about these.

Bug: chromium:1309955
Change-Id: Id99e3eee60bf2c789e15251f65a192a6bf51f252
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3554603
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79645}
2022-03-29 06:39:17 +00:00
Adam Klein
7e28b58cd7 Revert "Enable PAC and BTI for runtime generated code."
This reverts commit c482a66bd7.

Reason for revert: causes crashes in ChromeOS/MSAN builds:
https://crbug.com/1310642

Original change's description:
> Enable PAC and BTI for runtime generated code.
>
> This patch enables PAC and BTI for runtime generated code when PAC
> is enabled. Additional BTI landing pads will resolve to NOOP when
> running on non BTI device and will not cause functional problems.
>
> Change-Id: I3993481df2c3c47e3e81bfb76a8c355f642cd572
> Bug: chromium:919548, v8:10026
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548457
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Andre Kempe <andre.kempe@arm.com>
> Cr-Commit-Position: refs/heads/main@{#79630}

Bug: chromium:919548, v8:10026, chromium:1310642
Change-Id: I564efa5327ae038a7b5fb69b416300afebe2cd74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3556706
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79644}
2022-03-29 00:06:37 +00:00
legendecas
f4eb545e9a [ShadowRealm] Remove unused pending_exception
Fix GCC compilation complaints.

Bug: v8:11989
Change-Id: I547e61342be090cc31825d8fe49463a79a39495f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553789
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79643}
2022-03-28 23:44:17 +00:00
Junliang Yan
11052db34f ppc64: [baseline] implement JumpIf functions
Change-Id: Idd2c979db120be1e35260786a3f9534d950294b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555538
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79642}
2022-03-28 20:57:06 +00:00
Junliang Yan
23ee49ada0 ppc64: [baseline] implement Tail/CallBuiltin
Change-Id: Ife52b4279aa17e73316a77c5b4ef6f03bef763b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3555886
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79641}
2022-03-28 15:58:55 +00:00
henrika
ede0a4abee Ensures that Builtin events are sent to JIT-code event handlers
Generates callbacks for already existent code by using the
kJitCodeEventEnumExisting option instead of kJitCodeEventDefault.

When working on V8 system instrumentation on Windows, it was found in
https://bugs.chromium.org/p/v8/issues/detail?id=11043#c41 that several
parts of the JS stack was missing.

One missing part is all calls to Builtin methods
(example: Builtin:JSEntryTrampoline) and this change ensures that
events with name "Builtin" are also included in the generated JIT code
events.

Bug: v8:11043
Change-Id: Iaa99e18d799266a7224f848130c4eaf36e8c77fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550590
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79640}
2022-03-28 14:15:25 +00:00
Milad Fa
7c6ce251e6 AIX: Update code alignment to 64-bytes
Code alignment was updated to 64-bytes on ppc:
https://crrev.com/c/3528993

This change is required to maintain the same alignment on AIX.

Change-Id: I8cc33c9abad1ceeac050fde30700d315ef549d7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3552087
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79639}
2022-03-28 12:42:06 +00:00
Dominik Inführ
a847182056 [heap] Initialize pages with placement-new
Define ctors for BasicMemoryChunk, ReadOnlyPage, MemoryChunk, Page and
LargePage. We can use those with placement-new to initialize pages. We
now initialize chunks at once either for ReadOnlyPage, Page or
LargePage. Previously initialization happened in multiple locations
starting with BasicMemoryChunk::Initialize.

Adding ctors to these classes should improve debugging, since debug
info for classes without ctors was removed with the compiler flag
`-fuse-ctor-homing`.

Change-Id: Ib842bb9b1e93a6576cad8299b7c5dbfe299baa33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545092
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79638}
2022-03-28 09:18:55 +00:00
jameslahm
bd7f4823c1 [error] Improve GetExport error message
According to https://tc39.es/ecma262/#sec-InnerModuleLinking
step 10 and https://tc39.es/ecma262/#sec-source-text-module-record-initialize-environment
step 8-25, variables must be declared in Link. And according
to https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-get-p-receiver,
accessing the exported variable with the hole value should
throw uninitialized error.

Bug: v8:12729
Change-Id: I6fd2fcc580f7bafca986448b37adb8ba8f077929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3552281
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79637}
2022-03-28 09:03:45 +00:00
Danylo Boiko
959dd7d58d [turbolizer] Shortcuts for bidirectional phase switching.
Bidirectional phase switching by shortcuts "n", "b".
Improved selection of nodes when they are splitting or raising to a common ancestor.
Fixed minor inconsistencies in some variable names with the project style.
Added name and email to the AUTHORS file for first-time contribution.

Change-Id: I0c903dbf81c3d1d75503004ce412a81aace06a61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3537008
Reviewed-by: 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@{#79636}
2022-03-28 08:13:32 +00:00
Frank Tang
8b663818fc [Temporal] Add Temporal.Calendar.prototype.year
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.year

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

Bug: v8:11544
Change-Id: Ifadcdb4efe00a9954d5ac4c1154420c4903f28d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3531553
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79635}
2022-03-26 23:18:06 +00:00
Frank Tang
cdafded496 [Temporal] Add Calendar.prototype.daysInYear
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.daysinyear

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

Bug: v8:11544
Change-Id: I627fcf82641659c4697395057ee664a37f237228
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3531557
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79634}
2022-03-26 22:16:54 +00:00
Frank Tang
c232d789c7 [Temporal] Add Duration.prototype.(abs|negated)
Also add AO: CreateNegatedTemporalDuration

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.abs
https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.negated
https://tc39.es/proposal-temporal/#sec-temporal-createnegatedtemporalduration

Bug: v8:11544
Change-Id: Ie522a7446f40c946c30f2e90c5f6c7fbc96c41eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380101
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79633}
2022-03-26 22:15:14 +00:00
jameslahm
89ed081c17 [runtime] Add async-stack-trace support for Promise.allSettled
... with zero cost.

Bug: v8:9357
Change-Id: I66985c3fd3e7b4efa354eb564c641562cf55ab49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518909
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79632}
2022-03-26 12:04:24 +00:00
Tobias Tebbi
cfa4581e69 Revert "[maglev] Remove input_count from Node constructors"
This reverts commit 2ee36e4cf5.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/20570/overview

Original change's description:
> [maglev] Remove input_count from Node constructors
>
> Change the NodeBase bitfield to be out-of-line, and initialised by
> NodeBase::Allocate. This means that we don't have to thread the
> input_count through the Derived constructor just to pass it back into
> the NodeBase constructor, and so we can remove those arguments (plus the
> opcode ones while we're at it).
>
> Bug: v8:7700
> Change-Id: I0c96db8cdd05ef106b3cfeb31c5e0d4770d13cc9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553103
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79627}

Bug: v8:7700
Change-Id: Ice38908e85f2980dbbe66c61fab17326b3d0be41
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553005
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79631}
2022-03-25 17:26:24 +00:00
André Kempe
c482a66bd7 Enable PAC and BTI for runtime generated code.
This patch enables PAC and BTI for runtime generated code when PAC
is enabled. Additional BTI landing pads will resolve to NOOP when
running on non BTI device and will not cause functional problems.

Change-Id: I3993481df2c3c47e3e81bfb76a8c355f642cd572
Bug: chromium:919548, v8:10026
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548457
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Andre Kempe <andre.kempe@arm.com>
Cr-Commit-Position: refs/heads/main@{#79630}
2022-03-25 16:28:53 +00:00
Tobias Tebbi
e71ce3093d Revert "[heap] Only start incremental marking when V8 is not in GC VM state."
This reverts commit f124b28d46.

Reason for revert: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8818719400214419665/+/u/Check_-_stress_concurrent_allocation__flakes_/flush-baseline-code

Original change's description:
> [heap] Only start incremental marking when V8 is not in GC VM state.
>
> Bug: v8:12503
> Change-Id: Icda291d9770c46c7fee3c70dd4df97f320b1956a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398113
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79623}

Bug: v8:12503
Change-Id: I067b308cfc4511d89144d2bb65a1dba24db62179
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553104
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79629}
2022-03-25 16:07:53 +00:00
legendecas
0a0ad98a5a [ShadowRealm] WrappedFunction properties
Implement WrappedFunction properties name/length.

Bug: v8:11989
Change-Id: I050af5814537552ef6c2077802ffc726f2e08fa3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507201
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#79628}
2022-03-25 16:00:33 +00:00
Leszek Swirski
2ee36e4cf5 [maglev] Remove input_count from Node constructors
Change the NodeBase bitfield to be out-of-line, and initialised by
NodeBase::Allocate. This means that we don't have to thread the
input_count through the Derived constructor just to pass it back into
the NodeBase constructor, and so we can remove those arguments (plus the
opcode ones while we're at it).

Bug: v8:7700
Change-Id: I0c96db8cdd05ef106b3cfeb31c5e0d4770d13cc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553103
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79627}
2022-03-25 15:47:24 +00:00
Tobias Tebbi
1d96641ff7 Revert "Reland "Reland "[baseline] Enable concurrent sparkplug"""
This reverts commit 6819f75daf.

Reason for revert: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8818719400214419665/+/u/Check_-_minor_mc/loop-unrolling

Original change's description:
> Reland "Reland "[baseline] Enable concurrent sparkplug""
>
> This reverts commit 5d6a16fb64.
>
> Reason for revert: it was a flake
>
> Original change's description:
> > Revert "Reland "[baseline] Enable concurrent sparkplug""
> >
> > This reverts commit fee91f9afa.
> >
> > Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/44699/overview
> >
> > Original change's description:
> > > Reland "[baseline] Enable concurrent sparkplug"
> > >
> > > Issue that cause the revert was fixed: v8:12713
> > > https://bugs.chromium.org/p/v8/issues/detail?id=12713
> > >
> > > This is a reland of commit f01a609814
> > >
> > > Original change's description:
> > > > [baseline] Enable concurrent sparkplug
> > > >
> > > > Bug: v8:12054
> > > > Change-Id: I1b0ee1a9541a75412b882b259e421aa6e88317da
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259658
> > > > Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> > > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > > > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > > > Cr-Commit-Position: refs/heads/main@{#79485}
> > >
> > > Bug: v8:12054
> > > Change-Id: Iafba22e3fa3b38eddb226db6cd5afdb7e3e6b435
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528992
> > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > > Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#79618}
> >
> > Bug: v8:12054
> > Change-Id: I3ba60433fdbb5617900c83d022e4dd6f830695f9
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550271
> > Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Owners-Override: Tobias Tebbi <tebbi@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@{#79619}
>
> Bug: v8:12054
> Change-Id: Ia0fe1df00f5e715ceda46fbcdc48aed0f0190362
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550272
> Owners-Override: Tobias Tebbi <tebbi@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79622}

Bug: v8:12054
Change-Id: I5e75f0467d5617bb6e81d7d0031f298c09194685
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553107
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@google.com>
Owners-Override: Tobias Tebbi <tebbi@google.com>
Cr-Commit-Position: refs/heads/main@{#79626}
2022-03-25 15:16:54 +00:00
Igor Sheludko
a2cae2180a [runtime] Fix handling of interceptors, pt.2
Stores to undeclared global in strict mode should throw ReferenceError.

Bug: chromium:1309225
Change-Id: Iac7c55da2ff9c16e488b4fc66408c5300469873e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553099
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79625}
2022-03-25 13:34:31 +00:00
Michael Achenbach
b086206161 Reland "[tools] Clean up py2 code"
This is a reland of commit 1289704aae

Mac-arm64 problem fixed by:
https://crrev.com/c/3550199

Original change's description:
> [tools] Clean up py2 code
>
> Bug: chromium:1292013
> Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79507}

Bug: chromium:1292013
Change-Id: Iadf0ccf94c82012088b76a866296c8e008dff02f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550274
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79624}
2022-03-25 12:14:26 +00:00
Hannes Payer
f124b28d46 [heap] Only start incremental marking when V8 is not in GC VM state.
Bug: v8:12503
Change-Id: Icda291d9770c46c7fee3c70dd4df97f320b1956a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398113
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79623}
2022-03-25 11:53:23 +00:00
Tobias Tebbi
6819f75daf Reland "Reland "[baseline] Enable concurrent sparkplug""
This reverts commit 5d6a16fb64.

Reason for revert: it was a flake

Original change's description:
> Revert "Reland "[baseline] Enable concurrent sparkplug""
>
> This reverts commit fee91f9afa.
>
> Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/44699/overview
>
> Original change's description:
> > Reland "[baseline] Enable concurrent sparkplug"
> >
> > Issue that cause the revert was fixed: v8:12713
> > https://bugs.chromium.org/p/v8/issues/detail?id=12713
> >
> > This is a reland of commit f01a609814
> >
> > Original change's description:
> > > [baseline] Enable concurrent sparkplug
> > >
> > > Bug: v8:12054
> > > Change-Id: I1b0ee1a9541a75412b882b259e421aa6e88317da
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259658
> > > Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#79485}
> >
> > Bug: v8:12054
> > Change-Id: Iafba22e3fa3b38eddb226db6cd5afdb7e3e6b435
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528992
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#79618}
>
> Bug: v8:12054
> Change-Id: I3ba60433fdbb5617900c83d022e4dd6f830695f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550271
> Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Owners-Override: Tobias Tebbi <tebbi@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@{#79619}

Bug: v8:12054
Change-Id: Ia0fe1df00f5e715ceda46fbcdc48aed0f0190362
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550272
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79622}
2022-03-25 11:32:43 +00:00
jameslahm
c05be62fa2 [compiler] Optimize String.prototype.startsWith
We could optimize String#startsWith in JSCallReducer for
three conditions:
- If search_element is definitely not a string, we make no change.
- If search_element is definitely a string and its length is less
or equal than max inline matching sequence threshold, we could
inline the entire matching sequence.
- Else we try to inline, and have a runtime deopt if search_element
is not a string.

Bug: v8:8400
Change-Id: I505090b91d35fbc2c91cdf985717c68135cba807
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517936
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79621}
2022-03-25 11:01:05 +00:00
Anton Bikineev
be85909666 cppgc: young-gen: Fix MSVC build
Bug: chromium:1029379
Change-Id: Ia1de91ab0ffc63912ce26349d095881a7a141ff8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550269
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79620}
2022-03-25 10:49:46 +00:00
Tobias Tebbi
5d6a16fb64 Revert "Reland "[baseline] Enable concurrent sparkplug""
This reverts commit fee91f9afa.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/44699/overview

Original change's description:
> Reland "[baseline] Enable concurrent sparkplug"
>
> Issue that cause the revert was fixed: v8:12713
> https://bugs.chromium.org/p/v8/issues/detail?id=12713
>
> This is a reland of commit f01a609814
>
> Original change's description:
> > [baseline] Enable concurrent sparkplug
> >
> > Bug: v8:12054
> > Change-Id: I1b0ee1a9541a75412b882b259e421aa6e88317da
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259658
> > Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#79485}
>
> Bug: v8:12054
> Change-Id: Iafba22e3fa3b38eddb226db6cd5afdb7e3e6b435
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528992
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79618}

Bug: v8:12054
Change-Id: I3ba60433fdbb5617900c83d022e4dd6f830695f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550271
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@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@{#79619}
2022-03-25 10:45:13 +00:00
Victor Gomes
fee91f9afa Reland "[baseline] Enable concurrent sparkplug"
Issue that cause the revert was fixed: v8:12713
https://bugs.chromium.org/p/v8/issues/detail?id=12713

This is a reland of commit f01a609814

Original change's description:
> [baseline] Enable concurrent sparkplug
>
> Bug: v8:12054
> Change-Id: I1b0ee1a9541a75412b882b259e421aa6e88317da
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259658
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79485}

Bug: v8:12054
Change-Id: Iafba22e3fa3b38eddb226db6cd5afdb7e3e6b435
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528992
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79618}
2022-03-25 09:54:13 +00:00
Lu Yahan
8bfffd6a61 [riscv64] Use macros to control the compilation of RVV
Change-Id: Iac021f8666058042f5c26cf07d0f3810a1d451fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528374
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#79617}
2022-03-25 09:00:44 +00:00
Darshan Sen
ee29e41953 [compiler] Prevent extra copies of RpoNumber
This fixes the following compiler warning:

```
src/compiler/backend/mid-tier-register-allocator.cc:2046:26: warning: loop variable 'succ' of type 'const
      v8::internal::compiler::RpoNumber' creates a copy from type 'const v8::internal::compiler::RpoNumber'
      [-Wrange-loop-analysis]
    for (const RpoNumber succ : block->successors()) {
                         ^
src/compiler/backend/mid-tier-register-allocator.cc:2046:10: note: use reference type 'const
      v8::internal::compiler::RpoNumber &' to prevent copying
    for (const RpoNumber succ : block->successors()) {
         ^~~~~~~~~~~~~~~~~~~~~~
                         &
```

Signed-off-by: Darshan Sen <raisinten@gmail.com>
Change-Id: I41a9b6aa1ee16bf140f326410ae864b425509c2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538285
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79616}
2022-03-25 08:41:34 +00:00
Andrey Kosyakov
567fc46265 Convert inspector_protocol/roll.py to python3
Bug: v8:1306483
Change-Id: I2f1baf1374e82418c117f9126db2388b84ef46ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3530110
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79615}
2022-03-24 18:07:17 +00:00
Marja Hölttä
c6b68cbfbd [super IC] Turn off super ICs
They make assumptions which don't hold for API handlers.

Bug: v8:9237,chromium:1308360
Change-Id: I9f122c4e75a24d83ef3653cbf7a223ed522e4d13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3548899
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79614}
2022-03-24 17:59:52 +00:00