Commit Graph

47812 Commits

Author SHA1 Message Date
Clemens Hammacher
0b6ad25168 [wasm] Add histogram for code space per module
In the context of launching Liftoff, this will help us estimate the code
size increase and find a good value for the maximum allowed code space.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ie76172edbf136629636911fe97c7ecdc940be86d
Reviewed-on: https://chromium-review.googlesource.com/1061497
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53220}
2018-05-16 16:03:41 +00:00
Bill Budge
337c1e522e [wasm] Copy misaligned buffer on serialization
- Changes WASM serialization to copy misaligned code into an aligned
  buffer before relocating. This extra copy will eventually go away
  when code is mapped into the process.
- Serialized code buffers no longer need padding to align their
  contents.

Change-Id: Ib016c69b5099a4cf039dcd3d36a48f076033227c
Reviewed-on: https://chromium-review.googlesource.com/1060471
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53219}
2018-05-16 15:56:51 +00:00
Michael Starzinger
7bab086e79 [arm][arm64] Disable write protection of code memory.
R=cbruni@chromium.org
BUG=chromium:842862

Change-Id: I1b7ba33ffdfc3bb7542308ccc68a14696db5f583
Reviewed-on: https://chromium-review.googlesource.com/1061519
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53218}
2018-05-16 15:14:48 +00:00
Tobias Tebbi
07f19a085d [torque] implement function pointers to builtins
This CL adds the new type expression
builtin(Context, ArgType1, ...) => ReturnType
and allows to use Torque-defined builtins as values of this type, as well
as calling values of this type.
The new function pointer types are subtypes of Code.

Change-Id: Ib7ba3ce6ef7a8591a4c79230dd189fd25698d5b9
Reviewed-on: https://chromium-review.googlesource.com/1060056
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53217}
2018-05-16 14:44:48 +00:00
Sigurd Schneider
f651409fee [turbofan] Add missing check in JSCallReducer
Bug: chromium:843543
Change-Id: I709c4be330e7d45e597b3ca4ae9db8a960b07bbc
Reviewed-on: https://chromium-review.googlesource.com/1061463
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53216}
2018-05-16 14:01:30 +00:00
Sergiy Byelozyorov
9fc3551a7b Reland "[tools] Add benchmark owners to the config"
This is a reland of 989285b7a0

Original change's description:
> [tools] Add benchmark owners to the config
>
> R=machenbach@chromium.org
>
> No-Try: true
> Bug: chromium:826280
> Change-Id: Ic34d13170dfecdd9e791974a34c33ba0248c7a38
> Reviewed-on: https://chromium-review.googlesource.com/1053809
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53138}

TBR=machenbach@chromium.org

No-Try: true
Bug: chromium:826280
Change-Id: I169788ff40dd88a7017b46a15b292568b907f38e
Reviewed-on: https://chromium-review.googlesource.com/1061697
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53215}
2018-05-16 13:53:49 +00:00
Sergiy Byelozyorov
b595b89c36 [tools] Add minor_mc test variant to the V8 CQ
R=machenbach@chromium.org

Bug: chromium:651354
Change-Id: I9ce5c6dc6a155ff9a70713cbdbf2d4037ad47f24
Reviewed-on: https://chromium-review.googlesource.com/1053773
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53214}
2018-05-16 13:52:45 +00:00
Sigurd Schneider
a97a362d86 [turbolizer] Add support for inlined functions
This CL adds support for inlined functions in Turbolizer. It is also a
refactoring of the Turbolizer code-base. Most importantly, handling of
source positions changed to exact source positions, and not code ranges.
This improves selection interoperability between different phase views.

A separate CL changes the Turbolizer JSON format to include inlining
information. This Turbolizer update, however, is intended to be backwards
compatible with the JSON format Turbolizer generated before the JSON
format change.


