Commit Graph

50348 Commits

Author SHA1 Message Date
Georg Neis
9ed348e65f [turbofan] Serialize descriptor arrays.
- Provide MapData::SerializeDescriptors method for serializing the whole
  descriptor array.
- Trigger this in JSObjectData::SerializeAsBoilerplate.
- Further make things more consistent across the broker.

Bug: v8:7790
Change-Id: Ie6499da8857f7c6561f7c44922aeffcea4876be7
Reviewed-on: https://chromium-review.googlesource.com/1199102
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55756}
2018-09-10 14:23:03 +00:00
Georg Neis
5365cc1e40 [turbofan] More broker cleanups.
- Provide getters for all member variables.
- Add missing flags for cycle detection.
- Be more consistent in stylistic matters.

Bug: v8:7790
Change-Id: I87c3901b203acc4254ec48f5cc895b2e68ff32aa
Reviewed-on: https://chromium-review.googlesource.com/1196431
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55755}
2018-09-10 14:03:22 +00:00
Sreten Kovacevic
1c8ea8f63b [mips] Enable mjsunit/regress/wasm/regress-864509 on big-endian
Issues that caused failure of this test have been resolved with commit
https://chromium-review.googlesource.com/c/v8/v8/+/1213183, so it can
be re-enabled.

Change-Id: I441998e5e63fce7a7e718b593c8e58a71841b78e
Reviewed-on: https://chromium-review.googlesource.com/1215168
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55754}
2018-09-10 13:56:27 +00:00
Florian Sattler
fed741ec65 [debug] Refactored function param to be const ref
Bug: v8:8015
Change-Id: I3a3bd587e1f126b533a1eaea1ff9f74c2d0102b0
Reviewed-on: https://chromium-review.googlesource.com/1209847
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55753}
2018-09-10 13:20:44 +00:00
Michael Starzinger
4e71b6ba36 [wasm] Introduce WASM_EXCEPTION_OBJECT instance type.
This new instance type will be used for wrapper objects representing
exported exceptions. Currently the objects are empty and only serve as
an identity for exported exceptions. Eventually they will also need to
reference the signature underlying the exception to perform a signature
check upon import.

R=clemensh@chromium.org
TEST=mjsunit/wasm/exceptions-import
BUG=v8:8091

Change-Id: Ifdd561fc000090f4a985aeb45549fd7110849646
Reviewed-on: https://chromium-review.googlesource.com/1215166
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55752}
2018-09-10 11:26:25 +00:00
Sreten Kovacevic
c98b50fb43 [mips][Liftoff]: Enable BE tests on Liftoff
* Enable Liftoff wasm cctests on BE for mips and mips64
* Fix issues that were introduced with these tests and that are
linked with Load/Store instructions
* Change endianness on GetGlobal and SetGlobal, as done in TF
* Skip I32Binop tests that fail with OOM error and seem to not be
related directly to this task

Bug: v8:6600
Change-Id: Ib62ca5e3c681326d28e70a5157d8646e0c8d0b51
Reviewed-on: https://chromium-review.googlesource.com/1213183
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55751}
2018-09-10 11:21:31 +00:00
Tobias Tebbi
e569438b0a [torque] disallow using logical operators in value contexts
This CL makes sure, that logical operators (||, &&) always have return
type never. Together with a check that never is never passed as a
function argument, this prevents faulty evaluation as in !(x || y).

Before, the logical operators had a behavior similar to
(bool labels Taken, NotTaken), with a fast exit if the left-hand side
allowed shor-circuit evaluation, but returning the right-hand side
otherwise. Since we want to allow existing (a || b || c) patterns in
the codebase, this requires weakening the restriction that the left-
and right-hand side need to have the same type. Now the possibilites
are:
bool, never
never, bool
never, never
bool, bool
constexpr bool, constexpr bool

Bug: v8:8137
Change-Id: I9576b337dc4008ac58b4625e77fef4e73bcdd6e3
Reviewed-on: https://chromium-review.googlesource.com/1215162
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55750}
2018-09-10 11:14:15 +00:00
Clemens Hammacher
6549dffab6 [wasm] Remove limit on cmpxchg loop
If there are many workers and we are very unlucky, the cmpxchg loop can
in fact fail for more than 5 times. This CL removes this unneeded
limitation to avoid spurious failures.

