Commit Graph

72920 Commits

Author SHA1 Message Date
Frank Tang
f1b6873023 [intl] Ship Intl Locale Info
DD: https://docs.google.com/document/d/1OwEsvs8VQwvR-ug01xLyIwpgcvUfaP24u9owc7aBKJ4/
Status: https://www.chromestatus.com/feature/5566859262820352
R2T: https://groups.google.com/a/chromium.org/g/blink-dev/c/5spmAncbooE/m/NdwZGjLpAgAJ
I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/4ZMt5ukQNRs/m/0flHnuaBBgAJ
API Owners LGTMs: chrishtr@chromium.org, miketaylr@chromium.org, tkent@chromium.org

Bug: v8:11638
Change-Id: Ief40b7d545a268723e5fbe654cdc86dcb9523300
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3315223
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78378}
2021-12-14 22:40:25 +00:00
Igor Sheludko
4f4086dc34 [ext-code-space] Avoid Code <-> CodeT conversions in runtime, pt.4
This CL migrates the following objects' APIs to CodeT:
* WasmFunctionData,
* WasmInternalFunction.

Bug: v8:11880
Change-Id: Ib3f0eb41894cbd3c6b30430c4e5616eb45fbbaec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338701
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78377}
2021-12-14 18:42:55 +00:00
Seth Brenith
00a757fabd Shorten generated code for binary-search switches
On some branches of the search tree for a binary-search switch, the
input value is sufficiently constrained that we could unconditionally
jump to the last possible case rather than checking for value equality.
This shortens some builtins by a few instructions and might speed things
up, though I expect the effect to be small.

Change-Id: I2313f26976e6d3c182f03bd927b338c8175b3af3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3335437
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78376}
2021-12-14 16:46:08 +00:00
Camillo Bruni
86363753cf [d8] Add mutex guard for AsyncHooksWrap::async_wraps_
Multiple threads can modify async_wraps_ in parallel, which is not ok.

Drive-by-fix:
- Use normal constructor/destructor for AsyncHooksWrap
- Use unique_ptr for storing AsyncHooksWrap

Bug: chromium:1278276
Change-Id: I667980151c775be29e603790e589b1de76fae05a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338257
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78375}
2021-12-14 16:45:05 +00:00
Benedikt Meurer
5e26815591 [refactor] Introduce VisitStack choke point.
This decouples the stack trace visitation logic from the creation
of actual stack frame objects, in preparation to introduce a
second kind of stack frame object (`v8::internal::StackFrameInfo`
as part of http://crrev.com/c/3302794) in addition to the existing
`v8::internal::CallSiteInfo`.

Doc: https://bit.ly/v8-stack-frame
Bug: chromium:1258599, chromium:1278647, chromium:1278650
Change-Id: I398933653e29cc2fe5c222526d9dd686ef8239b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3334781
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78374}
2021-12-14 16:43:25 +00:00
Nico Hartmann
bc5fc1dbbf Revert "[counters] Improve v8.execute histogram timer"
This reverts commit 6956482764.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux%20MSAN%20no%20origins/25955/overview

Original change's description:
> [counters] Improve v8.execute histogram timer
>
> - Mark uncommon timer-paths as V8_NOINLINE
> - Add explicit LongTaskNestedTimedHistogramScope class
> - Use explicit LongTaskRecordMode enum
> - Mark a few more isolate methods as const
> - Add more timer scopes:
>   - Accessors::ArrayLengthSetter
>   - v8::NewContext
>
> Bug: v8:12498, chromium:1275056
> Change-Id: I7896ee341c3c3a1fd5acf8f3f59347ff01dda9c0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338258
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Auto-Submit: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78372}

Bug: v8:12498, chromium:1275056
Change-Id: I0147c57085f114201e1d5fa293282d38c81d0148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338699
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78373}
2021-12-14 16:28:45 +00:00
Camillo Bruni
6956482764 [counters] Improve v8.execute histogram timer
- Mark uncommon timer-paths as V8_NOINLINE
- Add explicit LongTaskNestedTimedHistogramScope class
- Use explicit LongTaskRecordMode enum
- Mark a few more isolate methods as const
- Add more timer scopes:
  - Accessors::ArrayLengthSetter
  - v8::NewContext

