Commit Graph

55138 Commits

Author SHA1 Message Date
Frederik Gossen
fa7c0ed288 [wasm-hints] Resolve Performance Problem
Locks for compilation state callbacks and for the native module are
again taken one after the other. As a consequence, publishing compiled
Wasm code again happens in parallel. Compile times are now comparable to
before lazy hints were enabled.

Bug: chromium:949050
Change-Id: I45c52254d046de080938bd131fd3ed8116660bef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552787
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60646}
2019-04-05 11:07:00 +00:00
Clemens Hammacher
7d714b61b4 Revert "[regalloc] Enable control flow aware allocation"
This reverts commit 1fb26d837f.

Reason for revert: Flushes out TSan issues: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/25782

Original change's description:
> [regalloc] Enable control flow aware allocation
> 
> This is a test to see how much and where we regress. We have seen
> some quirks of our current allocator that do not show up in this
> new approach, so we need to decide whether to stabilize the new
> allocation scheme. Performance numbers are a key indicator for that
> decision.
> 
> This patch is intended to be reverted after stability and performance
> numbers are in (i.e. after a few days).
> 
> Change-Id: I8df8ff7de8efa82a8abbdfa1d21d7877756f129e
> Bug: v8:9088
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552786
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60643}

TBR=mstarzinger@chromium.org,jarin@chromium.org,sigurds@chromium.org

Change-Id: Ia1934b01b0909479b2bd52ba686cc9b3fb364b4b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9088
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554682
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60645}
2019-04-05 10:37:32 +00:00
Georg Neis
31af63a49b [turbofan] Fix another bug in InferHasInPrototypeChain
Bug: v8:9087
Change-Id: Ia806686b47f0e6ddc89f6b043df65ab8a931bbf8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552798
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60644}
2019-04-05 10:10:20 +00:00
Sigurd Schneider
1fb26d837f [regalloc] Enable control flow aware allocation
This is a test to see how much and where we regress. We have seen
some quirks of our current allocator that do not show up in this
new approach, so we need to decide whether to stabilize the new
allocation scheme. Performance numbers are a key indicator for that
decision.

This patch is intended to be reverted after stability and performance
numbers are in (i.e. after a few days).

Change-Id: I8df8ff7de8efa82a8abbdfa1d21d7877756f129e
Bug: v8:9088
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552786
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60643}
2019-04-05 09:41:31 +00:00
Deepti Gandluri
a0a47b25a8 [wasm] Use auto* for memory_tracker pointer
Change-Id: I453c356a6d9098739e7bf32d3c7a75c8afb7cab2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554106
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60642}
2019-04-04 22:23:29 +00:00
Deepti Gandluri
b0077b3b50 [wasm] Move is_growable from JSArrayBuffer object to AllocationData
Some state related to WasmMemories is cached on the JSArrayBuffer
object (is_growable, is_wasm_memory). The problem with this is in
some PostMessage flows, this information can get lost depending on
how JSArrayBuffers are deserialized. In this particular case when
the WasmMemory is postMessaged, it goes through the Blink
DedicatedWorkerMessagingProxy::PostMessageToWorkerGlobalScope flow,
which reconstructs the ArrayBuffer from the backing store, and size,
and loses the is_growable flag, leading to a failure to grow memory.

Moving the is_growable flag so that AllocationData can be the source
of truth for all wasm memory state, and is consistently preserved
across PostMessage.

Change-Id: I775f66ddeff68b8cafc18b75ca5460dfb0343c8b
Bug: v8:9065
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549789
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60641}
2019-04-04 21:11:39 +00:00
Jaroslav Sevcik
4a68b29c1c Fix Map::TryUpdate assertion.
This makes the DCHECK consistent with the map updater.
See https://cs.chromium.org/chromium/src/v8/src/map-updater.cc?l=330&rcl=5671f8b940b0fcdb550e318e449ded0f866e935a

