Commit Graph

54523 Commits

Author SHA1 Message Date
Ben L. Titzer
15925e5cc6 [wasm] Fix import of reexported API function
When a function is exported from a WebAssembly module, it is implicitly
wrapped in a WasmExportedFunction. For functions that were imports into
this module, the exported function appears like other Wasm function,
e.g. can be used in tables. When that exported function was re-imported
to another module, the logic to compute the import kind mistakenly
assumed the exported function was indeed originally a Wasm function
and tried to call it directly, instead of treating it like an imported
JS function.

R=ahaas@chromium.org
BUG=v8:8947

Change-Id: Ib8fac81fbe0f49c50cfbfb2e69d9bb60aef91fcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1503632
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60031}
2019-03-05 14:34:57 +00:00
Hannes Payer
bcf0c32db9 [heap] AllocateRawWithRetryOrFail is using AllocationType.
Bug: v8:8945
Change-Id: I2ee060c03496bbcb388d82fd05ecc61658047f98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1503633
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60030}
2019-03-05 14:09:47 +00:00
Hannes Payer
cbc18b1836 [heap] Introduce AllocationType and use it in Heap::AllocateRaw.
Bug: v8:8945
Change-Id: I4e5f08a722e83fd8b4accb066eca50242a116a6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1503452
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60029}
2019-03-05 12:29:30 +00:00
Ulan Degenbaev
037ff2b725 [heap] Decouple the max semi-space size from the page size
This allows us to change the page size without affecting Scavenger
heuristics and performance.

Bug: chromium:852420
Change-Id: Idcff4296e88e16f9af0ee6ecd00c63d789866fd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499494
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60028}
2019-03-05 12:12:20 +00:00
Tobias Tebbi
676a020322 [turbofan] representation selection: do not convert from Boolean to Number without truncation
Bug: chromium:937649
Change-Id: I13c64a7cab7a6f1668c546114610006d0d6b91ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1501052
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60027}
2019-03-05 11:18:00 +00:00
Pierre Langlois
5e71633333 [arm, arm64] Setup arguments to RecordWriteStub using mov.
The `TurboAssembler::CallRecordWriteStub()` method which generates out-of-line
code to call the write barrier would push and pop arguments to move them to
different registers. Let's use `mov` instructions instead, making sure we handle
overlapping registers.

Change-Id: Ideb654cd558e984ccb90c7cf44b1c2c49f1c5b50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499496
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60026}
2019-03-05 11:07:00 +00:00
Simon Zünd
e00f2de6b5 [torque-ls] Properly decode file URIs sent by the client
This CL changes the language server to store file paths as URIs and
decodes them on-demand during compilation. For now, this will
eliminate the need for an URI encoding function.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: If79f635cb60035f58712c1458ecca3bfa23a6e47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1502992
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60025}
2019-03-05 10:36:38 +00:00
v8-ci-autoroll-builder
3bcc479dcb Update V8 DEPS.
Rolling v8/build: 9e80056..80892bf

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

Rolling v8/third_party/depot_tools: e9e89e3..cf661ac

Rolling v8/third_party/googletest/src: 5ec7f0c..efecb0b

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

Change-Id: Id94d65fceb3dad447e57c9cf27905e325c484330
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1501468
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@{#60024}
2019-03-05 03:59:59 +00:00
Bill Ticehurst
f8acd898de Specify the Python executable on the command line in gm.py
Launching Python scripts can fail on Windows if the Python executable
isn't given as the first argument to the shell. This change adds the
path of the current Python executable, as per the behavior of v8gen.py

Change-Id: Iedaf57bcafc4c6aa6ebb89e945ee967cf393da04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497522
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60023}
2019-03-05 03:30:30 +00:00
Deepti Gandluri
b71325230d Revert "[wasm simd] Fix F32x4 Min and Max"
This reverts commit 821bc64951.

