Commit Graph

61532 Commits

Author SHA1 Message Date
Zhao Jiazhong
15348f1a1c [mips][wasm-simd][liftoff] Implement replace_lane.
Port e5b4cb4567
https://crrev.com/c/2108299

Change-Id: Iac7e70aaa13cd46be4aaec1bf52388071ce17ae9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115835
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66840}
2020-03-24 08:24:16 +00:00
Andreas Haas
612e8dbaf7 [wasm][liftoff] Implement table.copy
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: Id6c004c60e3bf142c603d9e37f730348f89cd89d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111221
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66839}
2020-03-24 07:19:16 +00:00
v8-ci-autoroll-builder
e7a618d2cc Update V8 DEPS.
Rolling v8/build: bf3f9ee..26e9d48

Rolling v8/buildtools: 4164a30..7977eb1

Rolling v8/buildtools/linux64: git_revision:9499562d94bf142f43d03622492e67b217461f67..git_revision:5ed3c9cc67b090d5e311e4bd2aba072173e82db9

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bf306f5..032c783

Rolling v8/third_party/depot_tools: befc299..2b2aec6

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: I1a1926717ab4fa2f358220270ff8623695baed67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117391
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@{#66838}
2020-03-24 03:47:06 +00:00
Kong, Fanchen
e5b4cb4567 [wasm-simd] [liftoff] Implement replace_lane on x64 and ia32
Bug: v8:9909
Change-Id: Ia830b2fc00751abfb4dadb61651a252f1da48a1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108299
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66837}
2020-03-24 02:49:36 +00:00
Camillo Bruni
855b4945d3 [mjsunit] Use smaller test array
This might help reduce flaky test results caused by too high memory
consumption due to the large Float32Array in regress-crbug-1057653.js.

Bug: v8:10333
Change-Id: Id99ebb67ebe5a7a730e44cd8967ebbea905ccdc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108547
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66836}
2020-03-23 23:06:06 +00:00
Igor Sheludko
4789958d97 [tools] Make paths in v8-heap-stats relative
... to make it work from any location.

Bug: v8:10155
Change-Id: I4b949ed6fde0b38a92c1c1ab57eba0cf0f007b6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116034
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66835}
2020-03-23 23:00:06 +00:00
Michael Lippautz
9d75253764 cppgc: Hello world
"By my deeds I honor him. V8."

- Add basic build files for library and unittests.
- Integrate unittests also in existing V8 unittests for simplicity.

The CL also adds FinalizerTrait and unittests to allow building a
testing target that executes code.

FinalizerTrait is used to determine how managed C++ types are
finalized. The trait should not be overridable by users but needs to
be exposed on API-level to avoid including library-internal headers.

Bug: chromium:1056170
Change-Id: I64d91053410a17a7835e50547f58990625d2da28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108549
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66834}
2020-03-23 21:42:56 +00:00
Clemens Backes
92bd7818b7 [wasm] Fix placement of the events section
Before, it was specified between the globals and the exports section.
This changed with
https://github.com/WebAssembly/exception-handling/issues/98. The event
section is now placed between the memory and the globals section.

R=jkummerow@chromium.org
CC=aheejin@chromium.org

Bug: v8:10176
Change-Id: Icafeaae4ff7796273c73d61ed417c028fcbcb02d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116032
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66833}
2020-03-23 18:22:46 +00:00
Milad Farazmand
e89737524c s390: [wasm] Use a single register when visiting S128Zero
Change-Id: I7c4f06d53e7b58b902f929944c03dc7c65bf4abf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115935
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66832}
2020-03-23 18:10:36 +00:00
Andreas Haas
03d226bf31 [wasm][liftoff] Implement table.init
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: Ife66eef08ad3a578884b42d7171c04a3003ccee5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111219
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66831}
2020-03-23 16:58:05 +00:00
Thibaud Michaud
df15ce65e6 [liftoff][debug] Generate missing source positions
We previously could not OSR a frame paused in a breakpoint with another
frame in which the same breakpoint was removed, because the latter was
missing the source position.
This change fixes this by iterating the stack to collect frame
positions, and emitting the corresponding source positions in Liftoff.

R=clemensb@chromium.org

Bug: v8:10321,v8:10147
Change-Id: I5a7950d5ce6e3cd5a0648b861db75f4f3dafa644
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115433
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66830}
2020-03-23 16:47:55 +00:00
Thibaud Michaud
80b6867c9e [wasm] Fix WasmCodeRefScope use after free
Close WasmCodeRefScope before we potentially free the native module in
UpdateNativeModuleCache.

