Commit Graph

69725 Commits

Author SHA1 Message Date
Andreas Haas
274aaaafa0 Reland "[wasm][liftoff] Cache the memory start register"
On a loop back edge both the cached instance and the cached memory
start have to get restored for the next loop iteration. In the original
CL we did not consider the case that by restoring the instance we may
overwrite the currently cached memory start.

Original description:

WebAssembly functions often have subsequent memory accesses, and each of
these memory accesses need the start address of the memory in a register.
With this CL the register with the memory start address is cached, so
only the first memory access has to load the memory start address into a
register, subsequent memory accesses can just reuse the register.

In first measurements with the epic benchmark this reduces the size of
the generated Liftoff code by a bit more than 5%.

R=clemensb@chromium.org

Bug: v8:11862
Change-Id: I884c0da24be8bc6b10f2c6bf5437b9a279819538
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960220
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75183}
2021-06-16 14:31:17 +00:00
Michael Achenbach
6e6aa89579 [test] Mark/skip slow tests
No-Try: true
Bug: v8:11893
Change-Id: Iee4164cc25f736f4d9aa0b24319e947215439938
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964607
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75182}
2021-06-16 14:19:40 +00:00
Toon Verwaest
c7949470f8 [masm] Read builtin off builtin_entry_table rather than EmbeddedData...
... when we do have an isolate. This is a little leaner.

Change-Id: Ia95d9888b11cab9e43362f4fe78689a79dfa8b2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964604
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75181}
2021-06-16 14:09:47 +00:00
Jakob Kummerow
b1e8c26695 [wasm] Fix stack iteration for tagged parameters
When we pass function arguments on the stack, untagged parameters
"come first", i.e. are put to lower addresses / can be popped off
first. So when a function instructs the stack walker to visit its
parameters (belonging to its caller's frame), it must skip past
any untagged parameters at the top of the caller's frame.

Change-Id: I5a42e4850b0808237ae937c90b0cec930df8571b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964394
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75180}
2021-06-16 13:57:28 +00:00
Igor Sheludko
227e90188b [ext-code-space] Add CodeDataContainer::code field and friends
... behind the v8_enable_external_code_space build flag.

This is a first CL in a row of CLs that will make CodeDataContainer
the only type of objects that could contain references to Code objects
(besides the Code objects embedded into the generated code).
Eventually these changes will allow us to move Code space out of the V8
heap cage.

This CL adds |code| field to ensure that CodeDataContainer keeps the
respective Code object alive and |code_entry_point| field that contains
cached value of the code().InstructionStart().

Bug: v8:11880
Change-Id: Ie7ce75667d8da306797d203691b429671bc4530d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964093
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75179}
2021-06-16 13:53:17 +00:00
Dominik Inführ
11891fd6a7 [snapshot] Check CanDiscardCompiled() again before DiscardCompiled()
Since DiscardCompiled() can allocate, it could also a cause a GC. A full
GC might perform bytecode flushing, which could change the return value
of CanDiscardCompiled(). So a DiscardCompiled() invocation in one loop
iteration could violate the assumption that CanDiscardCompiled() holds
in subsequent iterations. Prevent DCHECK failure by checking whether
CanDiscardCompiled() still holds for each SharedFunctionInfo.

Bug: v8:11772
Change-Id: Ie9c704abeea801bd3f4f1bdf8fa9c51a8a9d447d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960274
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75178}
2021-06-16 11:49:27 +00:00
Andreas Haas
c0614e9bce [wasm] Refine installation of the WebAssembly.Exception constructor
Bug: chromium:1219630

Change-Id: Idf187bfb16157074b0affda1db3b8ac0b0870e7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964094
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75177}
2021-06-16 11:37:37 +00:00
Camillo Bruni
1baa7c1d3c [tools] Add clean action to gm.py
Now you can also clean build directories: x64.optdebug.clean
Or clean and build: x64.release.clean.d8

