Commit Graph

63250 Commits

Author SHA1 Message Date
Seth Brenith
607452dc22 [regalloc] Fix another case where FindOptimalSpillingPos missed ranges
In previous change https://crrev.com/c/2274308 , I attempted to fix an
issue where FindOptimalSpillingPos could sometimes fail to find the
LiveRange that covers the top of the loop. However, I misunderstood how
TopLevelLiveRange::GetChildCovers behaves, so I introduced a different
case where FindOptimalSpillingPos would fail to find the right
LiveRange. This change updates GetChildCovers to do what I had thought
it would do, so it can find the right LiveRange in all cases.

     chromium:1102243

Bug: chromium:1101958, chromium:1101954, chromium:1102257,
Change-Id: If91c642c3f7f5e3a8b4cfaa3b3577865c84afcb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288660
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68758}
2020-07-09 13:42:08 +00:00
Jakob Gruber
f468e8e75f [nci] Verify native context independent code
After native-context-independent codegen, verify that the resulting
Code object does not embed any nc-dependent objects, and that no code
dependencies have been created.

Bug: v8:8888
Change-Id: I894e74b27e86e7727ff17aa0dbfdd908373a5e55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284498
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68757}
2020-07-09 13:38:09 +00:00
Georg Neis
f44900d2f1 [turbofan] Prettify a condition
Change-Id: I3800486f18a3693c9e2d3ace0a6f8ee626efc84e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289780
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68756}
2020-07-09 13:35:18 +00:00
Jakob Kummerow
38b1bff18c [wasm-gc] Support RTTs of generic types ("eqref" etc)
By introducing a globally known map for each generic type.
These maps are never used to allocate objects, they only
serve as sentinels for generic heap types.

Bug: v8:7748
Change-Id: I950a8c712dc1510759a833fe9122b9e9a6222dc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288860
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68755}
2020-07-09 13:29:48 +00:00
Dominik Inführ
273f4e42e3 [heap] Avoid ParkedMutexGuard during allocation
Since main thread allocation does not start incremental marking anymore
while holding allocation_mutex_, background allocation does not need
ParkedMutexGuard anymore to avoid deadlocks.

This also means background thread allocation isn't paused anymore to
perform a GC, which already resulted in subtle bugs (e.g. in
ExpandBackground with incremental marking). We also do not
stop-the-world anymore while holding allocation_mutex_.

Bug: v8:10315
Change-Id: Iadf00bc26434c765722b82a10497ab06151f15cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289771
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68754}
2020-07-09 12:45:18 +00:00
Camillo Bruni
f4b3a59c08 [tools] Remove sodium
The tool is no longer supported since we migrated to Turbofan.

Change-Id: I55b911f47867b2a6985ce14f973cd837f71ec4b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288859
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68753}
2020-07-09 11:38:48 +00:00
Clemens Backes
b429b8f924 [liftoff] Handle unordered register pairs
For 64-bit binary operations, Liftoff on arm made the assumption that
register pairs are always ordered, i.e. the register code for the low
word is lower than the register code for the high word.
Ensuring this was only implemented in {GetUnusedRegister} in
https://crrev.com/c/2168875. Other cases were missing though, e.g.
return values, but also different places were we
construct register pairs internally.

Thus, this CL removes this constraint again and instead handles
unordered register pairs in 64-bit binary operations on arm.

R=thibaudm@chromium.org

Bug: chromium:1101304
Change-Id: I4cd9fb1577f82ab06d34c9dde6533cf04a2cade7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287870
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68752}
2020-07-09 11:05:08 +00:00
Dominik Inführ
d6a14abe05 [heap] Move start of incremental marking in allocation
Move start of incremental marking out of
RefillLinearAllocationAreaFromFreeList. This avoids a potential
safepoint while holding allocation_mutex_.

Bug: v8:10315
Change-Id: Ieb60ac68f26199eea7b6b7ad6d874851382f3d69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287496
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68751}
2020-07-09 10:25:18 +00:00
Leszek Swirski
8377214ae8 [objects] Pass isolate to HashTable accesses
Change-Id: I90612ae0e54b46e7147d9a3392783f56da598b2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287499
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68750}
2020-07-09 08:11:08 +00:00
v8-ci-autoroll-builder
a1b752a7a7 Update V8 DEPS.
Rolling v8/build: 4222272..2f694ac

Rolling v8/third_party/aemu-linux-x64: Cht8VcqmH1adKCbBa1TuNhvNv-lMJJ0W5LvFyKpchi8C..Y1_xyAnxWY49mUT2otmospCKTrX01gsjJxt9x-qV0RsC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7cbda52..5d5af4e

