Commit Graph

69815 Commits

Author SHA1 Message Date
Mihir Shah
9711289d06 A jump-table implementation for constant case switch statements
The change is made since for switch statements with lots of cases,
where each case is a constant integer, the emitted bytecode is still
a series of jumps, when we can instead use a jump table.

If there are 6 or more cases (similar to GCC) of Smi literals, and
if the max Smi case minus the min Smi case is not more than 3 times
the number of cases, we use a jump table up front to handle Smi's,
and then use traditional if-else logic for the rest of the cases.

We then use the jump table in interpreter/bytecode-jump-table to
do the optimization.

This tries to go off issue 9738 in v8's issue tracker. It is not
exactly the same, since that recommends doing the work at JIT-time,
but has similar ideas. It also partially goes off issue 10764.

Bug: v8:9738
Change-Id: Ic805682ee3abf9ce464bb733b427fa0c83a6e10c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904926
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75323}
2021-06-23 09:26:23 +00:00
Yoshisato Yanagisawa
b0ad4a11d2 Add re-client linux/win binaries to DEPS.
Fetch re-client binaries CIPD package via CIPD during gclient sync step.

Bug: chromium:1222951
Change-Id: I7c748b6555df293ee8a43a8b523f63a40cb70f6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2981692
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Auto-Submit: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75322}
2021-06-23 08:40:33 +00:00
Timothy Gu
528a01042d [parser] Ignore parenthesized identifiers when setting function name
Code such as

    var a;
    (a) = function() {};

should not lead to a.name being set to "a".

This fixes the last of the anonymous function naming bugs.

Bug: v8:4709
Change-Id: I70c2fcbcec1a57752fd58038262d02aefe26e28a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2970705
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75321}
2021-06-23 08:23:03 +00:00
Michael Achenbach
5e275b580f [test] Allow more time for tsan testing
This increases the base factor for timeouts on tsan as testing got
slower after https://crrev.com/c/2953321

Due to overall slower runtime we also increase the shards.

Bug: v8:11906
Change-Id: Ic5de5859755266a1e327433ce8efe6c171490a8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979671
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75320}
2021-06-23 07:51:52 +00:00
Leszek Swirski
6d1d1fbd8b Reland "[sparkplug] Trigger compilation when a FBV exists"
This is a reland of 3296de2f65
It includes pthier@'s fix of overzealous OSR

Original change's description:
> [sparkplug] Trigger compilation when a FBV exists
>
> We were gating baseline compilation on FBV allocation, but in some
> cases, the feedback vector may be allocated eagerly (notably, if we are
> logging function events). Instead, unconditionally try baseline
> compilation after ensuring the feedback vector exists.
>
> Bug: v8:11420
> Change-Id: I1264a1d541a74d4eccb5caf65c360ac23836a1a8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953161
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Patrick Thier <pthier@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75242}

Bug: v8:11420
Change-Id: Ia6864856926d6760bbe6c89ee010fa62cf23b6ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2976660
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75319}
2021-06-23 07:42:33 +00:00
John Xu
93604c5ab7 Upstream Cobalt changes in cpu
These are the changes Cobalt currently has in V8's cpu related code.
- Add missing Starboard CPU code
- Replace some V8_OS_WIN with V8_TARGET_OS_WIN, they are found when
  cross-compiling for Linux platforms on Windows

Bug: v8:10927
Change-Id: Id63ae8614cbe6fe0eb53df89060c8ca2c9969ef4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963803
Commit-Queue: John Xu <johnx@google.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75318}
2021-06-23 05:33:34 +00:00
John Xu
2c2b2132e6 Add Dummy implementations of atomics for Cobalt
This is part of Cobalt's upstream effort to be more in sync with V8.
Cobalt does not trigger the atomics functions in runtime-atomics.cc so
we use dummy implementations for now.

