Commit Graph

66749 Commits

Author SHA1 Message Date
Milad Fa
494a38006e PPC/s390: [wasm-simd] Move i64x2.widen_i32x4_{s,u} to mvp and remove ifdefs
Port ec8fbed745

Original Commit Message:

    These instructions were accepted into the proposal:
    https://github.com/WebAssembly/simd/pull/290

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

Change-Id: I69bbe90ab3af30d7748332a7e99b7812c95f96b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644939
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72257}
2021-01-22 15:31:06 +00:00
Omer Katz
adda4c5f98 cppgc: Add UMA support
This CL introduces cppgc::HistogramRecorder api which is similar to the
v8::metrics::Recorder api and is used by cppgc to report histogram
samples to embedders. Embedders should implement the api if they want to
collect histograms and provide an instance of it on heap creation.

CppHeap uses an adaptor class that implements the HistogramRecorder api
and is used to forward the relevant info to the relevant
v8::metrics::Recorder.

The api used 3 data structures: 2 for incremental steps that need to be
reported as they come (marking and sweeping) and 1 for the end of a GC
cycle that aggregates statistics over the entire cycle.
The data structure only provide the "raw" samples (e.g. atomic mark
time, incremental mark time, etc...). The embedder is expected to
compute aggregate histogram on its own (e.g. overall marking time).

Bug: chromium:1056170
Change-Id: If63ef50a29a21594f654edb83084598980d221ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642258
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72256}
2021-01-22 15:04:35 +00:00
Jan Wilken Dörrie
987f0b75bb [C++17] Apply consistent use of noexcept
In C++17 noexcept becomes part of the type system and thus needs to be
consistently applied between function declarations and definitions.

Change-Id: Ia34faa9d9d1f18916655fd5a1a8ec9f6b414f1e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643391
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72255}
2021-01-22 14:27:49 +00:00
Peter Marshall
93f8a86766 Reland "[cpu-profiler] Use base::LeakyObject for static CodeEntry objects"
This is a reland of c594a20ed3

Moved the getters to the .cc file to avoid link problems as they
are not performance critical anyway.

Moved ProfileNode::source_type to cc as it uses the _entry() functions
which are no longer inline.

Original change's description:
> [cpu-profiler] Use base::LeakyObject for static CodeEntry objects
>
> This is preferred over the older LazyInstance based stuff, and has
> a lot less boilerplate and is easier to follow.
>
> Bug: v8:8600
> Change-Id: I7c5c5ae04c064b0fc598dc01f1ed5442dc21a17b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640475
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72224}

Bug: v8:8600
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
Change-Id: I0ad9118e6d3bd087707609714b20aee1cbc4f459
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642252
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72254}
2021-01-22 13:59:53 +00:00
Paolo Severini
51ecfaec3a Revert "Reland "Faster JS-to-Wasm calls""
This reverts commit 6ada6a90ee.

Reason for revert: Revert for link issue:
https://bugs.chromium.org/p/v8/issues/detail?id=11335