R=clemensb@chromium.org

Bug: chromium:1062868
Change-Id: I7cd11fd2283a2cc399d05e32c609ff1af07e2706
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113380
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66829}
2020-03-23 16:00:19 +00:00
Ye Kuang
ad6ecbc449 Use luci-go isolate client in mb.py
This is identical to these CLs we did to Chromium's mb.py

* https://crrev.com/c/2105272
* https://crrev.com/c/2094482

Bug: chromium:1059167
Change-Id: Ibad4ed0d0655b8bf56a0e7fd672983eac5ac5d38
Reviewers: dpranke@chromium.org, tikuta@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100697
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66828}
2020-03-23 14:41:45 +00:00
Clemens Backes
404ce209ab [wasm] Make rethrow trap on nullptr
The behaviour was clarified in the spec:
https://github.com/WebAssembly/exception-handling/pull/97

br_on_exn (which was done in another CL) and also rethrow should trap on
nullptr. This CL implements this by an explicit check in the builtin
called for rethrow.

R=jkummerow@chromium.org
CC=aheejin@chromium.org

Bug: v8:10128
Change-Id: Icb0f4e54991b3385917bf183efa825048db4cb82
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115430
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66827}
2020-03-23 14:21:05 +00:00
Clemens Backes
bcc055c158 [wasm] Make br_on_exn trap on nullptr
The behaviour was clarified in the spec:
https://github.com/WebAssembly/exception-handling/pull/97

br_on_exn (and also rethrow, which will be added in another CL) should
trap on nullptr. This CL implements this by an explicit check on each
br_on_exn (within {GetExceptionTag}). This check will be redundant if
several br_on_exn follow each other. Since also the runtime call for
{GetExceptionTag} is redundant, and also the fact that we do a runtime
call is suboptimal, I consider the whole implementation prototypical for
now anyway.

R=jkummerow@chromium.org
CC=aheejin@chromium.org

Bug: v8:10128
Change-Id: I234c3183f93fe0884aadd2ab6dbd6c2b7a07c660
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113381
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66826}
2020-03-23 14:13:35 +00:00
Igor Sheludko
40c9fa052b [tools] Fix v8-heap-stats
Don't use deprecated HTML Imports, directly fetch the template files from
html instead.

Bug: v8:10155
Change-Id: Ic85a8b2cf227231fc6abf5adca6f1f144bf728f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113371
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66825}
2020-03-23 13:53:05 +00:00
Clemens Backes
31846fae92 [wasm] Make traps non-catchable
The spec was changed such that traps are not catchable in wasm:
https://github.com/WebAssembly/exception-handling/pull/93

This CL implements this in V8 by adding a private symbol as a property
to all uncatchable exceptions. It also adds a number of tests.

R=jkummerow@chromium.org
CC=aheejin@chromium.org

Bug: v8:10194
Change-Id: I498531762e8876f809d3b8aeb72ccc053e0e3cd4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113375
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66824}
2020-03-23 13:45:45 +00:00
Leszek Swirski
033118eea6 [offthread] Avoid invalid live byte update for off-thread page
During off-thread space merge, we free the linear allocation area in the
off-thread space. Since the off-thread space isn't marked, we have to
make sure that we don't try to compensate for black allocated live bytes.

Bug: chromium:1011762
Change-Id: Id2eb2212dc25e78952f817482abcdb4b49f3a373
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111224
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66823}
2020-03-23 13:05:25 +00:00
Georg Neis
33318c9154 [turbofan] Make FieldAccess DCHECK that offset is non-negative
Change-Id: I5a424f6349d2f71de1dccdcedb0d98d50c68fc98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113379
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66822}
2020-03-23 10:38:15 +00:00
Thibaud Michaud
aafc733fc8 [liftoff] Lazily remove unused breakpoints
Remove unused breakpoints as we hit them. OSR in this case does not work
properly yet, because we are missing the source position for the removed
breakpoint in the new code.

R=clemensb@chromium.org

Bug: v8:10321
Change-Id: I908546c1b37ca044166b24b4900126ab79f117ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111216
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66821}
2020-03-23 09:35:17 +00:00
Eric Rannaud
668aafb56c [cpu-profile] Timestamps in tracing events args stay in monotonic time
On Linux, Perfetto translates the builtin "ts" timestamp in trace event
from CLOCK_MONOTONIC to CLOCK_BOOTTIME, before passing them to devtools.
Devtools therefore implicitly operates on timestamps that are in
CLOCK_BOOTTIME.

