Commit Graph

62543 Commits

Author SHA1 Message Date
Bill Budge
e19eb649a3 [wasm] Torqueify wasm Table.init and Table.copy builtins.
Bug: v8:9891

Change-Id: I9fda15122fc4f24e237af6bfc00eb529ae37cb01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2177512
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67901}
2020-05-19 14:19:00 +00:00
Emanuel Ziegler
4372a9b58a [wasm] Implement optional init parameter for Table.grow
The typed function references proposal allows an optional second
parameter to Table.grow containing the initialization value for the
newly added entries for tables that do not support null defaults.

This CL adds this functionality but hides it behind a newly added
experimental flag --experimental-wasm-typed-funcref.

R=ahaas@chromium.org
CC=jkummerow@chromium.org
CC=manoskouk@chromium.org

Bug: v8:9495
Change-Id: Ia156aeacf95bc36a9fc182990f315c42075cbb7b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207184
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67900}
2020-05-19 14:09:30 +00:00
Richard Stotz
c8d51a8159 [wasm][liftoff][arm64] Add saturated conversion float->int
Bug: v8:10520
Change-Id: I765201107b6cee20ad8591db57ac88fef5b3dbbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207534
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67899}
2020-05-19 12:51:35 +00:00
Dominik Inführ
d29f29ced9 [heap] More fine-grained allocation mutex
Do not lock mutex for the full duration of the slow path of allocation
on background threads. For example sweeping and allocation of a new page
is now performed outside of the lock.

Bug: v8:10315
Change-Id: Ifee9bc1569d1ec53fdced965bd222dd1eab11b24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207131
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67898}
2020-05-19 12:50:30 +00:00
Richard Stotz
80796956dc [wasm][liftoff][arm] Add saturated conversion float->int64
Bug: v8:10520
Change-Id: I40b94705e638fa6491cef7ca7f8c6287657af06f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202909
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67897}
2020-05-19 12:46:01 +00:00
Clemens Backes
18ac08d03c Reland "[wasm][debug] Fix tier down during streaming compilation"
This is a reland of 3cc981cb7a with a
fix for data race detected by TSan.

Original change's description:
> [wasm][debug] Fix tier down during streaming compilation
>
> If the debugger is enabled while streaming compilation is happening, we
> won't correctly tier down to Liftoff. This is because during streaming
> compilation, we always compile for no debugging. Fixing that is a bit
> tricky, since when the debugger is enabled, functions can either already
> have finished compiling, or they are currently being compiled, or their
> wire bytes are not received yet.
> Instead of handling this correctly while streaming compilation is
> running, we just recompile the whole module with Liftoff after streaming
> compilation finished.
>
> For testing this, we use the existing tests for async compilation, and
> enable --wasm-test-streaming, which compiles via the streaming decoder
> even in the async compilation case.
>
> R=thibaudm@chromium.org
>
> Bug: v8:10531
> Change-Id: I0177248a9ad2e90f83faee965d6746de05423f1f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207133
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67882}

Bug: v8:10531, v8:10544
Change-Id: I884922b6ac55543e6ff9b1046438f6b3abab6f64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207187
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67896}
2020-05-19 12:37:00 +00:00
Thibaud Michaud
01046af93d [wasm][fuzzer] Fix empty break types for br_if
Fix underflow when the break type list is empty, and do not try to
reuse the first value to generate the wanted type.

Bug: chromium:1084452
Change-Id: Ia9855a267730bb9f427518c27157f449475fb6ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208858
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67895}
2020-05-19 12:15:10 +00:00
Clemens Backes
4126662b52 [wasm] Disable Liftoff in single-threaded mode
For single-threaded, we can not tier up in the background. Hence we can
either tier up in foreground (which is pointless), or not tier up.
This CL disables Liftoff, so will compile TurboFan code right away.

R=ahaas@chromium.org

