Commit Graph

67749 Commits

Author SHA1 Message Date
Camillo Bruni
88bf591442 [factory] Further dehandlify factory
- Add private NewStructInternal
- Dehandlify JSObject initializers

Bug: v8:11263
Change-Id: I62d77ef32747c2042de707ba10fad20327af0930
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2729342
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73157}
2021-03-03 15:17:18 +00:00
Camillo Bruni
3ba9e86665 [api] Advance API deprecation
Bug: v8:11165
Change-Id: Id1c7abec73d5dd4824c0d84c9789a8b4ea4911ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726513
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73156}
2021-03-03 14:34:32 +00:00
Santiago Aboy Solanes
795caf1eff [cleanup][csa] Remove unused using compiler::Node* occurences
Also add the qualifier `compiler::` to places where it should have been
used in the first place.

Bug: v9:6949
Change-Id: Ib5ca6829cd9d72b1e3047afc92363910c902bbbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731529
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73155}
2021-03-03 13:58:42 +00:00
Omer Katz
b4f838b8da cppgc: Fix ObjectSizeTrait
LargePage::PayloadSize inclues the heap object header.
Keeping PayloadSize as is to keep it aligned with
NormalPage::PayloadSize and introducing LargePage::ObjectSize as the
counterpart for HeapObjectHeader::ObjectSize that will exclude the
header.

Bug: chromium:1056170
Change-Id: I8a5f50841fd9dbd6c9a4a4035d9040021944cacc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731533
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73154}
2021-03-03 13:54:22 +00:00
Frank Emrich
50ee1407df [dict-proto] C++ implementation of SwissNameDictionary, pt. 8
This CL is part of a series that adds the C++ implementation of
SwissNameDictionary, a deterministic property backing store based on
Swiss Tables.

This CL contains:
1. Copy and equality functions used for testing
2. Runtime functions corresponding to most dictionary operations,
   which are used temporarily while the CSA/Torque implementation
   is work in progress
3. Some minor changes to SwissNameDictionary needed for testing
   (adding template instantiations, V8_EXPORT_PRIVATE, ...)

Bug: v8:11388
Change-Id: Iea5f4650b0a443edf563565138ea86fcb45af13a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2722094
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73153}
2021-03-03 13:49:52 +00:00
Clemens Backes
99af8d4918 [wasm] Move test-backing-store.cc to wasm directory
This is a wasm-only test, hence move it to the wasm directory and skip
it in no-wasm builds.

R=ahaas@chromium.org

Bug: v8:11238
Change-Id: I57c9abbb98c3415f4d759372d479e1f61464217f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731536
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73152}
2021-03-03 13:07:01 +00:00
Seth Brenith
3a366c4da7 Privatize FixedArray-style accessors on ScopeInfo
This is a partial reland of https://crrev.com/c/2601880 .

In preparation for ScopeInfo not being a FixedArrayBase, this change
privatizes the FixedArray-style functions that provide access to
ScopeInfo fields by index, and moves them from scope-info-inl.h to
scope-info.cc. Those functions are still used pretty heavily during
initialization (ScopeInfo::Create, etc.), but at least we can avoid
presenting them to the rest of the world.

This change also introduces a new length() function in ScopeInfo which
hides the one inherited from FixedArrayBase and computes the ScopeInfo's
length based on its flags, so that there are no remaining readers of the
'length' field.

Change-Id: I609754010723b679e5cf00f386020faaab84c17a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718275
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73151}
2021-03-03 11:30:14 +00:00
Dan Elphick
4fe89e59f2 [build] Add common_test_headers dep to wasm_api_tests
Fixes gn check error due to include of
test/common/wasm/wasm-macro-gen.h. Also changes common_test_headers dep
from v8_for_testing to v8_internal_headers, since otherwise on windows
the wasm_api_tests binary ends up depending on wee8 and
libv8_for_testing which define many of the same symbols.