Original change's description:
> Reland "Faster JS-to-Wasm calls"
>
> This is a reland of 860fcb1bd2
>
> - Disabled the tests for this feature in V8-lite mode (the original
> change broke V8-lite tests)
> - Also modified test console-profile-wasm.js that was brittle with this
> change because it assumed that there was always a JS-to-Wasm wrapper
> but this is not the case when the TurboFan compilation completes before
> the Liftoff-compiled code starts to run.
>
> More changes in Patchset 8:
>
> - Moved inlining of the "JSToWasm Wrapper" away from simplified-lowering,
> into a new phase, wasm-inlining that reuses the JSInliner reducer.
> The doc
> https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
> describes the new logic.
>
> - Fixed a couple of small issues in wasm_compiler.cc to make sure that
> the graph "JSToWasm Wrapper" subgraph has a valid Control chain;
> this should solve the problem we had inlining the calls in functions
> that can throw exception.
>
>
> Original change's description:
> > Faster JS-to-Wasm calls
> >
> > This replaces https://chromium-review.googlesource.com/c/v8/v8/+/2376165/.
> >
> > Currently JS-to-Wasm calls go through a wrapper/trampoline, built on
> > the basis of the signature of a Wasm function to call, and whose task
> > is to:
> > - set "thread_in_wasm_flag" to true
> > - convert the arguments from tagged types into Wasm native types
> > - calculate the address of the Wasm function to call and call it
> > - convert back the result from Wasm native types into tagged types
> > - reset "thread_in_wasm_flag" to false.
> >
> > This CL tries to improve the performance of JS-to-Wasm calls by
> > inlining the code of the JS-to-Wasm wrappers in the call site.
> >
> > It introduces a new IR operand, JSWasmCall, which replaces JSCall for
> > this kind of calls. A 'JSWasmCall' node is associated to
> > WasmCallParameters, which contain information about the signature of
> > the Wasm function to call.
> >
> > WasmWrapperGraphBuilder::BuildJSToWasmWrapper is modified to avoid generating code to convert the types for the arguments
> > of the Wasm function, when the conversion is not necessary.
> > The actual inlining of the graph generated for this wrapper happens in
> > the simplified-lowering phase.
> >
> > A new builtin, JSToWasmLazyDeoptContinuation, is introduced to manage
> > lazy deoptimizations that can happen if the Wasm function callee calls
> > back some JS code that invalidates the compiled JS caller function.
> >
> > Bug: v8:11092
> > Change-Id: I3174c1c1f59b39107b333d1929ecc0584486b8ad
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2557538
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Reviewed-by: Georg Neis (ooo until January 5) <neis@chromium.org>
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#71824}
>
> Bug: v8:11092
> Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
> Change-Id: I7d8523fa916bf4029a31f8c7a72bbd93336dc0b9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596784
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#72147}

Tbr: ahaas@chromium.org, jgruber@chromium.org
Bug: v8:11092, v8:11335
Change-Id: Iab2908928dfe7ea353f70cb5d3bf2de4d3074db6
Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644758
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72253}
2021-01-22 13:16:21 +00:00
Andreas Haas
3a8a7e6184 [wasm] Implement pushing of externref parameters on the stack
On x64, reference types where not handled yet in LiftoffAssembler::push.
Note that the values pushed on the stack there do not have to be
handled by a safepoint. The reason is that stack parameters in general
are handled separately from safepoints.

R=thibaudm@chromium.org

Bug: chromium:1168116
Change-Id: Ie62479c13839f0ba240d0e41fa76d07a2cc48881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642263
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72252}
2021-01-22 13:12:09 +00:00
Ulan Degenbaev
7d3f3d7fbb [heap] Fix alignment of large fixed double array.
This ensures that large objects have alignment suitable for a fixed
double arrays.

Bug: chromium:1161759
Change-Id: I64fe88d641fedbb5e27c2b38c1b9a4e75cab535a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639959
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72251}
2021-01-22 12:49:48 +00:00
Michael Lippautz
ee89feb102 cppgc: Allow tracing using raw pointers
There are several use cases related to collections that require
tracing a raw pointer.

Bug: chromium:1056170
Change-Id: I162b5380e7bddd7be62cbc74aa0031c8695220a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643385
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72250}
2021-01-22 12:28:58 +00:00
Mythri A
7ea641455a [turboprop] Add a new test variant for turboprop-as-toptier
Bug: v8:9684
Change-Id: Ie8c684998b9811c85ab385037d13604ac838b962
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637225
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72249}
2021-01-22 11:19:59 +00:00
Camillo Bruni
9e3822d0ac [codegen] Prevent duplicate register parameters
Prevent duplicate registers in interface descriptor parameter lists.

Change-Id: I160ada37f0d8308dd42a37b68fbf7c2d71ed8c8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642255
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72248}
2021-01-22 10:46:29 +00:00
Clemens Backes
82c3254de0 [wasm] Guard against huge code allocations
If a single background thread generates more code than
{kMaxCodeSpaceSize}, we cannot add them as one chunk. This CL adds a
CHECK to guard against that. If we find that this CHECK is hit in the
wild, we need to fix this for real.

R=ahaas@chromium.org