No-Try: True
Change-Id: I3df59416d4ce7db5306c0b09c9ee8293c7a345f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964595
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75176}
2021-06-16 10:42:07 +00:00
Michael Lippautz
9a311bcb34 Manually update google_benchmark
Rolling v8/third_party/google_benchmark/src: 0e1255a..5b75184

Manually roll forward to:
- roll across a compile-time failure
- adjust BUILD.gn

Change-Id: I4733fbc1ba565293a15d5360815c92b293eedc34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966378
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75175}
2021-06-16 10:40:47 +00:00
Patrick Thier
a94ecb0489 [sparkplug] Fix enable batch compilation per default
Remove the neg-neg implication sparkplug --> baseline-batch-compilation,
because it is wrong in the current setting.
Since sparkplug is off per default, the implication will turn off batch
compilation.
When sparkplug is turned on explicitly, there is no implication to turn
on batch compilation again.
Since batch compilation is gated behind --sparkplug anyways we can
safely remove it.

Bug: v8:11790
Change-Id: I8f5ffb542625bc8061ceef02bae688edecea8438
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964600
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75174}
2021-06-16 10:15:16 +00:00
Michaël Zasso
71e8f8bb3c [codegen] Move definition of GetRegisterParameter to inline header
This fixes compilation of V8 in Node.js with Visual Studio 2019.
Without this change, MSVC errors with C3779 (a function that returns
'auto' cannot be used before it is defined) on the `static constexpr
auto registers()` method.

Bug: v8:11420
Change-Id: Id545199e2cdc10c8560031fb5950ec1171e5d554
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964095
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75173}
2021-06-16 09:10:36 +00:00
Ross McIlroy
8cb73e04ce [Turboprop] Avoid bailout on call optimizations in TurboProp.
As we push TurboProp's interrupt budget back, the deopt savings we get
from this aren't worth the runtime overhead in the generated code.

BUG=v8:9684

Change-Id: I6eeb941b25c13958f6b9ddf33439d7928af9b302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964813
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75172}
2021-06-16 08:44:06 +00:00
John Xu
7956f9521f Replace strdup with base::Strdup
The Cobalt team uses base/wrappers.h to intercept some low level OS
functions and recently we found strdup to be a blocker. Thankfully it
only appeared once in V8.

Change-Id: Ib20f399f94933b5d407c1e22e1df674420003ba2
Bug: v8:10927
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963805
Auto-Submit: John Xu <johnx@google.com>
Commit-Queue: John Xu <johnx@google.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75171}
2021-06-16 08:14:06 +00:00
John Xu
a52858dc01 Introduce Starboard snapshot writer
Cobalt is a V8 embedder and it has its own platform abstraction. So
to V8 the OS name is "Starboard" instead of Win/Linux/Android even
though the real OS is one of them. To select the right embedded file
writer for Cobalt, we need some customizations in
platform-embedded-file-writer-base.*.

Bug: v8:10927
Change-Id: I6dadb4690ade0b4aebec14bc87fdc6d71c03b3bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963804
Auto-Submit: John Xu <johnx@google.com>
Commit-Queue: John Xu <johnx@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75170}
2021-06-16 07:39:35 +00:00
Camillo Bruni
91ddeb062c [tools][system-analyzer] Various improvements
- Show related code object for Maps
- Fix opening transition trees
- Rename *LogEntry.prototype.codeLogEntry to .code
- Show Arrays as dropdowns in tooltips
- Avoid hiding the tooltip when clicking on the tooltip itself
- Show links to code variants (bytecode/baseline/optimized)
- Fix chunk offset calculation
- Fix code for browsers that don't support
  navigator.scheduling.isInputPending