Bug: v8:7330
Change-Id: Ib03b860668146f21456729a3d2c5e0d75d8c17d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2729335
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73150}
2021-03-03 11:08:44 +00:00
Santiago Aboy Solanes
e4f63bae09 [compiler] Move GetFieldType to DescriptorArrayRef
Also access the DescriptorArray through GetFieldType concurrently if
the FLAG_turbo_direct_heap_access is on.

Bug: v8:7790
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_no_cm_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: I2506fe44a3be9f3474934300d52849f278899e70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720299
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73149}
2021-03-03 09:21:54 +00:00
Alex Kodat
c613eb9779 [api] Add StackFrame GetScriptSource and GetScriptSourceMappingURL
These simplify production of extra information in stack traces or
dereferencing source maps in processing stack traces. While these
can be managed externally, this can be very complicated in
environments where scripts come from many different sources,
possibly not even under embedder control. Since V8 already has
easy access to this information, it's nice to share it with
embedders.

Bug: v8:11509
Change-Id: Ic5a1685adf4cdf456bdf7191ce815f728cf491e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724571
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73148}
2021-03-03 06:37:44 +00:00
v8-ci-autoroll-builder
d0d9a33b9d Update V8 DEPS.
Rolling v8/build: a1f3c3d..122de42

Rolling v8/buildtools: aa09fa7..b60d41f

Rolling v8/buildtools/third_party/libunwind/trunk: 201ff85..8869f42

Rolling v8/third_party/aemu-linux-x64: gUyZgCT7R0DTHyu0Lq1Q7yrbbA9cage7ltjq_oN3mXkC..xxaIXDIq8jINlzwdt2TTV0PFwnzlgMri76ohrXyvF-wC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cae643a..6da8f82

Rolling v8/third_party/depot_tools: 6ac4a15..bf0766c

Rolling v8/third_party/googletest/src: 1e315c5..07f4869

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I4ea420884e582976db279ec8995c642f0f5786b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2730858
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@{#73147}
2021-03-03 03:59:04 +00:00
Junliang Yan
93f2d3f6dd s390x: [liftoff] misc functions
Change-Id: I5a7e9df277941a4fe88747720bed3c930fd6b4db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726544
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73146}
2021-03-02 22:16:22 +00:00
Sara Tang
8892676978 Step 2 (of 2) for ETW integration into V8
Design doc:
https://docs.google.com/document/d/1xkXj94iExFgLWc_OszTNyNGi523ARaKMWPZTeomhI4U

This is the second (and hopefully final!) change list needed to
integrate ETW into V8. In particular, we added stack-walking
functionality for JIT-ted functions!

Some notes on instrumentation:
  - The gist of getting stack-walking in ETW is we need to emit events
    with specific event IDs. These events get stitched into a pseudo-PDB
    that is recognizable by ETW.
  - Unfortunately, we cannot rely on the TraceLogging API from the first
    CL, as it does not support specifying event IDs. Instead, Bill
    Ticehurst wrote an API that peels back the TraceLogging API just
    enough so that we can specify event IDs. This API is the entirety of
    etw-metdata.h
  - We attach a CodeEventHandler that logs a stack-walking event whenever
    code movement is triggered.

Bug: v8:11043
Change-Id: I1bf57c985b7375f045089027855b1c03878abb78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2616221
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#73145}
2021-03-02 21:53:52 +00:00
Ng Zhi An
476582bfa6 [wasm-simd][ia32] Fix i64x2.eq
Operand 1 is not always a register (when AVX is supported).