Bug: v8:11339
Change-Id: I549ecd79747bdf14a65b297c01779953e053abf2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643382
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72247}
2021-01-22 10:38:08 +00:00
Marja Hölttä
2ac866d9e1 [super speed] Ship --super-ic
Bug: v8:9237
Change-Id: I60b016617d468e6a04ef48998e59c80f58d16863
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642245
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72246}
2021-01-22 09:38:09 +00:00
Liu Yu
3f1177c5a0 [mips] Change kSpeculationPoisonRegister from a7 to t3
When kSpeculationPoisonRegister is a7, the test
TestFastJSWasmCall_MultipleArgs failed.

Besides, delete an unuse member named table_entry_size_.

Change-Id: Ic2c8b68d50c02dca7c41520ceb217fec33fe8cc4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644539
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@{#72245}
2021-01-22 09:05:08 +00:00
v8-ci-autoroll-builder
f94b8d46fc Update V8 DEPS.
Rolling v8/build: 2f05905..61eac11

Rolling v8/buildtools: 0c30db8..13547b9

Rolling v8/third_party/depot_tools: af0dca3..361ccce

Rolling v8/tools/clang: 3c71637..786cae1

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ibfde76d5ee8a85f0bb1f8cd39538f3edc7d589a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644142
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@{#72244}
2021-01-22 03:53:03 +00:00
Zhi An Ng
ec8fbed745 [wasm-simd] Move i64x2.widen_i32x4_{s,u} to mvp and remove ifdefs
These instructions were accepted into the proposal:
https://github.com/WebAssembly/simd/pull/290

Bug: v8:10972
Change-Id: Ia2cce2df575786babe770b043b1e90bf953c5f9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643658
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72243}
2021-01-22 00:16:21 +00:00
Ng Zhi An
67ff779e97 [wasm-simd][x64] Optimize i8x16.popcnt
Instead of loading the same mask twice, we load from an external
reference twice. This saves some some binary size and a bunch of
instructions.

Bug: v8:11002
Change-Id: Ice80bd10694dcca920e18b8043390d7631c65805
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643404
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72242}
2021-01-21 22:03:52 +00:00
Milad Fa
d46ea5523c PPC [wasm-simd]: Prototype sign select
Code fo Instruction Selection is added to the comments
and should be added when opcode is moved out of being a prototype.

Bug: v8:10983
Change-Id: I55948208e0ba0e903b267e0ca3e5815cb673d264
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642155
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72241}
2021-01-21 21:29:31 +00:00
Deepti Gandluri
9a534a207e [wasm-simd] Prototype prefetch for ia32
Bug: v8:11168
Change-Id: I6f697363d6f6d9b6a2303dec848f6d5200613f0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2641198
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72240}
2021-01-21 21:22:41 +00:00
Bill Budge
f605917363 [wasm] Add experimental wasm threads to COOP+COEP features.
Bug: chromium:1167733
Change-Id: Ie057068ee4ff08055d9dc7812a2e4f4dca9ec8d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2636844
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72239}
2021-01-21 21:15:21 +00:00
Deepti Gandluri
1f9fdbe3a1 [wasm-simd] Prototype prefetch for x64
Bug: v8:11168
Change-Id: I88fd086b83bd4a17aae145fb02280a4d36b31579
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2641199
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72238}
2021-01-21 20:15:51 +00:00
Ng Zhi An
ae85cde159 [x64] Removed unused atomic instruction-codes
These are never generated by the instruction-selector, and don't need to
be defined.

Bug: v8:11074
Change-Id: I83a5760b6350155fd19d069be6aeeec5887e5880
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643396
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72237}
2021-01-21 18:59:51 +00:00
Santiago Aboy Solanes
2755e31c02 [object] Add string reader lock to StringCharacterStream
It acquires the string lock to avoid race conditions. It does so in a
slow way (by getting the isolate from the string) to avoid piping the
Isolate through.

Bug: v8:7790, chromium:1166095
Change-Id: I8b769b4e96ee780314359d1d15d712012aade88a
Fix: chromium:1166095
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637861
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72236}
2021-01-21 18:31:31 +00:00
Junliang Yan
8431f6e8f0 s390x: fix ptr-compr build break
Change-Id: I8c849e6259d60e8dc57a5b03f388cc9347488a1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642884
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72235}
2021-01-21 17:37:03 +00:00
Clemens Backes
bb931403b0 [flags] Hide simulator flags in non-simulator builds
Those flags are only used in the simulators, hence hide them for
non-simulator builds.