Bug: chromium:949435
Change-Id: Id4fef60cdca094e638a1db38878953ecb2422c4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552797
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60640}
2019-04-04 19:27:29 +00:00
Daniel Clifford
62a3280563 [torque] Indexed class field initialization
Indexed fields in classes can now be initialized using iterators
and a spread syntax, e.g.:

  class Foo {
    length: Smi;
    elements[length]: Object;
  }

  new Foo{length: 5, elements: ...iter};

where iter implements Torque's iterator protocol. This protocol
requires the definition of a method with the following signature:

  Next(): <type> labels NoMore;

Where <type> is the Torque type of the values to be iterated.
In the case of indexed field initialization, the type must be
the field's type or a subtype thereof.

Field initialization with spread is desugared into a loop that
calls the spread iterator's Next method and assigns each
returned value in order to the corresponding indexed field
element.

The general machinery for the spread syntax has been added to
the ast and parser, however, it can currently only be used in
the specific context of indexed field initialization. Spread
operators used in any other context will cause an error.

Bug: v8:7793
Change-Id: If071e61db8166573c28d13318879c88ba96f6d98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550407
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60639}
2019-04-04 17:58:59 +00:00
Sigurd Schneider
75ae54c55b [cctest] Add V8_EXPORT_PRIVATE for cctest (objects part)
Bug: v8:9020

Change-Id: I1b9f3c0c805709c6570785ec9f1045f21c9d03e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541048
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60638}
2019-04-04 14:32:38 +00:00
Michael Achenbach
20affe42ed [build] Fix using goma on gcc builder
TBR=sergiyb@chromium.org
NOTRY=true

Bug: chromium:933093
Change-Id: Iaf703f9f9743c508c1f63301a74a1076286fab79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552792
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60637}
2019-04-04 13:35:28 +00:00
Michael Achenbach
1646dbe05d [build] Enable goma back on gcc builder
TBR=sergiyb@chromium.org
NOTRY=true

Bug: chromium:933093
Change-Id: Idff6d4bdee2192eea895ca044c5a529e3638e908
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552789
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60636}
2019-04-04 13:01:21 +00:00
Clemens Hammacher
9e703c7f87 [wasm][gc] Add missing code ref scope for noembed builds
R=mstarzinger@chromium.org

Bug: v8:8217
Change-Id: I91534149f6a1d4cb4bf2beccc7ab53d75e677024
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552780
Auto-Submit: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60635}
2019-04-04 12:33:50 +00:00
Michael Achenbach
edc43675b3 Revert "[test] Skip tests blocking DEPS roll"
This reverts commit c652b5a124.

Reason for revert: Clang roll detecting this failures was reverted.

Original change's description:
> [test] Skip tests blocking DEPS roll
> 
> NOTRY=true
> 
> Bug: v8:9086
> Change-Id: I1a430c12d5ddccb17931fa32f45463b7d8992971
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552005
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60624}

TBR=machenbach@chromium.org,sigurds@chromium.org,jshin@chromium.org,sergiyb@chromium.org

Bug: v8:9086
Change-Id: I083c9b4c037bdae1bc0bfbd872bc73b931fbb853
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552785
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60634}
2019-04-04 12:22:10 +00:00
Maciej Goszczycki
149d92a828 [cleanup] Remove unused heap_iterator_depth counter
Bug: v8:8834
Change-Id: I763869297e52baf1142f89f0567441c05e00391c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552784
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Cr-Commit-Position: refs/heads/master@{#60633}
2019-04-04 12:16:20 +00:00
Michael Starzinger
5128ca0fd7 [wasm] Simplify access to Isolate in the interpreter.
R=clemensh@chromium.org

Change-Id: I643d9a142e55405ec010cfe56915527e3cff2d6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552783
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60632}
2019-04-04 12:00:02 +00:00
v8-ci-autoroll-builder
dec0de701b Update V8 DEPS.
Rolling v8/build: 6fdec9f..96d2ee3