R=mstarzinger@chromium.org

Bug: chromium:824443
Change-Id: I0a6adde1330c8a8389a42b36bf44e516fae8c574
Reviewed-on: https://chromium-review.googlesource.com/1213170
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55749}
2018-09-10 10:28:27 +00:00
Clemens Hammacher
b19637eb22 [wasm][cleanup] Remove dead method
R=mstarzinger@chromium.org

Bug: v8:8015, chromium:824443
Change-Id: I017e8bf9033fba1afdddcc5e3057860519dfc119
Reviewed-on: https://chromium-review.googlesource.com/1213210
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55748}
2018-09-10 10:21:27 +00:00
v8-ci-autoroll-builder
8610e08236 Update V8 DEPS.
Rolling v8/third_party/depot_tools: 66badbd..25c380c

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Iaf3e13ec8f9174321c61016c622a046a71ef6335
Reviewed-on: https://chromium-review.googlesource.com/1214867
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55747}
2018-09-10 10:16:37 +00:00
Simon Zünd
e365bc2dcb [array] Consistently throw TypeError for zero-length arrays
This CL fixes a bug that allowed calls to Array.p.shift on
zero-length arrays where the 'length' is read-only without throwing
a TypeError.

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

Bug: chromium:882233
Change-Id: Ib129ab4c4f4f233e7bb553effa77539badfbe26e
Reviewed-on: https://chromium-review.googlesource.com/1215164
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#55746}
2018-09-10 09:50:52 +00:00
Georg Neis
ece86adc6b [typedarray] Properly convert hole to undefined in TypedArray.from
It used to call the old IterableToList, which had the wrong
semantics for holes.

Bug: v8:8133
Change-Id: Idd5acd55a155bc43df7552135a44151bb2db38e9
Reviewed-on: https://chromium-review.googlesource.com/1213204
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55745}
2018-09-10 09:31:55 +00:00
Igor Sheludko
16816e53be [ptr-compr] Introduce BoundedPageAllocator and use it instead of CodeRange.
Bug: v8:8096
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: If44c1a9a76c517fe329485d385f445b2be9f5ec2
Reviewed-on: https://chromium-review.googlesource.com/1213186
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55744}
2018-09-10 09:30:50 +00:00
Florian Sattler
2e661ba10a [cleanup] Refactored BigInt BitwiseOp function.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I7ae9463768969d2821b19fa0d8c8a498d51f6b40
Reviewed-on: https://chromium-review.googlesource.com/1209943
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55743}
2018-09-10 09:24:49 +00:00
Stephan Herhut
e174f4abea [wasm] Remove GetName getters in favor of GetNameOrNull
This will replace "<?>" in certain debug output with the empty string.
There should be no end-user visible changes, though.

Change-Id: I80db2f2169532c600662977025185378004f7cd5
Reviewed-on: https://chromium-review.googlesource.com/1213188
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55742}
2018-09-10 08:58:24 +00:00
Benedikt Meurer
7e5a287853 [turbofan] Add missing test coverage for JSStrictEqual with symbols.
Bug: v8:6344, v8:8015
Change-Id: I6d96f039b47980f9df8d06c4097b70012fce3c82
Reviewed-on: https://chromium-review.googlesource.com/1215163
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55741}
2018-09-10 07:44:24 +00:00
v8-ci-autoroll-builder
ffd5dccda5 Update V8 DEPS.
Rolling v8/third_party/depot_tools: f022f91..66badbd

Rolling v8/third_party/icu: a191af9..7ca3ffa

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I06c1f34978d0cbb0a3deb1ae5b5d3b732c289186
Reviewed-on: https://chromium-review.googlesource.com/1215009
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55740}
2018-09-10 07:33:39 +00:00
v8-ci-autoroll-builder
44bd8fd72d Update V8 DEPS.
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/ead23c2..c869f29

Rolling v8/third_party/depot_tools: 4d2b901..f022f91

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Ib6ed7ffe55424e26cf9189c71edf26a96b010e62
Reviewed-on: https://chromium-review.googlesource.com/1214588
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55739}
2018-09-09 06:44:57 +00:00
v8-ci-autoroll-builder
140c786bc0 Update V8 DEPS.
Rolling v8/build: 6533d05..0e1589b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bcc3e49..ead23c2