Move the --log-colour flag out of the simulator block, because it
is also used in other components.

R=ahaas@chromium.org

Bug: v8:11074
Change-Id: Iafe3c6ba0ee78b2cf0b0dff7299a9b588d136ab8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642262
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72234}
2021-01-21 17:21:10 +00:00
Omer Katz
d1686fe884 cppgc: Remove deprecated enum values
Bug: chromium:1056170
Change-Id: I74c589171470296d310055ba3fe982fb3c9f25f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642261
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72233}
2021-01-21 17:13:50 +00:00
Junliang Yan
0c2e9cb016 s390x: Implement Store LE version
Change-Id: I5422d4288eebedac86077a42286231e5c225232d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642877
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72232}
2021-01-21 17:12:01 +00:00
Seth Brenith
6c2a1394ce Use Torque-generated BodyDescriptor for ScopeInfo
With this change, the GC will compute the size for ScopeInfo instances
based on a combination of flags, context_local_count, and possibly
module_variable_count, rather than using the FixedArray-style length
field. After this change and a few more cleanups, we should be able to
remove that length field and save a few bytes.

Bug: v8:8952
Change-Id: Ica8e51ee106685b44fcc55556b4bb124afc91cfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2598461
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72231}
2021-01-21 16:49:00 +00:00
Michael Lippautz
d37562e543 heap: Improve unified heap test coverage
Add test for Cpp->JS references.

Bug: chromium:1056170
Change-Id: I7240483b6ad7393346b55a9756fcd4721e238119
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642257
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72230}
2021-01-21 16:03:50 +00:00
Jakob Gruber
96b8ec759e [deoptimizer] Continue extracting classes
deoptimized-frame-info: Used only by the debugger.
translated-state: Combines translations and current frame states to
describe in- and output frames.
translation-array: Utils for accessing the on-heap TranslationArray
object.

Bug: v8:11332
Change-Id: I86757bed370d6d9e493862eb24a9e92533f80933
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640414
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72229}
2021-01-21 15:57:31 +00:00
Jakob Gruber
7eb88e4216 [deoptimizer] Begin splitting classes into files
This CL keep the Deoptimizer class in deoptimizer.{h,cc} and moves
everything else into translations.{h,cc}. Translations may be further
split up in follow-up work.

Drive-by: Remove dead code and clean up includes.

Bug: v8:11332
Change-Id: If774399843da1322c01e03d71c97b10fc88e45cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639955
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72228}
2021-01-21 15:14:10 +00:00
Michael Lippautz
df212a095b cppgc,api: Add support for JS->C++ write barriers
Provide a way to trigger a write barrier when updating the embedder
fields. In future, such a mechanism should be encapsulated into V8.

Bug: chromium:1056170
Change-Id: I4e43362993c3e58d5bebdd58a7d46a39c0aa4f06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640419
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72227}
2021-01-21 14:28:00 +00:00
Dan Elphick
df5854c914 Reland "[build] Enable external flag header by default"
This is a reland of d1da9694d4

Relanding now that fixes for perfetto and cppgc are in:
https://chromium-review.googlesource.com/c/v8/v8/+/2640458
https://chromium-review.googlesource.com/c/v8/v8/+/2640480

Original change's description:
> [build] Enable external flag header by default
>
> Turns on v8_generate_external_defines_header.
>
> Bug: v8:11292
> Change-Id: I4b1d9b47390b560b7cbf677948310694d8b03367
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2610966
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Auto-Submit: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72201}

Bug: v8:11292
Change-Id: Ia47eeb6c45f4cc3db72c10782d677b69506fa3d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642249
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72226}
2021-01-21 14:20:40 +00:00
Clemens Backes
02459cce47 Revert "[cpu-profiler] Use base::LeakyObject for static CodeEntry objects"
This reverts commit c594a20ed3.

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

Original change's description:
> [cpu-profiler] Use base::LeakyObject for static CodeEntry objects
>
> This is preferred over the older LazyInstance based stuff, and has
> a lot less boilerplate and is easier to follow.
>
> Bug: v8:8600
> Change-Id: I7c5c5ae04c064b0fc598dc01f1ed5442dc21a17b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640475
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72224}

