Commit Graph

62997 Commits

Author SHA1 Message Date
Maya Lekova
e7606e6b69 [gcmole] Enable use-after-free detection
GCMole now comes with the long forgotten use-after-free detection
enabled by default. The CL also improves error logging when test
expectations mismatch with the actual output and updates the hash
of GCMole to be used with the newly built version with enabled UAF
detection.

The CL also contains an ignore for isolate.cc due to inability to
fix a warning there and fixes a couple of UAF warnings.

Bug: v8:9680
Change-Id: I7a009ffd5f67b1b5437567691ca4235ea873de70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257236
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68505}
2020-06-24 09:29:31 +00:00
Clemens Backes
9a6c9010bb Ignore unhandled promises in one more test
This is a follow-up to https://crrev.com/c/2238569.

R=cbruni@chromium.org

No-Try: true
Bug: v8:10556
Change-Id: Id667359a3098bf6e248716d33a8fcfc110236bb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2262916
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68504}
2020-06-24 08:01:38 +00:00
Camillo Bruni
1335b1ec36 [d8] Exit with error code upon unhandled promise rejection
With this CL d8 exits with an error code if there is an unhandled
promise rejection, e.g. due tue a failed assertion in a promise. Up
until now these assertions were just ignored.

Bug: v8:10556
Change-Id: I25f20e4be45a2de130562deb15f6a144f0ac976f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238569
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68503}
2020-06-24 07:21:58 +00:00
Clemens Backes
3fd18f1258 Revert "Update V8 DEPS."
This reverts commit fa9214a029.

Reason for revert: Still broken: https://crbug.com/v8/10633

Original change's description:
> Update V8 DEPS.
> 
> Rolling v8/build: 2dc7c7a..876a780
> 
> Rolling v8/third_party/aemu-linux-x64: UoYLOT0X6577j70eB9nPqYQs9Z3Nh5lA4I-pRtTchO0C..ipSYUvRoHZQDXIwxn-c7KPxUWeLwGcF_l0HPFMH3eooC
> 
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/95c1f42..5718688
> 
> Rolling v8/third_party/depot_tools: 35c6274..bdfbdd2
> 
> Rolling v8/tools/clang: 42b285f..898dd03
> 
> TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
> 
> Change-Id: Ie77acff55525ad5775bed0e5ee81f8a31e85f689
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2262235
> Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/master@{#68501}

TBR=machenbach@chromium.org,v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Iefc8e1fb40d52d4c4c682cb26103d2860fb6d8c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2262912
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68502}
2020-06-24 07:16:10 +00:00
v8-ci-autoroll-builder
fa9214a029 Update V8 DEPS.
Rolling v8/build: 2dc7c7a..876a780

Rolling v8/third_party/aemu-linux-x64: UoYLOT0X6577j70eB9nPqYQs9Z3Nh5lA4I-pRtTchO0C..ipSYUvRoHZQDXIwxn-c7KPxUWeLwGcF_l0HPFMH3eooC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/95c1f42..5718688

Rolling v8/third_party/depot_tools: 35c6274..bdfbdd2

Rolling v8/tools/clang: 42b285f..898dd03

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

Change-Id: Ie77acff55525ad5775bed0e5ee81f8a31e85f689
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2262235
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#68501}
2020-06-24 03:50:18 +00:00
Deepti Gandluri
e68728a262 [wasm] Add templatized methods for static bounds checks
The IsInBounds function is used in a few different places, when used for
bounds checks on 32-bit platforms, size_t for max_memory_size leads to
incorrect out of bounds accesses as size_t is not guaranteed to be
64-bit on all platforms. Use specific uint32_t, uint64_t methods for
Wasm bounds checking instead of size_t.

Bug: chromium:1080902
Change-Id: I0e21f0a310382c8ed0703c8302200d3352495c13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2256858
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68500}
2020-06-24 03:41:28 +00:00
Deepti Gandluri
c4e66e3b5f [wasm] Add multiple retries to reserve wasm memory
The current memory reservation approach for wasm memory tries to reserve
upto the maximum, and only reserves initial if the maximum reservation  fails.
Add multiple retries with a smaller upper limit so that calls to grow
have a higher probability of succeeding.

