Commit Graph

62642 Commits

Author SHA1 Message Date
Michael Lippautz
ab671ee816 cppgc: Add HeapStatsCollector
This ports HeapStatsCollector (former ThreadHeapStatsCollector) from
Blink. The CL only ports accounting of allocated object size which is
needed for a simple growing strategy in a follow up.

HeapStatsCollector is a global dependency for most sub components as
it provides infrastructure for measuring time (through trace scopes)
and space.

The general idea of HeapStatsCollector is to act as sink where all sub
components push time and space information. This information is then
gathered and made available via an event that is implemented as POD.
Time-dependent info is available through regular getters (pull) and
observers (push).

Change-Id: I40b4d76e1a40c56e5df1a7353622318cde730e26
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225902
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68150}
2020-06-03 16:08:48 +00:00
Santiago Aboy Solanes
bdc4b6763e [compiler] Merge revisit loop into visit loop in SimplifiedLowering
This CL makes it so that we revisit nodes in the revisit queue as soon
as possible in RETYPE and PROPAGATE. This is done to revisit loops
related to backedges before moving onto other nodes.

Bug: v8:10424
Change-Id: I432c6551805903072b3f9fbc867adca82b263325
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157373
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68149}
2020-06-03 15:49:07 +00:00
Andreas Haas
641c1a4eff [wasm] Fix bottom type handling in br-table
Even in unreachable code, the targets of br_table have to have matching
types.

R=thibaudm@chromium.org

Bug: v8:10556
Change-Id: I2e85df3cb92f7910a6bcb5ac03927c424194660d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218062
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68148}
2020-06-03 15:46:47 +00:00
Manos Koukoutos
57c8f1dabc [wasm-gc] Refactor GC tests
Add some abstractions to make it easier to define more tests.

Bug: v8:7748
Change-Id: Ia5605aa10963228eb4bfba37e2b412fc5af860d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224212
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68147}
2020-06-03 15:14:37 +00:00
Junliang Yan
dc6186049c [heap] Create remembered-set-inl.h and move UpdateTypedSlot
1) Rename remembered-set-inl.h back to remembered-set.h
2) Introduce a new remembered-set-inl.h and move the
function definition that depends on ptr-compr-inl.h.

Change-Id: I0e16e1e428937184ff255471937c70e6bb65a11e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223816
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68146}
2020-06-03 14:42:47 +00:00
Clemens Backes
0816423d59 [wasm][debug] Avoid use-after-free on tier down
When tiering down (or up), we first get a list of all native modules
(under a lock), then tier them down/up without holding the lock. Since
we don't hold (shared) ownership of the native module, it could die
in-between.
This CL fixes this by keeping weak pointers to the native modules, and
re-gaining a shared pointer before putting the module in the list of
modules to be tiered down/up.

R=thibaudm@chromium.org

Bug: v8:10588
Change-Id: I2891c3729f42f26d4026f3e2448e124863b95122
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228515
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68145}
2020-06-03 14:37:57 +00:00
Michael Lippautz
246344ad2c cppgc: Fix stale comment in build file for example program
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1056170
Change-Id: I0f8d0a4e79fa3a526151efe3317546862aff70bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228333
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68144}
2020-06-03 14:01:09 +00:00
Arnaud Robin
171d94111a [wasm] Add return value to the tracing of function calls
Added return value display when tracing function calls in wasm.
The new types handled are I32, I64, F32 and F64.
Only single return value is handled.

R=clemensb@chromium.org

Bug: v8:10559
Change-Id: I726d08fcfdc8bf2c3e43a25ec1932412ff74387b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225024
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Arnaud Robin <arobin@google.com>
Cr-Commit-Position: refs/heads/master@{#68143}
2020-06-03 13:59:28 +00:00
Mythri A
a9b7830d3a Ensure bytecode isn't flushed when allocating feedback vector
This is a followup of the cl [1] that fixes a bug where bytecode was
getting flushed when allocating feedback vector. The fix added
IsCompiledScope before allocating a new feedback vector. We now pass
IsCompiledScope to JSFunction::EnsureFeedbackVector. This makes it
explicit that EnsureFeedbackVector expects a function that is compiled
and the bytecode shouldn't be flushed during the allocation.Also adds
a test.


[1] https://chromium-review.googlesource.com/c/v8/v8/+/2218066

Bug: v8:10560
Change-Id: I552c449a57555dffa625b2e4efa04c2c276fc0b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222347
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68142}
2020-06-03 13:50:17 +00:00
Andreas Haas
dbc8aa879a [wasm] Add type immediate to RefNull and RefIsNull instructions
With recent changes to the anyref proposal, null refs now have a type
immediate which declares the type of a null ref constant. Likewise,
the RefIsNull instruction is type aware now. This CL addresses these
proposal changes now.

