Commit Graph

68268 Commits

Author SHA1 Message Date
Deepti Gandluri
914d371f72 Revert "[torque] Protect against printing Type* pointers"
This reverts commit ef808d3ba5.

Reason for revert: Failures on TSAN: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/2981?

Original change's description:
> [torque] Protect against printing Type* pointers
>
> I've noticed a frequent mistake within Torque is to use Type* pointers
> with ostream's operator<<, which causes it to print a hex pointer rather
> than a descriptive string. This can cause confusing error messages for
> users of the Torque compiler. This change is an idea to prevent future
> incidences of that problem by adding a template overload that will cause
> a compilation failure if anybody tries to use Type* in this way. It
> found two incorrect uses of Type*, which I've corrected.
>
> Bug: v8:7793
> Change-Id: I85fafb333a89f8a3fed4346bdd154d70846a63d1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2748936
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#73574}

Bug: v8:7793
Change-Id: Ieee470aa3cd176b9e1ad21fe39b9939edcef5bd6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2778722
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73576}
2021-03-22 17:33:46 +00:00
Clemens Backes
f1644a4b95 Revert "[dict-proto] C++ implementation of SwissNameDictionary, pt. 10"
This reverts commit 8e6047e51d.

Reason for revert: Tests time out on TSan: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/36003/overview

Original change's description:
> [dict-proto] C++ implementation of SwissNameDictionary, pt. 10
>
> 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 adds the actual tests for SwissNameDictionary, defined in
> test-swiss-name-dictionary-shared-tests.h, using the infrastructure
> in test-swiss-name-dictionary-infra.[h|cc].
>
> Bug: v8:11388
> Change-Id: I5d91cede4f74b85a4101c5f2de3deda01a72edb2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2744138
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Frank Emrich <emrich@google.com>
> Cr-Commit-Position: refs/heads/master@{#73572}

Bug: v8:11388
Change-Id: I5d11e9f847545fe2b9c561ca8441eecb204bcfa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2779032
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73575}
2021-03-22 16:56:07 +00:00
Seth Brenith
ef808d3ba5 [torque] Protect against printing Type* pointers
I've noticed a frequent mistake within Torque is to use Type* pointers
with ostream's operator<<, which causes it to print a hex pointer rather
than a descriptive string. This can cause confusing error messages for
users of the Torque compiler. This change is an idea to prevent future
incidences of that problem by adding a template overload that will cause
a compilation failure if anybody tries to use Type* in this way. It
found two incorrect uses of Type*, which I've corrected.

Bug: v8:7793
Change-Id: I85fafb333a89f8a3fed4346bdd154d70846a63d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2748936
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#73574}
2021-03-22 16:50:04 +00:00
Michael Achenbach
321b1f8280 [test] Add configs for mac-arm64 debug builders
No-Try: true
Bug: chromium:1126457
Change-Id: Ie78d441dea6f86531230ac10fc1e7c7f6bfe254c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773350
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73573}
2021-03-22 16:30:15 +00:00
Frank Emrich
8e6047e51d [dict-proto] C++ implementation of SwissNameDictionary, pt. 10
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 adds the actual tests for SwissNameDictionary, defined in
test-swiss-name-dictionary-shared-tests.h, using the infrastructure
in test-swiss-name-dictionary-infra.[h|cc].

Bug: v8:11388
Change-Id: I5d91cede4f74b85a4101c5f2de3deda01a72edb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2744138
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73572}
2021-03-22 16:01:15 +00:00
Mike Stanton
907aa27db0 TSAN false positive in BasicMemoryChunk
When looking at Code objects from the compiler, we inquire whether
the object is on a read only page. In TSAN builds, it's necessary
to reload the memory because TSAN can't detect the safety of the
operation.