Bug: v8:10644
Change-Id: I858dc410657d26d076214368814a52177b124f4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964592
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75169}
2021-06-16 07:22:46 +00:00
Lu Yahan
88f4ca2b5a [riscv64] Port [sparkplug][arm][arm64[ia32] Callee-saved registers for RecordWrite
- 2944844: [sparkplug][arm][arm64[ia32] Callee-saved registers for RecordWrite
- Delete kTestReg due to 2945538
- 2949104: [runtime] Rename Builtins::Name to Builtin

Change-Id: I33d12df7cbee6842a05c1dbe3e6158be1ff4cbc7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2952865
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#75168}
2021-06-16 04:41:25 +00:00
v8-ci-autoroll-builder
8796b0eaf6 Update V8 DEPS.
Rolling v8/build: e6942ef..bc21621

Rolling v8/buildtools/linux64: git_revision:e0c476ffc83dc10897cb90b45c03ae2539352c5c..git_revision:72d5a6e15d868abc8451fe0a3b6596e86a2ffc40

Rolling v8/buildtools/third_party/libc++abi/trunk: 6c29693..f4328ad

Rolling v8/third_party/aemu-linux-x64: XSqCv80jM_M_v5sYf8LVksQaL1zsbc6Pp9y-6WBCkbsC..D99f9rA6SsUg1U4VGdh-MSQQX94eeW2Mi8I_xw6-ccwC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e30a74f..6434229

Rolling v8/third_party/depot_tools: 3b56309..e319aba

Rolling v8/tools/clang: de043ec..c6949cb

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

Change-Id: Ia70979bb89a4f20a75995819f4a9dc5c02a4ae1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965998
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@{#75167}
2021-06-16 03:49:55 +00:00
Igor Sheludko
8d9eb6d358 [heap][cleanup] Add Code overload for GenerationalWriteBarrier
... to ensure that it'll not be triggered for Code objects which
are known to never be in new space.

This removes the need for having custom implementation of setters with
Code values - existing [CONDITIONAL_]WRITE_BARRIER macros will work
just fine.

Bug: v8:11879, v8:11880
Change-Id: I7ed70e51f9459040086dd4c67e61b11617dbdc24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964812
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75166}
2021-06-15 22:29:55 +00:00
Deepti Gandluri
4e95777177 Revert "[cpu-profiler] Reference counting for code entries"
This reverts commit 8e44ee5f75.

Reason for revert: Reverting due to UBSan failures - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/16888.

Original change's description:
> [cpu-profiler] Reference counting for code entries
>
> To enable deallocation of CodeEntry objects after they're no longer
> being referenced by an active profile or alive on the heap, replace the
> |used| bit with a proper reference count maintained by a CodeMap.
>
> Bug: v8:11054
> Change-Id: Id3d5941e509504415692f833e406ecdd2553d426
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945541
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Andrew Comminos <acomminos@fb.com>
> Cr-Commit-Position: refs/heads/master@{#75164}

Bug: v8:11054
Change-Id: Iae3ae73014c7eafe20917cf088a569f370d9b53d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965489
Auto-Submit: Deepti Gandluri <gdeepti@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@{#75165}
2021-06-15 22:28:07 +00:00
Andrew Comminos
8e44ee5f75 [cpu-profiler] Reference counting for code entries
To enable deallocation of CodeEntry objects after they're no longer
being referenced by an active profile or alive on the heap, replace the
|used| bit with a proper reference count maintained by a CodeMap.

Bug: v8:11054
Change-Id: Id3d5941e509504415692f833e406ecdd2553d426
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945541
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#75164}
2021-06-15 21:31:25 +00:00
Ross McIlroy
7d468b70cd [TurboProp] Make TurboProp optimize later.
Moves TurboProp to optimize around the time of TurboFan right now, and
removes some of the special-case logic we had to avoid aggressive
early optimization of TurboProp.

BUG=v8:9684

Change-Id: I0299408891ff6fd57e6523ff309b5f16624466a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964814
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75163}
2021-06-15 21:04:11 +00:00
Frank Tang
2347c81ad6 [intl] Fix Intl Locale Info
1. Add test to ensure none of the array contains undefined
2. Calculate the fixed array size by considering the code may filter out
some itmes returned by ICU.
3. Add test to check there are no undefined.
4. Add test to check the locale.timeZones return sorted array.
5. Also refactor the JSArray generation code.

Bug: v8:11871
Change-Id: I8ad4a779d137d9b7e2deead7a1aa38e599e1af2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953517
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75162}
2021-06-15 19:16:01 +00:00
Camillo Bruni
354a14f5aa [assembler][x64] Revert to longer move immediate instruction
The shorter xorl + movb instructions cause regressions.

Bug: chromium:1220093
Change-Id: Ib7da0ea16669fa490b78a8095f6f3b35e972e1cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964396
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75161}
2021-06-15 18:22:11 +00:00
Michael Lippautz
88d5b9040a cppgc-js: Fix leak in generating heap snapshots
StateBase requires a virtual destructor as it is destroyed through the
base class. Failing to provide a virtual dtor leaks internal state in
State (and possible in future RootState).

Bug: chromium:1056170
Change-Id: I4408a57dc05fdeb81408f571dd6eb87312ba7c9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964815
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75160}
2021-06-15 17:12:41 +00:00
Camillo Bruni
f3810dd916 [logging] Replace last uses of FLAG_trace_ic with FLAG_log_ic
Long live --log-ic!