Bug: v8:12498, chromium:1275056
Change-Id: I7896ee341c3c3a1fd5acf8f3f59347ff01dda9c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338258
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78372}
2021-12-14 16:14:05 +00:00
Andreas Haas
00e806ff3e Reland "[wasm] Add --wasm-dynamic-tiering to --future"
R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: If00f34053bb970a71a1826010050b79557dbb381
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338259
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78371}
2021-12-14 15:06:37 +00:00
Seth Brenith
dd9d4c96c1 Always emit unconditional jump in binary-search switch
We probably expect a binary-search switch to take log(n) time in all
cases, but there is currently a possibility of that expectation being
broken. I'm not aware of any place where this actually happens, but if
the default handler immediately follows the switch dispatch block in
assembly order, then unconditional jump instructions for that handler
would be omitted. This omission could cause linear execution time, where
every case is checked before falling through to the default handler.

This change introduces a new function to emit an unconditional jump
instruction regardless of whether the target is the following block, and
uses that new function when generating a binary-search switch to ensure
consistently log(n) behavior.

Change-Id: I5cab86fd66386762519035410e3b532dc6fd764c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3335222
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78370}
2021-12-14 14:54:41 +00:00
Andreas Haas
dad520133c [wasm] Disable dynamic tiering for the c-api
With dynamic tiering, the "serialize" function provided by the c-api
does not work anymore, and it is unclear how it should work.

R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: Ib70bf118ba42b0752eb5dab5f43893da0404931e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338657
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78369}
2021-12-14 14:53:38 +00:00
Manos Koukoutos
8c0b9b3b49 [wasm-gc][asm-js] Consider gc disabled for asm-js modules
An asm-js module has all wasm feature flags disabled, despite the global
flag configuration. Therefore, in WasmExportedFunction::New, we should
retrieve the enabled features from the NativeModule instead of the
flags.

Bug: chromium:1279151
Change-Id: Ic44fe535baa7cb851644457cce533c24d4c9824e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338256
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78368}
2021-12-14 13:30:40 +00:00
Igor Sheludko
52407c5533 [ext-code-space] Avoid Code <-> CodeT conversions in runtime, pt.3
This CL
* migrates FeedbackVector::optimized_code to CodeT,
* migrates OSROptimizedCodeCache to CodeT.

Bug: v8:11880
Change-Id: I2082412fb9fdf90e7ed90f4454ecf55f4f3d53d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3330468
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78367}
2021-12-14 13:13:46 +00:00
Benedikt Meurer
907a03d3a8 [refactor] Be explicit wrt. simple vs. detailed stack trace.
This is a non-functional refactoring to make naming of stack traces more
consistent, and thus easier to reason about whether the "simple stack
trace" (stack trace API) or the "detailed stack trace" (inspector API)
is meant. Granted, these names aren't great by themselves, but at least
we should be consistent.

This also adds a new `Isolate::GetSimpleStackTrace()` and uses that
directly to implement the Wasm C-API, avoiding the roundtrip via the
`JSMessageObject`, which actually carries a detailed stack trace (which
by chance worked out so far).

Doc: https://bit.ly/v8-stack-frame
Bug: chromium:1258599, chromium:1278647, chromium:1278650
Change-Id: I29e1a956ed156d6eeceb50150a28afaa2f11b9c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3334780
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78366}
2021-12-14 13:10:16 +00:00
Igor Sheludko
a0108291e2 [ext-code-space] Avoid Code <-> CodeT conversions in runtime, pt.2
This CL migrates JSFunction's code accessors to CodeT.

Bug: v8:11880
Change-Id: I8cf367eb79cc1d59548dd4f3e18c010f76f101cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3330466
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78365}
2021-12-14 12:19:05 +00:00
Leszek Swirski
25601fb9db [zone] Fix initial position rounding
Fixed: chromium:1279383
Change-Id: I0fb6e15d47698b90c51cc27e18a526ba6d0fc1d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338656
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78364}
2021-12-14 11:57:35 +00:00
Corentin Pescheloche
79a9d2eb34 Fix destructor for EmbedderStateScope
EmbedderState is forward declared in public header for
EmbedderStateScope. Default std::unique_ptr's destructor needs a fully
defined class. Defining default destructor in implementation file fixes
this.

Bug: chromium:1263871
Change-Id: I8ccc58f56a758927dc5d7a39387188185e7d3827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338697
Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78363}
2021-12-14 11:54:09 +00:00
Camillo Bruni
1e4593f3fe [tq][runtime] Use build flags for JS context promise hooks
Use build_flags_ with @if/@ifnot in torque for the following flags:
- V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS
- V8_ENABLE_SWISS_NAME_DICTIONARY