Fixed: v8:11590
Change-Id: Iaedd6e3f9f22241d4ef778f53a0405eaac8f76b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2778276
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73571}
2021-03-22 15:38:25 +00:00
Santiago Aboy Solanes
7ace5189a2 [compiler] Get the Map's instance type concurrently
The instance type is set before setting the map inside an Object. It
is relaxed and not non-atomic to prevent a false positive TSAN failure
(see https://chromium-review.googlesource.com/c/v8/v8/+/2682641).

Bug: v8:7790
Change-Id: Iddd28ffb06b5a882e77c4bf88bf8580df792f198
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773042
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73570}
2021-03-22 15:30:55 +00:00
Marja Hölttä
977e1c9ea6 [web snapshots] Add inner functions
Bug: v8:11525
Change-Id: I9afd7095764fdb4b15c8a3492078073624b42a11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763869
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73569}
2021-03-22 15:21:05 +00:00
Milad Fa
207577f361 Revert "Reland "s390x: [liftoff] implement CallRuntimeStub""
This reverts commit 0655aa0573.

Reason for revert: intermittent failures on s390 native:

d8 --test test/wasm-spec-tests/tests/proposals/js-types/select.js --random-seed=-2107020726 --nohard-abort --testing-d8-test-runner --stress-background-compile --stress-wasm-code-gc --experimental-wasm-type-reflection --wasm-staging

Original change's description:
> Reland "s390x: [liftoff] implement CallRuntimeStub"
>
> This is a reland of 88c1ae95b6
>
> Original change's description:
> > s390x: [liftoff] implement CallRuntimeStub
> >
> > Change-Id: I505ea67af31006f3f233eef390f234cfc0188d6c
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774479
> > Reviewed-by: Milad Fa <mfarazma@redhat.com>
> > Commit-Queue: Junliang Yan <junyan@redhat.com>
> > Cr-Commit-Position: refs/heads/master@{#73525}
>
> Change-Id: Id5d0ece78533439870fdc6b000026fe04e576448
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774561
> Reviewed-by: Milad Fa <mfarazma@redhat.com>
> Commit-Queue: Junliang Yan <junyan@redhat.com>
> Cr-Commit-Position: refs/heads/master@{#73549}

Change-Id: If81175b752738bd76ab612ef43448fa775cf3083
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2778333
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73568}
2021-03-22 14:50:25 +00:00
Clemens Backes
0de9a7e606 [wasm][debug] Leave stepping code early
Stepping code that is left on the stack will repeatedly call the
WasmDebugBreak function. This has no observable effect, except for
severe slowdown of execution. In the linked bug, we were executing at
least another few million instructions in the same frame, so it appeared
that it never finishes.

This CL fixes that by replacing stepping code with non-stepping code if
the WasmDebugBreak runtime function is called from stepping code but we
are not stepping (any more).
Adding a test for this is difficult, since this only has an effect on
performance.

R=thibaudm@chromium.org

Bug: chromium:1153308
Change-Id: I02feb04a156dfe81ca76ce26f0af131c470ef7a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775575
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73567}
2021-03-22 14:04:13 +00:00
Thibaud Michaud
5c78ac485c [wasm][interpreter] Fix stack underflow behavior
Popping values from an empty stack is allowed in unreachable code, but
the stack height cannot be negative and stays at 0 instead.

R=clemensb@chromium.org

Bug: chromium:1190291
Change-Id: I84df7ab81ba6f5a9056c8341d88a4c47121363ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2778273
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73566}
2021-03-22 14:03:10 +00:00
Clemens Backes
1abc946a3c [wasm] Rename TailCall call kinds
Especially "kNoReturnCall" is confusing, because it can be read as "a
call that does not return", which is not meant here.
This CL renames the enum to "TailCall" with the boolean values
"kTailCall" and "kNoTailCall". Uses of the enum can be simplified to
boolean checks directly.

R=thibaudm@chromium.org

Change-Id: I7d9664203031ddd27f0bdcf318c637b4c00d9be8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775705
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73565}
2021-03-22 14:02:03 +00:00
Milad Fa
2055656f52 PPC: [wasm-simd] Implement double precision conversion
Change-Id: Icd46c44519a7cf524eba8a9ee3affdfb8f589bde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775716
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73564}
2021-03-22 13:44:13 +00:00
Santiago Aboy Solanes
fff952417e [objects] Set bit_field as relaxed as TSAN can't see StoreIC transition
Related: https://chromium-review.googlesource.com/c/v8/v8/+/2682641