Bug: v8:7327
Change-Id: Ic67506a6f3a36fe98c012b1e76994972779c1fd2
Reviewed-on: https://chromium-review.googlesource.com/1032784
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53213}
2018-05-16 13:43:14 +00:00
Sergiy Byelozyorov
4b6263be32 Reland "[tools] Add benchmark owners to the config"
This is a reland of 989285b7a0

Original change's description:
> [tools] Add benchmark owners to the config
>
> R=machenbach@chromium.org
>
> No-Try: true
> Bug: chromium:826280
> Change-Id: Ic34d13170dfecdd9e791974a34c33ba0248c7a38
> Reviewed-on: https://chromium-review.googlesource.com/1053809
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53138}

R=machenbach@chromium.org

No-Try: true
Bug: chromium:826280
Change-Id: Ie61892c80d5ce004703d3e769abd58c4f2af1eec
Reviewed-on: https://chromium-review.googlesource.com/1057092
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53212}
2018-05-16 13:39:34 +00:00
Sigurd Schneider
c43d79f86d [turbolizer] Add inlining information to --trace-turbo
Bug: v8:7327
Change-Id: Ic00291784e982632b15cd83059397b6e9e4c4f79
Reviewed-on: https://chromium-review.googlesource.com/1057487
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53211}
2018-05-16 13:22:24 +00:00
jgruber
5999f8f1fc [regexp] Do not assume fast regexp results are non-empty
It is possible for user code to modify fast regexp result objects
before they are used e.g. by RegExp.p.match, so we may not make any
assumptions about their contents. The only exception is when the
RegExp itself is fast.

Bug: chromium:843022
Change-Id: I14eafbdfb2b2ced609da1391b57c73cbe167f7fb
Reviewed-on: https://chromium-review.googlesource.com/1061455
Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53210}
2018-05-16 13:06:14 +00:00
Camillo Bruni
05bcb12e55 Flush ICache on startup deserialization after marking memory executable
Tentative fix for Android invoke crashers with write protection code
enabled.

Bug: chromium:842862
Change-Id: If238b25b239b50c597f3745aa683f564a717434f
Reviewed-on: https://chromium-review.googlesource.com/1061513
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53209}
2018-05-16 13:01:55 +00:00
Clemens Hammacher
c865c9f56e [wasm] Fix naming to distinguish memory from code space
The term memory usually refers to the wasm memory. In the
{NativeModule}, we store pools for allocated and available code space.
This CL changes naming to make clear that this is code space and not
memory.

R=titzer@chromium.org

Bug: v8:7754
Change-Id: I195bf5c9227ad246af302ae1e98f9c839a02adbf
Reviewed-on: https://chromium-review.googlesource.com/1061495
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53208}
2018-05-16 12:53:34 +00:00
Andreas Haas
63bd3a88c5 [turbofan] Increase the number of inputs for Binop instructions further
In WebAssembly benchmarks I saw Binop instructions with 6 inputs. We
don't know how many inputs there can actually be, so we conservatively
increase the number to 8 now.

R=jarin@chromium.org
Bug=chromium:842501

Change-Id: Id087481e7e524006c2f03fc545f9e35d1cad1fe8
Reviewed-on: https://chromium-review.googlesource.com/1061114
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53207}
2018-05-16 12:04:34 +00:00
Benedikt Meurer
0f3b19f436 [ic] Remove obsolete IC::FrameDepth.
The CallIC class is obsolete and unused for a long time, and the
IC::FrameDepth was only there to support the additional frame
that was imposed by the CallFunctionStub. All of that is long gone, so
we don't need that here.

Bug: v8:7754
Change-Id: Ic82f68b325e3e10e285e30111053ffffd547f965
Reviewed-on: https://chromium-review.googlesource.com/1061354
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53206}
2018-05-16 11:44:14 +00:00
Marja Hölttä
1950cf7f18 [iwyu] objects.h iwyu
BUG=v8:7490