Rolling v8/third_party/depot_tools: e62496b..6402141

Rolling v8/tools/clang: faaecad..77b632f

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

Change-Id: I2abc382797809382a8c6a28cf8bd3d0e97ae3305
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288599
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@{#68749}
2020-07-09 03:41:58 +00:00
Frank Tang
81f864bfdc Use TypeError instead of RangeError
Reflect recent change to the proposal

http://tc39.es/proposal-intl-DateTimeFormat-formatRange/#sec-intl.datetimeformat.prototype.formatRange

Bug: v8:10681
Change-Id: Ie2e0e85816aeaeb2615d482ccd3ea345a5056c93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2286813
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68748}
2020-07-08 21:22:27 +00:00
Milad Farazmand
c2373c464b PPC/s390: [wasm-simd] Use S128AllOnes in v128.const implementation
Change-Id: I997abb5576224d4e7fe00ef593afa0265ef80e16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288428
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68747}
2020-07-08 20:47:37 +00:00
Ng Zhi An
9025871855 [wasm-simd][fuzzer] Add v128.const
This rounds up all SIMD instructions as included in the proposal as of
9f1295a494.

Bug: v8:10180
Change-Id: Icd4cb0aeddede6a611de6f8f3916dc036977c499
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2285789
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68746}
2020-07-08 19:53:27 +00:00
Ng Zhi An
d0e6ff154c [wasm-simd] Implement v128.const for arm
And removed the ifdef guards around instruction-selector and
tests since v128.const is now implemented for x86, x64, arm, arm64.

Bug: v8:8460
Change-Id: I0ed8aede0a07db2fd286bf0c3385eba1079558f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2285149
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68745}
2020-07-08 17:48:37 +00:00
Ng Zhi An
07585a342f Enable F32x4ConvertI32x4 test on interpreter
Bug: v8:8425
Change-Id: I3a2485e9983ed14c25bde705a5906c50a78c651d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1768873
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68744}
2020-07-08 17:33:57 +00:00
Milad Farazmand
e4ab01f510 PPC: [wasm-simd] Implement simd AnyTrue and AllTrue
Change-Id: Ic60a47a931c8c359dce27ea5c774592bed1d4762
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287230
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68743}
2020-07-08 16:10:12 +00:00
Victor Gomes
8d34a6f413 [graph-builder] Fix parameter index access in VisitSuspendGenerator
The second argument of FromParameterIndex should be the parameter count, including the receiver.

Previously it worked by chance, because the code was trying to access the receiver but did not include it in the parameter count, accessing the first argument. This does not work anymore when the arguments are reversed (V8_REVERSE_JSARGS).

Change-Id: I8ca9054a99d074c130f9a9b444e7b8a379840991
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282531
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68742}
2020-07-08 16:09:07 +00:00
Clemens Backes
a53778bad7 [wasm] Fix --trace-wasm-decoder implication
--trace-wasm-decoder should not imply --single-threaded, as
--single-threaded implies --no-liftoff. Hence we cannot trace the
decoder in Liftoff mode.

R=thibaudm@chromium.org

Change-Id: I3e4f0ea119288ef88c4b00dd2f2a11244b77c204
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287492
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68741}
2020-07-08 14:49:00 +00:00
Clemens Backes
94ebbe1705 [wasm] Combine memory decode methods
Instead of having one decoder method per opcode, make all load and store
opcodes use the same method, and load the necessary information from a
static array.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I27daf52b9cb0af6a288a5642913c132e20f0eabd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287489
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68740}
2020-07-08 14:44:07 +00:00
Frank Tang
2931f7ea02 [Intl] Fix NumberFormat option reading
Bug: v8:10684
Change-Id: Id686d9f4d0b08d00ecf63217493e71f608d61b5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2286812
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68739}
2020-07-08 13:59:50 +00:00
Zeynep Cankara
e4d589a79b [tools][system-analyzer] Hide/Display panels
This CL attempts to hide panels from the user view until
data upload event to help users read instructions more easily.

Screenshots: https://imgur.com/a/qFgIKI8