However, additional timestamps sent in trace event payload arguments
will not be converted to CLOCK_BOOTTIME by Perfetto, raising the
possibility of devtools using timestamps from multiple clock domains
incorrectly.

Since trace events sent by CpuProfile also include the builtin "ts"
trace timestamp (sampled from CLOCK_MONOTONIC nearly at the same time by
the tracing framework), sending "data.startTime" and "data.endTime" is
essentially redundant. devtools-frontend:2113957 stops the use of the
value of these timestamps in the payload of Profile and ProfileChunk
events. Devtools continue to use the presence of these arguments to
indentify start and end profile events.

ProfileChunk events also include "timeDeltas" which are relative
timestamps. They are also in CLOCK_MONOTONIC and are not translated by
Perfetto. devtools-frontend:2113957 computes absolute CLOCK_BOOTTIME
timestamps from timeDeltas by adding them to "ts" in the "Profile" event
(previously, "data.startTime" was used). This is only valid if the
system is not suspended/resumed during profiling. Providing support for
suspend/resume in the middle of profiling will likely involve having
Perfetto convert "timeDeltas" directly to CLOCK_BOOTTIME.

This CL introduces no code changes and only adds comments to explain
the above.

BUG=chromium:1055871

Change-Id: I649dfcce8ea1a100c0ecfe03f843c7cb1fdd6f33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2114001
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66820}
2020-03-23 09:18:35 +00:00
Andreas Haas
2d8ca349f8 [wasm][liftoff] Implement elem.drop
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: I2c49093585fbd6e9ba1fe777492188d64625dc92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111222
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66819}
2020-03-23 07:39:05 +00:00
v8-ci-autoroll-builder
ebf2c49ae2 Update V8 DEPS.
Rolling v8/build: b53200e..bf3f9ee

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/39af23e..bf306f5

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: I2f928720575546690e7df15830ce53d27bba211d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2114656
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@{#66818}
2020-03-23 03:48:55 +00:00
v8-ci-autoroll-builder
8b53872c27 Update V8 DEPS.
Rolling v8/build: 192f1d2..b53200e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cc4989c..39af23e

Rolling v8/third_party/depot_tools: 5416b3a..befc299

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: I611df71694bae2f0450ca2de2cbcc8a4916b45b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2114102
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@{#66817}
2020-03-22 03:49:44 +00:00
v8-ci-autoroll-builder
1b8cf29649 Update V8 DEPS.
Rolling v8/build: 9e8017c..192f1d2

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/df670f0..cc4989c

Rolling v8/third_party/depot_tools: 464e9ff..5416b3a

Rolling v8/tools/clang: 689fb3d..105a846

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: Id8ed92bec0bdf65f55b78e92a65e281b73d0f677
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113103
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@{#66816}
2020-03-21 03:49:22 +00:00
Johannes Henkel
105103f68a [DevTools] Roll inspector_protocol (V8)
New Rev: b7cda08cd6e522df2159413ba5f29d2a953cc1c4

Upstream Review:
"Drop redundant std::move in inspector_protocol."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2112636

Change-Id: If7832adf00f1c574960e5ca3c179e7b03255fc86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113132
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66815}
2020-03-21 01:38:12 +00:00
Milad Farazmand
e70331f9d0 PPC/s390: [interpreter] Make IterationBody StackChecks implicit within JumpLoop
Port a447a44f31

Original Commit Message:

    Since now the IterationBody StackChecks are implicit within JumpLoops,
    we are able to eagerly deopt in them. If we do that, whenever we advance
    to the next bytecode we don't have to advance to the next literal
    bytecode, but instead "advance" in the sense of doing the JumpLoop.

    Adding tests that test this advancing for wide and extra wide JumpLoops.

    Also, marking JumpLoop as needing source positions since now it has
    the ability of causing an interrupt.

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

Change-Id: I5bec2212d040801d67426a8639d20fe96035d813
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111832
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66814}
2020-03-20 22:16:02 +00:00
Johannes Henkel
fa3aada528 [DevTools] Roll inspector_protocol (V8)
Upstream PR:
"Introduce a crdtp/dispatch.{h,cc} library."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1974680
"For the shallow parse of a DevTools message, allow "params": null."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2109466

New Revision: c69cdc36200992d21a17bf4e5c2f3a95b8860ddf

Change-Id: Icc447ff9ce408b24f5245c643dd2f1843da9255f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2076215
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66813}
2020-03-20 19:21:22 +00:00
Ng Zhi An
1e40c682e9 [wasm-simd] New macro to build using vector of bytes
Introduces a new macro BUILD_V (v is for vector) that pushes bytes into
a vector (instead of directly in an array initializer, see BUILD). This
has the positive effect of being able to handle opcodes of multiple
bytes (e.g. SIMD opcodes bigger that 0xfd80). Because of this "API"
change, our helper macros in test-run-wasm-simd.cc and wasm-run-utils.h
need to change too. So, we introduce new macros (suffixed by _V), that
will call the appropriate lambdas defined in BUILD_V, that knows how to
push bytes into the vector, and also can handle multi-byte opcodes.