Rolling v8/buildtools: 235be3c..218cb3d

Rolling v8/buildtools/third_party/libc++/trunk: 955113d..fbddc46

Rolling v8/tools/clang: 95a9e86..25ef1f6

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

Change-Id: Ifcda76b2b210ba6bfdee10170e042b5dbfff6d01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551412
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@{#60631}
2019-04-04 11:02:31 +00:00
Clemens Hammacher
8a35265ac4 [base] Remove safe_math headers
We only use the safe math helpers (CheckedNumeric<T>) in very few
places. The headers are huge though, and complex. They are pulled in to
839 of our object files, increasing compilation time.

I also find the implicit checks more easy to understand than the complex
logic in CheckedNumeric.

Thus, this CL removes the safe_math headers and implements bounds
checks for the five uses explicitly.

R=jkummerow@chromium.org, mlippautz@chromium.org

Bug: v8:8834
Change-Id: I2d60f95799ee61cfa161354428605f67829cd736
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547651
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60630}
2019-04-04 10:51:51 +00:00
Sigurd Schneider
ef2eb9337e [cctest] Add V8_EXPORT_PRIVATE for cctest (src/interpreter part)
Bug: v8:9020
Change-Id: Ic949775e018d2bad08fc36db8cdf912df3d67e65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552779
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60629}
2019-04-04 10:33:52 +00:00
Sigurd Schneider
f72b919b41 [cctest] Add V8_EXPORT_PRIVATE for cctest (src/ part)
Bug: v8:9020

Change-Id: Ie624a02598f5c3a43e40e03d0337c17ca5cc3769
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541052
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60628}
2019-04-04 09:23:59 +00:00
Georg Neis
c5e4df3754 Remove a redundant condition in LookupIterator
It's implied by the last clause of the conjunction.

Change-Id: I78a810a259888eda696c77cd6c117b35ef9e861a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549171
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60627}
2019-04-04 08:59:49 +00:00
v8-ci-autoroll-builder
3e71841f18 Update V8 DEPS.
Rolling v8/build: c2f2e5a..6fdec9f

Rolling v8/buildtools: 459baaf..235be3c

Rolling v8/buildtools/linux64:gn/gn/linux-amd64: https://chrome-infra-packages.appspot.com/gn/gn/linux-amd64/+log/git_rev..git_rev

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e1fc0b0..63e0762

Rolling v8/third_party/depot_tools: 865445e..b8268ca

Rolling v8/tools/clang: b823d94..95a9e86

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

Change-Id: Ie516f9c71b9709b86def577369702ae149744091
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552157
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60626}
2019-04-04 08:42:19 +00:00
Frank Tang
a21eba523a Roll test262
Rolling v8/test/test262/data: 324f291..6119191

Bug: v8:7834
Change-Id: I2ff745e709727d80ad6be6e910b1896adf78d3db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551406
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60625}
2019-04-04 08:01:34 +00:00
Michael Achenbach
c652b5a124 [test] Skip tests blocking DEPS roll
NOTRY=true

Bug: v8:9086
Change-Id: I1a430c12d5ddccb17931fa32f45463b7d8992971
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552005
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60624}
2019-04-04 07:52:54 +00:00
tzik
a487167ca1 Cancel EnqueueMicrotask on detached contexts
Context::microtask_context can be null after v8::Context::DetachGlobal
is called, and that should cancel microtasks that are associated to
the detached context.
However, there are several callers left without the null check to the
microtask queue, and that causes crashes.

This CL adds the null check and cancellation as the crash fix.

Bug: chromium:937784
Change-Id: Ie8d107f28f200cee6e75798e3f72c5ed7a2a461c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545139
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60623}
2019-04-04 07:10:11 +00:00
Tobias Tebbi
e87e3b1fa9 [torque] named arguments for constructors
This changes the syntax for constructing structs and classes to explicitly
mention the fieldnames, similar to JavaScript object literals.
The fields still have to be listed in the same order as in the struct/class
declaration.
As in Javascript, {foo: foo} can be abbreviated as {foo}.