Rolling v8/third_party/depot_tools: dd2c588..4d2b901

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I09c274664aa830bc8ad5892230fdc78f3753d25d
Reviewed-on: https://chromium-review.googlesource.com/1214584
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55738}
2018-09-08 08:41:21 +00:00
Frank Tang
67d0f65fbe [Intl] Clean up - remove unnecessary include
Bug: v8:5751



Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2642a8a693f9803949bc279892dffdcac0b6144c
Reviewed-on: https://chromium-review.googlesource.com/1212465
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55737}
2018-09-07 20:01:34 +00:00
Sathya Gunasekaran
c830799d68 [class] Give a name to initializer functions
Makes for a nicer stack trace

Bug: v8:5367
Change-Id: I6d77907e08c2c4efc7a1b25016c7e83841c7c574
Reviewed-on: https://chromium-review.googlesource.com/1211444
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55736}
2018-09-07 19:26:34 +00:00
Michael Achenbach
1742e57501 [test] Skip some tests on gc fuzzer
NOTRY=true
TBR=yangguo@chromium.org

Change-Id: Ic5e8ea11035ad77d4a47e600283f83941ca5af43
Reviewed-on: https://chromium-review.googlesource.com/1213213
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55735}
2018-09-07 18:35:52 +00:00
Michael Achenbach
3b4bfdb909 [test] Mark tests slow with isolates testing
The isolates step times out due to some very slow tests. Marking as slow
changes the test order and increases throughput.

NOTRY=true
TBR=yangguo@chromium.org

Change-Id: Iaaf6fe93e7f0e17266923d1ab6f0fe7b09abea9e
Reviewed-on: https://chromium-review.googlesource.com/1213212
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55734}
2018-09-07 18:12:25 +00:00
Mike Stanton
e1163c14f7 [Builtins] Array.prototype.forEach perf regression on dictionaries
An unnecessary call to ToString() on the array index caused trips to
the runtime. The fix also includes performance micro-benchmarks so
we'll have a harder time regressing this case in future.

TBR=tebbi@chromium.org

Bug: v8:8112
Change-Id: I781e8b1bbe2eb56db961cf33b0dca8523868b83d
Reviewed-on: https://chromium-review.googlesource.com/1213207
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55733}
2018-09-07 15:49:20 +00:00
Mathias Bynens
b4b2dafc03 Reland "Ship globalThis 🎉"
This is a reland of 4dac9872ae

Original change's description:
> Ship globalThis 🎉
>
> Proposal repository:
> https://github.com/tc39/proposal-global
>
> Intent to ship:
> https://groups.google.com/d/msg/v8-users/Vkoh0wXRwaM/Yt7MpzhkAgAJ
>
> Bug: v8:5537
> Change-Id: I60a6c5375165d89548db12fef454a64137d04c27
> Reviewed-on: https://chromium-review.googlesource.com/1195494
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55543}

TBR=adamk@chromium.org,machenbach@chromium.org,gsathya@chromium.org,mathias@chromium.org

No-Presubmit: true
Bug: v8:5537
Change-Id: I1e20d606bb027d7afca713ffde87e183b6f610bd
Reviewed-on: https://chromium-review.googlesource.com/1208633
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55732}
2018-09-07 15:18:00 +00:00
Benedikt Meurer
c2a3d24b24 [turbofan] Only symbols can be strictly equal to symbols.
For strict equality `a === b` with Symbol feedback we need to check only
one side via CheckSymbol, since the resulting comparison can only be
true if both sides are symbols. For consistency with the receivers case
we check the left side, so CheckSymbol(a). This significantly reduces
the number of CheckSymbol operations in optimized code for the ARES-6
Air benchmark.

Bug: v8:6344
Change-Id: I50420f8d862fec31214b7e86b17919edcfc1f23e
Reviewed-on: https://chromium-review.googlesource.com/1213173
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55731}
2018-09-07 14:59:47 +00:00
Michael Achenbach
c3dce78c1f [test] Skip more debugger tests on predicable mode
Seems like most lifeedit tests are not predicable.

NOTRY=true
TBR=yangguo@chromium.org