Bug: chromium:1182571,v8:11215
Change-Id: I75740b4900c4d8b4a10478780d93c995836faeb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724393
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73144}
2021-03-02 21:47:22 +00:00
Milad Fa
451254929f PPC [simd]: Implement vector shift ops on Sim
Change-Id: I051a82a4a041aa81c150ce559b2b3cbee7718425
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727271
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73143}
2021-03-02 21:36:22 +00:00
Michael Lippautz
f7a23f44b5 cppgc: Fix ephemeron processing of empty Member values
Bug: chromium:1056170
Change-Id: Ib8df4e10aa3a459cc24ca8d89db1f39b53cc5966
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727269
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73142}
2021-03-02 21:00:58 +00:00
Ng Zhi An
a5d45862e6 [wasm-simd][arm64] Optimize f32x4 dup + mul into fmul by element
Wasm SIMD does not have an opcode to multiply a vector by a scalar. In
these cases, Wasm code uses mul(x, shuffle(y, imms)), where the shuffle
is a dup of a single lane in y. Pattern match on this to emit a fmul
(element).

We can do similar pattern match on f64x2 too, that will come in a future
patch.

Bug: v8:11257
Change-Id: I61e8c46b56719a1179c8a6032dbf8a4cc03b40a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2719083
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73141}
2021-03-02 20:59:52 +00:00
Junliang Yan
f4ec0f4d01 s390x: [liftoff] implement sign-ext ops and emitjump
Change-Id: I27fc7c63ba673ec575d22438feb17f30c73074f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727586
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73140}
2021-03-02 19:34:54 +00:00
Santiago Aboy Solanes
02dcf19eb0 [CSA][cleanup] Remove SloppyTNode from the codebase
Remove sloppy-ness from the CODE_ASSEMBLER_UNARY_OP macros and the
remaining methods.

Bug: v8:6949
Change-Id: I48e2800c6bac558ae4005fa09551a4551c1dbb25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2725530
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73139}
2021-03-02 18:55:13 +00:00
Clemens Backes
8890bb21f9 [no-wasm] Remove wasm debugging support
This removes all wasm includes from src/debug and src/inspector if
webassembly is disabled (v8_enable_webassembly=false). It also removes
the definition of {WasmValueObject} and {v8::debug::WasmScript}.
This will allow to later fully exclude the src/wasm directory from
compilation (once other components are fixed).

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

Bug: v8:11238
Change-Id: I41a1d83d01fbb6c015cdfd6cc063bad90052505d
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726506
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73138}
2021-03-02 18:27:53 +00:00
Camillo Bruni
1dd8624b52 [api] Re-introduce v8::String::IsExternal
After deprecation and removal of the old misleading API we re-add
v8::String::IsExternal which returns true for both, external one-byte and
external two-byte strings.

Bug: v8:10641
Change-Id: I4c66d4df891f7180c7a727a45c1fbd254a7f5c02
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726512
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73137}
2021-03-02 18:18:53 +00:00
Santiago Aboy Solanes
d0fd577fda [CSA] TNodify last cases of Node* in CSA
Tnodifying the last cases of StoreElement, brings the total Node*
occurrences in code-stub-assembler to 0!

Bug: v8:6949
Change-Id: I27f61447a2a57969b5d24fe24ee5b2265aa20f8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727504
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73136}
2021-03-02 18:12:33 +00:00
Manos Koukoutos
6f82093f0c [wasm][bug] Add loop exits for tail calls
Tail calls are connected to the end of the graph, so technically they
also constitute loop exits.
Additional Changes:
- In DoReturnCall, change the argument {Node* index_node} into
  {Value index_or_caller_value}.
- Rename StackValueVector -> ValueVector.
- Add a test that reveals the bug.

Bug: chromium:1183622, v8:11298
Change-Id: I58f7877f2d03e94f6a281e566829897c3000b890
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727503
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73135}
2021-03-02 17:20:03 +00:00
Leszek Swirski
0390795fee [scanner] Add a stream for windows-1252
Add a Utf16CharacterStream for windows-1252, which uses a table to
covert from windows-1252 to the appropriate uc16 character. This fixes
issues where windows-1252 encoded source was treated like latin-1.

This introduces a new encoding type in the API, so embedders will have
to opt-in to using this new stream.