This design has a bit of duplication and ugliness, but was chosen to
reduce the impact of existing tests. No restructuring of test code is
required, we only need to add suffix _V.

Note that we do not have multi-byte opcodes yet (in wasm-opcodes.h),
this change will be breaking, and requires all the tests to be updated
to use _V macros first.

Bug: v8:10258
Change-Id: I86638a548fe2f9714c1cfb3bd691fb7b49bfd652
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2107650
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66812}
2020-03-20 18:05:22 +00:00
Santiago Aboy Solanes
6c1e09aebe [interpreter] Delete StackCheck bytecode
Now that it is implicit in function entry and loop iteration, there is
no need for an explicit bytecode.

Also updated tests that used explicit bytecodes.

Bug: v8:10149, v8:9960
Change-Id: I3ca582f276829bd54feb35e6d4ea656a32efbd54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2093507
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66811}
2020-03-20 15:16:01 +00:00
Andreas Haas
4212c303b6 [wasm][liftoff] Introduce PrepareBuiltinCall
This CL provides a generic way to prepare a builtin call: The
{PrepareBuiltinCall} takes the builtin signature for 64-bit systems,
the CallDescriptor, and a Vector of VarStates for the parameters, and
moves all parameters to their correct place, which is either in a
register or on the stack.

To test the new code this CL adjusts the implementation of AtomicWait
to use PrepareBuiltinCall. Thereby AtomicWait is now also supported
on 32-bit platforms, including ia32.

R=clemensb@chromium.org

Bug: v8:10108, v8:10281
Change-Id: Ia8589166310ea2e8442531b4ed20db62d7b4aff0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108554
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66810}
2020-03-20 14:00:41 +00:00
Santiago Aboy Solanes
a447a44f31 [interpreter] Make IterationBody StackChecks implicit within JumpLoop
Since now the IterationBody StackChecks are implicit within JumpLoops,
we are able to eagerly deopt in them. If we do that, whenever we advance
to the next bytecode we don't have to advance to the next literal
bytecode, but instead "advance" in the sense of doing the JumpLoop.

Adding tests that test this advancing for wide and extra wide JumpLoops.

Also, marking JumpLoop as needing source positions since now it has
the ability of causing an interrupt.

Bug: v8:10149, v8:9960
Fixes: v8:10149
Change-Id: Ib0d9efdfb379e0dfbba7a7f67cba9262668813b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064226
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66809}
2020-03-20 13:22:41 +00:00
Victor Gomes
2a1a7bf2c5 [runtime] Reverse JS arguments: fix tests and builtin arguments
Bug: v8:10201
Change-Id: I72cbe15912395b9b06ffdccce935abae6e7a050e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2093508
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66808}
2020-03-20 13:07:11 +00:00
Leszek Swirski
905d38f579 [offthread] Ensure off-thread allocations are pretenured
Squash a couple of remaining places where compilation finalization was
allocating new-space objects.

Bug: chromium:1011762
Change-Id: Ie0462eed422016f860146724a06dd2f1963bd88e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110019
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66807}
2020-03-20 11:32:51 +00:00
Yolanda Chen
3fb7590610 [regalloc] Find optimal spilling position when spill range to end
When spill a range without register uses inside a loop, it is beneficial to spill the range ealier at the loop header to reduce memory moves from the back edges.

