Commit Graph

73888 Commits

Author SHA1 Message Date
Frank Tang
afe71f3936 [Temporal] Add Temporal.PlainDate.from
Bug: v8:11544
Change-Id: I781119561db5ec05b12b9bca31c98403355e35ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3378882
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79396}
2022-03-08 06:17:34 +00:00
v8-ci-autoroll-builder
e7b7a3df00 Update V8 DEPS.
Rolling v8/build: cd24f73..eaff38e

Rolling v8/tools/clang: 1f05f8e..548c235

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

Change-Id: I004a6e8b76baee2d38a93b8843ea9625d6c6a9ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3508461
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@{#79395}
2022-03-08 04:07:29 +00:00
Michael Lippautz
1e9f077576 heap,api: Deprecate resurrecting finalizers
Resurrecting finalizers cause all sorts of problems, from performance
penalties when used to hard-to-debug memory leaks.

There's no more usage left in Blink as well as V8 internally, so
deprecate resurrecting finalizers.

Bug: v8:12672
Change-Id: I998373d6468bbd3bd581a41dec8904de80561f43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507991
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79394}
2022-03-07 20:43:02 +00:00
Frank Tang
e043b44d48 [test262] Roll test262
e87b0048c4..f7fb969c

Bug: v8:7834
Change-Id: I9581eed719044edc433d022f58cce0506c083594
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504183
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79393}
2022-03-07 20:37:32 +00:00
Frank Tang
11cd961474 [intl] NumberFormat v3 bug fix
Fix typo which cause morePrecision output for lessPrecision

Bug: v8:10776
Change-Id: I164abbdfa30ae1c4064a75abdd04fdbb1118dc0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3501835
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79392}
2022-03-07 20:35:22 +00:00
Frank Tang
67a78c40be [intl] NumberFormat v3 bug fix typo
Fix typo which should check y match -∞ but checked -0

Bug: v8:10776
Change-Id: I6bddbf91dbee2411d47a5e3b8ccbc456a0602bf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504646
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79391}
2022-03-07 20:30:12 +00:00
Junliang Yan
5807fdfa69 ppc64: [baseline] setup ScratchRegisterScope
Change-Id: I4a1e9ebc1a8c2efd1cdc46079519bd62fd90dc8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507200
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79390}
2022-03-07 18:56:42 +00:00
Leszek Swirski
426233a118 [counter] Add use counts for f.arguments and .caller
Change-Id: I29b48de9e0f6d6db5fba50d4a081656d869d9892
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506309
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79389}
2022-03-07 17:56:32 +00:00
Samuel Groß
f43f8a0bb5 [base] Don't return bool from VirtualAddressSpace::Free* routines
Instead of returning a boolean success/failure value, the Free* methods
of the VirtualAddressSpace API now terminate the process on failure, as
this implies a bug in the caller. This is simpler than CHECKing for
success in all callers and also provides more details about the possible
cause of the failure.

Bug: v8:12656
Change-Id: I5b469ae2c564068cff74e60b7e98f6a4776a239d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506992
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79388}
2022-03-07 16:53:23 +00:00
Junliang Yan
589036411c ppc64: [baseline] setup scratch registers
Change-Id: I03d1dfeb62c9c28debb902095ed070b529f3d978
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507451
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79387}
2022-03-07 16:33:03 +00:00
Victor Gomes
a47188e8e8 [maglev] Create RelationalComparisonNodes
Bug: v8:7700
Change-Id: Idc36a42307b05beefb2ff16e52c9a6c9b7a166f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500401
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79386}
2022-03-07 13:33:02 +00:00
Leszek Swirski
d5c23fdae8 [test] Make TestPlatform atomic for TSAN
Change TestPlatform's old_platform_ field to an atomic, so that its
write in the constructor and subsequent reads (that can be cross thread)
are race-free.

Hopefully this fixes the TSAN flakes we've been seeing.

Bug: v8:9054
Change-Id: Ib2b6edd21508ffa18debd6326dd7a100266125f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506505
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79385}
2022-03-07 13:06:23 +00:00
Samuel Groß
f29ae51cb3 [sandbox] Initialize the raw part of EmbedderDataSlots to zero
This simplifies various bits of logic around EmbedderDataSlots as the
raw part will now always contain a valid index into an external pointer
table entry.

This CL also unifies the initialization of EmbedderDataSlots by
providing a EmbedderDataSlots::Initialize method and adds more
documentation about the layout of EmbedderDataSlots in the different
configurations.