Reason for revert: Fails on ARM hardware :(
https://ci.chromium.org/p/v8/builders/ci/V8%20Arm%20-%20debug/9271

Original change's description:
> [wasm simd] Fix F32x4 Min and Max
> 
> - Fix F32x4 tests to save results in globals, so they can be checked
>   in C++ code. Perform correct checks in case of NaNs.
> - Fix ia32, x64 implementations of F32x4Min, F32x4Max to correctly
>   deal with NaNs.
> - Enable tests for all float values on all platforms, except skip
>   denormalized results on ARM, and skip extreme values for reciprocal,
>   reciprocal square root approximation opcodes.
> - Disable Min, Max test for interpreter (see v8:8425) since it doesn't
>   handle NaNs correctly.
> - Fix vmin, vmax implementations in ARM simulator.
> 
> Bug: v8:8639
> Change-Id: I87e188e3cb078f09fdacfd9955f426c20a11bf64
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495897
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60021}

TBR=bbudge@chromium.org,gdeepti@chromium.org

Change-Id: Ib0dc8395ff86263fe0c02faa53d90c7da46b50a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8639
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1501732
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60022}
2019-03-05 00:56:37 +00:00
Bill Budge
821bc64951 [wasm simd] Fix F32x4 Min and Max
- Fix F32x4 tests to save results in globals, so they can be checked
  in C++ code. Perform correct checks in case of NaNs.
- Fix ia32, x64 implementations of F32x4Min, F32x4Max to correctly
  deal with NaNs.
- Enable tests for all float values on all platforms, except skip
  denormalized results on ARM, and skip extreme values for reciprocal,
  reciprocal square root approximation opcodes.
- Disable Min, Max test for interpreter (see v8:8425) since it doesn't
  handle NaNs correctly.
- Fix vmin, vmax implementations in ARM simulator.

Bug: v8:8639
Change-Id: I87e188e3cb078f09fdacfd9955f426c20a11bf64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495897
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60021}
2019-03-04 21:59:54 +00:00
Ben Smith
a3ac513b5e [wasm] Implement passive element binary format
Passive elements have a different binary format, where the contents are
instructions instead of function indexes:

    0xd0 0x0b       -> (ref.null)
    0xd2 var:x 0x0b -> (ref.func x)

Bug: v8:8891
Change-Id: Ie7e8efe7b5acdf99622880dd97d28d3c13744dff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497516
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60020}
2019-03-04 20:05:13 +00:00
Deepti Gandluri
fee068bf2f Cleanup interrupt tracing in HandleInterrupts().
Change-Id: I092fff31b9cffef673f6929a510b3e643ab0ee29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1496274
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60019}
2019-03-04 19:57:53 +00:00
Yang Guo
6eb66e1cbd Revert "Remove builtin-function-id in SFI"
This reverts commit f8a676707d.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/25576

I don't think I've seen MSAN being flaky. Chances are that the change to SFI's object layout indeed left some field uninitialized.

Original change's description:
> Remove builtin-function-id in SFI
> 
> builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.
> 
> Bug: v8:6993
> Change-Id: Iee9b539475bc6531c9aa65b1904d1402a9ef30db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495898
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60017}

TBR=ulan@chromium.org,jgruber@chromium.org,leszeks@chromium.org,bmeurer@chromium.org,duongn@microsoft.com

Change-Id: Ic3964ce182ddbd7ef529ddb8b78b9bdfb1be7887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6993
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499500
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60018}
2019-03-04 19:54:05 +00:00
Z Duong Nguyen-Huu
f8a676707d Remove builtin-function-id in SFI
builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.

Bug: v8:6993
Change-Id: Iee9b539475bc6531c9aa65b1904d1402a9ef30db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495898
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60017}
2019-03-04 18:41:02 +00:00
David Benjamin
cbf8119471 [zone] Avoid undefined behavior in edge case
If buffer_ is empty and start_ is zero, even though the MemCopy would be
a no-op, &buffer_[start_] is undefined. buffer_.data() + start_ would
work, but due to a C/C++ language bug, that is technically undefined
too[*] if an empty buffer_.data() returns nullptr, so add a length() ==
0 check, matching methods above.

This was caught by building with _LIBCPP_DEBUG=0.