Change-Id: I4d8cefd64cdbf693a868019deb2a864d43cbd2ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964393
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75159}
2021-06-15 16:26:39 +00:00
Jakob Kummerow
ca29ff4393 [bigint] Move division to src/bigint/
No changes to the algorithm; minor speedup due to the move
from Handle<BigInt> to Digits.

Bug: v8:11515
Change-Id: Id85fe4f0c276d3ad826fee79205719092d0e0715
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947412
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75158}
2021-06-15 16:24:39 +00:00
Milad Fa
1808ba9718 PPC: Pass is_atomic when emitting load reverse
The boolean value is expected to be present during code
generation.

Change-Id: I3f9bd8f3977badd7fc7c0a716858d0d46032ae95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963834
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75157}
2021-06-15 15:46:49 +00:00
Manos Koukoutos
597a9c7bcf [wasm-gc][test] Add array.copy benchmark
Bug: v8:7748
Change-Id: Ifdc661d3f4f95d8bd0dbacdface6aed15b9f1942
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960210
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75156}
2021-06-15 15:18:39 +00:00
Victor Gomes
36b44c15f6 [bazel] Compile V8 with bazel
Command to build: `bazel build :d8`

Caveats:
  - Needs clang
  - Only supports x64 on Linux
  - Bare V8: no Wasm and no ICU
  - Still needs GN to generate inspector files

Bug: v8:11234
Change-Id: I6d01fecff5fba5c3582995d071692e5c6c6c6310
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960949
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75155}
2021-06-15 14:52:09 +00:00
Liu Yu
719e600a09 [mips64] Change scratch register from kScratchReg to at in JumpIfSmi
This CL fixes tests failure caused by register allocation conflicts.

Change-Id: Ie5ba445d2e36047abf95644b613f49d3ed47315f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963492
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#75154}
2021-06-15 13:49:29 +00:00
Leszek Swirski
1ac40e69e8 [system-analyzer] Support inline scripts
Inline scripts share the same URL, so lookup of script by URL on them
can give the wrong result. Also, their source positions are relative to
the start of the HTML file, so we need to infer the starting line from
the Script's compilation event.

As a drive-by, fix the tooltip to lock in-place on click.

Change-Id: I5db6d35b0fbd2521531e48c34dea44b43b65ca4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963592
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75153}
2021-06-15 13:40:09 +00:00
Camillo Bruni
c9249db663 [assembler][x64] Add scoped CodeComment helper for nested comments
CodeComment nicely indents nested comments for better readable
disassembled code.

In addition, there are two helper macros:
- ASM_CODE_COMMENT adds the current function name as comment
- ASM_CODE_COMMENT_STRING macro can be used with custom strings

Bug: v8:11879
Change-Id: If5ff7e315f5acebe613f24b20d34694155f928d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960888
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75152}
2021-06-15 13:05:00 +00:00
Georg Neis
8ceaec1750 [compiler] Simplify JSCreateLowering::TryAllocateFastLiteral a little
I don't see any reason why we need to convert the 'uninitialized'
Oddball into a Smi 0 in the Smi case, nor why we need to convert the
hole-NaN HeapNumber into the Oddball in the Tagged case. These are
temporary anyways.