Change-Id: I53888e391a0ad25407e59431b2fffbd7cacf5273
Reviewed-on: https://chromium-review.googlesource.com/1060060
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53205}
2018-05-16 11:38:44 +00:00
Sergiy Byelozyorov
a2c8169851 Update V8 DEPS.
Rolling v8/build: b61b6b6..03f39fd

Rolling v8/buildtools: 0b71401..e754647

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e853531..d8600cc

Rolling v8/third_party/depot_tools: d1de725..8de3800

Rolling v8/tools/clang: 51de78a..a67a084

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

Change-Id: I09efa7ed11e7f575c4f02746b39e151ebf8c2698
Reviewed-on: https://chromium-review.googlesource.com/1061093
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53204}
2018-05-16 10:47:58 +00:00
Daniel Clifford
3d2cb0b4ae [torque]: Implement Generics for Builtins and Macros
Including specialization, e.g.:

  // Declare parameterized generic
  macro GenericMacroTest<T: type>(param: T): Object {
    return Undefined;
  }

  // Declare specialization of generic
  GenericMacroTest<Object>(param: Object): Object {
    return param;
  }

  ...
  assert(GenericMacroTest<Smi>(0) == Undefined);
  assert(GenericMacroTest<Smi>(1) == Undefined);
  assert(GenericMacroTest<Object>(Null) == Null);
  assert(GenericMacroTest<Object>(False) == False);
  ...

Known issue: specialization doesn't rigorously checked to verify
that specialization signature precisely matches generic declaration.

Change-Id: I9d9d96da4c5c8c9a76550844680e9e133a5edaed
Reviewed-on: https://chromium-review.googlesource.com/1043986
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53203}
2018-05-16 10:29:48 +00:00
Camillo Bruni
c1928181d1 [factory] Flush instructions as late as possible
As my mum used to say: When it comes to flushing, later is better than early.

Tentative fix for Android invoke crashers with write protection code
enabled.

Bug: chromium:842862
Change-Id: Ib37115883a6fa615c9514aeb543dc3527335803a
Reviewed-on: https://chromium-review.googlesource.com/1059673
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53202}
2018-05-16 09:43:25 +00:00
Sigurd Schneider
e0059db555 [turbofan] Add --trace-turbo-filter
This adds a filter option for --trace-turbo, --trace-turbo-graph
and --trace-turbo-scheduled. The filter is a pattern that matches
function names in this way:
   "*"      all; the default
   "-"      all but the top-level function
   "-name"  all but the function "name"
   ""       only the top-level function
   "name"   only the function "name"
   "name*"  only functions starting with "name"
   "~"      none; the tilde is not an identifier

Bug: v8:7761
Change-Id: I7e8e726023f2c72754b0dd691d790af20b022fd3
Reviewed-on: https://chromium-review.googlesource.com/1059774
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53201}
2018-05-16 09:33:15 +00:00
Miran.Karic
42027031dc MIPS: Fix liftoff bit shift operations.
The problem occurs when getting an unused register causes spilling, but
the generated code is not executed because of a branch, resulting in
loss of data.

BUG=
TEST=cctest/test-run-wasm/RunWasmLiftoff_I64Sh*

Change-Id: Icdb897df42059ed27bec57fcf91cc8338e4598f3
Reviewed-on: https://chromium-review.googlesource.com/1060213
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53200}
2018-05-16 08:51:30 +00:00
Simon Zünd
154f0cb381 [array] Refactor sort pre-processing into a single runtime function.
This CL consolidates CopyFromPrototype and RemoveArrayHoles into a
single runtime function. It also creates two small helper functions
that are needed in both pre-processing steps.

Additionally it removes the return value from CopyFromPrototype since
it is no longer needed (it was previously used by a sort post-
processing step that no longer exists).