Example:

macro NewJSArray(implicit context: Context)(
    map: Map, elements: FixedArrayBase): JSArray {
  return new JSArray{
    map,
    properties_or_hash: kEmptyFixedArray,
    elements,
    length: elements.length
  };
}

Drive-by cleanup: Make struct and class constructors follow the same pattern
                  in the parser and the AST.

Bug: v8:9018 v8:7793
Change-Id: I22ff7f68270e4f406aa80731a709d41ea52f52bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551999
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60622}
2019-04-04 06:26:51 +00:00
Benedikt Meurer
ecec2c61e7 [turbofan] Only record samples for TurboFan stats with high-res timers.
Don't record samples from machines without high-resolution timers,
as that can cause serious reporting issues. See the thread at
http://g/chrome-metrics-team/NwwJEyL8odU/discussion for more details.

Bug: v8:9074
Change-Id: I8f9b588b249f944c4bc95feedf56960b28db9ddc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552001
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60621}
2019-04-04 05:58:51 +00:00
v8-ci-autoroll-builder
329b695d4d Update wasm-spec.
Rolling v8/test/wasm-js/data: 8059cd6..2a28a92

[test] Add dedicated test for memory.size (#997) (Andreas Rossberg)
https://chromium.googlesource.com/external/github.com/WebAssembly/spec/+/2a28a92

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: Idcb9a6f8f57d0e9d3f673d5575e663d729a50366
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1551405
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@{#60620}
2019-04-04 04:38:41 +00:00
Yu Yin
5c208de771 [MIPS64][liftoff] Introduce emit_{i64,i32}_add with immediate
This is port for https://crrev.com/c/1524482
Original commit message:
    This allows immediates to be encoded directly into instructions, rather than
    mov-ing constants to registers first.

    This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
    this approach has been approved.

Bug: v8:9038
Change-Id: I96929f870e54b24403a32428f3db31b42f41087a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545148
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#60619}
2019-04-04 01:07:14 +00:00
Adithya Srinivasan
e26ec8bd2d Revert "Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64""
This reverts commit 42beed975e.

Reason for revert: This commit seems to cause consistent failures in
some ProcessMemoryMetricsEmitterTest tests on Mac and ChromeOS. I'm
not sure what the exact reasoning behind this is. See https://crbug.com/949157.

Original change's description:
> Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64"
>
> This is a reland of 4f051fd5da
>
> Relanding after fixing Chromium issues.
>
> Original change's description:
> > [ptr-compr][x64] Temporarily enable pointer compression on x64
> >
> > ... and make sure that the x64 ptr-compr bots proceed testing V8 without
> > pointer compression in order to keep testing the full pointer mode.
> >
> > Bug: v8:7703
> > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> > Change-Id: Iee725deda813425a6f0722948b54976154f50909
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1497139
> > Reviewed-by: Michael Hablich <hablich@chromium.org>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#60230}
>
> Bug: v8:7703
> Change-Id: Ic2d1c2ae41ec645f34963f5f561c33199c72ef4b
> Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
> Cq-Include-Trybots: luci.chromium.try:fuchsia_x64,linux-rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535819
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60582}

TBR=machenbach@chromium.org,hablich@chromium.org,leszeks@chromium.org,ishell@chromium.org,verwaest@chromium.org

Change-Id: Ib9737081e90dddcfe44af9da1275a610da209323
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7703
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550709
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60618}
2019-04-03 20:13:12 +00:00
Dave Tapuska
81725babe0 [inspector] Don't call prototype's toString on objects.
Just rely on calling toString. This matches other vendor's implementations.

BUG=chromium:948257
R=dgozman@chromium.org