Bug: v8:10519
Change-Id: Ice5b4c826ff993c9da7292e1b24a42a72306c098
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259720
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68499}
2020-06-24 02:56:28 +00:00
Ng Zhi An
2cd264853c [wasm-simd][arm] Prototype f32x4.trunc
Prototype f32x4.trunc on ARM for both ARM v7 and ARM v8. ARM v8 has
support for vrintz, and for ARM v7 we fallback to runtime.

Since ARM v8 uses vrintz, which is the same instruction used for F32
trunc (scalar), wasm-compiler reuses the Float32RoundTruncate check.

Bug: v8:10553
Change-Id: I65ddc36ccff21f8f0ff21a6e768184c084ffcfea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2256770
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68498}
2020-06-23 23:56:13 +00:00
Ng Zhi An
9394cef257 [arm] Add disasm support to format and print Q registers
Bug: v8:10553
Change-Id: I57610afbf676f17d11675da1099ca45633d00402
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2254482
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68497}
2020-06-23 22:26:16 +00:00
Ng Zhi An
8e4df90b8c [Py3] Get tools/testrunner closer to Py3
This modernizes python code without breaking Py2 compat.

Ran with command:

futurize --stage1 -w tools/testrunner

Bug: v8:9871
Change-Id: Ie23333cbd923197be0bffcad5041056e00990042
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2252554
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68496}
2020-06-23 21:09:06 +00:00
Z Nguyen-Huu
40657debf4 [v8windbg] Show bitset name of compiler type
Get value from type payload, check and show bitset name.

Change-Id: I6d0e0f30fca0b2aaddfd5f18abf948886552f2dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2258815
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68495}
2020-06-23 19:36:36 +00:00
Camillo Bruni
e7bd239af8 [heap] #ifdef FLAG_minor_mc use
This is the only FLAG_minor_mc usage that is not guarded by
#ifdef ENABLE_MINOR_MC.

Change-Id: I54d447ede6a6ab4bbfb6ffbd7674e240d8cc1987
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2260878
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68494}
2020-06-23 19:30:46 +00:00
Shu-yu Guo
e1bfdae808 Check for null or undefined when getting methods in AsyncFromSyncIterator
Both the .return and .throw methods are delegated to the underlying sync
iterator. These methods are retrieved using GetMethod [1], which checks
for either null or undefined instead of only undefined.

[1] https://tc39.es/ecma262/#sec-getmethod

Bug: v8:10395
Change-Id: Ide8db4270d48783da6fd1d45a5b01f2858e2828c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2258667
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68493}
2020-06-23 19:13:56 +00:00
Ng Zhi An
6f296e0b54 [Py3] Get tools/testrunner/testproc closer to Py3
This modernizes python code without breaking Py2 compat.

Ran with command:

futurize --stage1 -w tools/testrunner/testpro

Manual fixup to util_unittest to modify import paths and change to
absolute imports.

Bug: v8:9871
Change-Id: I2ac29622aff5daebc9dc42145c1d96dff8258546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2252549
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68492}
2020-06-23 18:55:05 +00:00
Ng Zhi An
7603a30374 [wasm-simd][scalar-lowering] Bitmask
Scalar lowering for i8x16, i16x8, i32x4 bitmask.

Depending on which lane we are lowering, we can either shift the MSB
into the correct final bit position, then do a big OR of all the nodes.

Bug: v8:10308
Change-Id: Iddf6c077b5a8658a487cef59f2e3bbae3c8bd98d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219327
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68491}
2020-06-23 18:09:56 +00:00
Ng Zhi An
bf9d6afb93 [Py3] Get tools/testrunner/local closer to Py3
This modernizes python code without breaking Py2 compat.

Ran with command:

futurize --stage1 -w tools/testrunner

and manual fixup in statusfile_unittest.py to change to update import
path and change to absolute imports (similar to pool_unittest.py)