Bug: v8:10391
Change-Id: Ie952598898a7a6c9d40b28d3a7370bfc1291bcf0
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3472495
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79384}
2022-03-07 12:54:33 +00:00
Leszek Swirski
30f9c9249a [maglev] Allow closure register access
Allow bytecodes processed by maglev to access the on-stack closure
register.

Bug: v8:7700
Change-Id: I757d0c1734ef478e5b9671ed87a4691101b4e29d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506444
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@{#79383}
2022-03-07 11:28:43 +00:00
jameslahm
515c3887ed [parser] binding arguments var declaration in inner_scope
when has_simple_parameters_ is false in DeclareArguments

- According to https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-functiondeclarationinstantiation
step 28, arguments var declaration in function should be binding to
arguments parameterBindings when has_simple_parameters_ is false.
- According to https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-funct>
step 18, we should set arguments_ is nullptr if "arguments" is an element of lexicalNames
only when has_simple_parameters is true.

Bug: v8:12671
Change-Id: I542f80e2c8653ae05b65feb0036e4ade2e653a53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3499251
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79382}
2022-03-07 09:33:52 +00:00
Marja Hölttä
4620dbc09e [web snapshots] Add in-place strings
This decreases the snapshot size (we don't need to write the ID for the
string) and speeds up deserialization.

Bug: v8:11525
Change-Id: I8f48d2344a7fd895c746e6a3d26f6dbbdd11a062
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494539
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79381}
2022-03-07 09:24:02 +00:00
jameslahm
daa3ce759f [runtime] ClobberDoubleRegisters rewritten in platform-specific assembly
Currently ClobberDoubleRegisters is implemented in C++ and is
not guaranteed to clobber all registers. Rewritten in assembly
to clobber all double registers

Bug: v8:11798
Change-Id: I11c09bd247c929d251e6e509ea5cc76b9981ea98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3490715
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79380}
2022-03-07 07:59:42 +00:00
Darius M
48b443f692 [compiler] Simplify "==0" branches in MachineOperatorReducer
Bug: v8:12484
Change-Id: I0667c7464c0dd71338bc199a24a69248a7a0a525
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497303
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79379}
2022-03-07 07:50:22 +00:00
v8-ci-autoroll-builder
683a4f6b89 Update V8 DEPS.
Rolling v8/build: 5ca27a8..cd24f73

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