[*] https://www.imperialviolet.org/2016/06/26/nonnull.html

Bug: chromium:893810
Change-Id: I9f0834ffae6769e0e191e786842e6ecc6c95a58a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1483616
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60016}
2019-03-04 18:26:52 +00:00
Irina Yatsenko
37ff95adc0 Move empty elements canonicalization from call sites of
AllocateUninitializedJSArrayWithElements into the method.

Prior to the change, if the caller forgets to handle empty case on
their side, AllocateUninitializedJSArrayWithElements would allocate a
new empty FixedArray rather than return the canonical one. This refactor
shifts the burden of canonicalization from the callers to
AllocateUninitializedJSArrayWithElements.


Bug: v8:6777
Change-Id: I1246cb288861b65b51938414a454f21af78f8399
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1480330
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60015}
2019-03-04 18:07:52 +00:00
Simon Zünd
f35ad6ecd4 [torque-ls] Port tests from cctest to unittest
Moving to gtest allows negative test cases as the current parser
implementation exits the process on a parser error. The CL adds two
small negative tests. The idea is less to get full coverage, but to
have a place for regression tests.

Drive-by-change: Lexer errors need a valid source position scope and
Json parser needs a valid SourceId, otherwise we read OOB when the
error message is generated.

R=petermarshall@chromium.org

Bug: v8:8880
Change-Id: I56c4b9e0a29c8333b2e5e44f8116e5178552d2f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1498472
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60014}
2019-03-04 17:04:02 +00:00
Igor Sheludko
1744803073 [ptr-compr] Prepare for changing kTaggedSize, pt.3
This CL also gives up trying to maintain double and system word
fields at aligned addresses because currently it's not always
maintained (v8:8875) and Torque object definitions do not support
padding fields (v8:8863).

Given that both platforms where pointer compression is going to be
enabled (x64 and arm64) support loading of doubles and full words
from 4-byte aligned addresses we are fine.

Bug: v8:7703
Change-Id: I99fc6da5a0927f4db9b8fb24c7cc0bfc416523bc
Reviewed-on: https://chromium-review.googlesource.com/c/1496974
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60013}
2019-03-04 15:40:02 +00:00
Georg Neis
6422aa925c [modules] Make debug-scopes handle synthetic variables
... by skipping over them. Such variables appear in the case of direct
namespace exports and default exports. (Actually, the name used for
default exports used to be "*default*" which is not recognized as
synthetic, so I'm renaming it here to ".default").

Bug: chromium:932111
Change-Id: I0554dae9614334fdc02e78606f2db47e92196429
Reviewed-on: https://chromium-review.googlesource.com/c/1494010
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60012}
2019-03-04 15:06:02 +00:00
Ulan Degenbaev
21f75f9ae1 [heap] Reduce regular heap object size limit to half of the page size
This CL removes PPC specific constants and makes the regular heap
object size limit a power of two.

Bug: chromium:852420
Change-Id: I5f4000f76d029d689d22112877eea124774b29d2
Reviewed-on: https://chromium-review.googlesource.com/c/1496367
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60011}
2019-03-04 14:52:31 +00:00
Tobias Tebbi
438eee8493 [torque-ls] add option to trace communication from client
Bug: v8:8880
Change-Id: I835c465ccb63bcc20e9ec9cafda153a49de2bf7d
Reviewed-on: https://chromium-review.googlesource.com/c/1497010
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60010}
2019-03-04 14:43:02 +00:00
peterwmwong
f5ab50710d [js-perf-test] Add TypedArray#filter micro-benchmark
Bug: v8:8906
Change-Id: I61c04471530ecf8b97e1e6a0670f52f55232395e
Reviewed-on: https://chromium-review.googlesource.com/c/1497517
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60009}
2019-03-04 14:40:31 +00:00
Simon Zünd
d2a0df3fe1 [torque] Add SourcePosition field to TypeAlias
This CL introduces a declaration_position_ field on TypeAlias,
corresponding with the SourcePosition of the name of the
Type where it is declared.
This information is needed by the language server for
"goto defintion".

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I0de2f7b7ba23b86de34441107ca9982d190c227f
Reviewed-on: https://chromium-review.googlesource.com/c/1497952
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60008}
2019-03-04 14:20:51 +00:00
peterwmwong
acdaa4c713 [typedarray] Port TypedArray#slice to Torque.
Bug: v8:8906
Change-Id: I7a07482d2d5de13de11fa2611e3c6ae18439e820
Reviewed-on: https://chromium-review.googlesource.com/c/1493136
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60007}
2019-03-04 14:10:51 +00:00
Benedikt Meurer
683cf6f43b [cleanup] Remove obsolete "one byte data hint" for strings.
In the early days of Chrome when we used WebKit there was no support for
ASCII strings on the C++ side, so we put a hint onto these two-byte
strings that said "string only contains one byte data", such that
internally in V8 when these were involved in string operations, we could
instead create the *cheaper* one byte strings.