The changes to FindOptimalSpillingPos are motivated as follows:
 - Change “next_use->pos() < pos” to “next_use->pos() <= pos”.
  The former version causes a crash of mksnapshot in debug build,
  because it is possible that a UsePosition at a split point gets split
  to the previous range according to “DetachAt”. For example, we
  have a live range with:
    UseIntervals: [1, 20[
    UsePosition: 10
  When split the live range at position 10, we will get:
    Range 0:0: UseInterval: [1, 10[
               UsePosition: 10
    Range 0:1: UseInterval: [10, 20[

 - Change “NextUsePositionRegisterIsBenefitial” to
   “NextRegisterPosition”, because there’s always a
   “Define” use position at the loop header for those phis
   that do not require a register. Using the original check
   will hence not apply the optimization.


Change-Id: I3b0bb3687ba572f1d3fc1892cefae7e866d99baa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2094964
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
Cr-Commit-Position: refs/heads/master@{#66806}
2020-03-20 10:40:26 +00:00
Leszek Swirski
f6b185ca2a [offthread] Ensure off-thread page marking bits are right
Ensure that the off-thread pages' marking bits (including the page
headers) are correct, and synchronised correctly on merge.

Bug: chromium:1011762
Change-Id: I46c66fb35d49d39eb0da3513c869baf49c366706
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110020
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66805}
2020-03-20 10:39:21 +00:00
Zhao Jiazhong
d745a1e3ac [mips][wasm] Fix FpRegister size in WasmDebugBreakFrameConstants.
The FpRegister size was miswritten as kSimd128Size like x64, while it
should be kDoubleSize on mips.

Change-Id: Iac4c5687e398a87ec0508fb99042a487c41ddf8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110891
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66804}
2020-03-20 10:36:33 +00:00
Georg Neis
6fffffceca [mjsunit] Reenable test es6/array-iterator-turbo
I'm unable to produce an issue with this test locally, so let's
try to enable it again.

Big: v8:6587
Change-Id: Ida834ac4ccf8c25d8f5c1e09fc57479db46a1873
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108722
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66803}
2020-03-20 10:13:21 +00:00
Maya Lekova
ce1ee49223 [regexp] Add missing const qualifier
This is patching 560f2d8bb3 for a
failing android-binary-size bot, see
https://chromium-review.googlesource.com/c/chromium/src/+/2110413

TBR=rmcilroy@chromium.org

Bug: chromium:747064
Change-Id: I37c5484afa427420d7a4614300556f7a5e99b21d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111211
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66802}
2020-03-20 08:50:00 +00:00
Georg Neis
c25cc4e273 [turbofan] Remove bogus DCHECK and add a comment
Bug: chromium:1062916
Change-Id: Ic29ca849fb17c1409cc11018fdbc9d3363ebd55c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110027
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66801}
2020-03-20 08:11:00 +00:00
v8-ci-autoroll-builder
7905090da2 Update V8 DEPS.
Rolling v8/build: 9b1394c..9e8017c

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8413a03..df670f0

Rolling v8/tools/clang: 6e39ba4..689fb3d

TBR=machenbach@chromium.org,tmrts@chromium.org

Change-Id: If6421082ec9f3e737d9892778cffec143136cbcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111138
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@{#66800}
2020-03-20 04:02:10 +00:00
Ng Zhi An
1485de1777 [wasm-simd][arm64] Use unique register for shifts
The src register needs to be different from the temporary Simd128
register since in the codegen we modify tmp before using tmp and src.

Bug: chromium:1063006
Change-Id: I8b4b2d23d8f090ea37041e82cac97470bcf0d833
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111110
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66799}
2020-03-19 22:57:50 +00:00
Iain Ireland
560f2d8bb3 Reland "[regexp] Rewrite error handling"
This is a reland of e80ca24c80

Original change's description:
> [regexp] Rewrite error handling
>
> This patch modifies irregexp's error handling. Instead of representing
> errors as C strings, they are represented as an enumeration value
> (RegExpError), and only converted to strings when throwing the error
> object in regexp.cc. This makes it significantly easier to integrate
> into SpiderMonkey. A few notes:
>
> 1. Depending on whether the stack overflows during parsing or
>    analysis, the stack overflow message can vary ("Stack overflow" or
>    "Maximum call stack size exceeded"). I kept that behaviour in this
>    patch, under the assumption that stack overflow messages are
>    (sadly) the sorts of things that real world code ends up depending
>    on.
>
> 2. Depending on the point in code where the error was identified,
>    invalid unicode escapes could be reported as "Invalid Unicode
>    escape", "Invalid unicode escape", or "Invalid Unicode escape
>    sequence". I fervently hope that nobody depends on the specific
>    wording of a syntax error, so I standardized on the first one. (It
>    was both the most common, and the most consistent with other
>    "Invalid X escape" messages.)
>
> 3. In addition to changing the representation, this patch also adds an
>    error_pos field to RegExpParser and RegExpCompileData, which stores
>    the position at which an error occurred. This is used by
>    SpiderMonkey to provide more helpful messages about where a syntax
>    error occurred in large regular expressions.
>
> 4. This model is closer to V8's existing MessageTemplate
>    infrastructure. I considered trying to integrate it more closely
>    with MessageTemplate, but since one of our stated goals for this
>    project was to make it easier to use irregexp outside of V8, I
>    decided to hold off.
>
> R=jgruber@chromium.org
>
> Bug: v8:10303
> Change-Id: I62605fd2def2fc539f38a7e0eefa04d36e14bbde
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091863
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66784}

