Commit Graph

54492 Commits

Author SHA1 Message Date
Sigurd Schneider
f507e22261 Revert "[gn] use relative paths for gtest and gmock"
This reverts commit 131f4a3015.

Reason for revert: Breaks snapshot builder: https://ci.chromium.org/p/v8/builders/ci/Linux%20Snapshot%20Builder/16103

Original change's description:
> [gn] use relative paths for gtest and gmock
>
> TBR=machenbach@chromium.org
>
> Bug: v8:8941
> Change-Id: I0bbd119f7a613785b6e5e01cd8e59d5de40d68e1
> Reviewed-on: https://chromium-review.googlesource.com/c/1498473
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59996}

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

Change-Id: Ia2f377aa2e0fc69206104c4942085a9ded4534e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8941
Reviewed-on: https://chromium-review.googlesource.com/c/1497077
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60000}
2019-03-04 11:48:56 +00:00
peterwmwong
237236b9a9 [runtime] Remove unused SparseJoinWithSeparator and StringBuilderJoin runtime helpers.
As the TODO's indicate, these helpers only used by TypedArray#join when it was
implemented in JS.  As of https://chromium-review.googlesource.com/c/v8/v8/+/1369330
TypedArray#join is now implemented Torque and was optimized in a way that no longer
requires these helpers anymore.

Bug: v8:7624
Change-Id: I1d1ff80235a12feb3846ff92764e8593ce7c72c9
Reviewed-on: https://chromium-review.googlesource.com/c/1498692
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59999}
2019-03-04 11:47:53 +00:00
Dan Elphick
40bdd54d5d [cleanup] Delete BytecodeArray functions with no impl
BytecodeArray::SourcePosition and BytecodeArray::SourceStatementPosition
have no implementations and are never called.

Bug: v8:8834
Change-Id: I919c871795084766856dfbff5344c037b6f33dd0
Reviewed-on: https://chromium-review.googlesource.com/c/1497009
Commit-Queue: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59998}
2019-03-04 11:43:51 +00:00
Yu Yin
285dc86e93 [MIPS][Deserialize] Fix deserialize off heap target.
Change-Id: I3be3dc8815015c0215d3e3d655394850d85db871
Reviewed-on: https://chromium-review.googlesource.com/c/1490812
Reviewed-by: Predrag Rudic <prudic@wavecomp.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59997}
2019-03-04 10:28:31 +00:00
Yang Guo
131f4a3015 [gn] use relative paths for gtest and gmock
TBR=machenbach@chromium.org

Bug: v8:8941
Change-Id: I0bbd119f7a613785b6e5e01cd8e59d5de40d68e1
Reviewed-on: https://chromium-review.googlesource.com/c/1498473
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59996}
2019-03-04 10:05:02 +00:00
Yu Yin
420bc3e37e [MIPS] Remove function QuietNaN.
After 54a1889, Bug:7464, the permission of the page is read only, but this function need write permission.

Since this function is not used, just remove it.

Change-Id: I5a5976ab773bd808920893bbd2e3d9796e89e804
Reviewed-on: https://chromium-review.googlesource.com/c/1490813
Reviewed-by: Predrag Rudic <prudic@wavecomp.com>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59995}
2019-03-04 09:38:41 +00:00
Yu Yin
f93aef833c [instruction-selector-mips64] Add missing CanCover check
Change-Id: I2264b7850f2c091bfd28d90c5bfe36dcfe6e8a11
Reviewed-on: https://chromium-review.googlesource.com/c/1369908
Reviewed-by: Predrag Rudic <prudic@wavecomp.com>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59994}
2019-03-04 08:55:39 +00:00
Benedikt Meurer
8dd8bd56d1 [cleanup] Refactor CodeStubAssembler::NewConsString().
Remove the duplication of the allocation logic via the
AllocateOneByteConsString and AllocateTwoByteConsString helpers, and
instead just have a diamond to figure out the result map. This reduces
code size of the StringAdd_CheckNone builtin and even seems to be
beneficial performance wise. It seems to improve the performance on
the `bench-dom-serialize.js` test by around 1% just doing this.