Fixed: v8:9315
Change-Id: I2e847c2d4f1727281f6be24b4743d77bb232a62d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2729338
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73134}
2021-03-02 17:14:03 +00:00
Dan Elphick
93d5dd7c9b [build] Fix perfetto build
Moves the handling of base/trace_event/common/trace_event_common.h from
v8_base_without_compiler to v8_internal_headers to fix a build break
caused by:
https://chromium-review.googlesource.com/c/v8/v8/+/2712569

Change-Id: Ie3c161874e18cdfaf30286ff0fa299a4c4e2c1a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2729340
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73133}
2021-03-02 17:11:53 +00:00
Milad Fa
7dfe0d170c PPC [simd]: Implement min/max operations on Sim
Also renamed VECTOR_BIN_OP to VECTOR_ARITHMETIC_OP for clarity.

Change-Id: Icbe1cf9ac95f2c0b1cec364f50123a9fcb846f48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727644
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73132}
2021-03-02 17:05:43 +00:00
Nico Hartmann
0f8b5c5d2a Revert "[wasm][liftoff][eh] Implement catch_all"
This reverts commit 6e234e9d76.

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

Original change's description:
> [wasm][liftoff][eh] Implement catch_all
>
> Inline a catch handler after each potentially throwing call. The handler
> just merges values into the actual catch environment and then jumps to
> the catch body.
>
> This automatically adds support for unwind, which also uses the
> "CatchAll" interface method.
>
> Many tests can be written either with "catch" or with "catch_all".
> Duplicate them to get coverage for both.
>
> R=​clemensb@chromium.org
>
> Bug: v8:11453
> Change-Id: I789ad44b8d1e496f026157d5c37a12004a8b37e3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726497
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73129}

Bug: v8:11453
Change-Id: Ica7fa708962d9ae4b9fbf7473963d187062227ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727266
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73131}
2021-03-02 16:59:26 +00:00
Toon Verwaest
8904bceeb0 [sparkplug] Adjust interrupt weight by current bytecode size
The interpreter always adjusts the current interrupt budget down by the
current bytecode size as well. This aligns the optimization heuristics.

Bug: v8:11420
Change-Id: I0cc78d004779b393a3d8fb46e44bdd7465fcf4ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726496
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73130}
2021-03-02 16:36:43 +00:00
Thibaud Michaud
6e234e9d76 [wasm][liftoff][eh] Implement catch_all
Inline a catch handler after each potentially throwing call. The handler
just merges values into the actual catch environment and then jumps to
the catch body.

This automatically adds support for unwind, which also uses the
"CatchAll" interface method.

Many tests can be written either with "catch" or with "catch_all".
Duplicate them to get coverage for both.

R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I789ad44b8d1e496f026157d5c37a12004a8b37e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726497
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73129}
2021-03-02 16:25:23 +00:00
Camillo Bruni
1b11278eb0 [tools] Revamp callstats.html
- Fix diff coloring when a baseline is selected
- Cleanup UI and use dark-mode by default
- Reuse CSS from the system-analyzer
- Support loading mutliple files by default everywhere
- Use hideable panels from system-analyzer

Change-Id: Iafe271d2f86fbbd10a940b3ac99874dd51f45442
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2721763
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73128}
2021-03-02 14:49:02 +00:00
Camillo Bruni
757771f74a [factory] Dehandlify object initializers in factory
Clang cannot optimise across handle derefs and produces quite
inefficient code when setting multiple properties in a row.

We are already dealing with a lot of raw pointers in factory, thus
adding further DisallowGarbageCollection and will not significantly
increase the risk of stale pointers.

Bug: v8:11263
Change-Id: I2b62f79ecde95faa84a182c09d89c03423900d98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2581963
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73127}
2021-03-02 14:44:43 +00:00
Santiago Aboy Solanes
eb976c3ef9 [csa][cleanup] TNodify PrepareValueForWriteToTypedArray
Using templates seems like the best way to go. We are duplicating code
but seems like a fair trade-off.