Bug: v8:10927
Change-Id: I2da75b7f9b22b41a1ff00af1ab4b43641e9a33bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963801
Commit-Queue: John Xu <johnx@google.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75317}
2021-06-23 05:24:23 +00:00
v8-ci-autoroll-builder
c758c7135d Update V8 DEPS.
Rolling v8/build: 69cba92..e589a83

Rolling v8/buildtools: 7bff39b..9c143ac

Rolling v8/buildtools/linux64: git_revision:170c2dba1e0c0299fe8c6a441caf2f2352a42ae0..git_revision:e9b8433248ae2c117644b4e40b33203e7d3da192

Rolling v8/buildtools/third_party/libc++/trunk: 79a2e92..8fa8794

Rolling v8/third_party/aemu-linux-x64: KN9a-2MYhLQ9kDLdCOca4xZcBjrhMIzoD4ReyO0u95IC..LieFB6bFq-7RUGMVRhbOR3IXo6WdPE7fCzCMv4PnaScC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2ba6b1f..a2a4ced

Rolling v8/third_party/depot_tools: b714c17..09f358b

Rolling v8/third_party/googletest/src: 7153098..355d57d

Rolling v8/tools/clang: 2d4e9fd..8dd9dda

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

Change-Id: I04c672d47a7f34507045c81964f869d5fe145d52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2981458
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75316}
2021-06-23 03:52:03 +00:00
Dan Elphick
c941c4d960 Fix mips build after adding base/strings.h
Bug: v8:11879
Change-Id: I8f307490ca253e6d458db14cc5bf771d6fe1db57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979593
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#75315}
2021-06-23 01:38:59 +00:00
Dan Elphick
3c25c398a0 Fix riscv64 build due to base/strings.h change
Bug: v8:11917
Change-Id: Ie80a24bc9826aa42d7a35dcebda3bd4ed5be05ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2980971
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#75314}
2021-06-23 01:32:24 +00:00
Junliang Yan
06398e1ca1 ppc: [liftoff] implement Load for liftoff
Change-Id: I237f5ad18b82e2e2bf807241ce587a38a27e0b10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979592
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75313}
2021-06-22 18:33:42 +00:00
Milad Fa
8810a11847 PPC/s390: [base] Create base/strings.h
Port 9010201c99

Original Commit Message:

    Moves VSNPrintf, SNPrintf and StrNCpy out of utils/utils.h into
    base/strings.h.

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

Change-Id: Ia06003c1daea94e3767083b910bee1498bec37cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979474
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75312}
2021-06-22 18:31:02 +00:00
Ross McIlroy
ecea71d067 [Turboprop] Temporarily disable dynamic map checks.
To enable experimentation with inlining, temporarily disable dynamic
map checks which currently don't support inlining.

BUG=v8:9684

Change-Id: Iba674550213b393ab150ba241a2dad4ca8fdfd85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2978257
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75311}
2021-06-22 18:08:44 +00:00
Jakob Kummerow
7065784ac9 [bigint] Burnikel-Ziegler division
The Burnikel-Ziegler division algorithm is used for divisors
with 57 or more internal digits. It has better asymptotic
complexity than "schoolbook" division because it can make use
of fast multiplication under the hood.

Bug: v8:11515
Change-Id: Ib5d573a0afa560d42972c4ae06aff810a8b9cadb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960221
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75310}
2021-06-22 17:58:21 +00:00
Georg Neis
eeead50c9c Instrument JSObject::GetHeaderSize to track down Chrome crashes
Bug: chromium:1211264
Change-Id: If47e40e82d79707c7032837f56450790c089cf4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2976659
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75309}
2021-06-22 17:23:13 +00:00
Dan Elphick
9010201c99 [base] Create base/strings.h
Moves VSNPrintf, SNPrintf and StrNCpy out of utils/utils.h into
base/strings.h.

Bug: v8:11879
Change-Id: I0e165cb27c42f89c9acd1c6378514b40a90cd18d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972732
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75308}
2021-06-22 16:55:32 +00:00
Santiago Aboy Solanes
b952ea1685 [compiler] Skip MapRef descriptor array's serialize methods
We don't need to serialize the descriptor array when concurrent
inlining so we can skip the methods related to serializing.