Drive-by-fix: Remove the `flags` from CodeStubAssembler::StringAdd()
and its helpers, since we no longer support pretenuring of string
additions (for quite a while now).

Bug: v8:8834, v8:8939
Change-Id: Ia23e02c974b5f572930fcd45be0643094ab2fa98
Doc: https://bit.ly/fast-string-concatenation-in-javascript
Reviewed-on: https://chromium-review.googlesource.com/c/1498133
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59993}
2019-03-04 08:21:59 +00:00
Simon Zünd
0edcb2239a [torque-ls] Fix Json serialization
Stringification of Json wrongly used quotes for "true", "false" and
"null".

Drive-by: Manually flush std::cout when sending messages. This might
fix the server on windows.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: Ie499595a1b429514c5d8b1d3ece24f4690ece02e
Reviewed-on: https://chromium-review.googlesource.com/c/1498132
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59992}
2019-03-04 07:24:59 +00:00
v8-ci-autoroll-builder
df1279bf85 Update V8 DEPS.
Rolling v8/build: 9ed5110..9e80056

Rolling v8/third_party/depot_tools: 71bae22..e9e89e3

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

Change-Id: I1d682a1b5ea7121f431366f1b65d05252c50e78a
Reviewed-on: https://chromium-review.googlesource.com/c/1498693
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@{#59991}
2019-03-04 03:33:49 +00:00
v8-ci-autoroll-builder
efafc8e829 Update V8 DEPS.
Rolling v8/build: 74fd4a8..9ed5110

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bd30f49..b3bee2e

Rolling v8/third_party/depot_tools: c903198..71bae22

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

Change-Id: I80dba99b9c73cf6d705fe91f7757d6a315392ad8
Reviewed-on: https://chromium-review.googlesource.com/c/1497519
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@{#59990}
2019-03-03 03:33:20 +00:00
v8-ci-autoroll-builder
9c47bb670b Update V8 DEPS.
Rolling v8/build: 04fc46b..74fd4a8

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9950df1..bd30f49

Rolling v8/third_party/depot_tools: a6d41e2..c903198

Rolling v8/tools/swarming_client: d50a88f..7a61cf3

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

Change-Id: I7233879445d4df56678de72707f3994891eaea72
Reviewed-on: https://chromium-review.googlesource.com/c/1497512
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@{#59989}
2019-03-02 03:35:09 +00:00
Anton Bikineev
f8aaf984f7 Add missing explicit instantiation declarations
This is a cosmetic change aimed to reduce compilation
time spent on instantiating things and potentially reduce
code (in case instantiated specializations are in
different shared objects).

Change-Id: I719b4d376a0d707f4724555a2f404327d19d8477
Reviewed-on: https://chromium-review.googlesource.com/c/1484298
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59988}
2019-03-01 23:09:07 +00:00
Tom Tan
9405fcfdd1 Ignore cache flush when running V8 arm64 backend under simulator
When running under simulator, all arm64 JIT instructions are interpreted by
simulator via normal memory read, then no need to do icache/dcache flush.

Also when running under simulator, cache_type_register_ is set to 0 explicitly
in above CacheLineSizes class, which results in 0 value in both dstart and
istart, then causes flush on this incorrect range.

Bug: chromium:893460
Change-Id: Ief6cb09a0e89f7ede0761ad676ea6a882e9f4600
Reviewed-on: https://chromium-review.googlesource.com/c/1492514
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59987}
2019-03-01 22:16:43 +00:00
Toon Verwaest
c0eb72e063 [scanner] Tweak ScanNumber
Change-Id: I1654da286ae15bc028803286a188b5d89111c3d3
Reviewed-on: https://chromium-review.googlesource.com/c/1495983
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59986}
2019-03-01 21:43:43 +00:00
Sathya Gunasekaran
ab24897cb0 [fni] Mark computed props as computed, not anonymous function
I thought about potentially adding the identifer ref to the error but
that would require allocating a new string or at the very least
increasing the size of the resulting cons string. Given that the
parser is pretty performance sensitive, I've decided to not display
the identifier.

