Commit Graph

73695 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
b1ef087854 Update V8 DEPS.
Rolling v8/build: 19e2886..a4e7e5a

Rolling v8/buildtools/third_party/libc++abi/trunk: 77c52e2..a18d792

Rolling v8/third_party/android_sdk/public: Ez2NWws2SJYCF6qw2O-mSCqK6424l3ZdSTpppLyVR_cC..PGPmqJtSIQ84If155ba7iTU846h5WJ-bL5d_OoUWEWYC

Rolling v8/third_party/depot_tools: 1b93e14..cc0f7a5

Rolling v8/tools/clang: 94a76bd..d7bcddc

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

Change-Id: I4596515689bc1e99feb0af285d5b631fc2be8d5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3449235
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@{#79003}
2022-02-09 03:53:31 +00:00
Milad Fa
a52d45cbbb S390 [liftoff]: Implement FP promote and demote
Change-Id: Ie5eac61238442bedcb5f9d61a67cc47de261655a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3447692
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79002}
2022-02-08 21:17:17 +00:00
Milad Fa
934443d9dc S390 [liftoff]: Implement Add/Sub saturate ops
Change-Id: If5f8aef98dcfbff14ba457669c4a5fba5c9226b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3447376
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79001}
2022-02-08 20:09:31 +00:00
Alex Turner
05643c76f5 Make empty V8DebuggerId ctor public
This will allow users to create invalid V8DebuggerIds, e.g. to handle
error cases.

Bug: v8:12528
Change-Id: I6efbea934d444b520fc43531b910f4f80c718630
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3445742
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79000}
2022-02-08 16:41:31 +00:00
Camillo Bruni
8d6e5bc9c7 [serializer][web snapshot] Speed up ValueDeserializer
- Unroll loop in ReadVarInt to skip checks for uncommon branches and
  improve by ~15%
- Use cage_base more aggressively
- Use more dehandlified code if possible
- Allow allocating strings directly in old-space to avoid filling up the
  new space when deserialising web-snapshots

Cleanup:
- ThrowDataCloneError now returns Nothing<bool>() for more consistency

Bug: v8:11525
Change-Id: I69ac635e2bcab83e92fba5ab34603146fa21f043
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3437049
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78999}
2022-02-08 15:57:31 +00:00
legendecas
0823b36d35 [init] Install console API to context extras binding
Not all environments (like ShadowRealm) would expect console
APIs to present in their globals. Moving console API to
context's extras binding to allow them to be still
snapshotted to not slow down the bootstrap.

The console API is not removed from the global in this CL,
but it is planned to be removed in the later release.

Bug: v8:11989
Change-Id: Ieca09e0bafdf8943e8fff8fee97fc21c2326320f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3364786
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#78998}
2022-02-08 15:48:33 +00:00
Alexander Schulze
604f661495 [v8] Migrate compare_torque_output to py3
R=liviurau@chromium.org, machenbach@chromium.org

Bug: chromium:1292010
Change-Id: Ice96bda42e1597b7d266cafb61565a54ea96d9a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3448374
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78997}
2022-02-08 15:46:11 +00:00
v8-ci-autoroll-builder
3aa7a85cdd Update V8 DEPS.
Rolling v8/build: dfc291f..19e2886

Rolling v8/buildtools/third_party/libunwind/trunk: f2ef96e..b86911d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b4974c8..25f38be

Rolling v8/third_party/depot_tools: 9c0ccc7..1b93e14

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

Change-Id: I86966fa9d9a33c714004f9982f01dfa8e83b095a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3447530
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@{#78996}
2022-02-08 15:29:12 +00:00
Manos Koukoutos
00e6d96291 [wasm] DCHECK that all simple unary operators return a value
Since {WasmGraphBuildingInterface::UnOp} always sets the result value
node, we have to ensure the passed {result} is not null.
Note: This can never happen with the current set of operators; this is
guarding against possible future operators.

Bug: chromium:1285041
Change-Id: I657cb02a9c650121a51ee795ef5572a5abd66933
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3447373
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78995}
2022-02-08 14:25:30 +00:00
Jakob Kummerow
dfecb7bddb [wasm] Mark stack check call operator as kNoWrite
So that it doesn't cause loops to think that they have side effects,
which would impede load elimination and similar optimizations.
For compiling JavaScript, there is an equivalent annotation
in JSOperatorBuilder::StackCheck.

Change-Id: Ic9380df424062deb565671c8650b46550621fce5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440662
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78994}
2022-02-08 13:23:05 +00:00
Jakob Kummerow
52c539e37c [wasm-gc] Don't sign-extend indices for array accesses
We treat array indices as unsigned, so we should use
`ChangeUint32ToUint64` before using them for computing memory
offsets on 64-bit platforms.
The signed version is currently an inefficiency; if we actually
allowed arrays of such huge sizes, it would become a bug.