TBR=petermarshall@chromium.org,clemensb@chromium.org

Change-Id: I2e4fce9bc58d289338814f3ee1b1520a97dfd3cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8600
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642251
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72225}
2021-01-21 13:43:52 +00:00
Peter Marshall
c594a20ed3 [cpu-profiler] Use base::LeakyObject for static CodeEntry objects
This is preferred over the older LazyInstance based stuff, and has
a lot less boilerplate and is easier to follow.

Bug: v8:8600
Change-Id: I7c5c5ae04c064b0fc598dc01f1ed5442dc21a17b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640475
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72224}
2021-01-21 13:27:40 +00:00
Jakob Gruber
fa6b7a6970 Remove tebbi from OWNERS and TODOs
OWNERS files: removed tebbi's entry.
TODOs: replaced with 'turbofan'.

Change-Id: Ib7a90418b394f123b82051379f120f0323d04097
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639757
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72223}
2021-01-21 13:23:00 +00:00
Dan Elphick
eacd5a31ba [cppgc] Fix dependency for cppgc tests
Add a dependency to a cppgc target for the the cppgc unit tests sources
so that the header files are used correctly. Previously it was working
because it added the external config which sets up the include
directories correctly, but would fail if the v8-gn.h file was not
generated quickly enough or if the cppgc_unittests_sources was built on
its own.

Bug: v8:11292
Change-Id: If12be4809b59b8dd5705468ad0343a1118547092
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640458
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72222}
2021-01-21 13:21:32 +00:00
Liu Yu
2471a0670d [mips][runtime] Add new instance types for constructor functions
Port: 624030e975

Bug: v8:11256

Change-Id: I48379a716fd5424448fb1fb1051a9d119f73bcdb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642167
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@{#72221}
2021-01-21 13:18:00 +00:00
Camillo Bruni
cb020c8e21 [d8] Throw Error objects instead of strings by default
Change-Id: I3eaa9c7e80bea7748dc28ec4ff09fecbdd7a434d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639767
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72220}
2021-01-21 13:13:21 +00:00
Clemens Backes
e6cfe142c9 [wasm][memory64] Test executing memory.size
This fixes typing (and type conversions) in the two compilers and adds a
test for executing a memory.size instruction in memory64.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: Ic06b224437cb818ad74d0732fc4c8e08c9095231
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632594
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72219}
2021-01-21 13:06:11 +00:00
v8-ci-autoroll-builder
c86110789f Update V8 DEPS.
Rolling v8/build: 43dd249..2f05905

Rolling v8/buildtools: c38b5ab..0c30db8

Rolling v8/third_party/android_platform: ef64306..fdaa5e5

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cf567b6..beb8370

Rolling v8/third_party/depot_tools: dabd965..af0dca3

Rolling v8/tools/clang: ba4ee03..3c71637

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I1a41567539bad93f25648ce1719c20bf596af30f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642165
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@{#72218}
2021-01-21 11:16:50 +00:00
Pierre Langlois
251feceb65 [cctest][mac] Enable MAP_JIT on tests that need RWX memory.
The icache and jump-table-assembler tests need memory that is both
writable and executable. On Mac, to do this we need to pass MAP_JIT to
mmap which is wired with the VirtualMemory::JitPermission flag.

Change-Id: If8236fa8983a4a59ef39fe777f26a02103dc6f75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637227
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#72217}
2021-01-21 10:45:40 +00:00
Nico Hartmann
34e89a6ba8 Workaround for CFI bug
This CL lands a workaround for a bug causing the linker to merge
ExternalOneByteStringGetChar() and ExternalTwoByteStringGetChar() which
leads to the generated vtable address checks failing on one of the
inputs.

To make the two function's machine code different (to prevent the
linker from merging them), this CL adds CHECKs of the arguments to both
functions.