Previously, the error was:
  _test.js:3: Error
  a[foo].c = () => { throw Error(); };
                     ^
  Error
    at a.(anonymous function).c (_test.js:3:26)
    at _test.js:5:1

With this patch, the error becomes:
  _test.js:3: Error
  a[foo].c = () => { throw Error(); };
                     ^
  Error
    at a.<computed>.c (_test.js:3:26)
    at _test.js:5:1

Bug: v8:8823
Change-Id: I557b3517e317652c447ca06c5a400e9625353d9b
Reviewed-on: https://chromium-review.googlesource.com/c/1495017
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59985}
2019-03-01 20:52:03 +00:00
Jeff Fisher
368f55bb63 [Inspector] Add tests for Runtime domain
New tests added for:
  * Runtime.getProperties while debugger is paused
  * Runtime.exceptionThrown
  * Runtime.releaseObject/releaseObjectGroup

Change-Id: I72b3455e9fb3269c097bf9a383187c119158a722
Reviewed-on: https://chromium-review.googlesource.com/c/1490172
Commit-Queue: Jeff Fisher <jeffish@microsoft.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59984}
2019-03-01 20:34:53 +00:00
Georgia Kouveli
cc5808cd9f [arm64] Port the skipping of arguments adaptor frames.
This is a port of the improvements to the ArgumentsAdaptorTrampoline
that previously landed for x64. It skips the arguments adaptor frame
creation if the callee cannot observe the actual arguments (as indicated
by the "is_safe_to_skip_arguments_adaptor" bit on the SharedFunctionInfo),
and instead just massages the current stack frame appropriately (either
by pushing more undefineds in case of under application, or by removing
the superfluous arguments in case of over application).

Due to the 16 byte stack alignment requirement on arm64, we only skip
the arguments adaptor frame creation when the difference between the
expected and the actual argument number is even. When it is odd, we
would still need to copy the actual arguments in the existing frame to
account for the padding, which would defeat the point of the improvement.

Bug: v8:8895
Tbr: jgruber@chromium.org
Doc: http://bit.ly/v8-faster-calls-with-arguments-mismatch
Change-Id: I7f13f6f0ba86edb483e088aac145cfcf9c937fef
Reviewed-on: https://chromium-review.googlesource.com/c/1491633
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59983}
2019-03-01 18:16:18 +00:00
Sven Sauleau
5bdb6b8345 Replace assertErrorMessage in mjsunit test
Replaces assertErrorMessage by assertThrows. Previously
assertErrorMessage didn't assert the error message that was
provided.

Change-Id: I30410b43ff16db448776d9f3cae817b1c0966b3d
Reviewed-on: https://chromium-review.googlesource.com/c/1496973
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#59982}
2019-03-01 18:15:13 +00:00
Maciej Goszczycki
2ddc26fca7 [cleanup] Switch DeserializerAllocator to use Heap more directly.
Bug: v8:8562
Change-Id: I05421c9fa96e6c1d424c6d529922cde02ba2dc37
Reviewed-on: https://chromium-review.googlesource.com/c/1494760
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#59981}
2019-03-01 17:44:21 +00:00
Daniel Bratell
e5ec83fb03 Fixing SourcePosition ambiguity
There is both a v8::internal::SourcePosition and a
v8::internal::torque::SourcePositon and in jumbo builds
an unqualified SourcePositon ended up referring to the wrong
one since nobody had told the compiler that the correct one
existed. This broke jumbo builds of v8 cctests
on Windows (because only in Windows will the compiler look for
the symbol in a parent namespace).

R=szuend@chromium.org

Bug: v8:8880
Change-Id: I7c9ebf68629642b65e86d6a8ae458ec5ff01f2ce
Reviewed-on: https://chromium-review.googlesource.com/c/1496972
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#59980}
2019-03-01 16:40:50 +00:00
Mike Stanton
7d971fb022 [builtins] FastCreateDataProperty avoids runtime calls
If we make use of this in the generic Array.prototype.filter case
we get a performance boost of over 60%.