Change-Id: I325a12dd47712263a1ef4deee0bb2de9c4a1c656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545124
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60617}
2019-04-03 20:11:41 +00:00
Frank Tang
bb24140cb3 [Intl] Cutting 43K by removing Unibrow when ICU available
Making 43K of room for landing ICU64.

Size Change (on x64.release)
D8 before 23,683,192
D8 after 23,639,296
Reduce 43,896 bytes

Bugs: v8:8348

Change-Id: I057f7d59e955a2e5e017873e5b3b5daf5b142ae2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1478710
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60616}
2019-04-03 17:58:51 +00:00
Sathya Gunasekaran
46e944dbad [await] Add async iterator tests for await optimization
These tests make sure the ticks are correct when resolving against a
Promise.

Without the optimization, the result is:
"start,tick 1,tick 2,tick 3,tick 4,done,tick 5"

With the optimization, the result is:
"start,tick 1,tick 2,done,tick 3,tick 4,tick 5"

Bug: v8:8267
Change-Id: I6c6499c7c256927531a99bab4ae1c5bd5069ef7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1534884
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60615}
2019-04-03 17:42:51 +00:00
Frank Tang
1022396074 Update test262.
Rolling v8/test/test262/data:
de567d3..324f291

Bug: v8:7834
Change-Id: I31d3ea423078bc14df7cf131f373ba7b661938c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1544904
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60614}
2019-04-03 17:37:41 +00:00
Z Duong Nguyen-Huu
253ce6e188 Port Proxy.revocable to Torque
This is a part of porting Proxy-related builtins to Torque.

Spec: https://tc39.github.io/ecma262/#sec-proxy.revocable
Bug: v8:6664
Change-Id: I5f53eb4dff8ff9d3156b601652f3f86ede25fc1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1529261
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60613}
2019-04-03 17:10:21 +00:00
Sigurd Schneider
4415b1d112 [cctest] Add V8_EXPORT_PRIVATE for cctest (parser part)
Bug: v8:9020

Change-Id: I45f85807132fc9278e90b4cfc7f0dc8326870dfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541046
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60612}
2019-04-03 16:34:11 +00:00
Z Duong Nguyen-Huu
9d2f267f42 Improve test coverage for non-extensible array when possible
Bug: v8:6831
Change-Id: I7d51a49dfbf2e5a1fa2675fe0d70bb4091a4db78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1544274
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60611}
2019-04-03 16:32:01 +00:00
Frederik Gossen
be83fea988 [wasm-hints] Merged Tier Enum
Merged WasmCode::Tier into Execution Tier.

Bug: v8:9003
Change-Id: I0ad439b8bc060f73e71d60ab9c93dd6bc18d05fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547852
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60610}
2019-04-03 16:13:21 +00:00
Clemens Hammacher
aacbab8cb8 [interpreter][cleanup] Using 'using' instead of 'typedef'
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in interpreter code to 'using' declarations.

R=leszeks@chromium.org

Bug: v8:8834
Change-Id: Ide1e8a35a56a840b36b3ceab1307df1bcab94acd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545900
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60609}
2019-04-03 15:30:00 +00:00
Clemens Hammacher
aff3fe3022 [wasm][gc] Activate code ref scopes
This CL enables adding code to the top-most {WasmCodeRefScope} when
either adding code to the {NativeModule} (we have a nice choke point
for that in {PublishCodeLocked}), or when looking up existing code from
a {NativeModule}.
It also enables the DCHECK that for each such operation, there must be
an enclosing {WasmCodeRefScope}.

R=titzer@chromium.org

Bug: v8:8217
Change-Id: Ie93ca0b31b1577bef074923b3d228a9f214a909c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533861
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60608}
2019-04-03 15:26:10 +00:00
Benedikt Meurer
acdeb64c60 [turbofan] Bail out for accesses to fields with representation None.
When TurboFan optimizes field access, we need to check first that the
runtime already determined the correct field representation properly.
If the field representation is still None, we cannot optimize this in
TurboFan straight away but we have to call the IC to let the runtime
do the magic.