Bug: chromium:1160961
Change-Id: Ifc4c6e4e05a394a6f27572877abb765d02fd23ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640478
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72216}
2021-01-21 10:31:10 +00:00
Ross McIlroy
7c8564f982 [TurboFan] Ensure PossiblyBackgroundSerialized objects are considered serialized
Previously ShouldHaveBeenSerialized() would return false for
kPossiblyBackgroundSerializedHeapObject objects which prevented
checks for whether the correct serialization had been done before
accessing Map::prototype() for these ObjectRefs.

BUG=chromium:1168435,v8:7790,v8:9684

Change-Id: I31b4cf7c7ce67ba1c46aea1451172b279d215508
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640479
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72215}
2021-01-21 09:00:09 +00:00
Dan Elphick
dceceac1ba [tracing] Fix builds with perfetto and v8-gn.h
Adds v8config.h include before using V8_USE_PERFETTO to fix build errors
when v8_generate_external_defines_header and v8_use_perfetto are both
enabled.

Bug: v8:11292
Change-Id: I4ea5fd39ca7eaaa5ad64b532d26df7933da41659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640480
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72214}
2021-01-21 08:42:18 +00:00
Hao Xu
e5ea57a5a7 Mark builtins as hot sections using text section prefix in Windows.
This will places builtins in .text$hot code section that is generated by native compiler PGO

Change-Id: I9e66eea99fc9b25cda9d9a9d1f57a0cd43d3a924
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2628595
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72213}
2021-01-21 07:57:18 +00:00
Jakob Gruber
215416763e [compiler] Re-add NaN-folding optimization
This was previously removed in
https://chromium-review.googlesource.com/c/v8/v8/+/946129.

Given that test/mjsunit/compiler/regress-817225.js no longer
reproduces, and that the original CL removed only one occurrence of
this common pattern, it's not clear that it fixes anything.

Bug: v8:7519
Change-Id: I973a581e1e6cdea5ba2ff31364bd6701602fc8d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637854
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72212}
2021-01-21 07:30:18 +00:00
Jakob Gruber
3375b40d07 [compiler] Add convenience accessors to state value iteration
The `parameters` attached to FrameState nodes are often iterated s.t.
the receiver (implicitly at index 0), and potentially some leading
parameters, are skipped. The new convenience functions
`begin_without_receiver` and `begin_without_receiver_and_skip` make this
pattern more convenient.

Bug: chromium:1166136
Change-Id: Ic2bc7319edf9b8567346788dfaebd8852672a703
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637221
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72211}
2021-01-21 07:19:10 +00:00
Shu-yu Guo
61972b112d [regexp] Remove unused flag getter use counters
The compatibility fixes have been standardized.

Bug: chromium:581577
Change-Id: I4ab1df59cbcb4bcbcfe9e3a3c658b2d6b81fe68e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633539
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72210}
2021-01-21 03:14:08 +00:00
Bill Budge
352b9ecbdb Reland "Reland "[compiler][wasm] Align Frame slots to value size""
This is a reland of 1694925c72

Minor fix to linkage for constexpr.

TBR=ahaas@chromium.org,neis@chromium.org

Original change's description:
> Reland "[compiler][wasm] Align Frame slots to value size"
>
> This is a reland of cddaf66c37
>
> Original change's description:
> > [compiler][wasm] Align Frame slots to value size
> >
> > - Adds an AlignedSlotAllocator class and tests, to unify slot
> >   allocation. This attempts to use alignment holes for smaller
> >   values.
> > - Reworks Frame to use the new allocator for stack slots.
> > - Reworks LinkageAllocator to use the new allocator for stack
> >   slots and for ARMv7 FP register aliasing.
> > - Fixes the RegisterAllocator to align spill slots.
> > - Fixes InstructionSelector to align spill slots.
> >
> > Bug: v8:9198
> >
> > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
> > Commit-Queue: Bill Budge <bbudge@chromium.org>
> > Reviewed-by: Georg Neis <neis@chromium.org>
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#71644}
>
> Bug: v8:9198
> Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72195}

Bug: v8:9198
Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72209}
2021-01-21 01:24:58 +00:00
Ng Zhi An
5603f5c942 [wasm-simd] Prototype double precision conversions
Add interpreter implementation and tests.

Bug: v8:11265
Change-Id: Iddb33f2d2fe0badc0a5ee4a950a65b4caf5d289f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2636846
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72208}
2021-01-20 19:49:04 +00:00