Bug: v8:10530
Change-Id: Icfdc26643ab219d617f844c2ea8e149870168dbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208853
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67894}
2020-05-19 12:09:06 +00:00
Richard Stotz
3c6b5acc06 [wasm][liftoff][arm] Add saturated conversion float->int32
Bug: v8:10520
Change-Id: Ifc99782682c7b1597357211d72a11c44703965b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202907
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Richard Stotz <rstz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67893}
2020-05-19 12:00:00 +00:00
Clemens Backes
04cec28916 [wasm] Skip console-profile-wasm test on tsan
TSan handles SIGPROF incorrectly, hence we don't get the samples we
expect on that test, and it quite frequently times out on TSan bots.
Skip it for now, until the TSan issue is fixed.

R=petermarshall@chromium.org

Bug: v8:9869
Change-Id: I27c65cdd10c53b441faad216e00d6c60b42229e6
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208857
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67892}
2020-05-19 11:18:10 +00:00
Ulan Degenbaev
10b64c5791 [heap, offthread] Skip allocation steps for local spaces
Allocation observers are not thread-safe, so the allocation steps should
be invoked only on the main thread.

Bug: v8:10536
Change-Id: I90e809fa230d18cce135f4bea67b62ef616ca593
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207189
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67891}
2020-05-19 10:21:51 +00:00
Santiago Aboy Solanes
445d4c6bb9 [CSA][cleanup] TNodify LoadWeakFixedArrayElement
Bug: v8:9708, v8:10506, v8:6949
Change-Id: I701ad51273e14db8a5185ff130e8d8593dce1ba4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202911
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67890}
2020-05-19 09:47:28 +00:00
Dominik Inführ
f85f496c3e [heap] Remove Mutex in PagedSpace::Expand
Locking the space mutex isn't required in PagedSpace::Expand.

Bug: v8:10315
Change-Id: I6fac74e3c4fc6f4f2228af37729839b6ff23bc64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207183
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67889}
2020-05-19 09:43:59 +00:00
Jakob Gruber
cd2af2c71c [nci] Add remaining Call and Construct builtins with feedback
Call_WithFeedback
CallWithArrayLike_WithFeedback
CallWithSpread_WithFeedback

ConstructWithArrayLike_WithFeedback
ConstructWithSpread_WithFeedback

These are used in generic lowering if --turbo-nci is passed.

Bug: v8:8888
Change-Id: I78b56a1f358fa7c213e375eeb2feaa65432adfdb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2199352
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67888}
2020-05-19 09:33:04 +00:00
Santiago Aboy Solanes
67990d5635 [csa][cleanup] TNodify LoadElementAndPrepareForStore's parameters
Return type still needs TNodification. It can be Object or Float64T.

Bug: v8:10506, v8:6949
Change-Id: I71e7ae28f3039b2e1c5c2a5c2e383c335cdec38a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204281
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67887}
2020-05-19 08:48:08 +00:00
Santiago Aboy Solanes
34a011f8b6 [CSA][cleanup] TNodify FastArrayForEachBody
Used to be named FastFixedArrayForEachBody. Rename to remove the 'fixed'
part since it can also be a PropertyArray (i.e not a FixedArray).

Rename BuildFastFixedArrayForEach to also remove the 'fixed'.

Bug: v8:10506, v8:6949
Change-Id: I840edf802d334b9ca930f3022553c476e2dca34a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202910
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67886}
2020-05-19 08:40:38 +00:00
Clemens Backes
8d3cca9792 Revert "[wasm][debug] Fix tier down during streaming compilation"
This reverts commit 3cc981cb7a.

Reason for revert: TSan failures: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/31572

Original change's description:
> [wasm][debug] Fix tier down during streaming compilation
> 
> If the debugger is enabled while streaming compilation is happening, we
> won't correctly tier down to Liftoff. This is because during streaming
> compilation, we always compile for no debugging. Fixing that is a bit
> tricky, since when the debugger is enabled, functions can either already
> have finished compiling, or they are currently being compiled, or their
> wire bytes are not received yet.
> Instead of handling this correctly while streaming compilation is
> running, we just recompile the whole module with Liftoff after streaming
> compilation finished.
> 
> For testing this, we use the existing tests for async compilation, and
> enable --wasm-test-streaming, which compiles via the streaming decoder
> even in the async compilation case.
> 
> R=​thibaudm@chromium.org
> 
> Bug: v8:10531
> Change-Id: I0177248a9ad2e90f83faee965d6746de05423f1f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207133
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67882}

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