Bug: v8:8147
Change-Id: Ia0a3871112f5a6f4b5821ee401bfdfd26dd8f9e5
Reviewed-on: https://chromium-review.googlesource.com/1213211
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55730}
2018-09-07 14:54:47 +00:00
v8-ci-autoroll-builder
dad00eb9da Update test262.
Rolling v8/test/test262/data: 86b5efe..f10582e

TBR=adamk@chromium.org,gsathya@chromium.org

Change-Id: I487211c0d77c74f88fa3b5fda23363cb255cfaa8
Reviewed-on: https://chromium-review.googlesource.com/1213344
Commit-Queue: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: V8 Autoroller <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#55729}
2018-09-07 14:52:07 +00:00
Michael Achenbach
89428ef3d2 [test] Use only default variants for Android tests
Though it works with other variants apparently, we don't want to waste to
many resources for now.

NOTRY=true
TBR=sergiyb@chromium.org

Bug: chromium:866862
Change-Id: I8da2808fec183efa1bf325664ecf33f18a5b02fc
Reviewed-on: https://chromium-review.googlesource.com/1213187
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55728}
2018-09-07 14:38:56 +00:00
Michael Achenbach
a5dc30a6c1 [test] Skip debugger tests failing predictable testing
NOTRY=true
TBR=yangguo@chromium.org

Bug: v8:8147
Change-Id: I596d9a798440c50bc43b5250bd4f09a3392934a9
Reviewed-on: https://chromium-review.googlesource.com/1213022
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55727}
2018-09-07 13:11:08 +00:00
Igor Sheludko
32438e0bba [cleanup] Disallow copy constructor and assign operator on VirtualMemory
... and add move constructor and move assignment operator.
Also define some VirtualMemory parameters as r-values to explicitly express
that the ownership is passed from the caller to callee.

Bug: v8:8015
Change-Id: Iee27ddc844556dc7465177656b339cd1f83a3b56
Reviewed-on: https://chromium-review.googlesource.com/1213062
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55726}
2018-09-07 13:07:13 +00:00
Benedikt Meurer
e56b6d241f [turbofan] Introduce a pure StringConcat operator.
This replaces the previous CheckStringAdd operator which deopts in case
the combined length overflows with a dedicated pure StringConcat operator.
This operator is similar to NewConsString in that it takes the resulting
length plus the two input strings. The operator relies on the length
being checked explicitly by the surrounding code instead of baking the
check into the operator itself. This way TurboFan can eliminate
redundant/unnecessary StringConcat operations, since they are pure now.

This also unifies the treatment of string addition in JSTypedLowering,
and generalizes the StringLength constant-folding to apply to more cases
not just the JSAdd cases inside JSTypedLowering.

Bug: v8:7902, v8:8015
Change-Id: I987ec39815a9464fd5fd9c4f7b26b709f94f2b3f
Reviewed-on: https://chromium-review.googlesource.com/1213205
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55725}
2018-09-07 13:06:09 +00:00
Maya Lekova
d34641981c [turbofan] Optimize JSToString on strings early on
This optimization addresses a case triggered by the Templates/Untagged
js-perf-test, in which template literals get compiled to a cascade of
JSAdd(JSAdd, JSToString) nodes.

Before the optimization in https://chromium-review.googlesource.com/c/v8/v8/+/1193342
JSToString no-ops used to get optimized away during typed lowering together
with constant folding of string concatenation. This change allows us to get
rid of a no-op JSToString call during native context specialization, thus
allowing for constant folding of JSAdd to kick in and CheckStringAdd nodes to
not be generated at all.

This change also removes the NumberToString optimization from typed
lowering, as it's being executed during earlier stage.

Bug: chromium:879083
Change-Id: I1d8155ed969b6959fbb86fca21e4714b88a2695a
Reviewed-on: https://chromium-review.googlesource.com/1202622
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55724}
2018-09-07 12:19:18 +00:00
Michael Achenbach
e3a0b362db [test] Fix test-listing command on Android
The cctest and unittests suites call the test executable to list the
tests, which requires pushing the executables to the device on Android.

NOTRY=true
TBR=sergiyb@chromium.org

Bug: chromium:866862
Change-Id: I318dff7af2b2de3b8642ec4b6ba30b602da808bb
Reviewed-on: https://chromium-review.googlesource.com/1213202
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55723}
2018-09-07 12:16:58 +00:00
Stephan Herhut
47837cfc23 [wasm] Add d8 stress test for kExprI32AtomicCompareExchange
Add a test that runs multiple workers that concurrently try to advance
along a random sequence of numbers, using AtomicCompareExchange to
update the shared current position.