R=jkummerow@chromium.org

Bug: v8:10556
Change-Id: I810dfa3a4ab4389afc9639f897cee5d43e9b62cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215172
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68141}
2020-06-03 13:27:27 +00:00
Dan Elphick
490f3580a3 [heap] Fix ubsan SpaceIterator test
Now ReadOnlySpace is not a Space, it cannot be upcasted to it, so cast
to BaseSpace as well.

Fixes ubsan failure introduced by
https://chromium-review.googlesource.com/c/v8/v8/+/2209060.

Bug: v8:10454
Change-Id: I2936bfd8349377b441be4a6eedf580d91f1c4ee4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228723
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68140}
2020-06-03 13:25:37 +00:00
Michael Lippautz
5fc80685f5 cppgc: Add sample program showing cppgc usage for V8 embedders
Bug: chromium:1056170
Change-Id: I7cb19e19de63a74e5407665c28f1b5c0f23d7d0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226563
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68139}
2020-06-03 13:17:37 +00:00
Zhao Jiazhong
c5fe2cb3d4 [mips][wasm-simd][liftoff] Implement bitmask
Port aa5bcc09bf
https://crrev.com/c/2225090

Change-Id: Ib3b159ebcee0d4da5ce003b08d02cd36b7218016
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228097
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#68138}
2020-06-03 13:05:27 +00:00
Dan Elphick
81c34968a7 [heap] Make ReadOnlySpace use bump pointer allocation
This changes ReadOnlySpace to no longer be a PagedSpace but instead it
is now a BaseSpace. BasicSpace is a new base class that Space inherits
from and which has no allocation methods and does not dictate how the
pages should be held.

ReadOnlySpace unlike Space holds its pages as a
std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses
BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and
cannot be held in a heap::List. This is desirable since with pointer
compression we would like to remap these pages to different memory
addresses which would be impossible with a heap::List.

Since ReadOnlySpace no longer uses most of the code from the other
Spaces it makes sense to simplify its memory allocation to use a simple
bump pointer and always allocate a new page whenever an allocation
exceeds the remaining space on the final page.

Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68137}
2020-06-03 11:59:37 +00:00
Jakob Gruber
86fee30e25 Include standard heap object header when debug-printing String objects
This brings %DebugPrint(string) closer to %DebugPrint(object) by also
including the pointer, object kind, and RO/old space. Especially the
pointer can be useful while debugging.

One could consider going even further end printing full details of
the string object, e.g. first and second pointers for cons strings.

Before:

 $ out/debug/d8 --allow-natives-syntax -e '%DebugPrint("abc");'
 DebugPrint: #abc
 0x263f080402cd: [Map] in ReadOnlySpace
 [...]

After:

 $ out/debug/d8 --allow-natives-syntax -e '%DebugPrint("abc");'
 DebugPrint: 0xa830824ffe1: [String] in OldSpace: #abc
 0xa83080402cd: [Map] in ReadOnlySpace
 [...]

Drive-by: Document string printing functions.
Drive-by: Use PrintUC16 in spots that don't want a full debug print.

Bug: v8:10581
Change-Id: Ided59047b9c3edc1830ce7721376dddfd24fad1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228509
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68136}
2020-06-03 11:55:54 +00:00
Igor Sheludko
0262bc10fc [zone-stats] Introduce v8.zone_stats tracing category
... in order to make it possible to collect zone memory usage stats
from Chrome.

Drive-by-cleanup: move TracingFlags definition to a separate file.