Bug: v8:7790, v8:11353
Change-Id: Iefbc154b8bc7659e98a0bf8090e2d0cfa78b7063
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773348
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73563}
2021-03-22 13:35:33 +00:00
Clemens Backes
77f452edf2 [wasm] Remove template arguments from FrameFinder
The frame types to skip are only used in the constructor, hence pass
them as an initializer_list instead of template arguments.

R=thibaudm@chromium.org

Bug: v8:11384
Change-Id: I3ee57076a94514e5755f6f6541ebd9222306a634
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775574
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73562}
2021-03-22 12:35:43 +00:00
Kim-Anh Tran
23c45bf351 [debug] Handle exception thrown in CompileTopLevel
This fixes a bug in which CompileTopLevel has a pending exception
that is never taken care of. This CL adds a check for the output
of CompileTopLevel and clears the pending exceptions if existent.

Also-by: bmeurer@chromium.org
Bug: chromium:1190290
Change-Id: Ieba537d5af78fc35475f9547c240c70850bea608
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773346
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73561}
2021-03-22 11:10:09 +00:00
Clemens Backes
7f38169b2e [wasm] Test --no-wasm-generic-wrapper in the stress variant
Generic wasm wrappers are enabled by default now (since
https://crrev.com/c/2562241), so we can remove the flag from the
nooptimization variant. Instead, we should have a configuration which
tests --no-wasm-generic-wrapper to find bugs in the compiled wrappers
earlier.

Also add an entry for contradictory flags, and reformat that list to
respect the 80 columns limit.

R=machenbach@chromium.org
CC=ahaas@chromium.org

Bug: v8:10982
Change-Id: I780aaedbbf7fe761c39a41af1ff2db58c7447a76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773057
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73560}
2021-03-22 09:45:59 +00:00
Ross McIlroy
2dd21c33d1 [LiveEdit] Disable bytecode flushing on liveedit.
If liveedit patches a script there might be a mismatch between
the bytecode on a stackframe and the bytecode on the JSFunction
for that same frame. This allows the patched bytecode on the
JSFunction to be flushed which breaks the invariant that all
JSFunctions with live stack activations are compiled. To prevent
this disable bytecode flushing when liveedit patches a script.

BUG=v8:11445

Change-Id: I79e7403dfb6dfc317d4313f8cab5118b12c67ed9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775577
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73559}
2021-03-22 09:20:19 +00:00
Manos Koukoutos
7f0912269d [wasm][cleanup] Remove unused field from ModuleDecoderImpl
Change-Id: Iad4e33df76ce95b7f5543496fe1d2d7239f33c30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775566
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73558}
2021-03-22 08:48:29 +00:00
Manos Koukoutos
a51056f5c4 [wasm] Rename kWasmStmt -> kWasmVoid
This is a more canonical type name, and is in line with {kVoidCode}.

Change-Id: Iaae9524b6fb6ecaafd63ce81cf30e3d01ca3e525
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775565
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73557}
2021-03-22 07:58:18 +00:00
v8-ci-autoroll-builder
83eb068316 Update V8 DEPS.
Rolling v8/build: 1cd0c0e..5fcedaa

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/873d111..999f35f

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