Bug: v8:6949
Change-Id: I22b3d5e2e74bfc2bf46f95656782aae4944d72de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727816
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73126}
2021-03-02 13:33:02 +00:00
Dan Elphick
4db38b0c9e [build] Add v8_libbase dep to wasm_test_common
Dependency is needed as wasm-interpreter.cc uses base/overflowing-math.h
and base/safe_conversions.h.

Bug: v8:7330
Change-Id: I4515babf18723a34c89e63621f8aaa49252d3461
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727408
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73125}
2021-03-02 12:45:43 +00:00
Dan Elphick
20bbb356a4 [build] Add flag-utils headers to wasm_test_common
Adds test/common/flag-utils.h and test/common/wasm/flag-utils.h to
wasm_test_common to reduce the number of gn check errors by 4.

Bug: v8:7330
Change-Id: I94e11130c4b96972604cabbaa019617cb1f8f67a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727404
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73124}
2021-03-02 12:33:52 +00:00
Liu Yu
33ece42469 [mips64] Fix TestFastJSWasmCall_MultipleArgs failure
Add register t3 to ALLOCATABLE_GENERAL_REGISTERS,
and change kSpeculationPoisonRegister from a7 to t3.

Change-Id: I199c1b837d5fdd0b47f0865ac3146e47e4ddb68f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726050
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#73123}
2021-03-02 12:09:12 +00:00
Dan Elphick
9bfb7a123a [build] Add various missing dependencies
Adds cppgc_headers to v8_internal_headers and fuzzer_support to
lib_wasm_fuzzer_common in BUILD.gn as well as v8_libbase and
v8_libplatform to cctest_headers in test/cctest/BUILD.gn.

Bug: v8:7730
Change-Id: I9759bb0993be779ddfc26668b9e08503ea53bd69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727501
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73122}
2021-03-02 11:54:52 +00:00
Santiago Aboy Solanes
0378123215 [CSA][cleanup] TNodify CODE_ASSEMBLER_BINARY_OP macros
Bug: v8:6949
Change-Id: Ie8620ec5f3025cdf4f419c80db221d57698fd508
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726514
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73121}
2021-03-02 11:41:59 +00:00
Dan Elphick
64ca87d8f9 [build] Add cppgc_headers dep to v8_headers
To fix 6 gn check errors, this adds a cppgc_headers dep to v8_headers.
To resolve the resulting cycle, it also changes v8_libplatform to depend
on v8_config_headers since it only needs v8config.h.

Bug: v8:7330
Change-Id: I1e21271c84f2a80c248c584e8e107da99eaad5a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727500
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73120}
2021-03-02 10:01:19 +00:00
Benedikt Meurer
06359f7453 [debug] Don't put a source position on internal Returns.
Be explicit about source positions for `Return`s in the
BytecodeGenerator, and only do self-healing explicitly in the
`ReturnStatement` translation, where an end position of
`kNoSourcePosition` is turned into the return position of the
function literal.

This allows us to reason more easily about which `Return`s actually
receive a meaningful source position, and in particular it allows us
to construct the internal `Return`s for `yield` and `yield*` with no
source position attached to them. Previously they'd get the source
position for the implicit (final) return attached to it, which confused
the debugger and led to breakpoints being set in the completely wrong
spot.

Considering the simplified example

```
function* foo(){
  var a = 1;
}
```

this would previously generate the following bytecode