Bug: v8:8213, chromium:920187
Change-Id: Ia116a852f355a9f037850aee86db7284f0023929
Reviewed-on: https://chromium-review.googlesource.com/c/1484297
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59979}
2019-03-01 15:42:19 +00:00
Tobias Tebbi
a66712deba [torque] give field layout macros names that refer to Torque
To make it obvious these are not defined in C++.

Bug: v8:7793
Change-Id: Ib846023992e32ddd10dadc3834ce42b7604a1f48
Reviewed-on: https://chromium-review.googlesource.com/c/1495993
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59978}
2019-03-01 15:17:58 +00:00
Simon Zünd
77434fb9ce [torque-ls] Add source positions for constant definitions
This CL changes 'Value' to use an 'Identifier' for its name, where
the source position represents the point where it is defined. This is
used to support "goto definition" for constants and extern constants.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: Ifb9ff08b36cbd9fb2691dbae579d2df29edd651d
Reviewed-on: https://chromium-review.googlesource.com/c/1495986
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59977}
2019-03-01 14:43:17 +00:00
Michael Achenbach
d5ef815ca7 [test] Pull exit-code logic to shared base runner
This makes the test runner and numfuzz share the same exit code behavior on
errors. This is needed as they also share the same infrastructure logic
to collect swarming tasks.

Bug: chromium:937228
Change-Id: I155b37c7b10dd22959a4dcf30bbd0321c452236b
Reviewed-on: https://chromium-review.googlesource.com/c/1495987
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59976}
2019-03-01 14:24:56 +00:00
Seth Brenith
e97dfa6746 [torque] convert a handful of simple class layout definitions to Torque
I tried to use more specific union types where appropriate, even though
many of these fields are accessed as Object from C++.

Bug: v8:7793
Change-Id: I771d9b6459bdc1413019f8ff5ddfd611d1adf61f
Reviewed-on: https://chromium-review.googlesource.com/c/1490573
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59975}
2019-03-01 14:22:18 +00:00
Junliang Yan
d71374b1b0 PPC/s390: [arm] Port the skipping of arguments adaptor frames.
Port 4f62b4bb61

Original Commit Message:

    This is a port of the improvements to the ArgumentsAdaptorTrampoline
    that previously landed for x64. It skips the arguments adaptor frame
    creation if the callee cannot observe the actual arguments (as indicated
    by the "is_safe_to_skip_arguments_adaptor" bit on the SharedFunctionInfo),
    and instead just massages the current stack frame appropriately (either
    by pushing more undefineds in case of under application, or by removing
    the superfluous arguments in case of over application).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, miladfar@ca.ibm.com
BUG=
LOG=N

Change-Id: I94824c4b3d94f7c93c7526c865b82649426cd3a4
Reviewed-on: https://chromium-review.googlesource.com/c/1495014
Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59974}
2019-03-01 14:13:07 +00:00
Milad Farazmand
c8d0dae842 [torque-ls] Adding a required header needed for sorting
gcc requires the <algorithm> header for compiling std::sort. This issue
is not present when using Clang.

Change-Id: Ief7bfd6152754f71194c784b09dce39e357ddd5c
Reviewed-on: https://chromium-review.googlesource.com/c/1496280
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59973}
2019-03-01 14:02:26 +00:00
Sigurd Schneider
c924896fba [mjsunit] Skip test on ARM
TBR=ulan@chromium.org

Change-Id: Ic886973633b3631a336b5e549bb4c910d82fe57e
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/1495988
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59972}
2019-03-01 13:55:46 +00:00
Michael Achenbach
6b8f202b4f [build] Switch off goma on gcc trybots
NOTRY=true

Bug: chromium:933093
Change-Id: I0945adb70bcecb7542281eae39ce55929ad002ed
Reviewed-on: https://chromium-review.googlesource.com/c/1495985
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59971}
2019-03-01 13:34:05 +00:00
Mike Stanton
40c9cce4dd [Torque] Move some TypedArray builtins to Torque
This CL moves the following builtins from CSA to Torque:

TypedArray.prototype.forEach
TypedArray.prototype.reduce
TypedArray.prototype.reduceRight