Bug: v8:9871
Change-Id: I8851e2188ef9285f2bd57cc07e959e22e1b05f6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2252548
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68490}
2020-06-23 18:08:36 +00:00
Dan Elphick
a6015b4754 [heap] Fix allocated_object_size for RO_SPACE
After https://chromium-review.googlesource.com/c/v8/v8/+/2250254,
allocated_object_size in RO_SPACE is incorrect. This changes it to use
the accounting_stats_ value. This also fixes the Capacity() which was
previously uninitialized. Both are tested in new ReadOnlySpace allocation
tests in test-spaces.cc.

Couple of cleanups:
* area_size_ becomes const since its value is fixed after construction.
* Deletes incorrect comment in base-space.h

Bug: v8:10454
Change-Id: I9bbbc1ef2548722eee9dae1bb8d67448eccf8955
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259937
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68489}
2020-06-23 16:55:45 +00:00
Hannes Payer
9afb6f3260 [heap] Add --lazy-new-space-shrinking flag and configure the initial heap accordingly.
Bug: chromium:1054771
Change-Id: Id6fa131187caf67b2d7dddca548c2864ac5afaac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2260565
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68488}
2020-06-23 16:24:20 +00:00
Alex Turner
de05e68e3e [api] Add a ScriptId getter for Module objects
There is currently no API call that allows access to the id of the
script underlying a Module. As this function can only be used for
SourceTextModules, we also add IsSourceTextModule() and
IsSyntheticModule() to allow callers to distinguish them.

Bug: v8:10616
Change-Id: Ia55ea8e6993922b695019852e38ca54ffce32cbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2248199
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68487}
2020-06-23 16:23:15 +00:00
Deepti Gandluri
e1a9c1e807 [wasm] Enable atomic operations on all memory by default
Currently, atomics operations are only allowed on shared memory and are
enabled on regular memory behind the --wasm-atomics-on-non-shared-memory
flag. Set the default value of this flag to true. This enables the
following behaviors:

 - No validation failures when atomic opcodes are used on wasm memory
 backed by ArrayBuffers
 - memory.atomics.wait{32/64} operations will trap when wasm memory is
 not shared
 - memory.atomics.notify will always return 0 if wasm memory is not
 not shared.

Bug: v8:9921
Change-Id: I1feb8c3db428187ee192ea72277957bfde9ac4b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2258099
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68486}
2020-06-23 15:48:35 +00:00
Jakob Kummerow
906db63ff4 [wasm-gc] Implement rtt.canon
along with a very basic test case.

Bug: v8:7748
Change-Id: I93d4b280922dd9eba8defc1a83ca08a2a957376a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2254023
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68485}
2020-06-23 15:04:23 +00:00
Andreas Haas
0034015b1a [wasm] Remove immediate of ref.is_null
Due to recent spec changes, this CL removes the type immediate of
ref.is_null again. Instead we check if the type of the input parameter
is nullable.

R=jkummerow@chromium.org

Bug: v8:10556
Change-Id: If07d30fe4dd27664be7774422573b2ab2b0dfa20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247654
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68484}
2020-06-23 14:32:13 +00:00
Almothana Athamneh
462f3f4699 Remove v8_linux64_msan_rel trybot with legacy format
Bug: v8:10445
Change-Id: Ie0d34e2f4afb497c25544bc015d47e42e290f79d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259939
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68483}
2020-06-23 13:06:02 +00:00
Dominik Inführ
b70fd41af8 Revert "[heap] Invoke OldGenerationAllocationCounter in Safepoint"
This reverts commit 8bdd4e86ad.

Reason for revert: Caused multiple regressions.

Original change's description:
> [heap] Invoke OldGenerationAllocationCounter in Safepoint
>
> OldGenerationAllocationCounter() needs to be invoked in safepoint,
> otherwise invocation races with background threads incrementing the
> counter.
>
> Bug: v8:10315
> Change-Id: Iab005582bab7ebf63e7a5a796b25690f499a99eb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235544
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68250}

TBR=ulan@chromium.org,dinfuehr@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:10315, chromium:1095475, chromium:1094968, chromium:1094965
Change-Id: Ib221a907bf3e6a096398c42e74f78f9f48647063
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259854
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68482}
2020-06-23 09:30:24 +00:00
Maya Lekova
ce49d2a38a Revert "Update V8 DEPS."
This reverts commit c5e5321d26.