Bug: v8:7382
Change-Id: I7f9b00c1bc639d2118fdecef9c3b45c2cf010310
Reviewed-on: https://chromium-review.googlesource.com/1051887
Commit-Queue: Simon Zünd <szuend@google.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53199}
2018-05-16 08:50:26 +00:00
ray glover
d22b125a0c Document --module option for d8
- I think d8's ability to load es6 modules is important enough to
document through the CLI
- I also tried to simplify the d8/shell CLI synopsis

This is my first patch; I can't run the automated test suite.

Change-Id: I6376542f57f11dd8ec53be9b53f3d17d46a86fed
Reviewed-on: https://chromium-review.googlesource.com/1056530
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53198}
2018-05-16 07:35:46 +00:00
Vaclav Brozek
be5cfb2295 Fix array.indexOf for negative fromIndex
Array.indexOf accepts an optional fromIndex argument. When non-negative,
this argument restricts the searched indices to those starting at
fromIndex:
[1, 2, 1].indexOf(1,1) == 2
When negative, it is meant to be added to the array length to provide
such initial index for the search:
[1, 2, 1].indexOf(1, -2) == 2

This transformation has been done by the non-optimised builtin but not
by the reducer. The CL adds this construction to the reducer.

Bug: chromium:842612
Change-Id: I0ff089997f4ebb4dc3c2923e52c382a8a96cd711
Reviewed-on: https://chromium-review.googlesource.com/1059628
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53197}
2018-05-16 07:31:46 +00:00
Dan Elphick
7485b1296b [heap] Start making ReadOnlySpace Pages relocatable
Adds Page::MakeHeaderRelocatable that clears pointers to objects
outside the space. In this case relocatable means the entire page
heading is position independent in memory, meaning it could be saved to
disk and reloaded at a different memory location in a new process
without there being any invalid pointers.

Currently this only affects mutex_, locate_tracker_ and reservation_.

Additionally makes VerifyHeap work when there's no mutex in a Page.

This is just a stepping stone to making the Pages headers relocatable
since heap_ and owner_ still point out of the Page.

Also removes the empty ReadOnlySpace destructor.

Bug: v8:7464
Change-Id: Ife3c06575fa73a5818c4991fb9bec30a5f43901d
Reviewed-on: https://chromium-review.googlesource.com/1054879
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53196}
2018-05-16 07:25:26 +00:00
Georg Neis
b1fb9e9002 [serializer] Fix ExternalReferenceEncoder::NameOfAddress.
This function didn't account for addresses of api-provided external
references, leading to out-of-bound reads on external_reference_table.
(This happened to me when printing a code object in gdb, I'm not sure
how to easily test it.)

Also remove an unused method from the private Value class.

R=jgruber@chromium.org

Change-Id: Id14fed3fb3866df750bcad8f4a02c61748b07ad3
Reviewed-on: https://chromium-review.googlesource.com/1060035
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53195}
2018-05-16 07:17:16 +00:00
jgruber
50b2ecf9af [builtins] Reduce lifetime of builtins constant table builder
Code generation introduces indirections if a builder exists (and the
serializer is active). These indirections are not necessary outside of
embedded builtins (e.g. in bytecode handlers), so let's reduce its
lifetime.

Bug: v8:6666
Change-Id: I57207012997786f599f79f0982da61eea26f3e22
Reviewed-on: https://chromium-review.googlesource.com/1059114
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53194}
2018-05-16 06:46:46 +00:00
Nebojsa Ciric
ab72273692 Implementing Intl.Locale proposal.
https://github.com/tc39/proposal-intl-locale

Rename locale property to baseName to better reflect the intented use case and the change in spec.

TBR: bmeurer@chromium.org
Bug: v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I91b630b49ce73abcebd6040ec968c91d75cff879
Reviewed-on: https://chromium-review.googlesource.com/1014411
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53193}
2018-05-15 22:25:02 +00:00
Wez
aca333123d [heap] Replace retained_size() with ExternalBackingStoreBytes().
ArrayBuffer memory allocated off-heap was previously tracked by a test-
only retained_size() field on each LocalArrayBufferTracker.