A space-saving decision was made in the design -- instead of emitting
versions of the central loop for each ElementsKind, a function
pointer which knows how to read from the appropriate TypedArray
ElementsKind is constructed at the outset, and passed into the
loop. This enormously reduces codesize for the TypedArray builtins.
We'll have to see if the overhead of the builtin call affects
performance too adversely.

BUG: v8:8906
Change-Id: I808cd70f58ddbde18f85e5b2a9be0b883a3f6647
Reviewed-on: https://chromium-review.googlesource.com/c/1484292
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59970}
2019-03-01 12:46:25 +00:00
Simon Zünd
7eae3a63bf [torque] Update README.md for the extension to include build step
R=mathias@chromium.org

Bug: v8:8880
Change-Id: I6954ede6669f19d970ad4257fa4699da2db62fd3
Reviewed-on: https://chromium-review.googlesource.com/c/1495982
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59969}
2019-03-01 12:33:35 +00:00
Simon Zünd
756fdf6e10 [torque-ls][cleanup] JsonValue accessors are now checked
Instead of accessing JsonValue struct fields directly, typed
accessors check that the tag matches with the type access.

Drive-by: The factory methods are now static methods on the JsonValue
type itself, making call-sites more readable.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: I49b37b3ba8eaf1153b8aa93ea08913077c923fdc
Reviewed-on: https://chromium-review.googlesource.com/c/1495559
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59968}
2019-03-01 12:32:27 +00:00
Toon Verwaest
a83523d594 [scanner] Reuse SkipSingleLineComment in SkipSourceURLComment
Change-Id: Ie8109300ce134f3f9d0c1619f1375c29af2c8fa6
Reviewed-on: https://chromium-review.googlesource.com/c/1494758
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59967}
2019-03-01 12:00:34 +00:00
Ben L. Titzer
70a7287c96 [tools] Fix gdbinit cast error
R=clemensh@chromium.org

Change-Id: I1dec320464f5bc80e248cdf0b31b4a095bc54994
Reviewed-on: https://chromium-review.googlesource.com/c/1495981
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59966}
2019-03-01 11:52:54 +00:00
Andreas Haas
dd23f2f316 [wasm][interpreter] Support calls to imported JS functions in cctests
The interpreter is set up specially in cctests to allow more direct
testing. This requires sometimes to write special testing code in the
interpreter which is different than production code. This CL fixes one
instance of testing code which deals with indirect calls.

In production code, indirect calls go through the indirect function
table which can change over time. In cctests, however, the indirect
function table is not set up completely. In cctests the interpreter
uses information from the module instead to acquire the target of an
indirect call. In that testing code, calls to imported JS functions
were not handled. This handling gets added with this CL.


CC=fgm@chromium.org
R=titzer@chromium.org

Bug: v8:7431
Change-Id: I3b90d4ea8fec2633c010dd8359814440c7988509
Reviewed-on: https://chromium-review.googlesource.com/c/1495560
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59965}
2019-03-01 11:30:10 +00:00
tzik
06770cef6c Mark a non-primary path of ExtractHandlerContext as deferred
The performance regression comes from the extra time of
ExtractHandlerContext called by TriggerPromiseReaction,
On the previous code, it takes the current Context from Isolate,
and on the typical case of the new code, the Context is taken from
the promise reaction function, that adds a few memory read ops and
a few conditional branches.

This CL adds Label::kDeferred to non-typical cases of
ExtractHandlerContext, so that newly added instructions have smaller
impact under the speculative execution.
On a local benchmark, this fixes half of the regression.

Bug: chromium:936717
Change-Id: I34ce858f77d7d604dd596711a239160ed8dac383
Reviewed-on: https://chromium-review.googlesource.com/c/1496774
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59964}
2019-03-01 10:24:49 +00:00
Yu Yin
7eaaab2976 [MIPS] fix build error.
update the missing file in a2d9924.
see https://chromium-review.googlesource.com/c/1470129

port 591408c to mips.
see https://chromium-review.googlesource.com/c/1482915