Reason for revert: Possibly causing Android Arm64 failure - https://ci.chromium.org/p/v8/builders/ci/V8%20Android%20Arm64%20-%20builder/32831?

Original change's description:
> Update V8 DEPS.
> 
> Rolling v8/build: 2dc7c7a..55ed8e6
> 
> Rolling v8/third_party/aemu-linux-x64: UoYLOT0X6577j70eB9nPqYQs9Z3Nh5lA4I-pRtTchO0C..9BRSdHdrFCgATXOmmzV2ZGGbnwMtrcVLFMfGvaddyxcC
> 
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/95c1f42..80948d0
> 
> Rolling v8/third_party/depot_tools: 35c6274..b7db183
> 
> Rolling v8/tools/clang: 42b285f..84ce13e
> 
> TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
> 
> Change-Id: I76672f783411c3cc8a5043e0d5a18a97d1f24492
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259195
> Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/master@{#68474}

TBR=machenbach@chromium.org,v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I9217821f7ef025f657eb4431e66181073cc025ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259934
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68481}
2020-06-23 08:50:25 +00:00
Clemens Backes
1d31558f54 [wasm] Move interpreter to test directory
The interpreter is not used in production code any more, hence move it
from src/wasm to test/common/wasm.
It's still used in unit tests, cctests, and in fuzzers.

Because of this move, a few more methods had to be exported via
V8_EXPORT_PRIVATE.

R=ahaas@chromium.org, yangguo@chromium.org

Bug: v8:10389
Change-Id: If626b940a721146c596fd7df4faaea633e710272
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257226
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68480}
2020-06-23 08:48:14 +00:00
Jakob Gruber
aa4e381bda [nci] Add feedback vector as input to binary ops
Following up on previous changes for unary ops:
https://crrev.com/c/2246576

Bug: v8:8888
Change-Id: Ie4dd9a307fb0415e93babf412e3d8d9e86791761
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257227
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68479}
2020-06-23 08:38:54 +00:00
Daniel Clifford
1052dfb387 [torque] generate Cast<> macros from Torque-defined classes
This change enables automatic generation of Cast<> operators for
classes that are defined in Torque.

* Cast<> macros are generated for all classes that are defined in
  Torque code that are neither shapes nor marked with a new
  @doNotGenerateCast annotation.

* Implicitly generated Cast macros simply call through to an
  internally-defined "DownCastForTorqueClass" macro that implements
  the cast using one of three strategies for efficiency. If the class
  has subclasses (i.e. a range of instance types including subtypes),
  the DownCastForTorqueClass checks for inclusion in the instance type
  range. If the class has a single instance type (i.e. no subclasses),
  then either 1) a map check is used if the class has a globally-
  defined map constant or 2) an equality check for the instance type
  is used.

* Added new intrinsics to introspect class information, e.g. fetching
  instance type ranges for a class, accessing the globally-defined map
  for a class.

* Removed a whole pile of existing explicit Cast<> operators that are
  no longer needed because of the implicitly generated Cast<> macros.

* Added tests for the new Cast<> implementations.

Bug: v8:7793
Change-Id: I3aadb0c62b720e9de4e7978b9ec4f05075771b8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250239
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68478}
2020-06-23 08:01:54 +00:00
Jakob Gruber
443e37acc9 [compiler] Refactor opcode macro lists
This extends the opcode macro lists to include both the long name
(e.g.: JSAdd) and short name (Add) to reduce duplication. The change
is only for JS operators for now but can be extended to others in the
future.

Drive-by: Base more predicates off the macro lists for robustness.

Bug: v8:8888
Change-Id: I10debdf86166dbe9dac63a6df57938820a8af8d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2255468
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68477}
2020-06-23 07:54:14 +00:00
Jakob Gruber
5b5a519243 [coverage] Add a test to document crbug/v8/10628
Just a test for now to document how trailing space after async
functions is not removed by SourceRangeAstVisitor.

Bug: v8:10628
Change-Id: I40f0d911c59540ea835c807a2be5b0d1488291d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259852
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68476}
2020-06-23 07:32:34 +00:00
Marja Hölttä
e63ca1581a [Platform API] Add comment about non-nestable tasks
Clarify when we should use PostTask vs PostNonNestableTask.