Change-Id: I26e750c6c6d0783b5e4a0f19a5462a5fbe99a742
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10531
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207186
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67885}
2020-05-19 08:38:51 +00:00
Marja Hölttä
e90c5ddb02 [Promise.any] Fix: if "then" rejects immediately, do the right thing
In this case, we'll already have values in "errors" in PerformPromiseAny
step 8.d.

Bug: v8:9808
Change-Id: I5bb0cba41887f4bbdab3bb15e8f52dd94acec9c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204277
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67884}
2020-05-19 07:58:16 +00:00
Richard Stotz
73bf6079a0 [wasm][liftoff][ia32] Add saturated conversion float->int64
We implement the conversions via C functions (external references)
because 64-bit conversions are difficult to implement on ia32 and
would not be significantly faster.

Bug: v8:10520
Change-Id: I3573d30bf6b3d558f708c7e0273f027c30a1a771
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202988
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67883}
2020-05-19 07:53:10 +00:00
Clemens Backes
3cc981cb7a [wasm][debug] Fix tier down during streaming compilation
If the debugger is enabled while streaming compilation is happening, we
won't correctly tier down to Liftoff. This is because during streaming
compilation, we always compile for no debugging. Fixing that is a bit
tricky, since when the debugger is enabled, functions can either already
have finished compiling, or they are currently being compiled, or their
wire bytes are not received yet.
Instead of handling this correctly while streaming compilation is
running, we just recompile the whole module with Liftoff after streaming
compilation finished.

For testing this, we use the existing tests for async compilation, and
enable --wasm-test-streaming, which compiles via the streaming decoder
even in the async compilation case.

R=thibaudm@chromium.org

Bug: v8:10531
Change-Id: I0177248a9ad2e90f83faee965d6746de05423f1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207133
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67882}
2020-05-19 07:44:05 +00:00
Shu-yu Guo
b10ad8b4e4 Ship String.prototype.replaceAll
I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/raep1X9R_SE/m/V8ofHrBdAgAJ
Bug: v8:9801
Change-Id: I55e71b37f23ec91a01771f5584d11bc4e5939da4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207920
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67881}
2020-05-19 07:03:56 +00:00
Jakob Gruber
508569f5e7 [regexp] Specify signedness when accessing packed arguments
So far this is mainly a readability improvement to specify
expectations on the packed argument. In the future we should also
check signedness during bytecode generation.

Drive-by: Update DCHECK to allow signed args to
CHECK_CURRENT_POSITION.

Bug: chromium:1083450
Change-Id: I9376ec691b51eb251c972309ad65dd6c04eec3ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207137
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67880}
2020-05-19 05:25:15 +00:00
Jakob Gruber
1637b617b9 [regexp] Verify the interpreter's current position remains in-bounds
Verify that `current` always points inside, or just past the end of the
subject string.

Bug: chromium:1083450
Change-Id: I27ba49cbfd0aa93cd2e305efafc23b155c98a49b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207136
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67879}
2020-05-19 04:57:05 +00:00
Ng Zhi An
d16003da0a [wasm-simd][scalar-lowering] Fix anytrue lowering
The lowering for anytrue was assuming that the input nodes are all
integers. The regression test added in https://crrev.com/c/2194471 calls
anytrue with float operands, this was causing the lowering to generate
cmpl instructions with a float register and an immediate, which is
wrong.

The fix is to use GetReplacementsWithType on the input nodes, but
only if the input were floats, since we use Word32Equal.

Drive-by clean up of comments in the aforementioned regression test.