Bug: v8:7748
Change-Id: I5c89ef82755a9987c4e5a8c9b3b630534bb3424f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440661
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78993}
2022-02-08 11:33:50 +00:00
Piotr Sikora
d053afc9ee [bazel] Don't override --@v8//bazel/config:v8_target_cpu flag.
Fixes cross-compilation with bazel-zig-cc.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Change-Id: I7d94b84be33d8699ec71b4073bc0df1e7fcce5c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3445204
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78992}
2022-02-08 11:25:53 +00:00
Jakob Gruber
cb4f3c6957 [regexp] Don't check for excess zone allocations
The regexp parser historically has tried to gracefully detect and bail
out from excess zone allocations, where 'excess' was determined to be
an arbitrary limit of 256MB.

This leads to issues now that the regexp parser may run from within
the JS parser - the JS parser doesn't observe this arbitrary limit and
happily keeps allocating until the underlying allocator actually runs
out of memory; this way, the JS parser can handle very large JS files,
and it's now counterproductive if the regexp parser (which reuses the
JS parser zone) bails out on excess allocations.

This CL simply removes the excess_allocation mechanism.

Bug: chromium:1264014
Change-Id: I8d93a1e52aa65bb0ea6c2aab3b68b479ce79a1f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401580
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78991}
2022-02-08 11:13:51 +00:00
Benedikt Meurer
536e96cc1a [debug] Implement stepping out of async functions in the debugger.
Previously the inspector was trying to handle step-out for async
functions by annotating the async stacks, but this was merely a
hack and didn't work reliably

(a) when the async caller that is `await`ing the result of the
    callee was still in the synchronous part (because then there
    was no async task yet in the inspector), or
(b) not at all when the async stack tracking wasn't enabled or the
    maximum async stack depth was too small.

This CL replaces that hack with a pragmatic solution inside the
V8 debugger, where upon `await` we memorize the async function
object of the caller on the outer promise of the callee, and when
stepping out of the callee we check whether the returned promise
has a memorized async function object and if so, we schedule that
to resume.

This CL thereby effectively reverts https://crrev.com/c/1054618
and replaces it with a V8 debug solution, and thereby further
reduces the (memory) overhead of an AsyncStackTrace.

Fixed: chromium:1246867
Bug: v8:6161, v8:7753, chromium:1277451, chromium:1280519
Change-Id: I6aa79e90f49d204f66bfd37e7a328c7fb8d635b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439865
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78990}
2022-02-08 06:32:16 +00:00
v8-ci-autoroll-builder
4c89a32ff7 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 1ee7bee..bdea505

Add mutex when reading counters_ (Fixes #1335) (#1338) (Liqiang TAO)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/bdea505

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

Change-Id: I5acd1ef0af30aac9f76e6f7b215fd51d89c73c75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3446781
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@{#78989}
2022-02-08 05:29:35 +00:00
v8-ci-autoroll-builder
d21591df6f Update V8 DEPS.
Rolling v8/build: 3233ed2..dfc291f

Rolling v8/buildtools/third_party/libc++abi/trunk: 5b0a8cf..77c52e2

Rolling v8/third_party/depot_tools: 66c9784..9c0ccc7

Rolling v8/third_party/googletest/src: 14aa11d..43efa0a

Rolling v8/third_party/zlib: fc5cfd7..3fc7923

Rolling v8/tools/clang: a8ca822..94a76bd

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

Change-Id: Ia89843d90b9b115b302e4281991f3a7b2284b963
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3445842
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@{#78988}
2022-02-08 03:54:25 +00:00
Lu Yahan
b081d938de fix vector scratch reg check failed
Change-Id: I948d17b34334caae9deb9282176a76e6be3d28a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3443174
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#78987}
2022-02-08 03:03:15 +00:00
Frank Tang
a13483e626 [intl] Fix OOM nullptr crash while calling clone()
Bug: chromium:1290612
Change-Id: If1e3030882786ccc0c6a9b42128bc1ac044f43f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3445201
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78986}
2022-02-08 00:46:55 +00:00
Junliang Yan
53abcef779 Revert "s390x: [baseline] enable sparkplug on s390x"
This reverts commit 78bc785227.

Reason for revert: revert due to failure on native tests.

Original change's description:
> s390x: [baseline] enable sparkplug on s390x
>
> Change-Id: I4646bb0f3f6291c97bb4b397d6248b9bdaa2059a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439641
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Junliang Yan <junyan@redhat.com>
> Cr-Commit-Position: refs/heads/main@{#78959}

Change-Id: I8d006211e42ace4db804f1a88f2749282ef2de32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440771
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78985}
2022-02-07 18:29:17 +00:00
Benedikt Meurer
a3b145c714 [debug] Fix catch prediction inside async generators.
Properly push back the current request promise for async generators when
resuming after an `await` to ensure that the catch prediction works as
expected for async generators.

Fixed: chromium:1220203
Change-Id: I8c3592ceb567aadcba8f460794cd5d60a965a360
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3442680
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78984}
2022-02-07 17:14:05 +00:00
Victor Gomes
8cdd0bfbaa [runtime] Use a hashtable in ScriptContextTable
Bug: v8:12315
Change-Id: If750c9528d4f20c6695a6b25f4d1abc8a14dba62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3431486
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78983}
2022-02-07 16:06:15 +00:00
Milad Fa
08544f06a7 S390 [liftoff]: Implement simd select
all_ones and all_zero is also moved to the macro assembler
which will be used later.