Nowadays Blink properly supports one-byte string representations and
this additional hint only comes with overhead, since we check it in
quite a few places (i.e. on the hot path for string concatenation), plus
we end up consuming more memory due to the additional string maps.
Removing the hint also frees one bit in the InstanceType zoo for
strings.

This alone improves performance on the `bench-dom-serialize.js` test case
by around **3%**.

Tbr: mstarzinger@chromium.org
Bug: v8:6622, v8:8834, v8:8939
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I0753f2859cee7b5a37b6f0da64d8ec39fcb044ff
Doc: https://bit.ly/fast-string-concatenation-in-javascript
Reviewed-on: https://chromium-review.googlesource.com/c/1498478
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60006}
2019-03-04 14:04:02 +00:00
Igor Sheludko
4633c78207 [ptr-compr][heap] Make all map checks pointer compression friendly
Bug: v8:7703
Change-Id: I3d521423eec725915d1a197c79c076ad54eeef14
Reviewed-on: https://chromium-review.googlesource.com/c/1496368
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60005}
2019-03-04 13:47:42 +00:00
Sven Sauleau
722c4c8334 Simplify TFC builtins definitions
Removes the result_size parameter in TFC definitions which
can be infered from the provided CallInterfaceDescriptor.

Previously, the result size was added to support stubs with
custom linkage. However, In pratice, the size don't differ from
the provided CallInterfaceDescriptor (given that it's a DCHECK)
and use mostly JS linkage (only one return).

Change-Id: I8efdb3e3ce1a470735dac84ec6be506e071d2756
Bug: v8:6116
Reviewed-on: https://chromium-review.googlesource.com/c/1495554
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60004}
2019-03-04 13:36:02 +00:00
Dan Elphick
980e0d32d0 [api] Add new configuration change methods
This adds a new method Isolate::LocaleConfigurationChangeNotification
that clears the cached Locale allowing new Locales to be picked up in
later Locale operations.

It moves Date::DateTimeConfigurationChangeNotification to Isolate
(deprecating the old one) so that the configuration change methods are
found together.

Change-Id: Iffc15e326933c5bc5baf2f0eafdd5c148b8279a8
Reviewed-on: https://chromium-review.googlesource.com/c/1491608
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60003}
2019-03-04 12:56:51 +00:00
Dan Elphick
505a26fac7 [cleanup] Remove unused CollectTopFrameForICStats
Removes JavaScriptFrame::CollectTopFrameForICStats whose last usage was
removed in https://chromium-review.googlesource.com/626016.

Bug: v8:8834
Change-Id: I9ffad0c712816696c56b746a137bed30362550bc
Reviewed-on: https://chromium-review.googlesource.com/c/1496365
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60002}
2019-03-04 12:51:22 +00:00
Ross McIlroy
31a3cfbc10 [Test] Add PrepareForOptimization to mjsunit/compiler
BUG=v8:8801

Change-Id: I9d9d9824c6c9ad0176bbfd3723da1b578b17c256
Reviewed-on: https://chromium-review.googlesource.com/c/1495555
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60001}
2019-03-04 12:25:41 +00:00
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