Bug: v8:10665
Change-Id: Ida666aa850b80cff3f428e1789cc92592ec79a6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278474
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Cr-Commit-Position: refs/heads/master@{#68738}
2020-07-08 13:52:10 +00:00
Manos Koukoutos
0a9db745b7 [wasm] Fix performance bug in module instantiation
Bug: chromium:1103161
Change-Id: I8b6155ec4f1033eb7024d798a08cd6f55f5f609d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287502
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68737}
2020-07-08 13:27:30 +00:00
Ulan Degenbaev
34b0b6867d [heap] Allow dereferencing of persistent handles owned by LocalHeap
Bug: v8:10315
Change-Id: I6be83e742a3ef488e09ac44a379e028592a5ff64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287493
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68736}
2020-07-08 13:12:10 +00:00
Georg Neis
c681125cf9 [turbofan] Remove an incorrect DCHECK
Due to an optimization in how resumable functions are compiled, we can
actually see another Oddball type as StrictEquality inputs. I'm giving
up on getting the DCHECK right and removing it entirely.

Bug: chromium:1102683
Change-Id: Ia210777c66641e898e96900713710a51ebed311d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287494
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@{#68735}
2020-07-08 12:38:10 +00:00
Igor Sheludko
459b9aeff9 [cleanup] Split src/zone/zone.h header
... into
  src/zone/scoped-list.h
  src/zone/zone-hashmap.h
  src/zone/zone-list.h
  src/zone/zone-fwd.h

zone-fwd.h header contains zone-related forward type declarations.

Bug: v8:10506
Change-Id: Ic61b6717b3034afa24bdd49fbc0ce758a0e93c75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284987
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68734}
2020-07-08 10:30:20 +00:00
Peter Ralbovsky
923375a435 Integrate V8 Builtin coverage to Fuzzilli
Goal is to include coverage of builtin functions into coverage
bitmap send to Fuzzilli fuzzer. In order to do this, after each
REPRL loop, coverage data of bitmaps are retrieved from JS heap
and stored into coverage bitmap. Additionally, there is an option,
to print out statistics about how many of edges from builtin
functions were turned on by the program inputted into REPRL loop.

This commit introduces two flags:
--no-fuzzilli-enable-builtins-coverage - when enable-builtins-coverage
 turned of, builtins coverage will not be exported to fuzzilli

--fuzzilli-coverage-statistics - when turned on, d8 prints
 statistics into covlog.txt file after each loop




Change-Id: I8f9cf8dc693b952467b108c6d6bc00134125bc5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2263154
Commit-Queue: Peter Ralbovsky <ralbovsky@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68733}
2020-07-08 09:29:00 +00:00
Clemens Backes
d696c37db2 [wasm] Split decoder functions
Instead of having one method with a big switch, and specializing that
method for each single opcode, we now have one proper method per opcode.
This makes the code way more readable, and also reduces the compile time
of liftoff-compiler.cc significantly.

Unfortunately, we cannot use template specializations for this, since
GCC does not support specializing the methods within an unspecialized
templated class.
Hence, we need to have another dispatch per opcode when generating the
opcode handler table. I left a comment explaining why we do it this way.
The upside of this is that we get nicer method names.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I8c7026177490893711c999217eeb1e4f2fbb5e36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282533
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68732}
2020-07-08 09:22:43 +00:00
Shu-yu Guo
6023de85da [weakrefs] Add missing extension to test file
Change-Id: I1a7afc332dc2f1c4d4087650f116484437f7a09a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2285851
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68731}
2020-07-08 07:51:40 +00:00
Frank Tang
b8aa8df63f Roll test262
f89ea875..281eb10

Bug: v8:7834
Change-Id: I9a8bcd56b09092999430f568edb0f841b417c955
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2285850
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68730}
2020-07-08 06:10:33 +00:00
Zeynep Cankara
dbe1f4efb7 [tools][system-analyzer] Change color to dark theme
This CL attempts to change System Analyzer to fit
to the dark theme by Material Design.

Link dark theme: https://material.io/design/color/dark-theme.html

Screen Shots: https://imgur.com/a/xWJo1Xb