Change-Id: I72787c9bb217dd78f6fd8a818b95939e936bc68d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439916
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78982}
2022-02-07 16:04:35 +00:00
Michael Achenbach
171fb3b9af [clusterfuzz] Split directory structure
After https://crrev.com/c/3416191 there are too many mixed concerns in
the clusterfuzz directory. We split it into js-fuzzer, foozzie and
trials.

Change-Id: I9a21ee83985e6113d77acba4583e99df88723c60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3443505
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78981}
2022-02-07 15:38:46 +00:00
Thibaud Michaud
7b19d05b66 [wasm] Only suspend on promise for stack-switching
Currently, the stack-switching import wrapper always suspends. Only
suspend if the returned value is a promise, otherwise just convert and
return the value back to wasm.

R=ahaas@chromium.org
CC=fgm@chromium.org

Bug: v8:12191
Change-Id: I26e7a3921aeae30fcce7f0ccc98d790a1a6f8c35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440655
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78980}
2022-02-07 15:27:20 +00:00
Dominik Inführ
d75f761334 [heap] Use AlwaysAllocateScope for clients with shared allocations
When performing a shared allocation in a client we have checks for the
AlwaysAllocateScope in both client and shared isolate slow allocation
code paths. We need to enable both such that we don't fail with
spurious OOM failures with GC stress bots.

This change was already introduced with the reverted CL
https://crrev.com/c/3422630. Land this as its own CL until that CL
relands.

Bug: v8:11708, v8:12582
Change-Id: I81ca3f0aaec3ac3fbef9d0b7219e09fa056000f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3443503
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78979}
2022-02-07 15:12:22 +00:00
Dominik Inführ
da62220f54 [heap, objects] Check object layout changes happen on main thread
Verification code in HeapObject::set_map() is supposed to run on the
main thread since object layout change is only supported on the main
thread. There are some users of set_map() on background threads though,
which resulted in crashes. Since those users all perform a safe map
transition, we introduce a separate method for this purpose:
HeapObject::set_map_safe_transition(). This method behaves just like
set_map() but verifies that this is a safe map transition and not an
object layout change and therefore can be used on background threads
as well.

This CL also adds a DCHECK to HeapObject::set_map() to ensure we run
this method only on the main thread.

Bug: chromium:1293484
Change-Id: I25de6fda08de21b8b7a3645cf0ea5b1334e8a2f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439905
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78978}
2022-02-07 14:32:48 +00:00
Dominik Inführ
a6843b1370 [heap] Turn on fuzzing for map space compaction
Turn on fuzzing to get additional test coverage.

Bug: v8:12578
Change-Id: Ia614fb9e4ba519163024f3b7b40f22ad6ebb3297
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3442677
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78977}
2022-02-07 13:49:35 +00:00
Marja Hölttä
7ca4e9cad5 [errors] Enhance the DataView construction error message
Make it include the invalid length again, but this time consistently.

Bug: chromium:923688
Change-Id: I0ec2543e02b58ff2b79547021a8e0d47a9debe46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440068
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78976}
2022-02-07 12:02:48 +00:00
Patrick Thier
aa8cf1f0c2 Refactor Name::Hash
We introduce a new information type ForwardingIndex to be stored in
the Name::Hash field (to be used in the future).
To do so we use the 2 least significant bit to distinguish types
of information stored in the hash field (in contrast to only bit 1
to distinguis integer indicies from "real" hashes).
This motivated a refactor to use base::BitField for the hash field.

