Commit Graph

75003 Commits

Author SHA1 Message Date
Dominik Inführ
e0fa71643b [heap] Only mark object immediately when invalidating slots
We use the invalidate_recorded_slots argument to signal to NotifyObjectLayoutChange whether a particular object layout change
could cause a tagged pointer to be replaced with an untagged value.
In such cases we need our snapshot protocol in order to allow marking
such objects concurrently.

The snapshot protocol consists of two main operations:
  1) Tracing and marking the object black on the main thread before
     performing the unsafe transition.
  2) The concurrent marker needs to read such objects into a buffer
     first and is only allowed to trace it when successfully marking
     that object black.

However, in some cases we were still doing 1) on the main thread when
the concurrent marker didn't use 2) the snapshot buffer anymore. This
CL cleans up this behavior and ensures that 1) and 2) are always paired
together.

Bug: v8:12578
Change-Id: Id83b3de866a80efedf4a72e440cbc767fe3eaea6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644611
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80511}
2022-05-13 08:48:03 +00:00
Leszek Swirski
9df34f4d32 [maglev] Save registers across interrupt
The budget interrupt in maglev can clobber registers. We need to save
the caller-saved registers before making this call.

Additionally, move the interrupt call into deferred code, and only emit
the interrupt check + call for returns and backwards jumps (i.e. things
that reduce the budget).

Bug: v8:7700
Change-Id: I277e9fdf454ff0f22bf20e7cf9538e3020403c1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644619
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80510}
2022-05-13 07:59:14 +00:00
Michael Achenbach
58d930221e [build] Fix bazel build
Port GN changes in https://crrev.com/c/3596671

No-Try: true
Change-Id: I4d9571ce0d5abcae56a370986db1104e5429b348
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647347
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80509}
2022-05-13 07:16:26 +00:00
Lu Yahan
3d5e5f18e0 [riscv64] Add macro to control disassemble rvv
Change-Id: Iad4b34b1c4a85800e8e1d6c01b686dd19e8116a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600532
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80508}
2022-05-13 06:22:23 +00:00
Lu Yahan
ee1a364f0a [riscv64] Implement relaxed_i16x8_q15mulr_s
Port commit fe443a4e1f

Bug: v8:12284

Change-Id: I19ba180ecc7cd0e5a3b6e5009cc2b8c40074399a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642243
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80507}
2022-05-13 02:33:30 +00:00
Seth Brenith
c8848cf493 Refactor CompilationSubCache
CompilationSubCache has some complexity regarding generations of tables
which is only used by one subclass, CompilationCacheRegExp. This change
adjusts the class hierarchy so that classes only contain the necessary
member functions.

Bug: v8:12808
Change-Id: I4f4cf15bbf9b80c2de0c18aea82a0c238804759d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629603
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80506}
2022-05-12 22:05:53 +00:00
Tobias Tebbi
b16d2a4e2f [wasm] add experimental string/Wasm GC array conversion fast-path
This CL adds two experimental JS builtins to convert between
i16 Wasm GC and JS strings. This is a non-standard experimental
feature only available with the flag --wasm-gc-js-interop.

WebAssembly.experimentalConvertArrayToString(array, start, count)
Convert the `count`-many WTF-16 code units starting at index `start`
into a JS string. Throws a TypeError if `array` is not an i16 array,
or if `start` and `count` are not numbers or not in range.

WebAssembly.experimentalConvertStringToArray(string, sampleArray)
Convert `string` to an i16 array. The `sampleArray` parameter needs
to be an arbitrary i16 array, which is only used to extract the rtt.
Throws a TypeError if `string` is not a string or `sampleArray` is not
an i16 array.