Bug: v8:10572
Change-Id: I05fb65e207d573d5c18821067cfff4c37f2d77cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226561
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68135}
2020-06-03 11:31:35 +00:00
Dan Elphick
ae489decb1 [heap] Move MemoryChunk fields to BasicMemoryChunk
This moves several fields that will be needed by ReadOnlySpace pages
when it stops using MemoryChunk into BasicMemoryChunk.

Additionally AllocationStats is moved from spaces.h into
allocation-stats.h.

Bug: v8:10473, v8:10454
Change-Id: I76a66565a260126e629bd7588a5418267dfa8423
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228722
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68134}
2020-06-03 10:37:34 +00:00
Igor Sheludko
262a1078d5 [zone-stats] Add a UI for exploring zone memory usage stats
... collected via --trace-zone-stats flag or v8.zone_stats trace
category.

This is an initial version inspired by heap-stats UI.

Bug: v8:10572
Change-Id: Ib87cf0b4e120bc99683227eef02668a2a5c3d594
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226855
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68133}
2020-06-03 10:22:34 +00:00
Peter Ralbovsky
70eb08982c Integrate fuzzilli into v8
Fuzzilli is open source fuzzer by Samuel Groß (saelo@google.com)
that can be used to find bugs in v8 javascript engine. As we want
to automate fuzzing for current versions of v8, we want to merge
fuzzilli toolkit into v8 code, so that fuzzer can automatically
update to the newest version.
So far Fuzzilli has been maintained at
https://github.com/googleprojectzero/fuzzilli .


Bug tracker Id: https://bugs.chromium.org/p/v8/issues/detail?id=10571

Change-Id: I83ddc7e8bb31664c19e4044395bb9044a1c12031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201760
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68132}
2020-06-03 09:53:24 +00:00
Camillo Bruni
d9337dc100 [testrunner] Output unexpected passing tests
Passing tests that are marked as fail in a status file are not
immediately visible as such.

- Always show "--- FAILED ---" for failing tests
- Show "--- UNEXPECTED PASS ---" for unexpectedly passing tests

Drive-by-fixes:
- Color failures in red with --progress=color
- Color repro command in yellow with --progress=color

Change-Id: Id43ecec348dbfd4ff627ea6aa4ba458a2e5a8445
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2213434
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68131}
2020-06-03 09:16:29 +00:00
Thibaud Michaud
01724ace94 [assembler][x64] Inline Operand constructor
On x86-64, we spend significant time constructing and copying operands
in Liftoff (around 5% locally). Inlining the constructor and helper
functions removes most of the overhead.

R=clemensb@chromium.org

Bug: v8:10576
Change-Id: I1663e3e92abe7683eba9320e77fce9be8f84b4ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225023
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68130}
2020-06-03 09:13:19 +00:00
Iain Ireland
b65fcfe925 [regexp] Fix non-unicode ignore-case backreferences
https://crrev.com/c/2072858 rewrote the implementation of non-unicode
ignore-case matches to comply with the JS spec in some corner
cases. It fixed character matches and character class matches.

We missed a similar bug in the implementation of back references. This
CL fixes that bug.

The main change is in regexp-macro-assembler.cc, where
CaseInsensitiveCompareUC16 is split into CaseInsensitiveCompareUnicode
(which has the same semantics as before) and
CaseInsensitiveCompareNonUnicode (which has the semantics described
here: https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch).

Most of the rest of the patch undoes https://crrev.com/c/2081816 to
once again make the unicode flag available to the macroassembler, so
that we can decide which helper function to call.

The testcase is a version of test/intl/regress-10248.js, modified to
test backreferences.

Bug: v8:10573
Change-Id: I70ef7d134d37f99b1f75a5eba17020e82d59f1b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219284
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68129}
2020-06-03 08:59:08 +00:00
Jakob Gruber
69bc22e729 Extend two-byte-in-one-byte string test
This CL makes the test stricter by requiring specific string shapes;
before it was possible to skip verification if strings were
short-circuited, which I believe is no longer possible due to thin
strings.

I also added a regression test for the linked bug, which requires
a String.p.split call on a two-byte-in-one-byte string with an empty
string separator argument.