- Make sure Torque and CSA code actually respect
  V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS.
- Rename V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS to
  V8_ENABLE_JAVASCRIPT_PROMISE_HOOKS
- Rename gn/bazel arg v8_allow_javascript_in_promise_hooks to
  v8_enable_javascript_promise_hooks
- Unship context promise hooks in chrome and enable them only in d8
  for testing purposes
- Make sure d8 and the API throw when using promise hooks without
  the compile time feature enabled

Bug: chromium:1265186, v8:11025
Change-Id: I69834d44d683a36d0d7be3c3d68888321be0fd7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3301474
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78362}
2021-12-14 10:51:45 +00:00
Benedikt Meurer
4ecf143801 [refactor] Rename StackFrameInfo to CallSiteInfo.
This is the second step in the refactoring to make v8::StackFrame
more lightweight and usable for (long time storage) by the V8
inspector (see https://bit.ly/v8-stack-frame for an overview).

This is a purely mechanical change without any functional aspects.
The intention is to make the use case for the CallSiteInfo objects
clear, namely to serve as the backing store for the CallSite objects
exposed via the Error.prepareStackTrace() API and used under the
hood to implement the error.stack accessor.

Doc: https://bit.ly/v8-stack-frame
Bug: chromium:1258599, chromium:1278647, chromium:1278650
Change-Id: I39dffd1f1a8e5158ddc56f2a0a2b1b28321f487a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300138
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78361}
2021-12-14 10:03:25 +00:00
Igor Sheludko
7476acb90f [ext-code-space] Cache code kind and builtin_id in CodeDataContainer
Drive-by: fix TSAN issue.

Bug: v8:11880
Change-Id: I8a31391c6a1855a20a243eb740e4e3e1223ecbbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3333930
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78360}
2021-12-14 09:49:15 +00:00
v8-ci-autoroll-builder
2c89f0fdec Update ICU
Rolling v8/third_party/icu: edf883a..fbc6faf

Add display names for languages and regions for Android (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/fbc6faf

Update OWNERS (Maksim Ivanov)
https://chromium.googlesource.com/chromium/deps/icu/+/fe915d8

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

Change-Id: I02a5e611d648dc2393e96f2b108e15121eee210d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3336700
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78359}
2021-12-14 05:20:55 +00:00
v8-ci-autoroll-builder
668a4bf82c Update V8 DEPS.
Rolling v8/build: 47daaa3..864a567

Rolling v8/buildtools/linux64: git_revision:fc295f3ac7ca4fe7acc6cb5fb052d22909ef3a8f..git_revision:2e56c317bd8e2bf152cfa2ead6ac5fa476fe28b4

Rolling v8/buildtools/third_party/libc++abi/trunk: 58799ca..603d9d1

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/45fc896..1ba82f6

Rolling v8/third_party/depot_tools: ecc14aa..2777fd9

Rolling v8/tools/clang: 7fd4168..dc7eff9

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

Change-Id: Ic4bdb58338f40da8a26572d54ba949d27777a973
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3336699
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78358}
2021-12-14 03:49:55 +00:00
Aleksei Koziatinskii
99627ac1b8 inspector: report kMessageLog as a level for console.log to embedder
Some embedders might want to process console.info and console.log
differently. So inspector needs to return a different level for
these console log messages.

Change-Id: I936990a25f079a0d72f877a5095ed93819fc539a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3331929
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78357}
2021-12-14 02:55:15 +00:00
Lu Yahan
4c2bea9703 [riscv64] Implement cpu probe
Change-Id: I53234b6494887edd2b18e5d6b7d07675414d2e68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329802
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#78356}
2021-12-14 01:18:25 +00:00
Alexander Schulze
98c8dc1808 [infra] Remove gpu dimension from mac bots.
Bug: chromium:1279426
Change-Id: Ia510b105a4aacbca3abc521b110bcf58cfe6e294
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3335816
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78355}
2021-12-13 22:32:11 +00:00
Piotr Sikora
cecfbb46b1 cppgc: Fix include brackets.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Change-Id: Iee9005f1dd934fc6b81c1a8eb3d8d6bfb21b4bdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3334336
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78354}
2021-12-13 20:59:54 +00:00
Tim van der Lippe
0135cda64a Add more debugging info for DCHECK
We recently ran into two separate issues with this DCHECK. To enhance
debugging, let's add some more information as to which property is
failing. That should make investigating of the problematic property
easier, as we now no longer need to printf the results.