Change-Id: I2b69dc4d4b6de4079dcab05e8b5c3b1f77cbbe2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2253852
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68475}
2020-06-23 06:50:14 +00:00
v8-ci-autoroll-builder
c5e5321d26 Update V8 DEPS.
Rolling v8/build: 2dc7c7a..55ed8e6

Rolling v8/third_party/aemu-linux-x64: UoYLOT0X6577j70eB9nPqYQs9Z3Nh5lA4I-pRtTchO0C..9BRSdHdrFCgATXOmmzV2ZGGbnwMtrcVLFMfGvaddyxcC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/95c1f42..80948d0

Rolling v8/third_party/depot_tools: 35c6274..b7db183

Rolling v8/tools/clang: 42b285f..84ce13e

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

Change-Id: I76672f783411c3cc8a5043e0d5a18a97d1f24492
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259195
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#68474}
2020-06-23 03:39:34 +00:00
Ng Zhi An
50f4706c93 [wasm-simd][arm64] Prototype i32x4.dot_i16x8_s
This implements I32x4DotI16x8S for arm64.

Bug: v8:10583
Change-Id: Id55c57715b4050d54bbcdc18fc443f2332291651
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231032
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68473}
2020-06-22 22:21:33 +00:00
Ulan Degenbaev
3e91957803 [heap] Randomize the timeout for forcing GC in the MeasureMemory API
Chrome may send memory measurement requests to multiple renderer
processes at the same time. This may lead to multiple GC happening at
the same time if the processes are idle. Randomization spreads out
the GCs over time to reduce the load on the system.

Bug: chromium:1049093
Change-Id: I5aa67fb07f8a55d0ba769bf823168b35cb3c23cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208861
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68472}
2020-06-22 19:40:53 +00:00
Ng Zhi An
ad913fe4f3 [Respect] Prefer inclusive terms
This changes the use of "sane" to "sensible" or "valid". I tried to be
sensible in my choice of replacement, by trying to read the comments or
code to see which word matches the intention closest.

Referenced
https://fuchsia.dev/fuchsia-src/contribute/best-practices/respectful_code?hl=en#what_are_examples_of_terminology_to_be_avoided.

Bug: v8:10619
Change-Id: Id957b2e6ff11e95270e1372005e1006d8cf1008d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2254483
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68471}
2020-06-22 18:11:23 +00:00
Ng Zhi An
d21a35ef17 [wasm-simd][arm] Prototype f32x4.floor
Prototype f32x4.floor on ARM for both ARM v7 and ARM v8. ARM v8 has
support for vrintm, and for ARM v7 we fallback to runtime.

Since ARM v8 uses vrintm, which is the same instruction used for F32
Floor (scalar), wasm-compiler reuses the Float32RoundDown check.

Bug: v8:10553
Change-Id: I540e82a156131821f732cd427df2e5c68f4094d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2252541
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68470}
2020-06-22 18:10:13 +00:00
Z Nguyen-Huu
28b0df66a2 [v8windbg] Display node_id for compiler node
For better Turbofan debugging.

Change-Id: I79010632b1355e2a4c1a017d64db5ccbb97fa776
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2252539
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68469}
2020-06-22 18:01:03 +00:00
Deepti Gandluri
895c52ddcb [wasm] Adjust atomics wait/notify semantics
Adjust atomics.wait, atomics.notify semantics for when they are used
with non-shared Wasm memory to mirror the spec change introduced
in: https://github.com/WebAssembly/threads/pull/147. This does not
need to be gated by the flag here, as this will only decode if
the flag is enabled.

Bug: v8:9921
Change-Id: I7f2e018fed6bd131ad4c386def1e838626c28a4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2256863
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68468}
2020-06-22 17:49:23 +00:00
Ng Zhi An
7c429d96f6 [wasm-simd][liftoff][arm] Implement s8x16shuffle
Bug: v8:9909
Change-Id: Icb4dd53f02bcd3b38511bb028768d276e3bfebaf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2251041
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68467}
2020-06-22 17:08:12 +00:00
Georg Neis
b47c163bda [codegen] Add two DCHECKs
Change-Id: Id2192cb62d6e0920420a3e988593759f5892a0b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2254026
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68466}
2020-06-22 16:07:51 +00:00
Georg Neis
7527169afb [test] Fully reenable test-api/MultipleIsolatesOnIndividualThreads
Let's see if this is still flaky after almost 5 years.