Change-Id: I26062521bebe25e83a9f815a61d911a98dedae6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504700
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@{#79378}
2022-03-07 03:59:41 +00:00
Hao Xu
d666faeb49 [x64] Transform setcc + movzxbl into xorl + setcc
xorl + setcc is more efficient than setcc + movzxbl and encodes one byte
shorter.

Change-Id: Ib6679ce9ab0ac0d34701daba5c3d4d8bb57a8fc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3492946
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#79377}
2022-03-07 02:32:42 +00:00
Lu Yahan
c6f6626deb [riscv64] Fix segmentation fault of webpack-make from cockpit
issue: https://github.com/riscv-collab/v8/issues/520

Change-Id: I7fe298ad16a2f599805929db0f084a81c4eb7f7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3503170
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#79376}
2022-03-07 02:13:10 +00:00
v8-ci-autoroll-builder
5974242ae2 Update V8 DEPS.
Rolling v8/build: 086de03..5ca27a8

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d454c2e..34063a8

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

Change-Id: I948930606eba44b8bb4f46d98311981210367693
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3502545
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@{#79375}
2022-03-06 03:58:41 +00:00
v8-ci-autoroll-builder
6327bb030e Update V8 DEPS.
Rolling v8/build: d6d9d1b..086de03

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4756e38..d454c2e

Rolling v8/third_party/depot_tools: e210b54..9ce8be3

Rolling v8/third_party/zlib: aa5ea60..aa6909a

Rolling v8/tools/luci-go: git_revision:a1616e207f0d9c24beefe848ee899b7a73efcb70..git_revision:cb424e70e75136736a86359ef070aa96425fe7a3

Rolling v8/tools/luci-go: git_revision:a1616e207f0d9c24beefe848ee899b7a73efcb70..git_revision:cb424e70e75136736a86359ef070aa96425fe7a3

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

Change-Id: I3bd91e2d184c361878bf886987cff3cf4a79bff6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3502536
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@{#79374}
2022-03-05 03:56:10 +00:00
Frank Tang
a4bdc77fe8 [intl] Part 3 of NumberFormat v3
Add NumberFormat.prototype.formatRange(ToParts)?

https://github.com/tc39/proposal-intl-numberformat-v3

https://chromestatus.com/guide/edit/5707621009981440

Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit


Bug: v8:10776
Change-Id: I9bb163c0c15ccac9d3a2d5e55ad38aa5c06bbaa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429464
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79373}
2022-03-04 22:53:20 +00:00
Shu-yu Guo
82c4c977b3 [shared-struct] Handle HeapNumbers in Object::IsShared
HeapNumbers that are in the shared heap were incorrectly considered
!IsShared().

TBR=jkummerow@chromium.org

Bug: v8:12547
Change-Id: Ie4b9575445d841a7045c947ff4439bf53a22869d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504085
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79372}
2022-03-04 22:30:50 +00:00
Leszek Swirski
b9af6604c3 [maglev] Allow graph building to bail out
Start allowing heavier testing of maglev by allowing graph building to
bail out if passed an unsupported bytecode.

Bug: v8:7700
Change-Id: I7e3d2c5a8896d4f4e0da5ef444c95a286f9ac117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500417
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@{#79371}
2022-03-04 15:16:01 +00:00
Leszek Swirski
5704f86c58 [test] Pretty print object properties on assert failure
Because I don't get much out of "Object() != Object()"

Change-Id: I5a765b9cb0a272d30edcd834ec7b60d2fd03190b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497352
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79370}
2022-03-04 14:30:51 +00:00
Leszek Swirski
d05a38f9ad [runtime] Fix sandboxing violation in CopyDataPropertiesWithExclProp
The newly optimised CopyDataPropertiesWithExcludedProperties acceses the
excluded properties directly on the stack, to avoid pushing them twice.
This meant that we had to pass a stack pointer into the runtime, which
we couldn't do directly because all arguments to runtime functions
should be tagged.

We tried to work around this by passing the stack pointer in a Foreign,
but this violated the V8 sandbox. Fortunately, the stack pointer is
aligned, so it looks like a Smi to the GC. So, we can pass it directly
on the stack as a runtime argument but doing a bit of bitcasting.

Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Bug: v8:11614
Change-Id: I87c4a34a15ae863277142aa29f48b1dd546014e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497745
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79369}
2022-03-04 14:15:30 +00:00
Seth Brenith
37ce416f31 [ext-code-space] Restore tagging of Code objects in heap snapshot
The heap snapshot generator is meant to apply descriptive names to Code
objects, but was using CodeDataContainer instead. Attempting to set the
name of the CodeDataContainer instances did nothing because they already
had the name "system / CodeDataContainer".

Bug: v8:11880
Change-Id: If7bd115bde36386d283d319c1ee28df565a39569
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3498849
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#79368}
2022-03-04 13:53:52 +00:00
Tobias Tebbi
01b809d2fd [torque] fix bug in formatter
Change-Id: I05e7d0776eaa4722c5a5b9820ee6b34d9319d2ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497816
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79367}
2022-03-04 13:11:50 +00:00
Benedikt Meurer
05dfa28993 [inspector] Do not resurrect Script objects.
Previously, the inspector would resurrect `v8::internal::Script` objects
when the weak callback is invoked, in order to access their fields and
read out the source (either a String in case of JavaScript or the module
bytes in case of WebAssembly). With https://crrev.com/c/3494242 we no
longer need to access the `v8::internal::Script` now, and so we can stop
relying on the `WeakCallbackType::kFinalizer` logic.