R=jkummerow@chromium.org

Bug: chromium:1276617, chromium:1262066
Change-Id: I8613780fc9613af700e113bb6050d4cbbd4cb040
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3330467
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78353}
2021-12-13 17:15:04 +00:00
Nico Weber
282e678881 Remove absolute paths in ninja files for v8windbg gn file
No behavior change.

Bug: chromium:1278777
Change-Id: I18deed9571acb9f953cb6cddee12e27733de98b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3332197
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78352}
2021-12-13 16:22:54 +00:00
Manos Koukoutos
1771e4aaa3 [wasm] Remove --experimental-wasm-reftypes flag
Since the reftypes proposal has shipped, we remove the respective flag
and the code that handled its absence. We maintain a WasmFeature for
reftypes for feature detection purposes. We remove the flag declaration
from tests, and adapt some tests that make no sense without the flag.

Bug: v8:7581
Change-Id: Icf2f8d0feae8f30ec68d5560f1e7ee5959481483
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329781
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78351}
2021-12-13 14:29:15 +00:00
Milad Fa
9310a1620e [wasm] un-skip Wasm atomic op tests on big-endian
Support was added to big endian machines (PPC/AIX and S390)
using the following CLs:

TurboFan fixes:
https://crrev.com/c/3313444
https://crrev.com/c/3327721
Wasm Compiler fix:
https://crrev.com/c/3316032
cctest:
https://crrev.com/c/3302852

Change-Id: Ie20dcbe37d04b20d15aae724a82a204bd12baa2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329795
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78350}
2021-12-13 13:38:48 +00:00
Patrick Thier
e926da4592 Reland "[turbofan] Improve StoreStoreElimination"
This is a reland of 863bc2b88a

Diff to original:
- Don't eliminate GC observable stores that were temporarily
  unobservable during traversal.
- Skip the previously added test for single-generation
- Add new test

Original change's description:
> [turbofan] Improve StoreStoreElimination
>
> Previously, StoreStoreElimination handled allocations as
> "can observe anything". This is pretty conservative and prohibits
> elimination of repeated double stores to the same field.
> With this CL allocations are changed to "observes initializing or
> transitioning stores".
> This way it is guaranteed that initializing stores to a freshly created
> object or stores that are part of a map transition are not eliminated
> before allocations (that can trigger GC), but allows elimination of
> non-initializing, non-transitioning, unobservable stores in the
> presence of allocations.
>
> Bug: v8:12200
> Change-Id: Ie1419696b9c8cb7c39aecf38d9f08102177b2c0f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295449
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78230}

Bug: v8:12200, chromium:1276923, v8:12477
Change-Id: Ied45ee28ac12b370f7b232d2d338f93e10fea6b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320460
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78349}
2021-12-13 11:53:54 +00:00
Leszek Swirski
41b174a7f0 Reland "[zone] Keep one page when we Zone::Reset for reuse"
This is a reland of 2418d22a37

Reland fixes:
  * Rebase this 2+ year old change 😱
  * Unpoison the kept segment before zapping it to make ASAN happy.
  * Carefully adjust allocation size tracking fields to compensate for
    kept segment.

Original change's description:
> [zone] Keep one page when we Zone::Reset for reuse
>
> Change-Id: I50c6124d3da5b35d4156c066f38d10d2dc966567
> Reviewed-on: https://chromium-review.googlesource.com/c/1349246
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57793}

Change-Id: Iaffde5b38b3d683af081b1878464dd4c66be5af8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322833
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78348}
2021-12-13 08:20:07 +00:00
Benedikt Meurer
3312b952d1 [refactor] Introduce BuiltinExitFrame::Summarize()
This CL overrides the Summarize() method on the BuiltinExitFrame,
similar to what is already implemented on UnoptimizedFrame. This
way the stack trace capturing logic can be unified further, and
only needs to distinguish between JavaScript(ish) and WebAssembly
frames now.

Bug: chromium:1258599, chromium:1278650, chromium:1278647
Change-Id: I15f4dd61199ff047930796ce285bd938e8bcd22f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327142
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78347}
2021-12-13 06:03:16 +00:00
v8-ci-autoroll-builder
2e1f8c825a Update V8 DEPS.
Rolling v8/build: dda89a8..47daaa3

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