Update the missing file in a4b19dc.
see https://chromium-review.googlesource.com/c/1460474

Update the missing file in ad3546a.
see https://chromium-review.googlesource.com/c/1434036

Fix compiler warnings.

Change-Id: Ie47b1d5aaa3c7f558def92255ce135b0fc0406ec
Reviewed-on: https://chromium-review.googlesource.com/c/1490995
Commit-Queue: Michael Hablich <hablich@chromium.org>
Reviewed-by: Predrag Rudic <prudic@wavecomp.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59963}
2019-03-01 10:11:39 +00:00
Clemens Hammacher
8e0b2d1f70 [wasm] Remove compile job when finishing the module
The {AsyncCompileJob} can now always be deleted when initial
compilation finished. The previous conditions are redudant, since
{baseline_compilation_finished()} is always true when calling
{FinishModule()}.

R=ahaas@chromium.org

Bug: v8:8689
Change-Id: I95c0cf83943630b83216c83db0edbabdfbd71284
Reviewed-on: https://chromium-review.googlesource.com/c/1494008
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59962}
2019-03-01 09:57:17 +00:00
Tamer Tas
a6426cb888 [testrunner] remove the extra characters in progress indicator
After python3 migration, the new print usage started causing leftover character
issues.

This CL fixes the print usage.

R=clemensh@chromium.org,neis@chromium.org
CC=machenbach@chromium.org

Bug: v8:8918
Change-Id: Ibee06677c3bae3e1141579693aa16a539309a566
Reviewed-on: https://chromium-review.googlesource.com/c/1495558
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59961}
2019-03-01 09:37:37 +00:00
Simon Zünd
9911fd13cc [torque-ls] Add prototype language server implementation for Torque
Design Doc: https://goo.gl/9G9d9k

The initial prototype consists of a few parts:

The VS Code extension is now built using TypeScript. The build artifact
is checked-in along side the extension. The extension now starts up
the language server when it is activated. The path to the LS
executable is configurable via VS Code settings.

The language server is a separate executable. It adds a light-weight
object model on top of a Json Parser for reading/writing LSP requests
and responses. The current server is very much bare-bones featurewise:
    - Tell the client that the server can handle "goto definition"
    - Recompile when Torque files change
    - Goto definition support for Macros/Builtins, local variables
      and arguments.

R=mathias@chromium.org, mvstanton@chromium.org, tebbi@chromium.org

Bug: v8:8880
Change-Id: Ie9b433e64ee63e9aa757b6bf71e5d52beb15b079
Reviewed-on: https://chromium-review.googlesource.com/c/1494354
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59960}
2019-03-01 09:30:47 +00:00
Clemens Hammacher
3f8b031647 [zone] Remove segment pooling from accounting allocator
This pooling introduces severe lock contention for Liftoff compilation,
since each compilation uses its own Zone which does at least one
segment allocation.
It's also unclear whether pooling improves performance, since {malloc}
should implement a similar pooling mechanism, but better optimized for
multithreaded uses.

Feel free to revert if this introduces significant regressions.

R=verwaest@chromium.org

Bug: v8:8916
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Change-Id: Iaf988bed898e35700f5f7f3310df8e01918de4c9
Reviewed-on: https://chromium-review.googlesource.com/c/1491632
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59959}
2019-03-01 09:25:48 +00:00
Matt Gardner
803ad32414 Reland "Optimize in operator"
The original was reverted for breaking webkit layout tests:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/30270

It also caused the following clusterfuzz failures:

chromium:935832
This was a correctness bug due to not properly handling the case of arrays with prototypes other
than Array.prototype. Accesses that were TheHole were not being handled property, both in bounds
holes in holey arrays and out of bounds on either holey or packed arrays. Handling was incorrect
both in access-assembler and in Turbofan.

chromium:935932
This bug was that there was no handling for Has checks on the global object. Turbofan was emitting
code for a store (the 'else' condition on 'access_mode == AccessMode::kLoad'). It hit a DCHECK in
debug builds but in release could show up in different places. This is the bug that caused the
webkit layout test failure that led to the revert.