Bug: v8:10535
Change-Id: I4de89516c178e9003a4c745808d831be87918381
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2203400
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67878}
2020-05-19 00:16:45 +00:00
Ng Zhi An
671c2fda2f [wasm-simd] Test for offsets in load extend tests
Bug: v8:9886
Change-Id: I22af3c19ef6371d31f0f95c58730ceb3e7effafa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207653
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67877}
2020-05-18 23:46:25 +00:00
Hannes Payer
1f0befcac7 [heap] Adding fragmentation tracing to Minor Mark-Compact.
Change-Id: I70328a944b78591d106d752197b096cb86c32573
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2206735
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67876}
2020-05-18 21:48:15 +00:00
Ng Zhi An
9d1dda7e97 [wasm-simd][arm] Improve codegen for any_true
The codegen uses a bunch of vpmax to try and keep set bits around. The
datatype for vpmax does not need to change for each instruction, since
vpmax U32 will persist set bits just as well. This simplifies the
instruction sequences for S1x8 and S1x16 anytrue.

I added a test to check a special case when a f64x2 contains -0.0 (top
bit set). A previous attempt to optimize codegen used floating point
compare, which does not distinguish between 0.0 and -0.0. So -0.0 will
compare equals to 0.0, and incorrect return 0 for anytrue.

Change-Id: I66013796af08a666009e6b2d774ea7ee7bdfe1ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2203113
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67875}
2020-05-18 18:08:15 +00:00
Milad Farazmand
a43287f123 PPC/s390: [wasm-simd][liftoff][arm][arm64] Implement i8x16 shr
Port 99e4ef48e1

Original Commit Message:

    Only for arm and arm64 now. The ia32 and x64 ones are more complicated
    and will be included in subsequent changes.

R=zhin@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I3bcdae0d47d2e024cfb6e80ba460306ec5e2d434
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2205884
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67874}
2020-05-18 17:57:44 +00:00
Ng Zhi An
f5336b3d85 Reland "[wasm-simd][liftoff][ia32][x64] Implement i8x16 shr"
This is a reland of edf90ee828

The fix here is to call GetUnusedRegister with {}, in
liftoff-assembler-ia32.h emit_i8x16_shri_u.

Original change's description:
> [wasm-simd][liftoff][ia32][x64] Implement i8x16 shr
>
> The code sequence is the same as TurboFan, only wrapped in a template to
> share the implementation.
>
> Bug: v8:9909
> Change-Id: I9c1b37bbfafe91d1bd8edd7f9dafd86ff1c07623
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202723
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67842}

Bug: v8:9909
Change-Id: Id56a612cd6580c68a5129e71d7a0e7b29d64b368
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204080
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67873}
2020-05-18 17:21:24 +00:00
Ng Zhi An
59e2e119d9 [clang-tidy] Make deleted constructor public
Making them private was a way to hide the constructor, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I8a116637608fcc6a93d6fc4f5ee014d2db863669
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204156
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67872}
2020-05-18 16:58:44 +00:00
Manos Koukoutos
4f3b9ddd8c [wasm][refactor] Improve SsaEnv implementation
- Add a default, move, and copy constructor for SsaEnv and use them
  when possible.
- Bring the Split method signature in line with Steal and
  Unimplemented.

Changes: 
Change-Id: I626142fbd1c1ed15c1852b9bfc8b39a0e936b839
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204278
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67871}
2020-05-18 16:49:44 +00:00
Dan Elphick
b50d91960c [heap] Move remaining MemoryAllocator functions
Moves several functions missed in
https://chromium-review.googlesource.com/c/v8/v8/+/2203206.