While doing so we bumped into two broken tests in serializer-tester.
Since we are planning on removing the serializer soon, it makes more
sense to remove them than trying to fix them.

Bug: v8:7790
Change-Id: Ib1feea16f09edebbd9927afc4178ed10f85fd42f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975300
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75307}
2021-06-22 16:39:33 +00:00
Andreas Haas
07e6b125c9 [wasm] Don't expect a high-resolution counter for deserialization time
In the first CL to introduce a histogram for deserialization time a
high-resolution counter was required to get microsecond precision.
However, with the histogram we want to detect if we need to optimize
deserialization or not. For this information high precision does not
matter, it is more important that we get information from all devices.

R=clemensb@chromium.org

Bug: v8:11862
Change-Id: Id72e25ab7e5ac8217393ab6fd11416187822a158
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2978256
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75306}
2021-06-22 15:07:42 +00:00
Junliang Yan
00b4515c51 s390: fix offset overflow on atomic op
Change-Id: If8017e175fe4568ba10889dbb3b88cce897ec57e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972736
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75305}
2021-06-22 14:55:52 +00:00
Camillo Bruni
39a1ae9a0d [codegen] Fix places where we explicitly rely on movl
This partially reverts https://crrev.com/c/2649032
The previous CL was a bit too aggressive in replaceing movl with Move
which does sign extension for int32.

We can only safely replace movl if the input is in the [0, 2**31] range.


Bug: chromium:1220855
Change-Id: I6c29db1acd7de6b03ffaf802a868b6a531252bc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975860
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75304}
2021-06-22 14:32:42 +00:00
Milad Fa
299f4c5daf S390: Check memory offset when emitting vstbr
Add a similar check used in vlbr to make sure offset is
a 12 bit unsigned integer.

Change-Id: I12ef8734a7223fa375a31e55ecc81d1175de17c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2977272
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75303}
2021-06-22 14:17:52 +00:00
Leszek Swirski
18bcc9a6f2 [system-analyzer] Add source map support
- Asynchronously load source map from sourceMappingURL
  - Once loaded, annotate source positions with their original position
  - Update script panel tooltip to include link to original source
     - For the above, make DOM.element a slightly more flexible API,
       allowing defining attributes and children
     - Also fix ToolTipEvent handling to support nodes.
  - Shuffle around some code to make createScriptNode async, in case
    we want to load the source map when building the script node itself.
  - Drive-by: make source markers a simple backgroundColor when there is
    only one group.

Change-Id: I0926807761cbfe8b6dd8ff5154815a7e5ccb39bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972827
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75302}
2021-06-22 14:11:03 +00:00
Victor Gomes
329ee4d423 [baseline] Use RO empty byte array in NewEmptyCode
Bug: v8:11872
Change-Id: I95fb2199fb91f51e9b03a8a88000f9240d5d104b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2978255
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75301}
2021-06-22 13:38:52 +00:00
Dan Elphick
4378ff2d9b [utils] Move SimpleStringBuilder out of utils
Now that SimpleStringBuilder is only used in conversions.cc, it can be
moved there making it easier to assess its safety and limit further
use of this potentially unsafe API. (Additionally unused methods Reset
and size are removed).

Bug: v8:11917
Change-Id: I0515fe4f34bb8f7e7ea464b75394fa3d03939af1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2978253
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75300}
2021-06-22 13:10:21 +00:00
Georg Neis
4c41299d8c [compiler] Fix serialization for Function#bind
It was not in sync with the optimization, which relies on
inspecting up the length and name fields even for bound
functions.

To make a now meaningful serializer test actually pass, I have
to to make some changes to the test setup.

I'm also moving the function name and length index constants
from JSFunction to JSFunctionOrBoundFunction for clarity.

TBR=marja@chromium.org