Change-Id: I7ac2f6bd89b8f638427f61da1bb01ccba90d735b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642301
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80505}
2022-05-12 20:12:53 +00:00
Deepti Gandluri
334cc5f8d6 [wasm-relaxed-simd][liftoff] Enable relaxed LaneSelect on Arm/Arm64
Bug: v8:12284
Change-Id: Ica2564e8b34f8edd9492ef379cf3a3eb5575633d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642948
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80504}
2022-05-12 19:49:33 +00:00
Omer Katz
8a83325cfe [heap] Split NewSpace::Verify
Bug: v8:12612
Change-Id: Ib24496c1a3789ced50431818874e27886e92a909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644616
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80503}
2022-05-12 18:31:53 +00:00
Deepti Gandluri
6a9c8553f9 [wasm-relaxed-simd] Enable relaxed swizzle tests on all platforms
Bug: v8:12284
Change-Id: I7f6a4a5182ad61dfdc13faf2ced99fba7d64c9c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640926
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80502}
2022-05-12 18:25:52 +00:00
Chong Gu
2eaf6205ed [Fuchsia] Deprecate fuchsia_package_runner
Change-Id: Id6c520cd3cc6218fb32fea2c82b0ff8985e2b58e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627012
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Chong Gu <chonggu@google.com>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80501}
2022-05-12 18:07:18 +00:00
Jakob Kummerow
8f3581125a [wasm-gc] Fix instantiation of modules with no types
Fixed: v8:12866
Change-Id: Icba2ffc7837bf4942fd4bc741abeb7c98694c2d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644607
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andy Wingo <wingo@igalia.com>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80500}
2022-05-12 17:48:17 +00:00
Junliang Yan
26d0ca4112 ppc64: [baseline] replace GetSharedFunctionInfoBytecode
Change-Id: I933301cf9b81ef6a5cc5ec891611464a1e0a1e48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645029
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80499}
2022-05-12 17:22:43 +00:00
Omer Katz
f00727d2d0 [heap] Make PagedSpace::Verify* methods const
Bug: v8:12612
Change-Id: I47bf134a9ff57a5c4ace9d35bf023a1c5e248896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644615
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80498}
2022-05-12 16:54:53 +00:00
Deepti Gandluri
8709819285 [wasm-simd][Arm]Prototype Relaxed Rounding Q-format Multiplication
Bug: v8:12284
Change-Id: I9d8f9da8ed736d5119e7af4354e1ddd8a255713d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640925
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80497}
2022-05-12 16:40:21 +00:00
Igor Sheludko
83f03eef26 Revert "Reland "[rwx][mac] Enable fast W^X on Apple Silicon (M1)""
This reverts commit 411a015758.

Reason for revert: crbug.com/1324829 (Canary crashes)

Original change's description:
> Reland "[rwx][mac] Enable fast W^X on Apple Silicon (M1)"
>
> This is a reland of commit e8cac3776e
> Broken jitless mode is fixed in a separate CL.
>
> Original change's description:
> > [rwx][mac] Enable fast W^X on Apple Silicon (M1)
> >
> > Bug: v8:12797
> > Change-Id: I53bb803dd77db5bdd42b1a1b4b568e63857adf31
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598861
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Igor Sheludko <ishell@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#80396}
>
> Bug: v8:12797
> Change-Id: I5436ceced5d4673f3b80d9cacdb3d6e84012c6e7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635720
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80450}

Bug: v8:12797
Change-Id: If776ccb6ce9f41a84b94409ec5cae91c0915f129
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644620
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80496}
2022-05-12 16:39:19 +00:00
Francis McCabe
c31105569f Revert "[inspector] Re-enable Debugger#restartFrame"
This reverts commit 8278cb5015.

Reason for revert: breaking https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20CFI/10778/overview

Original change's description:
> [inspector] Re-enable Debugger#restartFrame
>
> Doc: https://bit.ly/revive-restart-frame
>
> This CL "undeprecates" Debugger#restartFrame and adds a new optional
> "mode" parameter for back-wards compatibility. Moreover, the return
> values are all deprecated. They were never actually used in the
> DevTools frontend and the same information is available from the
> Debugger#paused event that fires once execution stops at the
> beginning of the restarted function.
>
> The CL also re-baselines all the restart-frame inspector tests that
> now run successfully.
>
> R=​bmeurer@chromium.org, kimanh@chromium.org
>
> Bug: chromium:1303521
> Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80491}