Changes in off-heap ArrayBuffer memory usage are now reported to the
Space with which the ArrayBuffer is associated, so that the value is
cheaply available to include in e.g. GC limit calculations, via a new
getter, ExternalBackingStoreBytes().

Changes to external ArrayBuffer backing-store allocations are tracked in
an AtomicNumber associated with each Space, to allow for ArrayBuffers
being concurrently moved or freed from multiple Pages in the same Space
during sweeps & compactions.

Bug: chromium:837583
Change-Id: I8b1b6addd5cd05533d8da55ca813e134bc36e181
Reviewed-on: https://chromium-review.googlesource.com/1052347
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53192}
2018-05-15 21:04:42 +00:00
Clemens Hammacher
3b59a3dd4a [wasm] Refactor all call targets to be Addresses
With the introduction of a jump table, call targets will not be
{WasmCode} objects any more. Instead, we just call any {Address}.
This CL does not change anything yet, but changes interfaces to accept
an {Address} instead of {WasmCode*}.

R=titzer@chromium.org

Bug: v8:7758
Change-Id: Id299738bb7cc6a1891e4a03d7f67c24cde6d1699
Reviewed-on: https://chromium-review.googlesource.com/1058793
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53191}
2018-05-15 17:55:50 +00:00
Clemens Hammacher
37e9017f8e [wasm] Use correct instance when calling start function
We were always using the instance we were currently building. If the
start function is an exported wasm function of another instance, use the
exporting instance instead.

R=titzer@chromium.org

Bug: chromium:843120
Change-Id: I141d272b947bef8e903be7208ddf6ce344e754c4
Reviewed-on: https://chromium-review.googlesource.com/1059620
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53190}
2018-05-15 16:17:29 +00:00
jgruber
b9df312346 Refactor RelocIterator constructors
The (currently four, soon five) RelocIterator constructors contain
basically identical logic. Refactor that into a basic version that all
other constructors call.

Bug: v8:6666
Change-Id: Ice7b4891d5e539ff6fe63337fc52d480d85dc270
Reviewed-on: https://chromium-review.googlesource.com/1059109
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53189}
2018-05-15 15:19:19 +00:00
Igor Sheludko
41e7e17338 [heap-stats] Also collect object field stats.
In particular:
* number of pointer fields
* number embedder fields
* number boxed fields
* number of unboxed double field
* number of raw data fields

Bug: v8:7703
Change-Id: I22a310d941317a0f34f67536e55fbfab5f5354cd
Reviewed-on: https://chromium-review.googlesource.com/1056532
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53188}
2018-05-15 14:59:16 +00:00
Clemens Hammacher
d171ed411a [wasm] Add tests for re-importing into different instances
Since the code around that is quite fragile, and I plan to refactor it,
just add some tests to ensure that everything is and keeps working as
intended.

R=mstarzinger@chromium.org

Bug: v8:7758
Change-Id: Ib3814b93b465286d70b5669ed0161eecb9fc925a
Reviewed-on: https://chromium-review.googlesource.com/1059616
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53187}
2018-05-15 14:52:26 +00:00
Tobias Tebbi
b5708d9249 [build] Disable sysroot on gcov coverage builder
The sysroot only contains headers for gcc6, not gcc4.8 which is the version installed on the coverage bots.

Bug: chromium:837238
Change-Id: Ifd9b53dae510b969b4ef5ec8c1c2684eb92a94fa
Reviewed-on: https://chromium-review.googlesource.com/1059150
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53186}
2018-05-15 14:03:06 +00:00
Clemens Hammacher
fa569391bd [wasm] Disambiguate {ImportedFunctionEntry::set} methods
{ImportedFunctionEntry} offers two {set} methods: One takes a
{JSReceiver*}, the other one a {WasmInstanceObject*}. Since
{WasmInstanceObject} inherits from {JSReceiver}, it's quite easy to
confuse the two if the instance is hold as e.g. {JSObject}.
Hence, rename the methods to remove this ambiguity.