Bug: chromium:944865
Change-Id: I032a48824e83806e1be7670346f518b258a9dd65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549167
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60607}
2019-04-03 15:07:00 +00:00
Simon Zünd
a330f15b69 [cleanup] Remove 'native' flag from ParseInfo
The native flag is a left-over from self-hosted JavaScript. Currently
only the empty function and empty script are marked native.
This CL removes the native flag from the ParseInfo,
UnoptimizedCompilationInfo and its handling in the bytecode generator.

R=leszeks@chromium.org

Bug: v8:8834,v8:9043
Change-Id: I60726e28ce83cc84249e9c49bdc88d81f0a695c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545079
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60606}
2019-04-03 14:45:00 +00:00
Clemens Hammacher
084207d968 [wasm] Use engine's allocator consistently
Using the Isolate's allocator when creating the WasmModule can lead to
use-after-free situations when the NativeModule is shared across
Isolates.

R=mstarzinger@chromium.org

Bug: v8:9079
Change-Id: I5a564852179cc5b9d4cbad2a002d3b6e14b01968
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550404
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60605}
2019-04-03 14:33:30 +00:00
Benedikt Meurer
ab55cc736f [turbofan] Introduce V8.TurboFan timed histogram counters.
This adds new timed histograms to measure the time that TurboFan spends
on various compilation phases on a per function bases. This includes the
following new counters:

- V8.TurboFanOptimizePrepare
  Time spent in the preparation phase of TurboFan optimization. Recorded
  on each regular optimization of a function.
- V8.TurboFanOptimizeExecute
  Time spent in the execution phase of TurboFan optimization. Recorded on
  each regular optimization of a function.
- V8.TurboFanOptimizeFinalize
  Time spent in the finalization phase of TurboFan optimization. Recorded
  on each regular optimization of a function.
- V8.TurboFanOptimizeTotalForeground
  Total time spent on the main thread during TurboFan optimization.
  Recorded on each regular optimization of a function.
- V8.TurboFanOptimizeTotalBackground
  Total time spent on a background thread during TurboFan optimization.
  Recorded on each regular optimization of a function.
- V8.TurboFanOptimizeTotalTime
  Total time from starting optimizing to installing the code object.
  Recorded on each regular optimization of a function.
- V8.TurboFanOptimizeForOnStackReplacementPrepare
  Time spent in the preparation phase of TurboFan optimization for On
  Stack Replacement (OSR). Recorded on each optimization  for on-stack
  replacement of a function.
- V8.TurboFanOptimizeForOnStackReplacementExecute
  Time spent in the execution phase of TurboFan optimization for On Stack
  Replacement (OSR). Recorded on each optimization  for on-stack replacement
  of a function.
- V8.TurboFanOptimizeForOnStackReplacementFinalize
  Time spent in the finalization phase of TurboFan optimization for On Stack
  Replacement (OSR). Recorded on each optimization  for on-stack replacement
  of a function.
- V8.TurboFanOptimizeForOnStackReplacementTotalTime
  Total time from starting optimizing for On Stack Replacement (OSR) to
  installing the code object. Recorded on each optimization for on-stack
  replacement of a function.

This should give us a good overview and guide/validate future work on
the concurrent optimization pipeline.

Bug: v8:7790, v8:9074
Change-Id: I96573cd1da472684d06624b7573e4afd6efca99c
Doc: http://doc/1umgFxjLQ9p22lVS_BdhmAlo1o9xnxnWlhVi_HMWNktM
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547864
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60604}
2019-04-03 14:26:10 +00:00
Mythri A
128954a884 [interpreter] Omit bounds check for interrupt budget loads in bytecode handlers
With lazy feedback allocation we load the interrupt budget from the
ClosureFeedbackCellArray instead of the bytecode array. The factory method
that constructs the ClosureFeedbackCellArray ensures we have a field for
interrupt budget. So, it is safe to omit bounds check here. Including the
bounds check increases the size of all jump bytecode handlers by around
~120 bytes. This translates to ~9-10KB of the native code size on Android.