Bug: chromium:1303521
Change-Id: Ibc33328c31a4b6ea736d07ce5e5ee109039eec8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645767
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80495}
2022-05-12 16:38:03 +00:00
Jakob Kummerow
2f8f536b55 [wasm] Properly reject modules with unknown sections
The IsValidSectionCode function shouldn't include internally-used
numeric identifiers of well-known optional sections.

Fixed: v8:12867
Change-Id: I9d894ee57157455e92a17ddcde94f32f05fb038d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644612
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80494}
2022-05-12 15:08:02 +00:00
Jakob Kummerow
a5906c241e Revert "[tools] Add a simple gdb frame unwinder"
This reverts commit c3ac338bb9.

Reason for revert: Breaks stepping with `n`

Original change's description:
> [tools] Add a simple gdb frame unwinder
>
> Add a simple unwinder for gdb which, on x64,  walks frame pointers
> whenever there is no source information available. Ideally we would only
> do this for V8 PCs but this appears hard to do in an Unwinder without
> messing with gdb's internal assumptions.
>
> Change-Id: Iba1e62a3768340ee912e81d691237c1920a8ae91
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3608628
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80204}

Change-Id: I0264cf34cfe8fe2331bacf202dedbb4706535936
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644855
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80493}
2022-05-12 14:48:42 +00:00
Omer Katz
08b3bed2dd [heap] Introduce PromoteYoungGenerationGC
This CL separates logic for promoting all of new space during fast
promotion out of the heap and into a new dedicated
PromoteYoungGenerationGC class.

It currently assumes SemiSpaceNewSpace and will need to be extended with
support for PagedNewSpace.

Bug: v8:12612
Change-Id: I0e65c034b444634a31b3c00df0a4b558612f023f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644610
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80492}
2022-05-12 14:34:12 +00:00
Simon Zünd
8278cb5015 [inspector] Re-enable Debugger#restartFrame
Doc: https://bit.ly/revive-restart-frame

This CL "undeprecates" Debugger#restartFrame and adds a new optional
"mode" parameter for back-wards compatibility. Moreover, the return
values are all deprecated. They were never actually used in the
DevTools frontend and the same information is available from the
Debugger#paused event that fires once execution stops at the
beginning of the restarted function.

The CL also re-baselines all the restart-frame inspector tests that
now run successfully.

R=bmeurer@chromium.org, kimanh@chromium.org

Bug: chromium:1303521
Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80491}
2022-05-12 14:24:58 +00:00
Jakob Kummerow
c875e86df1 [bigint] Convert BigInt property names to decimal
Hexadecimal/octal/binary BigInt property names should be converted
to decimal, i.e. the following object literals should all be equivalent:
var o = {0xF: 1}, p = {0xFn: 1}, q = {15: 1}, r = {15n: 1}.

Test case by yangwenming@bytedance.com, uploaded at
https://chromium-review.googlesource.com/c/v8/v8/+/3634937

Fixed: v8:10600
Change-Id: Ie1d8a16e95697cd31cbc0784843779c921ce91fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642302
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80490}
2022-05-12 13:28:02 +00:00
Junliang Yan
b62a3ebf36 ppc64: avoid using callee save reg
Change-Id: I62f4d7fae09ab529756d106e77bb9bd8b3b239a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644850
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80489}
2022-05-12 13:26:43 +00:00
V8 Autoroll
2422673526 Version 10.4.0.1
Change-Id: If91de8dd11bdd2207bf88cad376c626964bfd162
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644848
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80488}
2022-05-12 13:22:25 +00:00
Igor Sheludko
42dbddf0c4 Fix includes in test-api-interceptors.cc
Bug: chromium:1310062
Change-Id: Iba231f98ef88df07b24b1c2bc9026a5b8ca18e15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644228
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80487}
2022-05-12 13:08:15 +00:00
Andreas Haas
6b57581d24 [wasm] Update spec tests
R=thibaudm@chromium.org

Bug: v8:12864
Change-Id: Ic8f031eafaeab6e17fa070a8447cd093ebb9adf5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3643656
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80486}
2022-05-12 12:34:21 +00:00
Michael Lippautz
bd9ed6ce24 Reland "[heap] Refactor atomic marking phase"
This is a reland of commit 25e3225286