R=titzer@chromium.org

Bug: v8:7758
Change-Id: I06617a565faa561d3afc70085e0df3b528c715bb
Reviewed-on: https://chromium-review.googlesource.com/1059147
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53185}
2018-05-15 12:57:14 +00:00
Clemens Hammacher
7696972ec3 [wasm][cleanup] Name interpreter entry consistently
The interpreter entry was sometimes referred to as "interpreter stub"
or "interpreter wrapper". Use the term "interpreter entry" consistently.

R=titzer@chromium.org

Bug: v8:7754
Change-Id: Ia06449c91300fca454c6afd5c82a789749d6b7d0
Reviewed-on: https://chromium-review.googlesource.com/1058794
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53184}
2018-05-15 12:53:44 +00:00
Marja Hölttä
6a0ff91c31 [in-place weak refs] Add MaybeObject::Print.
BUG=v8:7308

Change-Id: I12a38a6099f0ffd8718dc5cb77433baa75bc0411
Reviewed-on: https://chromium-review.googlesource.com/1059110
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53183}
2018-05-15 12:23:54 +00:00
Clemens Hammacher
7631358e34 [wasm] Reuse information from wasm-linkage.h
For generating the WasmCompileLazy builtin, we need to know the list of
parameter registers in wasm. Instead of duplicating this, just use the
existing array from wasm-linkage.h.

R=titzer@chromium.org

Change-Id: Ib552af7b6a3defbc9c8b48390244bf943306a4b7
Reviewed-on: https://chromium-review.googlesource.com/1057310
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53182}
2018-05-15 12:06:34 +00:00
sreten.kovacevic
8ae28f3276 [Refactor][mips] Refactor liftoff MIPS files
Since `at` register is used a lot in macro-assembler-mips, change
usage of this register with `kScratchReg` and `kScratchReg2`.
Also, remove TODO comments for unaligned memory access, since there
is nothing that can be done about it.

Change-Id: Ibf55c04a1f53521f34dfb483294de3010a0120c6
Reviewed-on: https://chromium-review.googlesource.com/1059347
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53181}
2018-05-15 11:51:54 +00:00
Marja Hölttä
b9d80c01e3 [in-place weak refs] Better CSA asserts.
Moving asserts from helpers to the call sites, so the failure messages are more
helpful.

BUG=v8:7308

Change-Id: I1da491d408c2e2a1017b1d3fe484b7b3d877a2cf
Reviewed-on: https://chromium-review.googlesource.com/1058802
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53180}
2018-05-15 10:58:51 +00:00
Sergiy Byelozyorov
54e5224590 [tools] Add dep on depot_tools and use it from release scripts
This is needed since depot_tools may not be in PATH on LUCI bots. Using the copy
of depot_tools that contains the recipes is also incorrect as it is not
guaranteed to contain binaries that do not have corresponding recipe API, which
does not apply to script called from a recipe. This also protects our release
scripts from breaking due to arbitrary changes to depot_tools.

Chromium also pins depot_tools for similar reasons:
https://cs.chromium.org/chromium/src/DEPS?l=525&rcl=f24fa931ae08b0e42aae2d13034229088179da7f

R=machenbach@chromium.org

Bug: chromium:831171
Change-Id: I393052b1c489d25e2e3fa173149635448e9bd2dc
Reviewed-on: https://chromium-review.googlesource.com/1054676
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53179}
2018-05-15 09:01:59 +00:00
Marja Hölttä
6c78bd9a1e [in-place weak refs] Replace PropertyCell handlers in FeedbackVector.
BUG=v8:7308