R=jgruber@chromium.org

Bug: v8:10303
Change-Id: Iad1f11a0e0b9e525d7499aacb56c27eff9e7c7b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2109952
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66798}
2020-03-19 16:59:43 +00:00
Andreas Haas
1e1d4d8291 [wasm] Introduce a TableCopy builtin
This CL introduces a CSA builtin for the TableCopy instruction. This
builtin allows to generate smaller code for both TurboFan and Liftoff,
and easier code generation from Liftoff.

The smaller code size comes from:
* Parameters are passed through registers, not the stack.
* Lower number of parameters: the call target, number of parameters, and
context are not passed as parameters.
* No int to smi conversion in generated code.

R=clemensb@chromium.org

Bug: v8:10281
Change-Id: I4734b94c8a2aff08a5938504e3e36d0d2424f8ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110010
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66797}
2020-03-19 16:47:33 +00:00
Peter Marshall
d1253ae95b [unwinder] Advance deprecation of the old unwinder API
Chrome uses the new version now.

Bug: v8:8116
Change-Id: I59af8d2c6a897a852acd6de3a7938a4b8d3943e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110015
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66796}
2020-03-19 16:18:53 +00:00
Ng Zhi An
4ac48b600e [wasm-simd][liftoff][arm][arm64] Implement sub for Liftoff
Bug: v8:9909
Change-Id: Ica1cb36e7e071e5755009d57a0f03080b74bbf8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108743
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66795}
2020-03-19 16:06:43 +00:00
David Manouchehri
765053dc1a [Intl] Correct RelativeTimeFormat behaviour on ICU error.
Bug: chromium:1062763
Change-Id: I70d44f2db06b5ec1d84ab6678582dfc559d47e7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108729
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: David Manouchehri <david@davidmanouchehri.com>
Cr-Commit-Position: refs/heads/master@{#66794}
2020-03-19 15:58:53 +00:00
Ng Zhi An
3406cba8fe [wasm-simd][arm64] Bitmask instructions
Implement i8x16.bitmask, i16x8.bitmask, i32x4.bitmask on interpreter and
arm64.

These operations are behind wasm_simd_post_mvp flag, as we are only
prototyping to evaluate performance. The codegen is based on guidance at
https://github.com/WebAssembly/simd/pull/201.

Bug: v8:10308
Change-Id: I835aa8a23e677a00ee7897c1c31a028850e238a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2099451
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66793}
2020-03-19 15:52:23 +00:00
Andreas Haas
ca5ee9d636 [wasm] Introduce a WasmTableInit CSA builtin
This CL introduces a CSA builtin for the TableInit instruction. This
builtin allows to generate smaller code for both TurboFan and Liftoff,
and easier code generation from Liftoff.

The smaller code size comes from:
* Parameters are passed through registers, not the stack.
* Lower number of parameters: the call target, number of parameters, and
context are not passed as parameters.
* No int to smi conversion in generated code.

The CL also introduces a small CSA function which takes an uint32 value
and a max value as parameters and returns a Smi of the minimum of these
two.

R=clemensb@chromium.org, ishell@chromium.org

Bug: v8:10281
Change-Id: I40f248c20ec76e6ae9483a5e2907a68f42f2cb04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2106201
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66792}
2020-03-19 14:52:28 +00:00
Clemens Backes
599a6e0ae8 [liftoff] Add some more code comments
Add some more code comments for code snippets that are not obvious,
especially if debug code is enabled.
The comments help when looking at Liftoff code for debugging code
generation issues.

R=thibaudm@chromium.org

Change-Id: I566bf2b05a454fb8addc030359969d36cb2cb707
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108557
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66791}
2020-03-19 14:45:25 +00:00