Original change's description:
> Reland "[heap] Refactor atomic marking phase"
>
> This is a reland of commit a3f66927f9
>
> The reland addresses a few CHECKs that were too agressive and also
> properly adjusts Oilpan's marking configurations depending on V8's
> flags.
>
> Original change's description:
> > [heap] Refactor atomic marking phase
> >
> > The atomic marking phase was organized in many distinct smaller
> > phases. In particular, before http://crrev.com/c/3584115 the marking
> > phase split into two large separate phases.
> >
> > This CL reorganizes marking into two phases that perform regular V8
> > heap marking, Oilpan, and ephemerons:
> > - A parallel phase that likely drains all marking worklists;
> > - A single-threaded final phase to catch any left overs;
> >
> > This avoids artificial splitting in phases and also avoids repeated
> > starting and joining of jobs.
> >
> > Change-Id: I5cccfc5777837d9ece10d8f4925781bf2d07d9da
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602507
> > Reviewed-by: Omer Katz <omerkatz@chromium.org>
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#80265}
>
> Change-Id: I26648da361b92d787c173aa9d390100ce8958728
> Bug: chromium:1320896
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616519
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80301}

Bug: chromium:1320896
Change-Id: I7ebb3bde9f0d3497f46c728bfbc380c1bd4bc021
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641167
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80485}
2022-05-12 10:44:21 +00:00
Igor Sheludko
8437ed16e3 [runtime] Add interceptors side effects detector
This CL introduces SideEffectDetectorScope which requires explicit
allowlisting of cases when side effects are allowed after calling
interceptor callbacks.
Side effects are not allowed when the callback does not intercept
the request.
The side effects detector is not enabled yet, it will be enabled in
a follow-up CL.

Bug: chromium:1310062
Change-Id: I805764920ed016cb37390aef7bb02cbdf5f72846
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641172
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80484}
2022-05-12 10:33:10 +00:00
Liu Yu
ef77fe0f4e [loong64][mips][wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Port commit fe443a4e1f

Bug: v8:12284
Change-Id: I242c4161ecff09fd7bcfeda27560a6c881c87d09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641034
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Commit-Queue: Yu Liu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80483}
2022-05-12 09:16:01 +00:00
Omer Katz
b415cd7c05 [heap] Extend and rename NewSpace base class
NewSpace is renamed to SemiSpaceNewSpace and NewSpaceBase is renamed to
NewSpace (the new PagedSpace new space implementation will be named
PagedNewSpace).

Most usecases are updated to use the base class rather than the concrete
semi space based implementation. To that end, the base class is extended
with additional virtual methods (for delegating to the concrete class).

This CL follows these guidelines:
(*) If at a method callsite we should know the exact new space
implementation we use, we cast to the concrete class. This is the case
for example for callsites in scavenger.*.
(*) If a method is called from outside the heap implementation or should
be present regardless of the concrete implementation, that method is
made virtual.
(*) Other cases are usually methods that are specific to a concrete
implementation but the concrete implementation is not known at the
callsite and there's no clear way to nicely abstract the method. In such
cases we cast to the concrete SemiSpaceNewSpace implementation for now
and we will revisit these cases once PagedNewSpace exists.

Bug: v8:12612
Change-Id: I7b85626774ce0d785b0257bf8d32b9f50eeaf292
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625975
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80482}
2022-05-12 07:17:23 +00:00
v8-ci-autoroll-builder
a680570338 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: bc4639c..aecbdbf