Bug: v8:4573
Change-Id: I4cd2779b2c4aefc7bb20597db2fccc0e7e7c39c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2255467
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68465}
2020-06-22 15:46:01 +00:00
Dan Elphick
6574a7133d [Respect] Rename lists
This changes black/white list to block/allow list.

Bug: v8:10619
Change-Id: Id55d72f90891670ca57b62dfeb6b3251025927dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257228
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68464}
2020-06-22 15:15:31 +00:00
Almothana Athamneh
3ed221fa1e [MB][Testing] Migrate remaining bots to builder/tester format
Bug: v8:10445
Change-Id: I4d08b77466029d248cae5cfae4a113842129675b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2254027
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68463}
2020-06-22 14:15:21 +00:00
Santiago Aboy Solanes
0da6b2cbfe [cleanup] Clean kFullTransitionArray path in TransitionsAccessor::Insert
There is a case where a TransitionArray shrinks during insertion. If
that's the case, we need to compute the index to insert again. However,
we can use the knowledge that already didn't appear in the array, and
after shrinking it shouldn't appear.

Change-Id: I3a742c5d37659064f143db1c4f345b0df35d0d42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238029
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68462}
2020-06-22 14:06:11 +00:00
Clemens Backes
6a546bd967 [wasm] Minor cleanup in wasm module builder
This addresses a review comment from
https://github.com/WebAssembly/spec/pull/1214.

R=ahaas@chromium.org

Change-Id: Icd473aa16bbf35839556b052271489a2889fe0fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257229
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68461}
2020-06-22 14:01:41 +00:00
Jakob Kummerow
cfb812e3bb [respect] Replace insensitive terms in gm.py
No-Try: true
Bug: v8:10619
Change-Id: I5c428bf47f2f6923aa88a8407d62d9480aa954fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257222
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68460}
2020-06-22 13:15:49 +00:00
Thibaud Michaud
74f5de4f45 [wasm][mv] Enable WebAssembly multi-value
Intent to Ship thread on blink-dev:
https://groups.google.com/a/chromium.org/g/blink-dev/c/K4-P5rq7FbY

Spec repository:
https://github.com/WebAssembly/multi-value/

WebAssembly multi-value is ready to ship. The proposal is now merged
into the core WebAssembly spec, and is implemented in both TurboFan and
Liftoff.

R=ecmziegler@chromium.org

Bug: chromium:1097717
Change-Id: Id53ee318cacae1bc9dd9d9611f9223de594a99b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257225
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68459}
2020-06-22 12:41:39 +00:00
Jakob Gruber
5ef3e899ab [jitless] Disable --interpreted-frames-native-stack
... when jitless is enabled to fix fuzzers that pass random flag
combinations.

Bug: chromium:1096168,v8:7777
Change-Id: Ia78c4d9e1256e44c10df2200ecc32067a617d777
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257220
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68458}
2020-06-22 12:20:39 +00:00
Anton Bikineev
03bb338960 Move stack walking to shared directory
This allows the implementation of different stack scanning mechanisms in
V8 (e.g. conservative scanning) while re-using the stack walking API.

Change-Id: I9b9c3b8ffe5d527ca3f7105776821776b509b187
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238194
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68457}
2020-06-22 10:40:56 +00:00
Clemens Backes
d4d3f3faf7 [wasm] Reuse simple operator logic
We already have specialized logic for unops and binops, and the generic
{BuildSimpleOperator} implementation (based on a signature) was
reimplementing these two cases.
This CL avoids the switch since we only need to handle exactly two
cases, and redirects to the existing methods for implementing them.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I8eb5c768f0fa59e48503c108498b334a0ae9037a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2249859
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68456}
2020-06-22 10:38:55 +00:00