Bug: chromium:1088179
Change-Id: Ibb3180afe612a64fcf6a506d18bbc415840526a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228609
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68128}
2020-06-03 08:18:28 +00:00
Dominik Inführ
49951673d4 [heap] Tests can now set FLAG_local_heaps from the get-go
Bug: v8:10315
Change-Id: I0144b89696933afcd02f63b0440118dd33a7d5ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225025
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68127}
2020-06-03 08:03:38 +00:00
Georg Neis
8c0bae39e9 Update deoptimizer/OWNERS
Also change the component from Runtime to Compiler.

Change-Id: Ifb19e0d584b279b5f9bc6bc60531e64d4fecb4ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218285
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68126}
2020-06-03 07:50:48 +00:00
Anton Bikineev
38c4d58727 cppgc: Fix missing <algorithm> header
This fixes the gcov build.

Bug: chromium:1056170
Change-Id: I40ac42b6fce77367c6a366544abf89fc21075cdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228510
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68125}
2020-06-03 07:32:04 +00:00
Jakob Gruber
0e8c33a57c [builtins] Fix String.p.split for one-byte-wraps-two-byte string
It's possible for a one-byte string to wrap a two-byte string. For
example:

      CONS_ONE_BYTE_STRING_TYPE
wraps THIN_STRING_TYPE
wraps EXTERNAL_INTERNALIZED_STRING_TYPE

We thus have to validate the extracted instance type when relying on
the string being one-byte.

Bug: chromium:1088179
Change-Id: Id0f996761a3ae2f1233e12c95e663e77d4a5ebf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226752
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68124}
2020-06-03 04:54:05 +00:00
Ng Zhi An
a96d243d2f [wasm-simd][fuzzer] Add replace lanes
Bug: v8:10180
Change-Id: Ic3dc7394962439adca0482750593a1c22c840054
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225091
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68123}
2020-06-03 01:42:51 +00:00
Ng Zhi An
5d8f3b46a5 [ia32] Replace c-style cast with brace initialization.
Bug: v8:10506
Change-Id: I896d0d614524bb9515593fb1fb2b1e3e9892a026
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225938
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68122}
2020-06-03 00:44:48 +00:00
Ng Zhi An
1b62ffa864 [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: I624efdb03edb4d1d07f95e756f2c87baba4b3ffe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223236
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68121}
2020-06-02 23:35:28 +00:00
Ng Zhi An
cebbf6103d [clang-tidy] Add override to overridden destructors
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: Icfb54d8f4ab0efe0fdf51bd1920511b7505207d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223234
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68120}
2020-06-02 21:32:46 +00:00
Frank Tang
ba3a9424f1 [Intl] Changes of toStringTag of Intl.*
Implement the spec changes in https://github.com/tc39/ecma402/pull/430

Bug: v8:10554
Change-Id: I421d6feb94810027cf17ff58a4ec5357940ef44a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2212889
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68119}
2020-06-02 20:31:45 +00:00
Clemens Backes
38948b8e92 [wasm][interpreter] Remove activations
Since the interpreter cannot call out to JS any more, there cannot be
more than one activation at a time. Hence remove the concept of
activations.

R=ahaas@chromium.org

Bug: v8:10389
Change-Id: Ifda5624e192464a1aed2943787bc6860d1917719
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219942
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68118}
2020-06-02 20:20:05 +00:00
Clemens Backes
634d5952a7 Revert "[wasm-simd][liftoff] Fix I64x2Mul"
This reverts commit 76debfda32.

Reason for revert: Nullptr access in new test: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/37265

Original change's description:
> [wasm-simd][liftoff] Fix I64x2Mul
> 
> The I64x2Mul overwrote the lhs/rhs if they are the same as dst. So when
> deciding if we need temporaries, we should not only check the
> cache_state, but whether they alias dst or not.
> 
> Bug: chromium:1088273
> Change-Id: I82efa9b45e0a3d321a06efde60971ce95b21490f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225796
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68114}

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

Change-Id: I5fd337b71d82d262d36ff410077a11c17b50036b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1088273
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226756
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68117}
2020-06-02 20:12:08 +00:00
Clemens Backes
6b633af775 [wasm] Disallow nullptr modules in decoder
In production, we will always pass a pointer to the decoded module. The
only reason for the existance of the nullptr checks is that tests
sometimes don't pass a module here. Hence we pay in production code for
a test-only feature.

This CL fixes this by always passing a module pointer from the decoder
tests. This even simplifies the code a lot by removing redundant code.