Change-Id: Ifdcd67528c7b19c36a1bde11291d78c3f211897f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953291
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75151}
2021-06-15 12:32:59 +00:00
Camillo Bruni
26b56ba664 [tools][system-analyzer] Fix linked events
- Open and focus separate views for each log entry
- Map.prototype.parent is now a getter
- Fix SharedLibLogEntry tooltips
- Store codeEntry in IcLogEntry for linking back to code objects
- New property-link-table which is used in tooltip and code-panel
- Ignore right-click events in the timeline-tracks

Bug: v8:10644, v8:11835
Change-Id: Id2fe5002b776adf362b1580b96082c84790a6ef0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960804
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75150}
2021-06-15 12:22:08 +00:00
Thibaud Michaud
68a438499d [regalloc] Skip unnecessary inactive live range iterations
Inactive live ranges are ordered by their next start, so in
UpdateDeferredFixedRanges, we can stop the search for conflicts as soon
as the next start is after the end of the current extent of deferred
code.

Bug: v8:11861
Change-Id: I114eb776c8228948ecca68d105224b121be8931b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960950
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75149}
2021-06-15 10:32:49 +00:00
Dominik Inführ
31251988ab [heap] Heap::EnsureSweepingCompleted only sweeps one page
This CL optimizes Heap::EnsureSweepingCompleted() by only ensure that
sweeping is finished for that object's page only and not for the whole
heap.

For this purpose the page is removed from the sweeping_list_ and
processed on the main thread. In case the object is in new space,
this method will just use EnsureIterabilityCompleted() since
the iterability task doesn't currently have any kind of synchronization.
Also the new space will generally be much smaller.

Bug: v8:11837
Change-Id: I7e878b5c84c223009fac0d58798197be5cd524e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2958488
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75148}
2021-06-15 10:03:39 +00:00
Michael Lippautz
1835607ba2 cppgc: Fix new/delete mismatch in heap snapshot generation
Before this CL the C strings were generated using new char[] and
destroyed using delete. Fix this by avoiding a raw new[] call and
directly using unique_ptr.

Bug: chromium:1056170
Change-Id: I894171d58a3f7a765cdf86e07d3da2e9298a4a92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960275
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75147}
2021-06-15 09:49:09 +00:00
Leszek Swirski
79b6158757 [system-analyzer] Support thin ticks
Add better support for lots of thin ticks by:

  * Removing stroke on ticks (so that the stroke isn't thicker than the
    tick itself)
  * Alternating colours of the ticks between light and dark (so that
    neighbouring ticks are still distinguishable)
  * Making selection drawing use isInputPending to allow faster looping
    over multiple ticks.

Change-Id: Iaa13fe4820d3d3168e085dfc01d7581cbc1739f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959626
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75146}
2021-06-15 09:29:39 +00:00
Santiago Aboy Solanes
9468be4ab7 [compiler] Add TSAN support for generated code tagged loads
In the same vein we did tagged stores, we can do tagged loads.

As a drive-by, move GetTSANRelaxedStoreStub to CodeFactory.

Bug: v8:7790, v8:11600
Change-Id: Ic1ef3245623756538eab64c3358047e3797195c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953162
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75145}
2021-06-15 09:17:49 +00:00
Georg Neis
3a6ace557c [ast] Fix a comment about placeholder for computed property values
R=mvstanton@chromium.org

Change-Id: Ia9b5b6e3b80334555faddd1fbc70995d414295a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960889
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75144}
2021-06-15 08:51:08 +00:00
Camillo Bruni
019d459299 [assembler][x64] Use higher-level Move instead of movq for code-size
Bug: v8:11879
Change-Id: I3f2f65d38fc656155b27b8835516cbf2832bf269
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649032
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75143}
2021-06-15 07:16:48 +00:00
Igor Sheludko
4b4037308b [compiler] Simplify DependentCode API and make it type-safe
Bug: v8:11879, v8:11880
Change-Id: I6b37148ae2a971bda0cbb6636f64561ab0a02ba5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960215
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75142}
2021-06-15 05:23:08 +00:00
Liu Yu
76a42474d2 [mips] Fix build failed
Port 407317a284