Change-Id: I4f283382cef4b9a7b88d7d2bdceffeabe13f8bd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2777123
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@{#73556}
2021-03-22 03:49:28 +00:00
v8-ci-autoroll-builder
44b17618f2 Update V8 DEPS.
Rolling v8/build: ffb4c76..1cd0c0e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7caeed0..873d111

Rolling v8/tools/clang: 9629038..24cecab

Rolling v8/tools/luci-go: git_revision:4eef77dde582d6065203e3249dd80477391a7dd6..git_revision:92739fd8ab1f99ef55abfba4162eedb89fddfb7b

Rolling v8/tools/luci-go: git_revision:4eef77dde582d6065203e3249dd80477391a7dd6..git_revision:92739fd8ab1f99ef55abfba4162eedb89fddfb7b

Rolling v8/tools/luci-go: git_revision:4eef77dde582d6065203e3249dd80477391a7dd6..git_revision:92739fd8ab1f99ef55abfba4162eedb89fddfb7b

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

Change-Id: I23c1bb53ef5d826af3b830afc32a9602b256daf6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2777111
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@{#73555}
2021-03-21 04:05:27 +00:00
v8-ci-autoroll-builder
c9d83e5c1f Update V8 DEPS.
Rolling v8/build: 100ae19..ffb4c76

Rolling v8/third_party/aemu-linux-x64: ASZAw9q3qc9gzTTRn-mGL72ir5Z_qIi5GvZGRBYa4sMC..bhg2KKy6t2GgDqorzVeY1StsCo2DnehaEbW3S_o1r7gC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c730dae..7caeed0

Rolling v8/third_party/depot_tools: 9757ad5..e58ece5

Rolling v8/tools/clang: 283bb29..9629038

Rolling v8/tools/luci-go: git_revision:ea8dc31395c76b2990112b29b02386628d795d2d..git_revision:4eef77dde582d6065203e3249dd80477391a7dd6

Rolling v8/tools/luci-go: git_revision:ea8dc31395c76b2990112b29b02386628d795d2d..git_revision:4eef77dde582d6065203e3249dd80477391a7dd6

Rolling v8/tools/luci-go: git_revision:ea8dc31395c76b2990112b29b02386628d795d2d..git_revision:4eef77dde582d6065203e3249dd80477391a7dd6

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

Change-Id: I7bc3399786e6a623656446ba4bbbda8cf47be6ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2776651
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@{#73554}
2021-03-20 04:06:24 +00:00
Ng Zhi An
72f449d234 [ia32][x64] Use *ps instruction on SSE
On SSE:

- use movaps (instead of movapd, movdqa)
- use movups (instead of movupd, movdqu)
- use andps (instead of andpd, pand)
- use andnps (instead of andnpd, pandn)
- use orps (instead of orpd, por)
- use xorps (instead of xorpd, pxor)

These *ps instructions are 1 byte shorter than the *pd or p*
instructions, and on systems without AVX, and most SSE-level processors
don't differentiate between integer and floating point domains.

For AVX systems, we use the instructions appropriate for the domain we
are operating in.

Related to b/175399220.

Bug: v8:11384
Change-Id: I332a2e741652f6c063ea1b84b0d9d41226d641ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773787
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73553}
2021-03-19 20:33:24 +00:00
Junliang Yan
06b0f23dd1 s390x: [liftoff] implement Popcnt32/64
Change-Id: I5bd0079eb81b962e03e475e48a7429933295f25a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774564
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73552}
2021-03-19 19:23:53 +00:00
Shu-yu Guo
f19142e613 [top-level-await] Implement the new post-order requirement for async subgraphs
This CL implements
https://github.com/tc39/proposal-top-level-await/pull/159, which reached
consensus at the March 2021 TC39.

The high-level intent is for parent modules that depend on async modules
to remember the DFS post-order such that when their async dependency
finishes, they execute in that original post-order. This aligns the
ordering between completely sync module graphs and async module graphs.

Bug: v8:11557
Change-Id: I5bd8f38f040115c255ca1ce8253b9686fdb4af03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2757901
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73551}
2021-03-19 19:22:04 +00:00
Shu-yu Guo
341ab4dc84 [interpreter] Apply Reflect.construct transform in BytecodeGenerator
Bug: v8:11573
Change-Id: Iab32d07443298bcd39c470ad92c5ce6db0a2b580
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2770603
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73550}
2021-03-19 18:56:24 +00:00
Junliang Yan
0655aa0573 Reland "s390x: [liftoff] implement CallRuntimeStub"
This is a reland of 88c1ae95b6

Original change's description:
> s390x: [liftoff] implement CallRuntimeStub
>
> Change-Id: I505ea67af31006f3f233eef390f234cfc0188d6c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774479
> Reviewed-by: Milad Fa <mfarazma@redhat.com>
> Commit-Queue: Junliang Yan <junyan@redhat.com>
> Cr-Commit-Position: refs/heads/master@{#73525}

Change-Id: Id5d0ece78533439870fdc6b000026fe04e576448
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774561
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73549}
2021-03-19 18:35:13 +00:00
Clemens Backes
deca652920 Make FixedSizeSignature<T, 0, 0> constexpr
This allows to hold a constexpr (empty) "builder" object instead of
creating it for every use.

R=ahaas@chromium.org