Bug: v8:7790
Change-Id: I36dd3c80996ccb53810c7ea9bfceb5c84ffd60ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972919
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75299}
2021-06-22 12:42:19 +00:00
Dan Elphick
332d6c1114 [utils] Remove StringBuilder class
StringBuilder and its base class SimpleStringBuilder aren't very safe
and are a potential source of memory leaks or double-frees.

This removes the StringBuilder class and converts all of its usages to
use the standard library.

(As a drive-by, this converts std::ostream* to std::ostream& which is
more idiomatic C++).

Bug: v8:11917
Change-Id: I0eaf9d60cf49836e65bb28f0e114b33ef8103a61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2978252
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75298}
2021-06-22 12:37:42 +00:00
Mike Stanton
38c872aa63 Concurrent stress mode adjustment in predictable test variant
If a test specifies --stress-concurrent-inlining it shouldn't be
run in predictable mode, since it is depending on some concurrent
behavior (a race condition) between threads.

Bug: v8:11907
Change-Id: I027eed056689a8ee62675fce7dfa0701d202e970
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975298
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75297}
2021-06-22 12:25:02 +00:00
Clemens Backes
83a5e42b5d [cleanup] Remove remaining redundant NOLINTs
After a series of CLs per component, this removes all remaining NOLINT
annotations that my script identified as not needed (because removing
them does not cause a presubmit error).

R=mlippautz@chromium.org, jkummerow@chromium.org, leszeks@chromium.org
R=cbruni@chromium.org

Bug: v8:11879
Change-Id: Ia403c23588a0c2871b987931f6c26f85821e9e9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972733
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75296}
2021-06-22 11:34:11 +00:00
Manos Koukoutos
3f24baf6da [wasm] Remove current global argument from consume_init_expr
We can get rid of this by deferring adding a new global to the module's
globals, and using the current size of globals to determine allowed
global indices.

Bug: v8:11895
Change-Id: Ide80eab2de4abdbab96a7298acf3665599c394ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972908
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75295}
2021-06-22 11:17:13 +00:00
Georg Neis
6288483b65 [compiler] Fix an issue with deprecated maps
Various field dependencies assume that the receiver map and the field
owner map agree on field meta data. That's not necessarily true when
the receiver map is already deprecated. We should skip over deprecated
maps.

- Fix a bug in SerializerForBackgroundCompilation. It used to process
  even deprecated maps.
- Fix a bug in FilterRelevantReceiverMaps. It used to store the original
  map rather than the new version.
- Turn some compilation dependency DCHECKs into CHECKs.
- CHECK in MapRef::FindFieldOwner that the map is not deprecated. While
  there might be valid use cases for calling the underlying
  Map::FindFieldOwner on a deprecated map, we never want to do that in
  the compiler.

Note that we skip any deprecated maps in JSNativeContextSpecialization's
ReduceNamedAccess. That's why I believe the issue could only be observed
with --concurrent-inlining and only in the form of a failing DCHECK.

Bug: chromium:1221812, v8:7790
Change-Id: I998b4ce1954be01eb6e0feb491ccc6b8306c685f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2976655
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75294}
2021-06-22 09:56:02 +00:00
Al Muthanna Athamina
fb9aee414d [test] Skip test-osr until we make progress on NumFuzz
Bug: v8:11656
No-Try: true
Change-Id: I60bdedc1eb7fc04a3ed1f09bf02fbddffa05c4dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975861
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75293}
2021-06-22 09:50:22 +00:00
Manos Koukoutos
0ec7f85f37 [wasm] Improve init. expr. testing code
- Add an expected type argument in DecodeWasmInitExprForTesting. This
  eliminates the need to check for kWasmVoid in consume_init_expr.
- Invoke StartDecoding() to initialize module in
  DecodeWasmInitExprForTesting.
- Pass the current module to DecodeInitExprForTesting.
- Adjust tests.