Bug: v8:10473, v8:10506
Change-Id: I882410cefe496054b71db24a65133224dc52f23c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207144
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67870}
2020-05-18 15:02:31 +00:00
Maya Lekova
9e2f3f864e [gcmole] Handlify test-api.cc
Bug: v8:9994
Change-Id: I662182a252c2aab053f6c821bf281f613316700a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207143
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67869}
2020-05-18 15:00:01 +00:00
Richard Stotz
72ae7f48cc [wasm][liftoff][ia32] Add saturated conversion float->int32
Bug: v8:10520
Change-Id: If24a2d74b6e1837b4c29383e4c537e872404e0a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201764
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67868}
2020-05-18 14:51:21 +00:00
Maya Lekova
273f9abdb1 [gcmole] Whitelist entry for frames.cc
Enhance gcmole --verbose printing with the GC suspect.

Bug: v8:9986
Change-Id: Ia1454d4edec334eabb31a764583e4ee559f0fe07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207174
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67867}
2020-05-18 14:06:20 +00:00
Richard Stotz
003b2622d9 [wasm][liftoff][x64] Add saturated conversion float->int64
Bug: v8:10520
Change-Id: Iad8d35e58b766a9e4d3013f90fd4d7fb68708fa7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201577
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67866}
2020-05-18 14:02:50 +00:00
Clemens Backes
e0246541ed [wasm][debug] Add more tests for async compilation
Asynchronicity can be tricky, in particular if the debugger is enabled
while wasm compilation is happening.
We seem to have open issues in streaming compilation there. As a first
step, which CL adds more tests for async compilation (non-streaming).

R=thibaudm@chromium.org

Bug: v8:10531
Change-Id: Idf16790a91aad437ceb981485512a2f52b791bac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2206736
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67865}
2020-05-18 13:49:50 +00:00
Jakob Gruber
7845967af3 Reland "[nci] Add Construct_WithFeedback builtin"
This is a reland of 69f42d408a

Original change's description:
> [nci] Add Construct_WithFeedback builtin
>
> This builtin essentially acts like InterpreterAssembler::Construct. It
> collects full feedback, then tail-calls either the array constructor
> or the construct builtin.
>
> For now, it is only used in generic lowering, if the --turbo-nci flag
> is passed. One of the next steps will be to measure performance impact
> of feedback collection. If minimal, we may want to enable it
> unconditionally in generic lowering.
>
> Bug: v8:8888
> Change-Id: I8a460a2b5954c26fa72658045a8423c5eee6b611
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2198775
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67850}

Tbr: neis@chromium.org
Bug: v8:8888
Change-Id: Ib1a81da998c848d63c0119b3a4e90fc917b15e94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2206738
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67864}
2020-05-18 12:57:35 +00:00
Richard Stotz
19e3eb8fd9 [wasm][liftoff][mips64] changed default position in switch-case
Bug: v8:10520
Change-Id: Id06c35f8004519cd778af12ad67aaee2d506609a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207135
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67863}
2020-05-18 12:56:30 +00:00
Omer Katz
c9ee831541 cppgc: Dynamically trace previously in-construction objects
Bug: chromium:1056170
Change-Id: I8f1fbf1f9995fbd3f89564542209b828bf7118ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2190428
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67862}
2020-05-18 12:48:00 +00:00
Santiago Aboy Solanes
88958ea929 [cleanup] TNodify ExtendPropertiesBackingStore
There are some 'mode' still pending removal.

Bug: v8:9708, v8:10506, v8:6949
Change-Id: Ie1dc0397241bf046ac9737666e700b98018b2ff5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202906
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67861}
2020-05-18 11:11:50 +00:00
Jakob Gruber
fe3e17d483 Revert "[nci] Add Construct_WithFeedback builtin"
This reverts commit 69f42d408a.

Reason for revert: The last PS introduced a bug https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20fyi/15897.

Original change's description:
> [nci] Add Construct_WithFeedback builtin
> 
> This builtin essentially acts like InterpreterAssembler::Construct. It
> collects full feedback, then tail-calls either the array constructor
> or the construct builtin.
> 
> For now, it is only used in generic lowering, if the --turbo-nci flag
> is passed. One of the next steps will be to measure performance impact
> of feedback collection. If minimal, we may want to enable it
> unconditionally in generic lowering.
> 
> Bug: v8:8888
> Change-Id: I8a460a2b5954c26fa72658045a8423c5eee6b611
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2198775
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67850}

TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org

Change-Id: I3af168373978d773385b9eda9bc1e243e3cbea09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8888
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2206737
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67860}
2020-05-18 10:57:12 +00:00
Jakob Gruber
7f25263c4b [csa] Remove unused ReceiverMode for CodeStubArguments
... and other unused methods.

Bug: v8:9708
Change-Id: Ie3658878024fcddcd5503c6462e5ad873eba19b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2206733
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67859}
2020-05-18 10:51:39 +00:00
Richard Stotz
9282c90732 [wasm][liftoff][x64] Add saturated conversion float->int32
Bug: v8:10520
Change-Id: I0b4867d9b705058536b0f4640a9a87059db3aca7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201576
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67858}
2020-05-18 10:36:21 +00:00
Dan Elphick
dfabc70a99 [heap] Split out memory-allocator.h
Splits out MemoryAllocator and CodeRangeAddressHint into
memory-allocator.h

Bug: v8:10473, v8:10506
Change-Id: I0855f23dd0374ddd68493ee05af7a3a00c84660d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2203206
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67857}
2020-05-18 10:08:30 +00:00
Thibaud Michaud
821d97627c [wasm][fuzzer] Fuzz multi-value blocks
R=ahaas@chromium.org

Bug: v8:10408
Change-Id: I1ca62c1cdf3025dcd0df7cdbe6735cc3491c48e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201578
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67856}
2020-05-18 09:48:49 +00:00
Clemens Backes
a0687c7131 [utils] Synchronize across StdoutStream instances
We constantly fight against scrambled output with --print-wasm-code and
other flags. Passing --single-threaded only partially mitigates this,
because there could still be multiple isolates (e.g. Workers), and we
sometimes failed to really execute in a single thread if that flag was
set.
Hence this CL solves the problem in a more fundamental way: Whenever a
{StdoutStream} is constructed, it implicitly takes a global recursive
mutex. The recursive mutex is needed because we still have some printing
methods that don't take a stream as parameter, and instead create their
own instance of {StdoutStream}, which should not crash of course.

The overhead of taking a mutex should be acceptable, since output to
stdout mostly happens if special tracing flags have been passed, and is
slow anyway.

This CL ensures that the {StdoutStream} is used at least for
--print-code, --print-wasm-code, and --trace-turbo-graph.
More flags can later be ported on demand.

The {JSHeapBroker} class was modified to not contain a {StdoutStream},
but instead create one on demand.

R=mlippautz@chromium.org, tebbi@chromium.org
CC=ahaas@chromium.org

Bug: v8:10506
Change-Id: Ib9cf8d76aa79553b4215bb7775e6d47a8179aafa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201767
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67855}
2020-05-18 09:40:50 +00:00
Jakob Kummerow
f87539b4a8 [cleanup] Replace some "default:" with explicit cases
When the intention is to handle every case, *and* when we can be
reasonably sure that no invalid enum values will occur (e.g. from
reading untrusted data), then we shouldn't have a "default:" case
in a switch statement so that the compiler will warn us when a
case is missing.

Bug: v8:10506
Change-Id: Iefdebd54802611e7ec3479afa3c4e6506f97a095
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204284
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67854}
2020-05-18 09:30:00 +00:00
Ulan Degenbaev
4f9b30b014 [heap] Make PagedSpace::Expand thread-safe
This moves page post-processinng into NotifyOldGenerationExpansion
and introduces a new CanExpandOldGenerationBackground.

Bug: v8:10536
Change-Id: I54761226487434955f8a0dadf7c4dbb31c7955e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204283
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67853}
2020-05-18 09:23:45 +00:00
Santiago Aboy Solanes
66dd6bdb41 [CSA][cleanup] Turn {} allocation sites into base::nullopt
Bug: v8:10506
Change-Id: I171a587176f4a1a3c98d407e8b6a3b63bbf1ad6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202993
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67852}
2020-05-18 09:22:39 +00:00