Bug: v8:11384
Change-Id: Ib5e13c58e81a950bb5dd0e8eefe4021bc77d8b64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773801
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73548}
2021-03-19 18:10:14 +00:00
Milad Fa
282c2c30be s390: [wasm][cleanup] Return void in some WasmGraphBuilder public functions
Port 7e6fe4ea91

Original Commit Message:

    Although the result was unused, these functions used to return a (often
    random) Node* to satisfy old restrictions of graph-builder-interface.
    Now that these restrictions are lifted, we can type them properly as
    {void}.

R=manoskouk@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Iabcc889af26ddb2325530dc78d15f5a8f4667387
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775570
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73547}
2021-03-19 16:40:04 +00:00
Leszek Swirski
5edeaf2fe8 [sparkplug] Fix no-PC Smi writes
StoreTaggedSignedField wasn't clearing the lower bits of a
field when writing a 32-bit Smi

Bug: v8:11420
Change-Id: I543a35001ca8a78490de2d09539b72f52749b198
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775571
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73546}
2021-03-19 16:10:23 +00:00
Junliang Yan
20189856cd s390x: [liftoff] fix endianness issue on MoveStackValue
Change-Id: I7dfe3005554286f2f6a83acc4019c3cf06f7f65c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774058
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73545}
2021-03-19 16:00:23 +00:00
Manos Koukoutos
7e6fe4ea91 [wasm][cleanup] Return void in some WasmGraphBuilder public functions
Although the result was unused, these functions used to return a (often
random) Node* to satisfy old restrictions of graph-builder-interface.
Now that these restrictions are lifted, we can type them properly as
{void}.

Change-Id: I914024240f3005bc8a8636ac33ed4594f5ae5988
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767218
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73544}
2021-03-19 14:09:13 +00:00
Junliang Yan
3e40d2803a s390x: [liftoff][arm] Make context register allocatable
Port 4b3371c62b

Original Message:
  This will make it easier to generate builtin calls that require the
  context to be passed in that register, because this can be represented
  as a {LiftoffRegister} then.

Change-Id: I35f14d9f5460706ef1d51f39a7eb3afdf0979f9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764682
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73543}
2021-03-19 14:01:34 +00:00
Clemens Backes
81008e1752 [wasm][memory64] Fix typing of memory.grow
If memory64 is enabled, memory.grow should consume and return an i64
instead of i32.
This CL implements this for both TurboFan and Liftoff, and adds
validation and execution tests at different layers.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I0b725dbd0d5767bda4609747c1f4aad163c35304
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773800
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73542}
2021-03-19 13:51:23 +00:00
Frank Emrich
3bf2935f6a [csa] Make CTZ, CLZ, and POPCOUNT available in CSA
This CL makes CTZ (count trailing zeros) and POPCOUNT (count set bits),
which are optional ops in the raw machine assembler, available in CSA.
A fallback exists for the case that they are not available.

This CL also adds the 64 bit version of the mandatory CLZ (count
leading zeros) op available.

Change-Id: I53cd6738b8ede8bd5842a83bb1161299824d39c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742207
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73541}
2021-03-19 13:41:04 +00:00
Clemens Backes
cc09f7ff3c Avoid UB in FixedSizeSignature
The initial implementation of {FixedSizeSignature} contains undefined
behaviour, because {InitReps} wrote to the {reps_} array before the
constructor of that array has been called.
This also resulted in bugs if {FixedSizeSignature} was used with types
that actually have a constructor (like {ValueType}). The array
constructor would call the default constructor on each contained
element, thus overwriting the values written by {InitReps}.

This CL fixes that by switching to a plain array, and only writing to
the array in the body of the constructor (after the field was properly
initialized).

It also removes the {Concat} method in favor or simply copying from two
input arrays in a private constructor.

Drive-by: Use proper constant names for the template parameters to
make cpplint happy.

R=ahaas@chromium.org

Bug: v8:11384
Change-Id: Id748c8fef3c846069f91843f74d0555ed8ca9fb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773799
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73540}
2021-03-19 13:35:23 +00:00
Georg Neis
1ffd5c2205 [compiler] Fix a bug in BranchElimination
The condition can change between VisitBranch and VisitIf, so VisitIf
can't assume that the condition is not yet in the ControlPathConditions
list. Thanks Manos!