Change-Id: Ie073bbdce6fd6766ef1f73f996dd592b90b8b3c2
Reviewed-on: https://chromium-review.googlesource.com/1198769
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55722}
2018-09-07 12:07:57 +00:00
Florian Sattler
7e4e3e05d2 [wasm] Revert ImportNativeModule call semantic
Bug: v8:8015
Change-Id: If6017a85683efcc847dab8034fdd82ac51106317
Reviewed-on: https://chromium-review.googlesource.com/1213182
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55721}
2018-09-07 11:55:34 +00:00
Benedikt Meurer
77abc64d24 Revert "[turbofan] Be more consistent about Smi comparisons."
This reverts commit 0aac3884c9.

Reason for revert: Various performance regressions (Blink and JSTests).

Original change's description:
> [turbofan] Be more consistent about Smi comparisons.
> 
> This changes SimplifiedLowering to be more consistent when chosing Smi
> representation as input for Number comparisons. We already had some
> isolated logic for doing (speculative) Number comparisons on Smis, but
> only in the case where that decision was based on type feedback, not on
> information already present in the graph.
> 
> Bug: v8:7703
> Change-Id: I25370ade630917675a6ac79b5ae6a8afd253dfc7
> Reviewed-on: https://chromium-review.googlesource.com/1196422
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55518}

TBR=jarin@chromium.org,bmeurer@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7703, chromium:881758, chromium:881759, chromium:881760
Change-Id: I4af9c0b0ad37dea17ceabeb721c92a7cc978987a
Reviewed-on: https://chromium-review.googlesource.com/1213185
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55720}
2018-09-07 11:50:21 +00:00
Benedikt Meurer
0f5249be0d [turbofan] Assign good types to Symbol.prototype.{toString,valueOf}.
Make the TurboFan Typer infer proper types for calls to the known
Symbol.prototype.toString() and Symbol.prototype.valueOf() builtins.

Bug: v8:8015
Change-Id: Ia133bd8f2cfcabaf984820a953b357d1747d6892
Reviewed-on: https://chromium-review.googlesource.com/1213203
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55719}
2018-09-07 11:49:12 +00:00
Ross McIlroy
83dee31e42 [Parser] Split building logic out of ProducedPreParserScopeData.
Splits PreParsedScopeDataBuilder out of ProducedPreParserScopeData to make the split between
building PreParsedScopeData and using already build PreParserScopeData more explicit.

BUG=v8:8041

Change-Id: Iab42cab84c247152c14ac39f3136f985753160ec
Reviewed-on: https://chromium-review.googlesource.com/1202104
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55718}
2018-09-07 11:39:58 +00:00
jgruber
ce5893626a Fix two issues in FuzzAssembleSwap test
The first: we allocated within the argument list of a function call on
a handlified receiver. The allocation may trigger GC which leaves us
with a stale receiver reference.

The second: in generated code we triggered further allocations while
an uninitialized fixed array was live.

Bug: v8:8145
Change-Id: If59cab6274277534b2ff6463daa5863b8feae22c
Reviewed-on: https://chromium-review.googlesource.com/1213162
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55717}
2018-09-07 11:08:47 +00:00
Ulan Degenbaev
206d37b926 Emit trace event on console error messages from JS.
This is needed to implement a new metric that measures
health of Web Page Replay archives.