Change-Id: I7720dbc84ce3e614f025759224e2d8d7ffa7a952
Reviewed-on: https://chromium-review.googlesource.com/1052013
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53178}
2018-05-15 09:00:53 +00:00
Théotime Grohens
c79feb8aa3 Add a first performance test for DataView
and comparison with a JS implementation using TypedArray

Change-Id: Ifec9c19f23e182db25ad3e54edc3f60c6e6048f4
Reviewed-on: https://chromium-review.googlesource.com/1057729
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53177}
2018-05-15 08:45:54 +00:00
Michael Achenbach
1b0641577b Update V8 DEPS.
Rolling v8/build: 1fd2d08..b61b6b6

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3059fd7..e853531

Rolling v8/third_party/googletest/src: a6f06bf..045e7f9

Rolling v8/tools/clang: de94aab..51de78a

Also added fixes for fuchsia-sdk and additional DEPS entry.

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

Bug: chromium:840669
Change-Id: Ic0370c56e98118780f02758e5ea057bb9026bacd
Reviewed-on: https://chromium-review.googlesource.com/1049305
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53176}
2018-05-15 08:40:54 +00:00
Kanghua Yu
0b4643b732 [x64] Add conditional jumps with Code targets
Change-Id: I647a1c175fb1a4f6fa764cc68c7b9c94d3b65817
Reviewed-on: https://chromium-review.googlesource.com/1053688
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53175}
2018-05-15 08:37:33 +00:00
Sergiy Byelozyorov
0e37130bce [tools] Describe sorting rules and format the file according to them
This will aid with quickly finding the needed builder and verifying whether a
given test definition is already present or not.

R=machenbach@chromium.org

No-Try: true
Change-Id: I5a9b74925fa2bfb27f29434bb43045394b20cf18
Reviewed-on: https://chromium-review.googlesource.com/1053772
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53174}
2018-05-15 08:34:23 +00:00
Simon Zünd
a410e9e441 [torque] Emit labels only if they are used.
This CL changes the generated C++ code for LabeledStatementBlocks to
only emit labels if they are used.

Prior to this CL, when a label was only used on one path of an
if constexpr expression, and not at all anywhere else,
the try/label construct would BIND a label that was not used,
causing a CSA verification error.

R=tebbi@chromium.org

Change-Id: Ia81a0cd081b84528c95bbdbdb98b9ab51928e13f
Reviewed-on: https://chromium-review.googlesource.com/1057247
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53173}
2018-05-15 08:29:33 +00:00
Michael Achenbach
632ceb4d6d [build] Disable custom libcxx on gcov coverage builder
NOTRY=true
TBR=sergiyb@chromium.org

Bug: chromium:837238
Change-Id: Ib10cb178b707eace50d77d20a732a106904167fb
Reviewed-on: https://chromium-review.googlesource.com/1058790
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53172}
2018-05-15 06:46:03 +00:00
Kanghua Yu
3302242667 Reland "[turbofan][x64] Reduce compare-zero followed by flags-setting binop"
On IA architecture, arithmetic and shifting operations set the flags
according to the computation result.

    subl rsi,0x1
    REX.W movq rbx,[rbx+0x17]
    cmpl rsi, 0                       <-- TO BE REDUCED
    jnz 0x3f54d2dcef0
==>
    REX.W movq rbx,[rbx+0x17]
    subl rsi,0x1
    jnz 0x3f54d2dcef0
&
    orl rdx,rbx
    cmpl rdx,0x0                      <-- TO BE REDUCED
    jnz 0x3f54d22b0f5
==>
    orl rdx,rbx
    jnz 0x3f54d22b0f5

Bug: chromium:842497, chromium:842501
Change-Id: I4e2c40861b76ac3f508b01ee27249e85eab3222f
Reviewed-on: https://chromium-review.googlesource.com/1057351
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kanghua Yu <kanghua.yu@intel.com>
Cr-Commit-Position: refs/heads/master@{#53171}
2018-05-15 06:40:13 +00:00