Bug: v8:11895
Change-Id: I13b71b68a2011bf08742701cb9dd986afd6e55f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972907
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75292}
2021-06-22 09:43:25 +00:00
Victor Gomes
e29b2ae48a [baseline] Compiles sparkplug code on the heap
1. Adds the flag --sparkplug-on-heap
2. Creates OnHeapAssemblerBuffer
3. Generates code on heap (but still relocates later)
4. Provides Assembler::IsOnHeap function

Bug: v8:11872
Change-Id: I6223bf27a5fbcfb5f94f3462b951443b35273661
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949097
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75291}
2021-06-22 09:11:02 +00:00
Sara Tang
205338ceb3 [diagnostics] Added line numbers to ETW JIT events
Feedback suggests that it would be easier to trace minified JS code if
line numbers were included in the ETW JIT events, so I added them.

Bug: v8:11043
Change-Id: I1660c695db2e4659184b2b679839dafe256fb3ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971625
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#75290}
2021-06-22 09:10:53 +00:00
Clemens Backes
4e19455bd8 Reland "[wasm] Provide a global WasmCodeManager"
This is a reland of 0f90a2aa1c.
The issue was inverted destructor order between WasmCodeManager and
WasmEngine. WasmEngine has to be destructed first, because it contains
a barrier to ensure that background compile threads finished before
global state is being destructed.

Original change's description:
> [wasm] Provide a global WasmCodeManager
>
> The WasmCodeManager was part of the WasmEngine so far, but there is only
> exactly one WasmEngine. Hence we can pull it out, and also remove the
> pointer in the WasmCodeAllocator.
>
> The argument passed from the single constructor call is now inlined in
> the constructor itself.
>
> Drive-by: Replace "GetPlatformPageAllocator()->CommitPageSize()" by just
> "CommitPageSize()".
>
> R=jkummerow@chromium.org
>
> Bug: v8:11879
> Change-Id: I6c0e74cea308f5806d1aa479945d90b6ef8d1613
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972909
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75270}

Bug: v8:11879
Change-Id: I0eaa2395f5c1e30f3f7303c5f3df70c227b74d3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975859
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75289}
2021-06-22 08:59:10 +00:00
Michael Achenbach
7d3bc3fa60 [bazel] Add optional deps for prebuilt bazel for bots
This will download a prebuilt bazel on Ubuntu bots if gclient variable
download_prebuilt_bazel is set. The currently pinned version is:
5.0.0-pre.20210604.6.

This is planned to only run on specific bots that use a new recipe
for building with bazel:
https://crrev.com/c/2972749

Bug: v8:11912
Change-Id: I8ff405fc03bfede4762bf4e8577cb1feab56f7c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972918
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75288}
2021-06-22 08:42:15 +00:00
Maya Lekova
e33ca13415 Revert "[sparkplug] Trigger compilation when a FBV exists"
This reverts commit 3296de2f65.

Reason for revert: Blocks the roll - https://chromium-review.googlesource.com/c/chromium/src/+/2970676

Original change's description:
> [sparkplug] Trigger compilation when a FBV exists
>
> We were gating baseline compilation on FBV allocation, but in some
> cases, the feedback vector may be allocated eagerly (notably, if we are
> logging function events). Instead, unconditionally try baseline
> compilation after ensuring the feedback vector exists.
>
> Bug: v8:11420
> Change-Id: I1264a1d541a74d4eccb5caf65c360ac23836a1a8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953161
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Patrick Thier <pthier@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75242}

Bug: v8:11420
Change-Id: Ia9524e3a57eda7ec069f29652acc7593bf680509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2976654
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75287}
2021-06-22 08:24:31 +00:00
Maya Lekova
e0e9f7412d Revert "[sparkplug] Trigger compilation only when we don't have baseline data"
This reverts commit a93293d9c9.

Reason for revert: Need to revert a dependency which is blocking the roll - https://chromium-review.googlesource.com/c/v8/v8/+/2953161