Change-Id: Ib921febfaaee7aa362495031a174875f442af3a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282596
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Cr-Commit-Position: refs/heads/master@{#68729}
2020-07-08 04:58:33 +00:00
v8-ci-autoroll-builder
cb1bc4a2d1 Update V8 DEPS.
Rolling v8/build: 89943b9..4222272

Rolling v8/third_party/aemu-linux-x64: LQ_bftKUbwaforl6s7QhdVirfTBttP4-yogIN0A6CcoC..Cht8VcqmH1adKCbBa1TuNhvNv-lMJJ0W5LvFyKpchi8C

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9ef36d0..7cbda52

Rolling v8/third_party/depot_tools: 81923d6..e62496b

Rolling v8/tools/clang: b49c12a..faaecad

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

Change-Id: Id1e21a8f8d9687f18206e393348c453878fbf474
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2286649
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@{#68728}
2020-07-08 03:56:53 +00:00
Gus Caplan
f14960b02a [Torque] Port WeakRef APIs to torque
Bug: v8:9891
Change-Id: I559ee50a09a2c8530c3d75a650b383b7d987f6f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282713
Commit-Queue: Gus Caplan <me@gus.host>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68727}
2020-07-08 03:13:33 +00:00
Jakob Gruber
e33e84815d [nci] Don't expose feedback to compiler phases in NCI mode
Native context independent code generation should, at the moment, not
use any collected feedback.

We implement this by returning InsufficientFeedback from the heap
broker's ReadFeedbackForX methods if currently compiling nci code.
Thus all feedback.IsInsufficient() calls inside the compiler will
return true (disabling feedback-based optimizations).
FeedbackSource::IsValid() (used in generic lowering) can still return
true.

Bug: v8:8888
Change-Id: I198b6457276073e7376c777b206c50726f1b3645
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284494
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68726}
2020-07-07 20:19:12 +00:00
Jakob Kummerow
6603127440 [wasm-gc] Reject WasmGC <-> JavaScript interaction
We used to expose raw WasmGC objects via the JS interface and made
use of that in our cctests. Since those objects would cause crashes
when used in JavaScript, this patch prevents such interactions, and
migrates the tests to use the C-Wasm interface instead.

Bug: v8:7748
Change-Id: I76a10663cda43c940c8c22c57c14922be9b05134
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284497
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68725}
2020-07-07 19:54:02 +00:00
Ng Zhi An
1043f49d98 [wasm-simd] Implement v128.const for ia32
Drive-by fix for x64 to remove unused temporary register.

Bug: v8:8460
Change-Id: Ib4e83bad4e14670ccd93dd10e16c5483eb0897b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2283233
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68724}
2020-07-07 19:00:04 +00:00
Shu-yu Guo
93c0be4b7c [weakrefs] Make unregister_token undefined on popped WeakCells
The unregister_token slot is iterated as a custom weak pointer slot,
which means the heap verifier treats it as a strong slot. Currently,
popped WeakCells (that is, WeakCells for which the owning
FinalizationRegistry's finalizer has already been invoked) neither
clears out the unregister_token slot nor marks it, which trips the heap
verifier.

Bug: chromium:1102161
Change-Id: I0a803f12379fc9df6935bc8331b3d5ecb199571a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284202
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68723}
2020-07-07 17:24:31 +00:00
Mythri A
f41e519f65 [Turboprop] Differentiate between a deopt when we discard / reuse code
In turboprop, we reuse the code on a soft deopt. It will be good to
differentiate between a deopt that reuses the optimized code on the
next run and the deopt that discards the code. The deopt that reuses the
code is called a "bailout" because it is just bails out for one
execution to the unoptimized code.

Change-Id: I9a300201e9b327415e94c2817065d6a561f8ece5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277807
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68722}
2020-07-07 16:58:02 +00:00
Dan Elphick
ea2460e2ee [heap] Make AllocationStats methods const
Adds const modifiers to several methods and their parameters in
AllocationStats, BasicMemoryChunk and ReadOnlySpace.

Also moves BasicMemoryChunk::OffsetToAddress to ReadOnlyPage.

Bug: v8:10454
Change-Id: Ibda8f9212d95dff71ed1d8f1f985eb1c7e6087aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284986
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@{#68721}
2020-07-07 16:18:06 +00:00
Ulan Degenbaev
6e6f6d09bb [heap] Implement LocalHeap::Current using thread_local
This is needed for write-barrier and persistent-handle code that does
not otherwise get an instance of LocalHeap

Bug: v8:10315
Change-Id: I480e31f32141510f2f9e678af3449d5841e3156e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284492
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68720}
2020-07-07 16:17:01 +00:00
bcoe
2d5017a0fc [coverage] remove the last continuation range before synthetic return
Rather than only removing the continuation range for the last return
statement prior to a synthetic return statement, remove the
continuation tracking for whatever statement occurs prior to the
synthetic return.

Bug: v8:10628
Change-Id: Ieb8e393479c9811cf1b9756840bbfdbe7f44a1b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280585
Commit-Queue: Benjamin Coe <bencoe@google.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68719}
2020-07-07 15:53:21 +00:00
Ulan Degenbaev
10fdca843d [heap, api] Add a memory measurement mode that doesn't force GC
By default the v8::MeasureMemory API forces GC after some timeout.
There are use cases that require low overhead measurements without
forcing GC at all.