Bug: v8:12007
Change-Id: I651c86807edfc218792d0db12379374eaa50c930
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3432385
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78975}
2022-02-07 11:30:04 +00:00
Benedikt Meurer
21f72f82ce [inspector] Send empty string for Debugger.CallFrame.url.
This is the final step towards moving away from sending `url` with
every call frame when emitting the `Debugger.paused` event.

Fixed: chromium:1270316
Bug: chromium:1271078
Change-Id: I87a286d81eb91a9bed64213c4b18db0675858822
Doc: https://bit.ly/devtools-debugger-callframe-url
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3345001
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78974}
2022-02-07 10:26:05 +00:00
Thibaud Michaud
08b3da7f9c [wasm] Fix typing of stack-switching wrappers
- Suspender.suspendOnReturnedPromise expects a function with type
[ti*]->[externref] and returns a function with the same type.
- Suspender.returnPromiseOnSuspend expects a function with type
[ti*]->[to] and returns a function with type [ti*]->[externref].

Changes:
- Check the wrapped function's return types
- Skip type checking of return types when importing a wrapper (and
assert that the return type is externref)
- Add special case for WebAssembly.Function.type of a
WasmExportedFunction: it currently returns the signature declared by
the module. Change the return type to externref if this is a
stack-switching export.

Bug: v8:12191
Change-Id: I6619c306e9613825ad1b021cb3400d73cd684656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3435190
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78973}
2022-02-07 09:48:35 +00:00
Igor Sheludko
e112e4d181 [ext-code-space] Fix TSAN issue in JSFunction::ShouldFlushBaselineCode()
Drive-by: cleanup accessor declaration and definition macros.

Bug: v8:11880, v8:12596
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: Ia04a7f21d911386e610f963f55cbc1d310b2f442
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439917
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78972}
2022-02-07 09:21:14 +00:00
Dominik Inführ
becce45ba1 [json, parsing] Switch to internal GC callbacks
We have two different kinds of GC prologues/epilogues. The user-exposed
one in Heap and the internal one in LocalHeap. During parsing and in
the JSON parser we were using the former. While this is definitely
correct and at the time of implementation it was the only existing
mechanism, I believe the internal callbacks are now a better fit for
these use cases.

Internal callbacks are simpler since they don't allow allocations, which
allows us to run them during the GC safepoint. The user-exposed
interfaces are allowed to allocate and are run either before or after
the safepoint. Such allocations could cause recursive GCs, which is
impossible for internal callbacks.

Bug: v8:12545
Change-Id: Ie697556cec9aa77b2f70704445aa5bd58e0a381a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3435188
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78971}
2022-02-07 09:13:07 +00:00
v8-ci-autoroll-builder
ed8e0f41ae Update V8 DEPS.
Rolling v8/build: 4852ab2..3233ed2

Rolling v8/buildtools/third_party/libunwind/trunk: 659c7d9..f2ef96e

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

Change-Id: I5494824f0c480b20bcd653855dce9cf9827d73a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441242
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@{#78970}
2022-02-07 03:55:04 +00:00
v8-ci-autoroll-builder
a6bb46e276 Update V8 DEPS.
Rolling v8/build: f1292c4..4852ab2

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

Change-Id: I923602ab54a92259568d1b264ef82f97144e6265
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441240
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@{#78969}
2022-02-06 04:01:13 +00:00
Frank Tang
40b099e38f [Temporal] Add Temporal.(Calendar|TimeZone).from
Bug: v8:11544
Change-Id: Iab90377372dcd97f1919fde1d886dfe67b336198
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3379236
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78968}
2022-02-05 07:42:23 +00:00
Frank Tang
1288650e4e [Temporal] Implement Temporal int getters
get Temporal.Plain*Time.prototype.(hour|minute|*second)

Bug: v8:11544
Change-Id: I6de1304c1a920f8047d499e4e6dcedbd72ba07f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3374073
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78967}
2022-02-05 06:21:02 +00:00
Frank Tang
c705272afe [Temporal] Add ZonedDateTime withTimeZone
Bug: v8:11544
Change-Id: I72e005c0937418f4160e763edc4fd2b81b14b9c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3385604
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78966}
2022-02-05 04:20:43 +00:00
v8-ci-autoroll-builder
ec4b7835cb Update V8 DEPS.
Rolling v8/build: 3a9b7ad..f1292c4

Rolling v8/buildtools: 8ccda4f..2a745cc

Rolling v8/third_party/android_platform: f0d4a3b..87b4b48

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/87e6066..b4974c8

Rolling v8/third_party/depot_tools: df01c5a..66c9784

Rolling v8/third_party/googletest/src: 25ad42a..14aa11d