```
        0 : SwitchOnGeneratorState r0, [0], [1] { 0: @20 }
        4 : Mov <closure>, r2
        7 : Mov <this>, r3
 13 E> 10 : InvokeIntrinsic [_CreateJSGeneratorObject], r2-r3
       14 : Star0
 13 E> 15 : SuspendGenerator r0, r0-r1, [0]
       20 : ResumeGenerator r0, r0-r1
       24 : Star2
       25 : InvokeIntrinsic [_GeneratorGetResumeMode], r0-r0
       29 : SwitchOnSmiNoFeedback [1], [2], [0] { 0: @39, 1: @36 }
       33 : Ldar r2
 13 E> 35 : Throw
       36 : Ldar r2
 30 S> 38 : Return    <=========================== internal Return
 27 S> 39 : LdaSmi [1]
       41 : Star1
       42 : LdaUndefined
 30 S> 43 : Return
```

where everything between offset 4 and 42 corresponds to the implicit
yield at the beginning of every generator function, in particular the
code between 20 and 42 corresponds to that initial yields resumption
logic. Notice how the internal Return at offset 38 gets assigned the
source position of the function literal (the same as the implicit
return at the end). This confuses the debugger quite a bit when trying
to set a breakpoint on the closing brace, since it's going in bytecode
order and will thus discover the `Return` at offset 38 first (matching
the source position 30 it's currently looking for) and setting the
breakpoint there. This `Return` bytecode however is only executed when
the generator is resumed via `GeneratorPrototype.return()`, and it'll
not hit when the developer uses the generator normally, which is not
the desired behavior and extremely confusing (especially since stepping
on the other hand works as expected).

With this patch, we no longer slap a source position (and in particular
not the function literal's return position) onto these internal
`Return`s as you can see from the generated bytecode below:

```
       0 : SwitchOnGeneratorState r0, [0], [1] { 0: @20 }
       4 : Mov <closure>, r2
       7 : Mov <this>, r3
13 E> 10 : InvokeIntrinsic [_CreateJSGeneratorObject], r2-r3
      14 : Star0
13 E> 15 : SuspendGenerator r0, r0-r1, [0]
      20 : ResumeGenerator r0, r0-r1
      24 : Star2
      25 : InvokeIntrinsic [_GeneratorGetResumeMode], r0-r0
      29 : SwitchOnSmiNoFeedback [1], [2], [0] { 0: @39, 1: @36 }
      33 : Ldar r2
13 E> 35 : Throw
      36 : Ldar r2
      38 : Return
27 S> 39 : LdaSmi [1]
      41 : Star1
      42 : LdaUndefined
30 S> 43 : Return
```

This also allows us to remove the break position finding hack that was
kept in BreakIterator::BreakIndexFromPosition() for generators and
modules.

Fixed: chromium:901819
Change-Id: If19a6b26e2622d49b6b5e54bf7a162747543f970
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727820
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73119}
2021-03-02 08:42:10 +00:00
Dan Elphick
be5ccde28a [build] Split out EmbeddedFileWriterInterface
To reduce gn check errors, this moves EmbeddedFileWriterInterface into
its own header file that can be included directly by isolate.cc since
embedded-file-writer.h is in the mksnapshot target.

Bug: v8:7330
Change-Id: I3bfb1f48c646680b71189e8229b8df54ead9eea0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727817
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73118}
2021-03-02 08:20:59 +00:00
Dan Elphick
179ee5f250 [build] Move wasm constants files into v8_shared_internal_headers
Moves src/wasm/wasm-constants.h and src/wasm/wasm-limits.h into
v8_shared_internal_headers so v8_flags can access them.

Bug: v8:7330
Change-Id: I322ac483d26a03fd79e9961678462227a89e594b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727498
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73117}
2021-03-02 07:58:39 +00:00
v8-ci-autoroll-builder
547c37f542 Update V8 DEPS.
Rolling v8/build: 06d89c7..a1f3c3d

Rolling v8/buildtools/third_party/libunwind/trunk: 8d5fb6f..201ff85

Rolling v8/third_party/aemu-linux-x64: 12utHdzpAJMv14HvzgxQA19OLkI0UrGervsCs46ESbIC..gUyZgCT7R0DTHyu0Lq1Q7yrbbA9cage7ltjq_oN3mXkC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/df7850d..cae643a