fix some typos (#1393) (cui fliter)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/aecbdbf

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

Change-Id: Ib44a175614b0e3f2394c901b96e8d0b7fbaaa33c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641659
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@{#80481}
2022-05-12 06:02:30 +00:00
Deepti Gandluri
b49919516d Cleanup some leftover macros
Change-Id: I0efdbb9cdfef6c206201adf4d75a0c542979d2f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640267
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80480}
2022-05-11 22:46:10 +00:00
Milad Fa
f4674fbba3 PPC/s390: [wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Port fe443a4e1f

Original Commit Message:

    Prototype the instruction on the interpreter, and Arm64. Details of
    instruction lowerings on all relevant architectures can be found at:
    https://github.com/WebAssembly/relaxed-simd/issues/40

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

Change-Id: I5da65cb5f59db811d9d796918b8f5c8892e053fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642299
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80479}
2022-05-11 18:17:32 +00:00
Rob Paveza
081f7281e4 Add Bazel to SHA-256 hash feature
Bug: chromium:1322555
Change-Id: I2416150c19cd1b9dc062edd42806c1b10eead969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625836
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80478}
2022-05-11 17:55:12 +00:00
Clemens Backes
f215452211 [cleanup] Remove two unused TRACE_BS macros
BS for "backing store", obviously.

R=ahaas@chromium.org

Bug: v8:12425
Change-Id: I310ba8e34e8ca2c7b7bdeec5f1bc184330fbaf28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641175
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80477}
2022-05-11 17:03:23 +00:00
Marja Hölttä
0cdea40a1c [objects printing] Fix SFI printing
Change-Id: Iafca9e5ddf85bc528d4043863ec71ae1ce7020d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641168
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80476}
2022-05-11 16:12:42 +00:00
Deepti Gandluri
fe443a4e1f [wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Prototype the instruction on the interpreter, and Arm64. Details of
instruction lowerings on all relevant architectures can be found at:
https://github.com/WebAssembly/relaxed-simd/issues/40

Bug: v8:12284
Change-Id: Id4cb3889d94cf0bb7169ea068efe5ca68cfcbad9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3636365
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80475}
2022-05-11 16:10:32 +00:00
Marja Hölttä
94b4391dab [web snap] Support inheriting from builtins
Side product: enable null as __proto__.

Bug: v8:11525,v8:12820
Change-Id: I2b9508d0f3563d9000ddede24e7684aab18c2b5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637791
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80474}
2022-05-11 14:54:43 +00:00
Camillo Bruni
6b4a541cfd [tools][system-analyzer] Fix timeline scaling
- Make sure the viewport size of the svg is adjusted properly when
  scaling
- Fix an off-by-one when calculating Chunk groups

Bug: v8:10644
Change-Id: I56e857a8aa1a67e408bcfb08ed126e6bfdb0ce1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641177
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80473}
2022-05-11 14:40:42 +00:00
Seth Brenith
2507217839 Improve Script reuse in isolate compilation cache, part 1
Once the root SharedFunctionInfo for any Script gets its bytecode
flushed, the Isolate's compilation cache currently evicts that entry, to
reduce memory usage. However, the associated Script is likely still
alive, since scripts often declare functions which outlive the initial
evaluation of the script. If an identical script is loaded later, a
duplicate Script is created for it, which can waste memory.

In this change, I propose that the compilation cache keys can refer
weakly to the Script. When the root SharedFunctionInfo gets old, instead
of deleting the cache entry entirely, we can just drop the strong
reference to the SharedFunctionInfo. A subsequent lookup in the cache
will retrieve the Script instead of the root SharedFunctionInfo,
indicating an opportunity to save some memory by reusing the existing
Script.

Eventually, all callers to CompilationCache::LookupScript should reuse
the Script if possible. This change implements only the easy case of
reusing the Script for synchronous parsing. Follow-up changes will be
required for the TODO comments left by this change.

Bug: v8:12808
Change-Id: Ia8b0389441a682de9a43e73329049fd2e7835d3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3597106
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80472}
2022-05-11 14:27:43 +00:00
Jakob Kummerow
8fbefa4797 [wasm-gc] Experiment: ref.cast_nop_static
This adds a non-standard, unsafe instruction for performance
experiments: ref.cast_nop_static behaves like ref.cast_static
as far as static types are concerned, but emits no code.

Bug: v8:7748
Change-Id: Ic5797a941146a06d7c6ff249d8e29919145d8ea1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639206
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80471}
2022-05-11 13:19:12 +00:00
Igor Sheludko
a62c040451 [rwx][mac] Fix component build
The issue is that a thread_local variable used in RwxMemoryWriteScope
can't be directly accessed from another component, so the workaround is
to avoid inlining accesses the variable into other components.