The {TestModuleBuilder} class was moved before the definitions of the
{FunctionBodyDecoderTest} class in order to be able to reuse it there.
It's unmodified otherwise.

R=ahaas@chromium.org

Bug: v8:10576
Change-Id: I7d876bfc8a27b50fe713afb8848fb4f642287cfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226749
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68116}
2020-06-02 20:01:35 +00:00
Shu-yu Guo
e0f2e5a515 Revert "Set .name of anonymous functions on the RHS of logical assignment."
This reverts commit c342ba8247.

Reason for revert: Incorrectly parsed destructuring + logical assignment

Original change's description:
> Set .name of anonymous functions on the RHS of logical assignment.
> 
> https://github.com/tc39/proposal-logical-assignment/pull/24 reached
> consensus in June TC39.
> 
> Drive-by refactoring of testing for logical assignment ops using
> IsInRange.
> 
> Bug: v8:10579
> Change-Id: I5a203ba552a905cd28f75c5d223998431a1966ce
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225809
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68101}

TBR=marja@chromium.org,syg@chromium.org

Change-Id: I7992941bb31ad063611a45a65d20517803910475
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10579
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227059
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68115}
2020-06-02 19:26:27 +00:00
Ng Zhi An
76debfda32 [wasm-simd][liftoff] Fix I64x2Mul
The I64x2Mul overwrote the lhs/rhs if they are the same as dst. So when
deciding if we need temporaries, we should not only check the
cache_state, but whether they alias dst or not.

Bug: chromium:1088273
Change-Id: I82efa9b45e0a3d321a06efde60971ce95b21490f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225796
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68114}
2020-06-02 19:21:55 +00:00
Ng Zhi An
6dca4f96f4 [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: Ie9200b317e4d2f47b9e869701149960341878d3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223235
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68113}
2020-06-02 19:20:35 +00:00
Clemens Backes
447ad5ccbe [codegen] Move SourcePositionTableBuilder to Zone
The SourcePositionTableBuilder unconditionally allocates heap memory for
every Liftoff compilation. This shows up with 1-2% of compilation time
in profiles. Hence move the vector contained in the
SourcePositionTableBuilder into the compilation zone. Such a zone
already exists for both Liftoff and TurboFan, so we can easily save
allocations this way.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: Ia83d05cc8c36c775ebff6ec2064e9c3f8cc4d384
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224221
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68112}
2020-06-02 19:18:07 +00:00
Dominik Inführ
f62fc2e1a8 [heap] Allow enabling --local-heaps by default
All tests pass now with --concurrent-allocation and --local-heaps flags
set to true.

Bug: v8:10315
Change-Id: I03a70933aa0db4d9e74933ad2fc4cb81105cb889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218061
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68111}
2020-06-02 19:03:25 +00:00
Junliang Yan
1e0287c13b PPC: [test] fix heap/Regress589413
We need to reserve two pages for young objects and objects on
the evacuation candidate page.

Change-Id: I0c4e8f85971676c0b50dfd947678a33dd1b56084
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224364
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68110}
2020-06-02 18:28:55 +00:00
Milad Farazmand
2ae3fa5076 PPC/s390: Reland "[wasm-simd][liftoff][ia32][x64] Implement bitmask"
Port aa5bcc09bf

Original Commit Message:

    This relands commit d04b5e4755.

    The fix here is in the assembler for pmovmskb, emit_optional_rex_32 should be
    called after emitting the prefix byte.

    Original change's description:
    > [wasm-simd][liftoff][ia32][x64] Implement bitmask
    >
    > Implements i8x16 i16x8 i32x4 bitmask.
    >
    > This was merged into the proposal in
    > https://github.com/WebAssembly/simd/pull/201/.
    >
    > Bug: v8:9909,v8:10308
    > Change-Id: I882f0c2697213cdf593e745112e0897cee252009
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222607
    > Commit-Queue: Zhi An Ng <zhin@chromium.org>
    > Reviewed-by: Clemens Backes <clemensb@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#68090}

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

Change-Id: Id73795d3628067199ac6ac592a9b0b1c57fc65a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226311
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68109}
2020-06-02 18:25:25 +00:00
Anton Bikineev
ad54f1bb17 cppgc: Add write barrier
This moves from Blink:
1) implementation of the marking write barrier;
2) WriteBarrierWorklist to Marker;
3) incremental/concurrent marking options.