Both bugs are fixed by in CL, and tests are added for those cases.

Bug: v8:8733, chromium:935932, chromium:935832
Change-Id: Iba0dfcfce6e15d2c0815a7670ece67bc13ba1925
Reviewed-on: https://chromium-review.googlesource.com/c/1493132
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Matt Gardner <magardn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#59958}
2019-03-01 09:01:18 +00:00
v8-ci-autoroll-builder
b8c79ff6e0 Update V8 DEPS.
Rolling v8/build: 325e95d..04fc46b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/827da84..9950df1

Rolling v8/third_party/depot_tools: fe34723..a6d41e2

Rolling v8/third_party/icu: 960f195..8c67416

Rolling v8/tools/clang: a287525..257c91c

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

Change-Id: I19df61991d87ab439d3dd2c88368081dc5632be3
Reviewed-on: https://chromium-review.googlesource.com/c/1495899
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@{#59957}
2019-03-01 03:41:30 +00:00
Johannes Henkel
6141741064 [DevTools] Roll of inspector protocol ...
... to b13e24ccee66d7e0590ce1266db9c906e3648561

to support UTF16 strings with binary protocol (v8).

Original review here:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1493312

Change-Id: I401c5d52d233805dc681bb23b40df99f2ea14992
Reviewed-on: https://chromium-review.googlesource.com/c/1493291
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59956}
2019-03-01 02:10:29 +00:00
Tom Tan
75d972a6fd Move Assembler::AbortedCodeGeneration() from .h to .cc for arm64
Assembler::AbortedCodeGeneration() is defined in assembler-arm64.h, but it calls
into Constant::Clear() which is defined in assembler-arm64.cc. This introduces
dependency to v8_base component when including assembler-arm64.h which is not
always possible like for V8 unittests target. To fix this, we could define both
in the same file, like Assembler::IsConstPoolEmpty() calls Constant::Clear() and
both are defined in assembler-arm64.h, so it works fine.

Bug: chromium:893460
Change-Id: I895cf0147950fca20142ea5ed18bcd020c1ab866
Reviewed-on: https://chromium-review.googlesource.com/c/1493293
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59955}
2019-02-28 19:40:59 +00:00
Maciej Goszczycki
b0bcd45d83 [heap] Isolate read-only space creation
This provides a single point where read-only space sharing will be
controlled. Eventually ReadOnlyDeserializer will take ReadOnlyHeap
instead of Isolate, first steps include
https://chromium-review.googlesource.com/c/v8/v8/+/1483054

Bug: v8:7464
Change-Id: I213819aeca6fca335235025c9195edf474230eda
Reviewed-on: https://chromium-review.googlesource.com/c/1489087
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59954}
2019-02-28 16:56:07 +00:00
Toon Verwaest
506f79b88f [scanner] Remove superfluous cases from switch in ScanEscape
Change-Id: I4d774452e4537ba507bab87ac0a197d17a2f2862
Reviewed-on: https://chromium-review.googlesource.com/c/1494759
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59953}
2019-02-28 16:17:31 +00:00
Dan Elphick
3ce662f4e6 [cleanup] Make MentionedObjectCache GC-safe
This changes DebugObjectCache to be a vector of Handles rather than
tagged pointers, meaning it's not GC-safe.

This will allow PrintStack to allocate memory if required (if for
instance source positions must be regenerated).

Bug: v8:8834, v8:8510
Change-Id: Ieec9a827af9abbcb9b5b237d79984eedf0cdcc57
Reviewed-on: https://chromium-review.googlesource.com/c/1494755
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59952}
2019-02-28 16:03:41 +00:00
Leszek Swirski
8d940b913a [ignition] Use dead code elimination for implicit returns
Rather than manually tracking basic blocks in the bytecode array builder,
use the existing dead code elimination to generate an implicit return iff
the block ending the bytecode is not dead by the time all statements have
been visited.

Change-Id: I9520486a523ec4e01bc203e9a847eb1f57b130b6
Reviewed-on: https://chromium-review.googlesource.com/c/1494756
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59951}
2019-02-28 15:55:41 +00:00