Bug: chromium:1295659
Fixed: chromium:1302195
Doc: https://bit.ly/v8-inspector-script-caching
Change-Id: I6a444bfcdf6cd23b30043f7386d6c18b7afec659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497324
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79366}
2022-03-04 12:55:00 +00:00
Leszek Swirski
7f5c3f7b81 [maglev] Fix maglev include for bazel
Bug: v8:7700
Change-Id: I1ebb7b0404526e45622b488248a244d75d93a4d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3501892
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@{#79365}
2022-03-04 10:25:42 +00:00
Keith Smiley
7c7f83f1f4 [bazel] Add darwin_arm64 to list of cpus
This fixes bazel builds on Apple Silicon hosts

https://github.com/envoyproxy/envoy/issues/19916

Change-Id: I9651538bec8a98e4b350c5f8ee1a40ed91dff461
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3502848
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79364}
2022-03-04 09:36:06 +00:00
Benedikt Meurer
c4d1feee52 [inspector] Introduce v8::debug::ScriptSource.
This introduces a new (inspector-only) `v8::debug::ScriptSource`,
which represents the source for a given `v8::debug::Script` (in
case of JavaScript it's a `v8::internal::String` while in case of
WebAssembly it's a `Managed<v8::internal::wasm::NativeModule>`).
Every `v8_inspector::V8DebuggerScript` now holds on weakly to the
`v8::debug::Script` and strongly to its `ScriptSource`, making it
possible to access the source even after the `Script` dies.

This is preliminary work to allow for the removal of the special
GC feature that a `WeakCallbackType::kFinalizer` callback can
resurrect the object (this change is split into a separate follow
up CL https://crrev.com/c/3497324).

Bug: chromium:1295659, chromium:1302195
Doc: https://bit.ly/v8-inspector-script-caching
Change-Id: I503d0d9283e2da392023f06f79b8ff35953e7935
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494242
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79363}
2022-03-04 09:35:02 +00:00
Manos Koukoutos
bf1565d708 [wasm] Implement the Extended Constants proposal
This proposal adds i32 and i64 addition, subtraction, and multiplication
to the list of constant expressions.
See https://github.com/WebAssembly/extended-const.

Bug: v8:12089
Change-Id: I23a27a54a15fd37ee1d553992ab3b355eb9d317c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497665
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79362}
2022-03-04 08:49:52 +00:00
Hao Xu
6b565a04f2 [x64] Narrow operand for comparing WordAnd with a constant
In x64, the result of WordAnd with a positive integer constant is known
to be sign(zero)-extended. Comparing this result with another positive
integer constant can have narrowed op according to the value of the
constants.

This CL do this narrow for WordAnd. It also makes the narrow in Word
comparison to deal with X64Cmp and X64Test.

Bug: v8:12650
Change-Id: I77f4ada9a9f94d78b3a78911e279a647c561cce4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3462081
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#79361}
2022-03-04 05:23:52 +00:00
v8-ci-autoroll-builder
960cac9780 Update V8 DEPS.
Rolling v8/build: e6ef2e3..d6d9d1b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1ec1fe1..4756e38

Rolling v8/third_party/depot_tools: b65bfd5..e210b54

Rolling v8/tools/clang: 3a67a50..1f05f8e

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

Change-Id: Ie85d4ba287a44ee06ad2e9075d3fd97937401778
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3502850
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@{#79360}
2022-03-04 03:57:31 +00:00
Frank Tang
2144c5357a [Temporal] Implement Temporal.Now.*
Bug: v8:11544
Change-Id: I5dda2845618cc7c709fb9ddac337472e112407e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3374281
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79359}
2022-03-04 02:25:31 +00:00
Frank Tang
326a63a984 [intl] NumberFormat v3 mark unimplement for string
Add unimplementation macro for String case till the resolution of
https://github.com/tc39/proposal-intl-numberformat-v3/pull/82

Bug: v8:10776
Change-Id: Ic59d532bb78a9f56a0c121e71e0f9e585bb8c9d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497619
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79358}
2022-03-04 02:08:01 +00:00
Camillo Bruni
ecc3cd256a [tools] Improve gcmole part II
Prepare gcmole.cc for the next update:
- Print possible GC locations when discovering stale/dead variables
- Make error messages less confusing for the modern V8 engineer
- Prepare gcmole to read suspects.allowlist instead of .whitelist
- Use more readable variable names
- Only log non-found types with --verbose
- Change the currently unusued gccauses format in gcmole.py and
  support loading it back in gcmole.cc
- Implemented first basic gc call-chain printing (disabled by default)

GCmole packaging:
- Add debug mode to bootstrap.sh build script
- Update gcmole.py run instructions in bootstrap.sh and package.sh

Bug: v8:10009
Change-Id: I369d48baa2980455d2e8f57e7a803d0384fe83f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3480095
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79357}
2022-03-04 01:06:11 +00:00
legendecas
8e18ea3913 [builtins] Fix binding function with native data property accessors
When the function is created with FunctionTemplate and set name with
native data property accessors, binding the function should throw
immediately if the native accessor throws.