Bug: v8:12797, chromium:1324333
Change-Id: I0f83358ac0c663c92ef7b3dff54a068472d61aed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641169
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80470}
2022-05-11 12:33:52 +00:00
Pierre Langlois
e3addb6eaa [buildtools] Use arch-specific GN on linux.
CIPD provides both amd64 and arm64 binaries for GN, download the correct
one. This way we get the correct GN when checking out V8 on an AArch64
linux host.

Change-Id: I39c2d7a0062eb330bccac9bc71068bc02bf6958b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637798
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80469}
2022-05-11 12:24:52 +00:00
Michael Achenbach
40d2fab61c [foozzie] Disallow flags with too many known failures
This filters the flags --maglev and --no-use-map-space when passed to
foozzie. Most open bugs are known or spurious, but all take up the
limited hashes for correctness bugs, which prevents finding other
bugs. Filtering on the source-side will make those reports appear
as fixed.

Bug: chromium:1324097, chromium:1317880
Change-Id: Ibf1b04bdfdd2395c3bda5787b4843c6bb5ca8f8e
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641171
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80468}
2022-05-11 12:22:22 +00:00
Camillo Bruni
28b2ecfc42 [runtime][api] Be stricter about microtasks and termination exceptions
Bug: chromium:1319267
Change-Id: I7956b804246ee2c1fa170bf2eb8f3588b7488b42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3620285
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80467}
2022-05-11 09:24:52 +00:00
Nico Hartmann
2437a61bae [turbofan] Print graph after SimplifiedLowering retyping
Bug: v8:12619
Change-Id: Idcad21d03081e6f012656d36d99ce465158f84eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634958
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80466}
2022-05-11 09:04:32 +00:00
Patrick Thier
fe1361f392 Revert "[csa] Load hash in TryToName with Acquire semantics"
This reverts commit b086aa700c.

Reason for revert: Significant negative performance impact on Android.

Original change's description:
> [csa] Load hash in TryToName with Acquire semantics
>
> Add support to atomically load (untagged) values from objects to CSA.
>
> Bug: v8:12007
> Change-Id: If0c4f20f20e021ace3b1e3a874c0405574d313e1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627513
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80444}

Bug: v8:12007
Change-Id: Iee97d83725beb0671fd585a2955cf208975315e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641164
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80465}
2022-05-11 08:53:52 +00:00
Marja Hölttä
924a299e1a [maps] Add check for is_prototype_map being set correctly
Bug: v8:11525
Change-Id: I59fdb446d2b704ef386a8695ee3ddd1b1cdd1dac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635724
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80464}
2022-05-11 07:16:03 +00:00
Samuel Groß
70b83edfb6 [sandbox] Temporarily disable sandboxed pointers on ChromeOS
They are causing failures in the Linux ChromiumOS MSan bot.

Bug: chromium:1324301
Change-Id: I7a7bcd111a9f0e0e652d38e107027c51e51bd4bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639205
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80463}
2022-05-11 07:03:36 +00:00
Simon Zünd
a5ab3507d6 [deoptimizer] Support 'restart frame' in the deoptimizer
Doc: https://bit.ly/revive-restart-frame

This CL implements support for the Debugger's "restart frame"
functionality in the deoptimizer. When the debugger wants to restart
a frame, we throw a termination exception.

If the restarted frame is an optimized frame or was inlined into
an optimized frame, the deoptimizer has to materialize all the
frames up to (and including) the frame we want to restart. This
is similar to materializing all the frames up until the frame
with a catch handler.

The main difference is that we do not jump into the middle of the
top-most materialized frame, but instead use the
RestartFrameTrampolone to immediatly exit, and then re-invoke the
top-most materialized frame.

R=jarin@chromium.org, tebbi@chromium.org

Bug: chromium:1303521
Change-Id: I74ee412bc67f027be81fe56e529b5e5161e97153
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616504
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80462}
2022-05-11 06:38:02 +00:00