Original change's description:
> [sparkplug] Trigger compilation only when we don't have baseline data
>
> If we trigger baseline compilation unconditionally on bytecode budget
> interrupt after we have compiled the function with sparkplug already, we
> will arm back-edges for OSR unconditionally. Since the OSR arming
> mechanism is the same for Sparkplug and TurboFan, this means that we
> will immediately arm back-edges for OSR to TurboFanned code.
>
> Bug: v8:11656
> Change-Id: Ic8e5d1899a3a203321e063ada474d39f2627ea88
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972922
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75285}

Bug: v8:11656
Change-Id: I2e2910f8882314260ff70a3c996ef74903b6851b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2976653
Auto-Submit: Maya Lekova <mslekova@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/master@{#75286}
2021-06-22 07:45:05 +00:00
Patrick Thier
a93293d9c9 [sparkplug] Trigger compilation only when we don't have baseline data
If we trigger baseline compilation unconditionally on bytecode budget
interrupt after we have compiled the function with sparkplug already, we
will arm back-edges for OSR unconditionally. Since the OSR arming
mechanism is the same for Sparkplug and TurboFan, this means that we
will immediately arm back-edges for OSR to TurboFanned code.

Bug: v8:11656
Change-Id: Ic8e5d1899a3a203321e063ada474d39f2627ea88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972922
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75285}
2021-06-22 06:58:21 +00:00
Benedikt Meurer
01605d567a [debug] Default to last break index.
When looking up the break index for a given source position, default to
the last break index if there is neither a precise match nor a breakable
position after the source position (in which case we still pick the
first candidate).

Fixed: chromium:1222065
Bug: chromium:901819, chromium:782461, chromium:1222060
Change-Id: I10d6a086b2d5fadc9e6dca0c49ed4187eb0359ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972917
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75284}
2021-06-22 05:06:31 +00:00
v8-ci-autoroll-builder
1890913587 Update V8 DEPS.
Rolling v8/build: e03cfed..69cba92

Rolling v8/buildtools: 466954e..7bff39b

Rolling v8/buildtools/third_party/libc++/trunk: 8fa8794..79a2e92

Rolling v8/third_party/aemu-linux-x64: PN9-ZWJ3VamzkSeIVWLhS3mXDEVLPX86Ht5EEDH1O-EC..KN9a-2MYhLQ9kDLdCOca4xZcBjrhMIzoD4ReyO0u95IC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cb63922..2ba6b1f

Rolling v8/third_party/depot_tools: 473499b..b714c17

Rolling v8/tools/clang: 03ff857..2d4e9fd

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

Change-Id: I1c17166b07efae9631726b57f27260997571f120
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2977585
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75283}
2021-06-22 03:56:31 +00:00
Bill Budge
b261213fcc Revert "Improve error messages for property access on null/undefined"
This reverts commit 24c626c1f7.

Reason for revert: Blocks V8 roll into Chromium (changed error messages cause tests to fail):
https://ci.chromium.org/p/chromium/builders/try/linux-rel/724109?

Original change's description:
> Improve error messages for property access on null/undefined
>
> Only print the property name when accessing null/undefined if we can
> convert it to a string without causing side effects.
> If we can't, omit the property name in the error message.
> This should avoid confusion when the key is an object with toString().
> E.g. undefined[{toString:()=>'a'}] doesn't print 'read property [object
> Object]' anymore, which was misleading since the property accessed would
> be 'a', but we can't evaluate the key without side effects.
>
> Bug: v8:11365
> Change-Id: If82d1adb42561d4851e2bd2ca297a1c71738aee8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960211
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75250}

Bug: v8:11365
Change-Id: Ic63f34033254f55b3871041633d84ea48586a75d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2977374
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75282}
2021-06-21 23:06:41 +00:00
Milad Fa
4eebb1e915 S390: enable VEF2 on the simulator
This enables running some of the new instructions on the simulator
including vcgd and vclgd.

Change-Id: Icd1c6ced124aec8608dece855f85ba350c4247fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2976027
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75281}
2021-06-21 22:02:41 +00:00
Frank Tang
91d5cc2fa9 Reland "[intl] Improve test coverage of "best fit" localeMatcher"
This is a reland of dd8845cd74