Bug: v8:11989
Change-Id: Ief282202aa5b8515f581fd5478886ed5f001fd4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3492966
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#79356}
2022-03-04 00:50:51 +00:00
Deepti Gandluri
a0b25ebd75 [wasm-relaxed-simd] Prototype relaxed min/max for ARM
Prototype F32x4Relaxed(Min/Max) and F64x2Relaxed(Min/Max)
operations for ARM. F32x4 variants map directly to vmin/vmax
hardware instructions which are also used for F32x4(Min/Max)
operations. The F64x2 variants are mapped in this implementation
to Pmin/Pmax instructions as detailed in the github issue.
https://github.com/WebAssembly/relaxed-simd/issues/33

Bug: v8:12284
Change-Id: I5ea939385fa0ae97bbdf776fc0b763cabb1b293c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3501347
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79355}
2022-03-03 22:37:19 +00:00
Nico Hartmann
aaedd8b788 Revert "[turbofan] Enable --verify-simplified-lowering in debug"
This reverts commit 23b178b540.

Reason for revert: Speculative revert due to https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/945522/overview

Original change's description:
> [turbofan] Enable --verify-simplified-lowering in debug
>
> Bug: v8:12619
> Change-Id: I3b9f82a21c9454ff37036e8abcf73862e38f1fc9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494243
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79338}

Bug: v8:12619
Change-Id: Ia879b53e1b0a07109f0420fdf954b110f45abf58
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497339
Auto-Submit: Nico Hartmann <nicohartmann@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@{#79354}
2022-03-03 18:04:11 +00:00
Jakob Gruber
995217a31b [maglev] Add a skeleton MaglevConcurrentDispatcher impl
A dispatcher that currently does nothing, installed on the Isolate.

The implementation is close to the baseline concurrent compiler; but
boilerplate is short enough that a common base class is not worth the
additional complexity.

Bug: v8:7700
Change-Id: Ia34781e24cb6b1f72e5560fb0afe107bb0486092
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497690
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79353}
2022-03-03 17:32:21 +00:00
Deepti Gandluri
eda743d06b [wasm-relaxed-simd-arm] Prototype relaxed lane select
With the previous change to using the mask as the first
input to the node, the lane select ARM codegen is equivalent
to V128Select. Also enable cctests to run on ARM.

Bug: v8:12284
Change-Id: I5572f4845307ff20cc2a0a58d3ccf162caa436b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500655
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79352}
2022-03-03 17:16:51 +00:00
David Benjamin
3561874da1 Use numpy 1.2x.supported.1 in V8
This fixes 'fetch v8' on Arm Macs.

Bug: chromium:1295840
Change-Id: Ifa7a07eef508c0e0203de8ea8d54ddcd31815fe8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3494442
Auto-Submit: David Benjamin <davidben@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79351}
2022-03-03 15:21:21 +00:00
Marja Hölttä
fe479fe793 [rab/gsab] RAB/GSAB support in TA.p.subarray
Bug: v8:11111
Change-Id: I58b76ce0ad47eb47ccbd0244b110f7cb0450ced8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468349
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@{#79350}
2022-03-03 15:05:15 +00:00
Manos Koukoutos
2ba409389c [turbofan] Fix optimization of traps after if-nodes
A TrapUnless after an IfTrue, and conversely, a TrapIf after an IfFalse,
should not optimize away the respective Branch node.

Bug: v8:12624
Change-Id: I250b2f84c38295ca35e440589901ed5a58bb4e75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500303
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79349}
2022-03-03 15:04:12 +00:00
Camillo Bruni
4db43bfa2f [tools] Improve gcmole part I: command line
- Convert gcmole to python3-ish code
  - use local Path implementation for future full migration
- Use optparse and explicit arguments for gcmole
  - Add explicit directories flags
  - Use backwards compatible env vars as fallbacks
- Add gn target v8_gcmole_files to avoid issues with missing or
  incompatible generated files

Drive-by-fixes for running gcmole without ignored files:
- Disable gcmole in Isolate::UnwindAndFindHandle
- Partially disable gcmole in V8HeapExplorer::AddEntry

Bug: v8:10009
Change-Id: I5b4d1c6554db300190226361b6c518419109ff3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497320
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79348}
2022-03-03 15:01:15 +00:00
Camillo Bruni
0794551156 [gcmole] Disable gcmole for Isolate::UnwindAndFindHandler
Temporary fix to allow running gcmole on isolate.cc

Bug: v8:12676
Change-Id: I0b625e6e0419885cf20758f22d897dc2532c2606
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497335
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79347}
2022-03-03 13:08:30 +00:00