Bug: chromium:948835
Change-Id: I8e10b3f630097728ae9e520bfb0d85dfc0f806ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550403
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60603}
2019-04-03 13:49:30 +00:00
Jaroslav Sevcik
c13ae846e1 [turbofan] Introduce fix up phase after memory optimization
On arm processors, we need to have some kind of subexpression
elimination running after memory optimizer, so that we reuse index
calculation for loads and stores. This CL introduces a small cleanup
phase after memory optimizer.

Bug: chromium:947225
Change-Id: Ifda7b348d968d58f31947a4ba139863059f4112d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547664
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60602}
2019-04-03 13:47:25 +00:00
Michael Starzinger
7fccbfe9c3 [wasm] Be more rigorous about {HandleScope} in interpreter.
This seals any surrounding {HandleScope} when the interpreter enters the
main interpreter loop. It ensures that there are no accidental leaks of
handles into the surrounding scope and enforces that operations dealing
with handles open their own scope.

R=clemensh@chromium.org

Change-Id: I43d479129bef60beb7565022b24577f8bf1dc522
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550401
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60601}
2019-04-03 13:46:20 +00:00
Peter Marshall
e3a0aca0b9 [cleanup] Add an iterator to ZonePtrList and use it in some places
Bug: v8:8834
Change-Id: I1d7451a6306bc34e6254383fd79e8411bffd26ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545894
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60600}
2019-04-03 13:33:50 +00:00
Clemens Hammacher
ac8c78e01d [cleanup] Replace underscore by minus in d8 flags
Reading --verify_predictable makes me sad, whereas --verify-predictable
makes me happy. This CL introduces more happiness.

R=machenbach@chromium.org

Bug: v8:8834
Change-Id: Id51a75f32e6d5a2f87aed81e058a8b6dff189758
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550399
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60599}
2019-04-03 12:32:08 +00:00
Michael Starzinger
46a99b07fc [wasm] Add support for "br_on_exn" in the interpreter.
This adds preliminary support for handling the "br_on_exn" opcode in the
interpreter. It also makes "catch" and "rethrow" use a proper exception
reference instead of a dummy value.

To that end this also adds {Handle<>} as a new kind of {WasmValue} which
is intended to pass reference values (e.g. "anyref" or "except_ref") to
the runtime system. Therefore lifetime of such a {WasmValue} is directly
coupled to any surrounding {HandleScope}.

For now we just store {Handle<>} directly on the simulated operand stack
of the interpreter. This is of course bogus, since the surrounding scope
does not outlive the interpreter activation. Decoupling the lifetime of
the operand stack from a {HandleScope} will be done in a follow-up CL.

As a drive-by this change also implements support for the "ref_null" and
the "ref_is_null" opcodes as a proof-of-concept that the new {WasmValue}
is also applicable to the "anyref" reference type.

R=clemensh@chromium.org
TEST=cctest/test-run-wasm-interpreter/ReferenceTypeLocals
BUG=v8:8091,v8:7581

Change-Id: I2307e0689a19c4aab1d67f1ba6742cb3cc31aa3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1550299
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60598}
2019-04-03 12:16:36 +00:00
Daniel Clifford
72269e3fa4 [torque] Remove constexpr from Arguments object type
In the process turn the Torque's Arguments type into a real struct
and add interoperability with it and CSA's CodeStubArguments.

This change is motivated by the desire to include Arguments
in structs (e.g. iterators), which is not possible for constexpr
fields.

Bug: v8:7793
Change-Id: I840538b84c4c58fee75e0b9cd3bdbb3b96a6b948
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549162
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60597}
2019-04-03 12:12:56 +00:00