Bug: chromium:880432

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I59aed22e4671e491fc3a30d04fbdce1643404b32
Reviewed-on: https://chromium-review.googlesource.com/1204570
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55716}
2018-09-07 10:48:36 +00:00
Florian Sattler
d292402031 [cleanup] Refactored FindOrderedHashTableEntry to take compare func as ref
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I4062fea76f0db405e38f5f5b7d8b78409ff57357
Reviewed-on: https://chromium-review.googlesource.com/1209787
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55715}
2018-09-07 10:44:15 +00:00
Florian Sattler
323dfe3717 [cleanup] Refactored two methods to no longer copy.
Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I6bf929bea03a59b40f205482b7604f44e61bc6f8
Reviewed-on: https://chromium-review.googlesource.com/1209846
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55714}
2018-09-07 10:40:35 +00:00
Florian Sattler
f2aba4fca0 [Intl] Refactored find calls to use char.
String find has a faster overload for char, hence, we should pass a char
instead of a string where possible. Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I49611d84bfb195992b6e2de538a726a8654b7b71
Reviewed-on: https://chromium-review.googlesource.com/1209348
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55713}
2018-09-07 10:38:35 +00:00
Florian Sattler
6027ec031a [builtins] Refactored methods to take the std::function by ref
In these cases the std::function state does not change, hence, it can be
a const ref. Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I221b0c3e18c5c1f54d35d671445d2e947cf64c02
Reviewed-on: https://chromium-review.googlesource.com/1209822
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55712}
2018-09-07 10:36:35 +00:00
Ross McIlroy
8da9dbbb54 [Parser] Add support for Zone allocated ConsumedPreParsingScopeData.
Adds support for zone allocated (off-heap) ConsumedPreParsingScopeData to
enable worker-thread access to PreParsingScopeData during parallel IIFE
compile tasks.

In order to avoid code-duplication, a templated
BaseConsumedPreParsingScopeData is added which implements the logic for
decoding the bytestream into scope data. Two implementations of this
base class are instantiated for each of the underlying serialized scope date:
  - ZoneConsumedPreParsedScopeData for exposing ZonePreParsedScopeData
  - OnHeapConsumedPreParsedScopeData for exposing on-heap PreParsedScopeData
The interface for each of these classes is the ConsumedPreParsingScopeData,
which exposes the methods required by the parser to deserialize the required
data.

As a side-cleanup, moved Ucs2CharLength and Utf8LengthHelper implementations
to cc file so that we don't get a linker error if one of them are unused by
the cc file including the header.


BUG=v8:8041

Change-Id: Id502312d32fe4a9ddb6f5d2d9d3e3a9d30b9b27d
Reviewed-on: https://chromium-review.googlesource.com/1199462
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55711}
2018-09-07 10:28:40 +00:00
Benedikt Meurer
60d3f89d8a [turbofan] Consistently use the StringLength operator.
Previously all internal accesses to the String::length field in TurboFan
would use the StringLength operator, whereas explicit `string.length`
accesses from user JavaScript code would use LoadField operators instead.
This inconsistency led to redundant loads of the String::length, for
example in case of code like

```js
subject.substring(1, subject.length - 1)
```

where the `subject.substring` call introduces a StringLength(subject)
node, and the `subject.length` introduces a LoadField[length](subject)
node.

Consistently using StringLength operator everywhere enables
optimizations in TurboFan that had been blocked before here (besides
avoiding the redundant load operations).

Bug: v8:8015
Change-Id: I21c82bc418105b9933a9e60dde11c7b222dfcf4f
Reviewed-on: https://chromium-review.googlesource.com/1212942
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55710}
2018-09-07 10:04:07 +00:00
Ross McIlroy
b3a480a65e [RCS / TurboFan] Enable basic off-thread RCS for Concurrent Optimization.
Also removes the --no-recompile-concurrent from the callstats.py script.

BUG=v8:7790

Change-Id: I7e652dd273fd12565e086fe579bdf5974a876d9c
Reviewed-on: https://chromium-review.googlesource.com/1202402
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55709}
2018-09-07 10:02:27 +00:00
Florian Sattler
dc5c741612 [Runtime] Refactored Lookup/Construct to take function by ref
We don't need to copy the std::function because we don't modify it's
state.

Bug: v8:8015
Change-Id: I5320f78683fb7c1cca44b73e54312b3cc07b28cd
Reviewed-on: https://chromium-review.googlesource.com/1209782
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55708}
2018-09-07 09:57:45 +00:00
Dan Elphick
10afbb7e0f [cleanup] Split out v8-internal.h from include/v8.h
Move everything defined in the v8::internal namespace from include/v8.h
into a separate header that can be included by globals.h/checks.h
instead of the whole v8.h.

Also moves V8_EXPORT into v8config.h (so it can be use in the new
v8-internal.h).

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I22cdc2728d91a94b309a3d030ed06c0f8a06c723
Reviewed-on: https://chromium-review.googlesource.com/1210102
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55707}
2018-09-07 09:55:25 +00:00