Change-Id: I67a741acaa598961fee60c788f202cf23c3e3f0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3330906
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78346}
2021-12-13 03:47:24 +00:00
v8-ci-autoroll-builder
e4a3ef48c4 Update V8 DEPS.
Rolling v8/build: 10669fa..dda89a8

Rolling v8/buildtools/third_party/libc++abi/trunk: d520ea5..58799ca

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/70bcf59..45fc896

Rolling v8/third_party/depot_tools: 58c7c38..ecc14aa

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

Change-Id: I1168840eaadcc74c3a0845192669ad5c4a523361
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3330905
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78345}
2021-12-12 04:00:13 +00:00
Igor Sheludko
12fb2c3c75 [ext-code-space] Fix issues with recent shared GC changes
Bug: v8:11880
Change-Id: Ifcbf73a68c68b2534bb0c7272be43269b0963507
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329799
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78344}
2021-12-11 08:59:52 +00:00
v8-ci-autoroll-builder
4653741a6b Update V8 DEPS.
Rolling v8/build: 312246f..10669fa

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d16203a..70bcf59

Rolling v8/tools/clang: ed8451a..7fd4168

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

Change-Id: I636d923bae0d44bdc02e4b3e94a8450cff867a9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3330904
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78343}
2021-12-11 03:58:02 +00:00
Milad Fa
440d2ffb16 PPC/s390: Add missing calls to Unreachable.
Port df748fc03e

R=georgia.kouveli@arm.com, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I3ae962a6c6f20c945c788e9ff512a3b02aff4754
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3331275
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78342}
2021-12-10 23:44:22 +00:00
Andreas Haas
fecb695e84 [wasm] Introduce 'funcref' for the type reflection proposal
With a recent addition to the type reflection proposal, 'anyfunc' gets
renamed to 'funcref'. For backwards compatibility, 'anyfunc' becomes an
alias for 'funcref'. With this CL, the string 'funcref' can be used to
create a funcref table or a funcref global. Additionally, 'funcref' is
returned as the type of imported and exported functions as well as
globals and tables.

R=manoskouk@chromium.org

Change-Id: If3ed4d507de862ebfcabd4eb967bbfaae1c6ccba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300135
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78341}
2021-12-10 20:09:12 +00:00
Milad Fa
8a1bf76ffe S390: sign extend result of atomic ops after reversing
Fix is applied to some of halfword signed ops.

Change-Id: Idad3cfe9b66d39cb991974c959d447e5c4eccad3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327722
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78340}
2021-12-10 17:01:02 +00:00
Milad Fa
fd50badbf2 PPC/AIX: Support Wasm atomic ops on big endian within turbofan
Currently atomic ops on TF are using machine native byte order
and cannot be used by Wasm calls.

This Cl adds support for Little Endian enforced Wasm atomic ops
to PPC/AIX by reversing bytes where needed.

Change-Id: I4080f318022eedd2058e51d09595753eab385441
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327721
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78339}
2021-12-10 16:12:22 +00:00
Leszek Swirski
ef0b2aabd9 [parser] Split AstRawString and Parser zones
This allows us to reuse AstValueFactory's string table across multiple
parsers, while still releasing memory after each individual parse.

This is mild overkill for all the single parses that don't reuse
AstValueFactories, but there at least the AstRawStrings now end up
grouped together in memory, so that might have mild cache benefits.

Change-Id: I0b378760b601fa4ec6559a0dca5d7ed6f895e992
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322764
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78338}
2021-12-10 16:03:42 +00:00
Leszek Swirski
4fae8b1680 [compiler] Don't elide ChangeTaggedToInt32->ChangeInt31ToTaggedSigned
Bug: chromium:1278387
Change-Id: If834ee2f9ba3663822a8066fbd1ece49c24023da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329790
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78337}
2021-12-10 15:36:42 +00:00
Jakob Kummerow
6d7ed2e870 [wasm] 32-bit platforms: lower kV8MaxWasmMemoryPages by 1
To make sure that Wasm memories don't exceed JSArrayBuffer size.
This change shouldn't affect real-world modules, because finding
enough contiguous address space to allocate that much memory is
virtually impossible anyway.

Fixed: chromium:1242339
Change-Id: I68873796b9afb798cb1a64e5e1acc495cf509159
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3328783
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78336}
2021-12-10 12:59:31 +00:00
Leszek Swirski
2e96d32168 [compiler-dispatcher] Fix job delete posting
Some bad rebasing meant that we were still deleting on the main thread.