Original change's description:
> [intl] Improve test coverage of "best fit" localeMatcher
>
> https: //docs.google.com/document/d/1cPGfiihn76yj2iAomKcspPFyLLcnk3WkCiqceBQPQyk/edit#heading=h.cc9tt7s0iwsd
> Bug: v8:7051
> Change-Id: I8c35e859062c5bdb009334dd1b725751e6df2123
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965481
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75228}

Bug: v8:7051
Change-Id: I9af13b8fdf7ec3de2ac24050074d13fcdef981c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2973648
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75280}
2021-06-21 17:37:31 +00:00
Leszek Swirski
b6e31aaaaa [system-analyzer] More fixes
- Fix inline script line nos
  * Change the map source pos panel to a table
  3. Fix script sorting to not crash on missing name

Change-Id: I250c830f4be5f734a9489622ce162615bf80aab7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964606
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75279}
2021-06-21 16:05:29 +00:00
Nico Hartmann
d8f78c0a9e Revert "[assembler][arm64][arm][ia32] Add more Assembler::CodeComment"
This reverts commit 2588380d2c.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Arm%20-%20debug%20builder/34664/overview

Original change's description:
> [assembler][arm64][arm][ia32] Add more Assembler::CodeComment
>
> Use more code comments to better document generated assembler code.
> This CL also attaches a CodeComment to FrameScope.
>
> Change-Id: I45afc3e4078dc161316b877fbbd1ae8bcd6e821d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964392
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75277}

Change-Id: I6d36535ca96133cc83b3d6194a3d53889f735499
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972826
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75278}
2021-06-21 15:42:22 +00:00
Camillo Bruni
2588380d2c [assembler][arm64][arm][ia32] Add more Assembler::CodeComment
Use more code comments to better document generated assembler code.
This CL also attaches a CodeComment to FrameScope.

Change-Id: I45afc3e4078dc161316b877fbbd1ae8bcd6e821d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964392
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75277}
2021-06-21 15:37:39 +00:00
Michaël Zasso
3b8a5026eb [log] Include tickprocessor log files in git
Without this, the files are ignored when V8 source is copied to another
repository (for example Node.js).

Change-Id: Ia1ac2d2673d13a266f2beaa1dadd93df903afd5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972915
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Cr-Commit-Position: refs/heads/master@{#75276}
2021-06-21 15:26:29 +00:00
Igor Sheludko
d31824f47d [ext-code-space] Enable stricter heap verification for CodeT
When v8_enable_external_code_space is enabled the Code objects are
allowed only
- in CodeDataContainer::code field
- as uncompressed values embedded in Code instruction streams

Bug: v8:11880
Change-Id: I080a678fd77a7e42c6a397e7145a640fd07d6e83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969828
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75275}
2021-06-21 14:35:59 +00:00
Maya Lekova
c46e820538 Revert "[wasm] Provide a global WasmCodeManager"
This reverts commit 0f90a2aa1c.

Reason for revert: Breaks MSAN, please see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/38941/overview

Original change's description:
> [wasm] Provide a global WasmCodeManager
>
> The WasmCodeManager was part of the WasmEngine so far, but there is only
> exactly one WasmEngine. Hence we can pull it out, and also remove the
> pointer in the WasmCodeAllocator.
>
> The argument passed from the single constructor call is now inlined in
> the constructor itself.
>
> Drive-by: Replace "GetPlatformPageAllocator()->CommitPageSize()" by just
> "CommitPageSize()".
>
> R=​jkummerow@chromium.org
>
> Bug: v8:11879
> Change-Id: I6c0e74cea308f5806d1aa479945d90b6ef8d1613
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972909
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75270}

Bug: v8:11879
Change-Id: I110eec313762d73073f530aec7cf0be82c4db344
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972921
Auto-Submit: Maya Lekova <mslekova@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/master@{#75274}
2021-06-21 14:31:57 +00:00