Change-Id: Ic74253b6faf2663cfa5212765d81392cb89d73b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773312
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73539}
2021-03-19 13:12:43 +00:00
Milad Fa
08bdebf7eb Revert "s390x: [liftoff] implement CallRuntimeStub"
This reverts commit 88c1ae95b6.

Reason for revert: illegal instruction

Original change's description:
> s390x: [liftoff] implement CallRuntimeStub
>
> Change-Id: I505ea67af31006f3f233eef390f234cfc0188d6c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774479
> Reviewed-by: Milad Fa <mfarazma@redhat.com>
> Commit-Queue: Junliang Yan <junyan@redhat.com>
> Cr-Commit-Position: refs/heads/master@{#73525}

Change-Id: Ie464430bce6f768f38ebed193d10bbf0107a8484
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774164
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73538}
2021-03-19 13:04:34 +00:00
Manos Koukoutos
ec81d82d16 Reland "[turbofan] Optimize TrapIf/Unless in BranchElim. and CommonOp-Reducer"
This is a reland of a3b1233e16

Changes compared to original commit:
- Use a more canonical way to replace TrapIf/Unless nodes that always
  trap. This fixes the issue where their outputs were marked dead even
  if they were Merge/Loop nodes.
- Use Throw() over Return() to connect a dangling trap to End().
- Add regression test.

Original change's description:
> [turbofan] Optimize TrapIf/Unless in BranchElim. and CommonOp-Reducer
>
> Bug: v8:11510
> Change-Id: I1e8fcb54444e494c7d765ad556d09d954441361f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752876
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73468}

Bug: v8:11510, chromium:1189454
Change-Id: I1d691a3ea299ed668cff925910ed231aad37cac6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772601
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73537}
2021-03-19 13:02:53 +00:00
Benedikt Meurer
c0ee8f905b [wasm][inspector] Don't use Script::source_url to store URL.
The `Script::source_url` field holds the value of the magic
`//# sourceURL` comment if found, and the `Script::name` field is
supposed to hold the actual name of the resource (as provided by
the embedder ideally), in case of Chromium that's supposed to be
the URL (in case of Node.js it's often the local path).

Using `source_url` worked by chance so far, but for loading DWARF
symbol files correctly we need the initiator (which we pick from
the embedderName of the Script as reported to DevTools). More
importantly, the partial handling of `//# sourceURL` in V8 is a
layering violation and causes trouble in DevTools, i.e. when users
put relative paths here. So as part of refactoring and correctifying
the handling of `//# sourceURL`, we need to make sure that the embedder
provided name (the URL in case of Chromium) is always stored in the
`Script::name` field.

Bug: chromium:1183990, chromium:974543, chromium:1174507
Change-Id: I32e11def2b9b52be11bd2e0e64a2ab6bdcf5e52d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773584
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73536}
2021-03-19 12:19:13 +00:00
Georgia Kouveli
ce85e66a20 [cfi][arm64] Change InterpreterEnterBytecode use of LR for CFI.
This use of LR previously allowed overwriting it with arbitrary addresses
that aren't signed. Change this so we never return to an arbitrary LR.

Instead of loading the InterpreterTrampolineEntry address into LR directly,
use an ADR instruction to place into LR the address of a piece of code
that jumps to the InterpreterTrampolineEntry instead. This makes a difference
because BR is also constrained by BTI, whereas RET isn't.

An alternative would have been to `Call` instead of `Jump` to the target
bytecode and avoid the ADR instruction altogether, but I wanted to keep the
same behaviour with respect to the return stack that the existing code
exhibits.

Also add a comment to src/regexp/arm64/regexp-macro-assembler-arm64.cc for
a similar use of LR that should eventually be removed.

Bug: v8:10026
Change-Id: I24a13481f3fa416247dab8f9e5ae6f52f6b2ad42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764761
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#73535}
2021-03-19 11:35:53 +00:00
Shu-yu Guo
fd75c97d3f [interpreter] Apply Reflect.apply transform in BytecodeGenerator
Calls with a spread expression in a non-final position get transformed
to calls to Reflect.apply. This transformation is currently done in
the parser, which does not compose well with other features (e.g.
direct eval checking, optional chaining).

Do this transform in the BytecodeGenerator instead.