Change-Id: I7d57c552d78d86800c4f37acb680c70c6422477f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257856
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68718}
2020-07-07 15:14:31 +00:00
Manos Koukoutos
8143a3e040 [wasm-gc] Add test for disallowed packed globals
Bug: v8:7748
Change-Id: I6793133d7b05c3b8dbece80a51a7a6e5e250e8b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284482
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68717}
2020-07-07 14:28:21 +00:00
Michael Lippautz
3a50eae048 api: Add JSVisitor and JSMember reference
- Adds JSVisitor that is used for unified heap marking.
- Adds JSMember as supported reference type that also encapsulates a
  write barrier in future. JSMember is a replacement for
  TracedReference which can be deprecated with EmbedderHeapTracer once
  the library is used to handle unified heap collections.

The dispatch for v8::JSMember on cppgc::Visitor is provided through a
specialization of TraceTrait.

Bug: chromium:1056170
Change-Id: I60d976ae66db3e5fa2e690a21627bdcb8c6871af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2284488
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68716}
2020-07-07 13:48:31 +00:00
Jakob Kummerow
bc793ae8e5 [wasm-gc] Canonicalize RTTs created with rtt.sub
When rtt.sub is called repeatedly with the same arguments, it
should return the same result. This CL introduces a cache for
previously created sub-RTTs to achieve that.

Bug: v8:7748
Change-Id: Ie6c74eedf0df6f94cd973fdb0b6b6fc0130a9c41
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275967
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68715}
2020-07-07 13:31:41 +00:00
Santiago Aboy Solanes
9b4450da62 [cleanup][csa] Create typed version of PrepareValueForWriteToTypedArray
This lets us type the last VARIABLE. PrepareValueForWriteToTypedArray
still returns Node* for the non-templated version since it can return
Word32T or Float64T or Float32T or BigInt.

Bug: v8:6949
Change-Id: I90dee90d2e7eff08b1f69a57af371dec399b94c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282595
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68714}
2020-07-07 13:27:11 +00:00
Aaron O'Mullan
0300dd8ba2 Fix crash on inspector setScriptSource calls when source is unchanged
Bug: chromium:1059746
Change-Id: I309c15a33a7185c9397b7893a9eefcb90981dc64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280085
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68713}
2020-07-07 13:25:51 +00:00
Jakob Gruber
3ccf0d30fa [nci] Load the native context from the current context
Similar to the feedback vector, we cannot embed the native context as
a constant in NCI code (it is trivially native-context-dependent). In
NCI mode, load it from the current context. In default turbofan, we
keep the HeapConstant.

Bug: v8:8888
Change-Id: Iff95c673b25245c701c7755416abf2038b5fdf08
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282532
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68712}
2020-07-07 13:19:51 +00:00
Jakob Gruber
db5d8d1983 [nci] Adapt HasProperty, InstanceOf, CreateClosure
HasProperty and InstanceOf now both have a feedback vector input, and
collect feedback in generic lowering.

CreateClosure loads the feedback cell (in nci mode) instead of embedding
a heap constant.

Bug: v8:8888
Change-Id: Id479cda344684aeb5054f687b087c4fedeac05d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282530
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68711}
2020-07-07 13:16:06 +00:00
Jakob Gruber
e63bae121b [compiler] Enable feedback collection in generic lowering
Turbofan now has support for generating generic code in two variants,
with and without feedback collection. Currently, feedback is collected
only for some load and store operators (historical reasons).

This CL enables feedback collection for (almost) all operators by
default. The exception in the default TF configuration are call and
construct variants (see also https://crrev.com/c/2276042). In NCI mode,
all operators collect feedback.

Regression have looked acceptable in our benchmarks so far. This is an
experiment to see impact on real world. If successful, the
non-collecting variants can be removed.

Bug: v8:8888
Change-Id: I0dddc7113ce94071552d5c4d992471db5ac5f989
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2239571
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68710}
2020-07-07 13:14:51 +00:00
Santiago Aboy Solanes
ad29219533 [cleanup][csa] TNodify CheckForCapacityGrow and type VARIABLEs
This CL types almost all remaining VARIABLEs. Only one remains (in
PrepareValueForWriteToTypedArray) since it depends on a variable
MachineRepresentation. Will be done in a follow-up.

Bug: v8:6949
Change-Id: Icdec3d8fdc1459c0b35fc3d1f7e8816981bbccba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282594
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68709}
2020-07-07 13:08:31 +00:00