Change-Id: I6d46b2c9b9bafb0287fa711822aac8ffdb30c7ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2962153
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#75141}
2021-06-15 04:24:28 +00:00
v8-ci-autoroll-builder
e54c28ba0a Update V8 DEPS.
Rolling v8/build: b59724c..e6942ef

Rolling v8/buildtools/third_party/libc++abi/trunk: e5f25a3..6c29693

Rolling v8/third_party/aemu-linux-x64: KF0Sz0CG_sURJodN44_YMwy0VU9tagOFFB_3EDTux1kC..XSqCv80jM_M_v5sYf8LVksQaL1zsbc6Pp9y-6WBCkbsC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2f46970..e30a74f

Rolling v8/third_party/depot_tools: ef579a1..3b56309

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

Change-Id: I3b333c34f79e876889148c808c7e1aac3866cf11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2962152
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@{#75140}
2021-06-15 03:47:58 +00:00
Igor Sheludko
b5b9c2ca8b [cleanup] Remove unused TailCallOptimizedCodeSlot builtin
Bug: v8:11879
Change-Id: Ifb894d8beec6b54a9b7ff879dd4d6710306ba15b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960217
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75139}
2021-06-14 15:31:46 +00:00
Clemens Backes
13209a75c0 Reland "[no-wasm] Exclude trap-handler implementation"
This is a reland of 5d84b6cb9a. PS2 contains
the fix for a copy&paste error in a preprocessor condition.

Original change's description:
> [no-wasm] Exclude trap-handler implementation
>
> The trap handler is only needed for WebAssembly, hence it can be
> excluded in no-wasm builds (v8_enable_webassembly = false).
> This makes it easier to port WebAssembly to platforms that do not need
> to support WebAssembly.
>
> R=ahaas@chromium.org, jkummerow@chromium.org
> CC=johnx@google.com
>
> Bug: v8:11877
> Change-Id: I25c34c2c4f1122227047e13add532ee2b9f73d2f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953285
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75101}

Bug: v8:11877
Change-Id: I70dba5dc8762c65a9c751ff6619a3b0ebb542837
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960214
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75138}
2021-06-14 15:18:27 +00:00
Igor Sheludko
5913deec99 [cleanup][ic] Introduce bottleneck for Code handlers
This CL also removes code handler related logic from CodeFactory
and removes unused CodeFactory::BinaryOperation().

Bug: v8:11879, v8:11880
Change-Id: I4ea3074b7143975bea3f9367bcab84cdfcd86827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960948
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75137}
2021-06-14 15:10:27 +00:00
Clemens Backes
6ae810b805 Skip another nondeterministic test in predictable mode
Just as other skipped tests, this new test uses SAB to synchronize
between Workers, thus timing (and hence amount of allocations) is
nondeterministic.

R=syg@chromium.org

Bug: v8:11881
Change-Id: I9cd375a1f804aac4248a7c491e75a1c7c7919e82
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959627
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75136}
2021-06-14 14:44:36 +00:00
Thibaud Michaud
ff2cf7dad2 [wasm][eh] Remove unwind instruction
Relevant links:
https://github.com/WebAssembly/exception-handling/issues/153
https://github.com/WebAssembly/exception-handling/pull/156

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: I0deeb9665c6648e643d0aa4f310b7676e1c2fa32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2959624
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75135}
2021-06-14 14:36:26 +00:00
Milad Fa
659424f8c7 PPC/s390: [runtime] Rename Builtins::Name to Builtin 2/2
Port 407317a284

Original Commit Message:

    - Convert Builtin to enum class
    - Change int-based builtin_index methods to use Builtin
    - Change Builtins::builtin to Builtins::code

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

Change-Id: Ic92eeea4a0d0aaf38d78a93bfbaac2bb10403dae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960908
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75134}
2021-06-14 14:34:36 +00:00