Bug: v8:11573, v8:11558, v8:5690
Change-Id: I56c90a2036fe5b43e0897c57766f666bf72bc3a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2765783
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73534}
2021-03-19 11:02:43 +00:00
Jakob Gruber
2dd02967a7 [compiler] Visit-order-independent inlining heuristics
When making inlining decisions in the JSInliningHeuristic, it's
possible that a Node is not a candidate on the first visit, but
becomes a candidate in later visits due to other node reductions.

These later visits should also result in the inlining decision being
made. Until now this was prevented by the visit aborting early since
the Node was added to the seen_ list on the first (unsuccessful)
visit.

This CL changes the seen_ insertion to happen only once a positive
inlining decision was made.

Change-Id: Ide7f6abd3c1d9759d7422fcd5ad9c7daff825795
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764759
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73533}
2021-03-19 10:30:30 +00:00
Santiago Aboy Solanes
4194d3bbf5 [compiler] Read the bit_field in MapData concurrently
`has_non_instance_prototype` can be modified in live objects. For the
native context's map that we serialize on the background this bit is
"set" but it doesn't change value (i.e. it is set to false when it was
already false).

Bug: v8:7790, v8:11575
Change-Id: I070c0f0e383250d0e3cb92065d1113662976cabf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772609
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73532}
2021-03-19 10:23:00 +00:00
Santiago Aboy Solanes
6556b4ac3e Initialize bit field in map using relaxed store
Restore of https://chromium-review.googlesource.com/c/v8/v8/+/2194012.
I changed it to be non-atomic and missed the fact that the concurrent
marker accesses the has_prototype_slot concurrently.

Bug: v8:7790, v8:11353
Change-Id: I292aeacb340b6340c40b633db2591c7d0cbca3bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772608
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73531}
2021-03-19 10:17:21 +00:00
Leszek Swirski
0545b16250 [compiler] Enable off-thread finalization by default
Bug: chromium:1011762
Change-Id: I960b3f57fa29f25d4cda038304825375ada686b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108039
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73530}
2021-03-19 10:07:21 +00:00
Leszek Swirski
791e085d2f [sparkplug] Add always_sparkplug variant
Add an always_sparkplug testing variant, and fix a couple of issues it
found.

Bug: v8:11420
Change-Id: I7d87a41e3413f40271a0140118531f075d633b23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773047
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73529}
2021-03-19 09:52:50 +00:00
v8-ci-autoroll-builder
baa83b38b7 Update V8 DEPS.
Rolling v8/build: ff9d9de..100ae19

Rolling v8/buildtools/third_party/libc++abi/trunk: c93be42..4e07843

Rolling v8/third_party/aemu-linux-x64: fU_J9KtzLrfiXhqpf_1eV01gy30M641raluN5uaKPNAC..ASZAw9q3qc9gzTTRn-mGL72ir5Z_qIi5GvZGRBYa4sMC

Rolling v8/third_party/depot_tools: 2737963..9757ad5

Rolling v8/tools/clang: 41f9e2d..283bb29

Rolling v8/tools/luci-go: git_revision:e81c0c9c528d0a416922e4ccd958d0de59a64816..git_revision:ea8dc31395c76b2990112b29b02386628d795d2d

Rolling v8/tools/luci-go: git_revision:e81c0c9c528d0a416922e4ccd958d0de59a64816..git_revision:ea8dc31395c76b2990112b29b02386628d795d2d

Rolling v8/tools/luci-go: git_revision:e81c0c9c528d0a416922e4ccd958d0de59a64816..git_revision:ea8dc31395c76b2990112b29b02386628d795d2d

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

Change-Id: Iefca39aa2842894aaa4ec039bad4862533cbf0e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774713
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@{#73528}
2021-03-19 04:00:20 +00:00
Ng Zhi An
2969e67e3c [wasm-simd][ia32][x64] Optimize i64x2.extend_high_i32x4_{s,u}
- Use movhlps instead of pshufd if dst == src
- use xorps with punpckhdq instead of two shuffles

Bug: v8:11470
Change-Id: I50f77b8591372cccca48b9a6078fc3132fe48a2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773902
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73527}
2021-03-19 00:29:09 +00:00