As an additional simplification, remove the specific deletion queue
mutex, and just use the compiler dispatcher mutex for the deletion queue
-- this avoids risks of deadlock when both are held.

Change-Id: Ifa4ead6ee3fd814d7f013dd14a5617456afc9f7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3328785
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78335}
2021-12-10 12:06:31 +00:00
Leszek Swirski
7f121b4f93 [local-isolate] Move worker RCS scope into LocalIsolate
Rather than requiring the user of a LocalIsolate to pass in a
RuntimeCallStats from a WorkerThreadRuntimeCallStatsScope, create the
scope in the LocalIsolate directly and use its RuntimeCallStats in the
LocalIsolate constructor.

We can't do this for the main thread LocalIsolate, since
WorkerThreadRuntimeCallStatsScope doesn't work on the main thread, so
there we use the main-thread RuntimeCallStats instead.

This flushes out some issues of background-thread LocalIsolates being
used on the main thread, so fix those too, as well as RCS scopes using
background counters for operations that could happen on the main thread.

Change-Id: I21a53be0771f47a03ccdb27d24c2b9d25d8b2d1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3318664
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78334}
2021-12-10 11:08:01 +00:00
Manos Koukoutos
96c6986c65 [wasm][turbofan] Add kNoThrow property to stub calls
Stub calls generated in wasm-compiler were not marked as kNoThrow. This
created an inconsistency where these ostensibly throwing calls did not
get wrapped in exception handlers, which in turn creates problems in
upcoming changes in inlining.
We resolve the inconsistency by marking all such calls as kNoThrow.
Exceptions are the throwing calls Throw and Rethrow, for which we create
exception handlers in WasmGraphBuildingInterface::CheckForException.

Change-Id: I81da1b191332bcd497116e9f82e4de198778086b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322836
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78333}
2021-12-10 09:25:41 +00:00
Dominik Inführ
a0ed6096f3 [heap] Introduce CLIENT_TO_SHARED remembered set
During a shared GC we need to iterate the twice: for marking and later
when updating pointers after evacuation. This CL introduces a new
remembered set to avoid the second heap iteration, the remembered set
is created when iterating the client heaps for marking. When updating
pointers, the GC only needs to visit slots in the remembered set.
CLIENT_TO_SHARED is only used during GC atm.

Bug: v8:11708
Change-Id: Ie7482babb53b5f6ca2115daafe6f208acae98d6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3315443
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78332}
2021-12-10 07:29:41 +00:00
v8-ci-autoroll-builder
6b503b95d4 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 1f99405..b000672

Avoid errors due to "default label in switch which covers all enumeration values" in Windows codepath (#1302) (Martin Storsjö)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/b000672

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

Change-Id: I5732a8f27fb17fa74ba68331612b9c1e121642ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327747
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78331}
2021-12-10 05:47:31 +00:00
v8-ci-autoroll-builder
b3f4684a4a Update V8 DEPS.
Rolling v8/build: 9cfc745..312246f

Rolling v8/buildtools/third_party/libc++abi/trunk: 89f2e82..d520ea5

Rolling v8/buildtools/third_party/libunwind/trunk: c8c0ec9..d81cd62

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/4983973..d16203a

Rolling v8/third_party/depot_tools: 0a233e1..58c7c38

Rolling v8/third_party/googletest/src: 4c5650f..054a986

Rolling v8/tools/clang: 336fcfd..ed8451a

Rolling v8/tools/luci-go: git_revision:31175eb1a2712bb75d06a9bad5d4dd3f2a09cd1f..git_revision:e897e118887a2e6c50a82212b660cb2a7c58d910

Rolling v8/tools/luci-go: git_revision:31175eb1a2712bb75d06a9bad5d4dd3f2a09cd1f..git_revision:e897e118887a2e6c50a82212b660cb2a7c58d910

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

Change-Id: If2bd3d5e3c62c274ab71b01a562370e7a77bf980
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327745
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78330}
2021-12-10 03:54:31 +00:00
Michael Lippautz
3afcbf5c3c cppgc: Advance deprecation arounds write barrier
Advance deprecations and remove fully deprecated code.

Bug: v8:12165
Change-Id: I2cf1715d6878ff65e5b9beaddb8df7aec780b21e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3328781
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78329}
2021-12-09 21:42:16 +00:00