Rolling v8/third_party/depot_tools: e952fae..6ac4a15

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ic0e83640067bc37ed7b5ec5d35c6118e5e649e72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728641
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@{#73116}
2021-03-02 03:59:28 +00:00
Frank Tang
13ac253ac7 Revert "[test] Disable tests failing with new msan roll"
This reverts commit 57ae048bd2.

Reason for revert: bug fixed in https://chromium-review.googlesource.com/c/v8/v8/+/2706353

Original change's description:
> [test] Disable tests failing with new msan roll
>
> Temporarily disable these tests failing on msan builds after latest
> roll:
> - test262/intl402/DateTimeFormat/timezone-invalid
> - intl/regress-364374
> - mjsunit/regress/regress-crbug-627935
>
> No-Try: true
> No-Tree-Checks: true
> Bug: v8:11438
> Change-Id: I4a7755f9f65b2e9a12463c9e12fbbe39d3f5efb2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692188
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72691}

Bug: v8:11438
Change-Id: Iaca0a401a2c6d89e1bc8292ad41ae0086943c635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724862
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73115}
2021-03-02 00:00:03 +00:00
Shu-yu Guo
9c5e0cd832 [x64] Remove dead code related to safepoint registers
Change-Id: I33999e33793662aad741d336018f3a099af17fec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728239
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73114}
2021-03-01 23:14:03 +00:00
Ng Zhi An
40790bfa44 [ia32] Remove unused Psrlw macro-assembler instruction
Bug: v8:11384
Change-Id: I51ac29ed041bc0491c9c45ca1416d69639d9338e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720018
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73113}
2021-03-01 22:46:28 +00:00
Dan Elphick
725c839c4e [build] Fix cppgc_headers deps
Add conditional include of caged-heap-local-data.h and v8_libplatform
dep.

Bug: v8:7730
Change-Id: Ic9dcb919a94e96fbdeb586e20de9fe17ff4d0ce1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727499
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73112}
2021-03-01 22:45:23 +00:00
Ng Zhi An
39f9936c15 [wasm-simd][ia32] Fix ext add codegen
The main problem here is that the macro-assembler for Pmaddubsw and
Pmaddwd expects dst == src1 when AVX is not supported.

For Pmaddwd, we use an existing macro to define the function.

For Pmaddubsw, we do the AVX check inline and use movaps if not
supported because it requires a SSSE3 scope, and we don't have an
existing macro to do this (we can find other uses and clean up as
necessary in the future).

Bug: v8:11086
Change-Id: I97bd29cd93456744414d28e5f1ffcbc875c3ab22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716740
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73111}
2021-03-01 21:14:53 +00:00
Dan Elphick
fcf29e4815 [build] Split out v8_flags target
Moves flags/flags.h and flags/flag-definitions.h out of
v8_internal_headers into a new v8_flags target that can be included by
torque_base to resolve a gn check error.

Bug: v8:7330
Change-Id: I08e3a4475cc4f455077995ddff8683266ed51cd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727819
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73110}
2021-03-01 21:10:53 +00:00
Milad Fa
c687bee8f3 PPC [simd]: Implement vector binary ops on Sim
Change-Id: I8f9f2e291e943a0a63cb78a033b44e6c4a7889f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727822
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73109}
2021-03-01 20:57:33 +00:00
Dan Elphick
cff5e69696 [build] Remove the separate v8_libsampler build target
v8_libsampler was previously split off to serve goals that were never
achieved and seem unlikely to be. Since the division creates a
dependency cycle between v8_base_without_compiler and v8_libsampler
(where one edge is a #include that breaks gn check), this moves
sampler.* back into v8_base_without_compiler and removes the
v8_libsampler target.

Bug: v8:7330
Change-Id: Ied87b68927a372ec084cd650b278af98d7db5f8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727818
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73108}
2021-03-01 20:53:33 +00:00