Rolling v8/tools/clang: f246ca2..a8ca822

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

Change-Id: Idbd708109a5b352fb33489a66cd0c620931a4fa3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441237
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@{#78965}
2022-02-05 04:02:08 +00:00
Shu-yu Guo
c4a4da7f08 Plumb Isolate through FastPropertyAt
Currently the Isolate is gotten off of the object that the operation is
being performed on. Shared objects return the shared Isolate, which is
incorrect as it shouldn't be used to run JS, nor does it have
HandleScopes open. Plumb the executing Isolate through.

Bug: v8:12547
Change-Id: I1cd23b18b5b841c5b4339f52adecf1b86f3253dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441398
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78964}
2022-02-05 01:12:25 +00:00
Shu-yu Guo
6ba2b6da8c Plumb Isolate through GetConstructor and GetConstructorName
Currently the Isolate is gotten off of the object that the operation is
being performed on. Shared objects return the shared Isolate, which is
incorrect as it shouldn't be used to run JS, nor does it have
HandleScopes open. Plumb the executing Isolate through.

Bug: v8:12547
Change-Id: I428d21f5e6a9c51c8c7c4577395bf27c8706bdb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441033
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78963}
2022-02-05 01:07:36 +00:00
Shu-yu Guo
52180d383d Plumb Isolate through ToPrimitive and friends
Currently the Isolate is gotten off of the object that the operation is
being performed on. Shared objects return the shared Isolate, which is
incorrect as it shouldn't be used to run JS, nor does it have
HandleScopes open. Plumb the executing Isolate through.

Bug: v8:12547
Change-Id: I7524a956876a0ff2d362c1ad6ec3ae044445215f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441023
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78962}
2022-02-05 01:03:55 +00:00
Shu-yu Guo
33457e544a Plumb Isolate through HasProperty and friends
Currently the Isolate is gotten off of the object that the operation is
being performed on. Shared objects return the shared Isolate, which is
incorrect as it shouldn't be used to run JS, nor does it have
HandleScopes open. Plumb the executing Isolate through.

Bug: v8:12547
Change-Id: I52d5a172ea602f4ad058d979003d51a80cdb4405
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3441022
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78961}
2022-02-05 00:39:25 +00:00
Shu-yu Guo
d4baeee65f Plumb Isolate through SetPrototype
Currently the Isolate is gotten off of the object that the operation is
being performed on. Shared objects return the shared Isolate, which is
incorrect as it shouldn't be used to run JS, nor does it have
HandleScopes open. Plumb the executing Isolate through.

Bug: v8:12547
Change-Id: I4d2c9f5d4d7bc50b3aeb515eb78c08eb1b2a6824
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440902
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78960}
2022-02-05 00:21:15 +00:00
Junliang Yan
78bc785227 s390x: [baseline] enable sparkplug on s390x
Change-Id: I4646bb0f3f6291c97bb4b397d6248b9bdaa2059a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439641
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78959}
2022-02-04 18:44:55 +00:00
Alex Turner
e3ca1f1a73 Add V8Inspector::uniqueDebuggerId method
This method returns the unique debugger ID for a v8::Context (i.e. the
V8DebuggerID), serialized to a pair of int64_ts.

Bug: v8:12528
Change-Id: Ib2cdda73447f8233f9afb773fed4a634d4618aef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3369124
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78958}
2022-02-04 18:23:05 +00:00
Michael Achenbach
9e9d9142d6 [infra] Testrunner fixes for Python3 compatibility
Using UTF-8 encoding couldn't properly read:
test/webkit/parser-high-byte-character.js

Fix itertools rename and one usage of map that's now an iterator.

Bug: chromium:1292016
Cq-Include-Trybots: luci.v8.try.triggered:v8_linux64_python3_rel_ng_triggered
Change-Id: I2b2ab72ce0eb355d1e70f247b5ea38d1d71c7845
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439914
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78957}
2022-02-04 17:58:05 +00:00
Junliang Yan
40c4ed6f74 s390x: implement Move in macroassm
Change-Id: Id233437d92a9af0d7726bcd6207133802ee3d129
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439640
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78956}
2022-02-04 17:04:15 +00:00
Junliang Yan
6b0146fe29 s390x: [baseline] patch EnterFrame
Change-Id: I5d9fc560a398328674907962a3730036b72172a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439638
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78955}
2022-02-04 16:41:28 +00:00
Milad Fa
d1d7e15306 S390 [liftoff]: Implement simd rounding average
Change-Id: I709253796b8493cf365f21247c367974ffbb3106
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3440435
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78954}
2022-02-04 16:06:46 +00:00