Bug: chromium:1056170
Change-Id: Ia3e31ffd920a99803420b1453695fe2fb8d843b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218064
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68108}
2020-06-02 18:03:35 +00:00
Ng Zhi An
f672cefd30 [wasm-simd][liftoff][arm][arm64] Implement bitmask
Implement i8x16 i16x8 i32x4 bitmask for arm and arm64.

The instruction sequence is the same as TurboFan, we have some special
handling for getting the second temporary Q register, reuse src if
possible.

Bug: v8:9909,v8:10308
Change-Id: I1c6fe0d076f0e14d05c4cc532e4d976f4ebcce30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222608
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68107}
2020-06-02 17:32:35 +00:00
Ng Zhi An
aa5bcc09bf Reland "[wasm-simd][liftoff][ia32][x64] Implement bitmask"
This relands commit d04b5e4755.

The fix here is in the assembler for pmovmskb, emit_optional_rex_32 should be
called after emitting the prefix byte.

Original change's description:
> [wasm-simd][liftoff][ia32][x64] Implement bitmask
>
> Implements i8x16 i16x8 i32x4 bitmask.
>
> This was merged into the proposal in
> https://github.com/WebAssembly/simd/pull/201/.
>
> Bug: v8:9909,v8:10308
> Change-Id: I882f0c2697213cdf593e745112e0897cee252009
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222607
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68090}

Bug: v8:9909, v8:10308
Change-Id: I4897585c86b87f72dc8f142b275171276d135a24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225090
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68106}
2020-06-02 16:31:15 +00:00
gengjiawen
a16ad725b9 build: fix build on msvc
See: https://github.com/nodejs/node-v8/issues/158#issuecomment-636909258
Change-Id: I50c732cd682cd4627a463822a4dfd1678dff266e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226121
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68105}
2020-06-02 15:33:11 +00:00
Seth Brenith
7ce4b196ce [diagnostics] Make basic block profiling more configurable
This change adds more granular control to the behavior that was
previously controlled by the single flag --turbo-profiling. With this
change, it becomes possible to:
- output information only about builtins, ignoring functions compiled at
  runtime
- skip the very slow process of writing the schedule and disassembly for
  all builtins, if you only want the block counts and don't need verbose
  output

This change also moves the output step from Shell::OnExit to
Isolate::DumpAndResetStats so that it's more consistent with other
features and works in hosts other than d8.

Bug: v8:10470, v8:9119
Change-Id: I19b1caca3ff27a2e4a6fdc7ad2f8174f8d678b3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216717
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68104}
2020-06-02 15:18:52 +00:00
Jakob Gruber
a70348d0e0 Unify string debug printing
This unifies functionality between release-mode ShortPrint and
debug-mode Print:

- Prefixes and suffixes are now consistent. 'u' for two-byte, '#' for
  internalized, 'c' for cons, '>' for thin.
- Logic was simplified and is now based on 3 functions:
  PrefixForDebugPrint, PrintUC16, SuffixForDebugPrint.
- %DebugPrint no longer interprets strings as 'code markers'.
- The ancient and unused use_verbose_printer flag was removed.

Bug: v8:10581
Change-Id: Iebc6a746a2683f9f5a8ef60579836e7f66a188fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224868
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68103}
2020-06-02 15:08:21 +00:00
George Wort
7c0c52861f [turbolizer] Display live range uses
Display UsePositions in the intervals
in live ranges in turbolizer.

Uses are shown as vertical red lines.

Bug: v8:7327
Change-Id: Iab8d08989b9113d1b7d393252de5988e8b25b8de
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224215
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68102}
2020-06-02 15:04:11 +00:00
Shu-yu Guo
c342ba8247 Set .name of anonymous functions on the RHS of logical assignment.
https://github.com/tc39/proposal-logical-assignment/pull/24 reached
consensus in June TC39.

Drive-by refactoring of testing for logical assignment ops using
IsInRange.

Bug: v8:10579
Change-Id: I5a203ba552a905cd28f75c5d223998431a1966ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225809
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68101}
2020-06-02 15:00:21 +00:00