Commit Graph

51120 Commits

Author SHA1 Message Date
Toon Verwaest
26b47aafb3 [parser] Simplify detecting async arrow functions
Change-Id: I448110b10bb4dafdfb05983db92e06383c2913a3
Reviewed-on: https://chromium-review.googlesource.com/c/1280203
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56628}
2018-10-15 11:22:17 +00:00
Jakob Gruber
cddf5bbdc1 [ia32,root] Initialize kRootRegister and verify through IsolateData
With this CL we finally actually set the root register to the correct
value.  Verification is still preserved by keeping a magic number in
IsolateData.

Bug: v8:6666
Change-Id: I89cb7cb36f977ac677ec33a814a2798baab4cec4
Reviewed-on: https://chromium-review.googlesource.com/c/1278277
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56627}
2018-10-15 10:19:00 +00:00
Georg Neis
4bc1517fe8 [test] Remove dead flags from some tests.
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I37c67adc857ce7dec1a06f580d981a35c474df1c
Reviewed-on: https://chromium-review.googlesource.com/c/1280322
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56626}
2018-10-15 10:00:12 +00:00
Clemens Hammacher
da339e60da [base] Sync Optional implementation to chromium
There were a lot of tweaks and optimizations to chromium's
{base::Optional} implementation. This CL brings us back in sync with
that.
Some changes were needed to make this compatible with C++11 and with
GCC 4.8:
1) Types like std::decay_t and std::enable_if_t were rewritten to
   use std::decay and std::enable_if.
2) Some conditional no_except declarations were removed.
3) std::is_trivially_copy_constructible and
   std::is_trivially_move_constructible are assumed to be false on
   gcc 4 because it's unimplemented there.

R=neis@chromium.org

Bug: v8:8238
Change-Id: Ia0542c0d4d2fd43a2454f639ec5201ad8d8201cd
Reviewed-on: https://chromium-review.googlesource.com/c/1275824
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56625}
2018-10-15 09:36:59 +00:00
Georg Neis
b5e45a285b Turn --concurrent_typed_lowering on by default.
With the flag enabled, that phase runs in the background as part
of OptimizeGraph.

Bug: v8:7790
Change-Id: I313578c113be1fb76dfc315522906178bee1027d
Reviewed-on: https://chromium-review.googlesource.com/c/1268156
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56624}
2018-10-15 08:38:27 +00:00
Georg Neis
be41df9646 [turbofan] Rename "js_heap_broker" to "broker".
There's no ambiguity and the shorter name makes things easier to read.

Bug: v8:7790
Change-Id: Ibcf3fd7f38a91e26a83cd335fad0ec80a5fe9be1
Reviewed-on: https://chromium-review.googlesource.com/c/1278392
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56623}
2018-10-15 08:17:17 +00:00
Benedikt Meurer
63f92a9f31 [turbofan] Fix representation selection of CheckFloat64Hole.
Properly handle the case where the CheckFloat64Hole becomes a
no-op after RETYPE (because the feedback type is already Number).
We always need to pass the Number restriction type here.

Bug: chromium:895199
Change-Id: I96a949ba35db1e6d35abedddc4507c101d95b716
Reviewed-on: https://chromium-review.googlesource.com/c/1278804
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56622}
2018-10-15 07:11:58 +00:00
Jaroslav Sevcik
c59c9c46b5 [turbofan] Fix Math.expm1 builtin typing.
This fixes the typing for the case when the call is not lowered to
the simplified operator.

Bug: chromium:880207
Change-Id: Icecf12de77ece0fe9ffec2777874f5f0004a1e97
Reviewed-on: https://chromium-review.googlesource.com/c/1278642
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56621}
2018-10-15 06:00:03 +00:00
v8-ci-autoroll-builder
937719d531 Update V8 DEPS.
Rolling v8/build: e270920..9578c43

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

Change-Id: I67c5cb1f4f781605098e106289061d4f4e449236
Reviewed-on: https://chromium-review.googlesource.com/c/1279935
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#56620}
2018-10-15 03:33:09 +00:00
v8-ci-autoroll-builder
5688516b83 Update V8 DEPS.
Rolling v8/build: e4c7352..e270920

Rolling v8/third_party/depot_tools: 94faf32..dd78844

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

Change-Id: I7a2eedb4f0271ce281c9722c384add7195e0e38a
Reviewed-on: https://chromium-review.googlesource.com/c/1279925
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#56619}
2018-10-14 03:36:13 +00:00
v8-ci-autoroll-builder
babaaadd76 Update V8 DEPS.
Rolling v8/build: dbb4fad..e4c7352

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c8b97e3..5aac72d

Rolling v8/third_party/depot_tools: 066e110..94faf32

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

Change-Id: I73f0237a1799d01c5dec0df65763300626b19de6
Reviewed-on: https://chromium-review.googlesource.com/c/1279922
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@{#56618}
2018-10-13 03:43:24 +00:00
Bill Budge
9ecd4545fe [api] Add WebAssembly caching API
- Adds embedder callback to notify fully tiered compilation is finished,
  returning a WasmCompiledModule for serialization.
- Adds function to pass previously compiled bytes into WASM streaming
  compilation, for deserialization.
- Plumbs this API through StreamingDecoder.

Bug: chromium:719172
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ibe376f3a8ccfa90fda730ef4ff6628a1532da45c
Reviewed-on: https://chromium-review.googlesource.com/c/1252884
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56617}
2018-10-12 21:34:45 +00:00
Michaël Zasso
98200838a4 [node] check out wasm-js as a dependency
The dependency is not required to build V8 but Node.js needs it for
running mjsunit tests.

Refs: https://github.com/nodejs/node-v8/issues/83
Change-Id: Ieb37acb73e5e2fe417c7d9a16c498565839b7a45
Reviewed-on: https://chromium-review.googlesource.com/c/1278166
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56616}
2018-10-12 19:07:00 +00:00
Jakob Kummerow
913d363c14 [refactoring] Drop roots.h -> handles.h #include
This makes it possible for handles.h to #include objects.h, which
upcoming changes will need.

Bug: v8:3770
Change-Id: I4f500736028668749bb73fb24f9732df757e97d0
Reviewed-on: https://chromium-review.googlesource.com/c/1278487
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56615}
2018-10-12 18:50:02 +00:00
Maya Lekova
71ed3d9b95 [test] Skip flaky user-properties-module test on TSAN
Bug:v8:8303

NOTRY=true

Change-Id: I45da1a1f0f16488610ddabfd0bb88408571fa161
Reviewed-on: https://chromium-review.googlesource.com/c/1278279
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56614}
2018-10-12 16:05:42 +00:00
Benedikt Meurer
b1a9769425 [async] Follow initial promise chains created via Promise#then().
For the --async-stack-traces we can also look through initial parts of
the promise chain that were created by regular Promise#then() calls to
walk up to the first async function frame. This addresses the missing
support for aforementioned example

```js
(async function() {
  await Promise.resolve().then(() =>
    console.log(new Error().stack));
})();
```

which now also works.

Bug: v8:7522
Change-Id: I574943c1fc6ee4a1bd56f208dce78eb7506c5c4f
Reviewed-on: https://chromium-review.googlesource.com/c/1278276
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56613}
2018-10-12 15:49:01 +00:00
Clemens Hammacher
75b5666175 [base] Introduce MutexGuard as typedef for LockGuard<Mutex>
LockGuard is mostly used with Mutex. Since both are defined outside the
internal namespace, we often have to write
{base::LockGuard<base::Mutex>}. This CL shortens this to
{base::MutexGuard} across the code base

R=mlippautz@chromium.org

Bug: v8:8238
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I020d5933b73aafb98c4b72e3bb2dfd07c979ba73
Reviewed-on: https://chromium-review.googlesource.com/c/1278796
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56612}
2018-10-12 15:44:51 +00:00
Sathya Gunasekaran
230dd86ce6 [Class] Fix debug scope iteration for class fields
When trying to print the scope information for the class fields
initializer function, the debugger asks the parser to parse the class
literal as a function literal (to get the scope info) ... which
doesn't quite work.

Instead of adding support for parsing the class literal, we just short
cicruit this parsing step by just returning an empty context.

This works fine because initializer function doesn't have any
variables in it's local scope.

The one caveat is that the objects in the scope above this function
(like the global) are now missing. This trade off is possibly fine
for now, as adding parsing support for class literal to only produce
would be a lot of code for not enough use.

As a follow up to this change, the devtools UI needs to be updated to
handle this empty context cleanly. Currently, it doesn't show the
`this` object if no context exists even if the `this` object is
correctly passed to the UI from the backend.

Bug: v8:5367, v8:8122
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I52965f26241bbf6abdc988783aa0fc44bb36901f
Reviewed-on: https://chromium-review.googlesource.com/c/1274268
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56611}
2018-10-12 14:01:22 +00:00
Maya Lekova
fb23303806 Revert "[test] Skpping flaky object-seal test on TSAN"
This reverts commit b5800a63e3.

Reason for revert: Proper fix has already landed, see https://chromium-review.googlesource.com/c/v8/v8/+/1278386

Original change's description:
> [test] Skpping flaky object-seal test on TSAN
> 
> NOTRY=true
> 
> TBR=machenbach@chromium.org
> 
> Bug: v8:8294
> Change-Id: Ib235139087bd6a651dc8bd43c5f9990e0513c7a5
> Reviewed-on: https://chromium-review.googlesource.com/c/1276627
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56573}

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

Change-Id: I641aa14c2a5c4a4d1db3cde6048cf355b59e4f7c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8294
Reviewed-on: https://chromium-review.googlesource.com/c/1278795
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56610}
2018-10-12 13:45:08 +00:00
Ross McIlroy
823a918240 [CompilerDispatcher] Simplify Abort logic and remove MemoryPressure notifications.
The memory pressure notification logic wasn't correct and given the current users of
the compiler dispatcher aren't posting speculative tasks, it isn't particularly useful.
After removing this, the abort logic can also be simplified significantly by removing the
non-blocking abort logic.

BUG=v8:8041

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I584533b58fb717fdca46cc620822914d6bdb28b8
Reviewed-on: https://chromium-review.googlesource.com/c/1278495
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56609}
2018-10-12 13:28:20 +00:00
Maya Lekova
fa8af5a775 [test] Fix async hooks test which was swallowing a promise rejection
Updated the test so that it uses assertPromiseResult, which makes sure that
a promise rejection is not swallowed. The change is reflected in the actual
async ids, checked in the test.

Bug: v8:8300
Change-Id: Ie227ca74a8cf4e0e079809b21c3abc5a5f87c11a
Reviewed-on: https://chromium-review.googlesource.com/c/1278388
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56608}
2018-10-12 13:14:15 +00:00
Ross McIlroy
84b3b702fd [CompilerDispatcher] Fix unittest flake to avoid posting an idle task after aborted.
There was a small race where an idle task could be posted after the compiler dispatcher
had aborted and the CancellableTaskRunner had been cancelled. This was causing flakyness
on the bots. This fixes this by moving the idle task posting into the same lock block as
the notification to the main thread that the background task has completed.

BUG=v8:8041

Change-Id: I43ca4cea807bfdfeb13f6d1c4a67a4d8a4f6291f
Reviewed-on: https://chromium-review.googlesource.com/c/1278494
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56607}
2018-10-12 11:58:10 +00:00
Michael Starzinger
c3e66ed23e [wasm] Fix {WasmDecoder::OpcodeLength} for rethrow.
R=clemensh@chromium.org
TEST=unittests/WasmOpcodeLengthTest.Statements
BUG=v8:8091

Change-Id: Ia2a01d5c35ace33c9c8a29a8df7b30e3f1e119cc
Reviewed-on: https://chromium-review.googlesource.com/c/1278728
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56606}
2018-10-12 11:56:10 +00:00
Clemens Hammacher
d88bd9a1d2 [Liftoff][cleanup] Use more Register instead of LiftoffRegister
We generally try to use the most specific type, but sometimes we still
used LiftoffRegister even though it's statically known that it always
holds a GP register. Make these uses use Register directly. Note that
the conversion between Register and LiftoffRegister is a noop in
Release builds.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I1cf9aa727fb6fd71bbc1eed77df5e9d01e35ddee
Reviewed-on: https://chromium-review.googlesource.com/c/1278727
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56605}
2018-10-12 11:53:09 +00:00
Ulan Degenbaev
3ace9cde3f Use synchronized accessors for Map::layout_descriptor field.
This fixes a potential data race that can happen when a freshly
allocated layout descriptor is set on an existing map while the
concurrent marker is using the map to visit an object.

Change-Id: If8ff1c9368b24beb15fefe4a78a21e0f0784d2e8
Reviewed-on: https://chromium-review.googlesource.com/c/1278726
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56604}
2018-10-12 11:37:32 +00:00
Hai Dang
c659e944f1 [js-perf-test] Fix spread set benchmark (again).
Change-Id: Iec5e6baff16260317f693188b01230ab0c2bb86f
Reviewed-on: https://chromium-review.googlesource.com/c/1278809
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56603}
2018-10-12 10:50:59 +00:00
Clemens Hammacher
bfa2be86af [wasm] Move WasmGraphBuildingInterface to own cc file
This class was defined in function-body-decoder.cc, but it's not an
implementation of function body decoding, but rather the interface
between the decoder and the WasmGraphBuilder. Hence move it out to its
own file.

R=titzer@chromium.org, mstarzinger@chromium.org

Bug: v8:8238
Change-Id: Ib9bf47e90a3683f578b30b6de74d01da81b2be93
Reviewed-on: https://chromium-review.googlesource.com/c/1278391
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56602}
2018-10-12 10:40:11 +00:00
Marja Hölttä
e91085d366 [comments] Drop references to "harmony egal"
It's obsolete, see
https://web.archive.org/web/20161216045840/http://wiki.ecmascript.org/doku.php?id=harmony:egal

Change-Id: I58a7aa8fcf5dff7e76e5603d42aeb53a994c313d
Reviewed-on: https://chromium-review.googlesource.com/c/1278394
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56601}
2018-10-12 10:39:07 +00:00
Georg Neis
8600209966 [turbofan] Brokerize typed-array element access.
Bug: v8:7790
Change-Id: Ice64279a94b4f25151c1b35da1f3c9c1117d3c80
Reviewed-on: https://chromium-review.googlesource.com/c/1270584
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56600}
2018-10-12 10:34:01 +00:00
Georg Neis
e7a33bd715 [turbofan] Collect Array and Object prototypes upfront.
As part of the standard objects serialization, collect the identities of
the Array prototype and the Object prototype from all native contexts.
This information is then be consulted at compile time instead of having
to call Isolate::IsInAnyContext (which accesses the heap).

Bug: v8:7790
Change-Id: I26a8271afadfce243a8032e4a012f249ce3c2a60
Reviewed-on: https://chromium-review.googlesource.com/c/1275815
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56599}
2018-10-12 10:30:01 +00:00
Mike Stanton
ce1ce547da Correct semantics of memmove on a pointer array for concurrent marking
Yesterday I added a call to memmove in CSA for pointer arrays when they
are in new space and the concurrent marker isn't running (protected by
mask kPointersFromHereAreInteresting, CL here:
https://chromium-review.googlesource.com/c/v8/v8/+/1243104/12). The bug
was that I didn't emit the check if dealing with a SMI array. However,
the GC subsystem at that point doesn't distinguish between SMI and
OBJECT FixedArrays. This fix brings the CSA code in line with that.

R=ulan@chromium.org

Bug: v8:8294
Change-Id: I9eb033c358911e8337562dbc91af8f0e6fbd2ed3
Reviewed-on: https://chromium-review.googlesource.com/c/1278386
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56598}
2018-10-12 10:07:51 +00:00
Clemens Hammacher
ede7df9cb4 [wasm] Move definition of FunctionSig to a common place
We were re-definining the FunctionSig typedef in several places. This
CL moves it to value-type.h, since it's a signature over ValueType.

R=titzer@chromium.org

Bug: v8:8238
Change-Id: Id5e8a55c7e0f98d61235e32a5e6cd12e04d26947
Reviewed-on: https://chromium-review.googlesource.com/c/1278387
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56597}
2018-10-12 09:56:58 +00:00
Marja Hölttä
a2918ebdd3 [js weak refs] Fix WeakRef related types in BitSetType::Lub
BUG=v8:8179

Change-Id: Ie39465ee1b356a33c810bc1fc7e35f985347fb5c
Reviewed-on: https://chromium-review.googlesource.com/c/1278389
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56596}
2018-10-12 09:55:19 +00:00
Stephan Herhut
f3bc98a61f [cleanup] visualize register allocation before and after splintering
This also adds support in the c1 visualizer output generator to resolve
splintered live ranges before they have been merged back in.

Bug: v8:8238
Change-Id: I61e5f6da2e8b77ca9b42fae9004c77163d11960f
Reviewed-on: https://chromium-review.googlesource.com/c/1270817
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56595}
2018-10-12 09:26:28 +00:00
Stephan Herhut
b79cbd5615 [regalloc] More aggressively reuse spill ranges for phi inputs
The register allocator has an optimization that makes it try reuse
spill-slots between phi-inputs and assign the same spill slot to a phi
output, if possible.
Furthermore, if the phi has no immediate register use, the output is
kept spilled.

With this change, no longer require that a phi input was spilled in an
immediate predecessor. Instead, it is good enough if it was spilled
at definition.

Change-Id: I317b9d5f9a9dda6a47972cdf84dc2627b996f3db
Reviewed-on: https://chromium-review.googlesource.com/c/1273053
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56594}
2018-10-12 09:24:38 +00:00
Ross McIlroy
85b7f1cd91 [Parser] Add basic support for parallel IIFE parse / compile tasks.
Adds support for enqueuing parallel parse / compile tasks for eagerly
compiled IIFEs during parsing. If the --parallel-compile-tasks flag is
enabled, the parser will pre-parse eager top-level IIFEs and enqueue a
task on the compiler dispatcher to do the actual parsing / compilation
on a worker thread.

Currently we always enqueue the task, but we likely want to only
enqueue parallel tasks where the script has multiple IIFEs or a
substantial amount of top-level script code before the IIFE to avoid
the main thread having to immediately block on the parallel task. This
work will be done as a follow-up.

BUG=v8:8041

Change-Id: If68d7c374548cabd4ec32f1fb6752da7d6aaae6b
Reviewed-on: https://chromium-review.googlesource.com/c/1275354
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56593}
2018-10-12 08:48:48 +00:00
Clemens Hammacher
5f9d7e805a Only deregister Managed destructors on second pass callback
This will ensure that the Isolate tear-down sequence runs the
destructors even if the first callback already ran. The second callback
might never be executed, since it runs on a background thread which
might not be executed before tear-down of the Isolate.

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

Bug: v8:8208, chromium:893549
Change-Id: Ibc148e71bc06936033c5b0f0e70bbb2b5a8e8094
Reviewed-on: https://chromium-review.googlesource.com/c/1276629
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56592}
2018-10-12 08:47:43 +00:00
Hai Dang
65aaf00a61 [js-perf-test] Fix spread set benchmark.
Bug: v8:7980
Change-Id: I35b24638b5e2995bb6a5cbb5a28d0d186e807ef3
Reviewed-on: https://chromium-review.googlesource.com/c/1278725
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56591}
2018-10-12 08:43:58 +00:00
Benedikt Meurer
9f28c129a0 [async] Introduce the notion of a "current microtask".
Change the way we start collecting async stack traces by storing the
current microtask as a root instead of trying to make sense of the
last frame we see. This makes it possible to use the zero cost async
stack traces in Node.js as well (where the last JavaScript frame we
see is not the actual async function, but some frame related to the
main event loop usually).

In addition to the benefit that it now works with Node.js, we can also
extend the new machinery to look through (almost arbitrary) promise
chains. For example this code snippet

```js
(async function() {
  await Promise.resolve().then(() =>
    console.log(new Error().stack));
})();
```

can be made to also show the async function frame, even though at the
point where the stack trace is collected we don't have any async
function on the stack. But instead there's a PromiseReactionJobTask
as "current microtask", and we can dig into the chained promise to
see where the async execution is going to continue and eventually
find the await promise in the chain.

This also removes the removes the need to allocate `.generator_object`
specially during scope resolution.

Bug: v8:7522
Ref: nodejs/node#11865
Tbr: ulan@chromium.org
Design-Document: bit.ly/v8-zero-cost-async-stack-traces
Change-Id: Ib96cb17c2f75cce083a24e5ba2bbb7914e20d203
Reviewed-on: https://chromium-review.googlesource.com/c/1277505
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56590}
2018-10-12 08:42:53 +00:00
Toon Verwaest
1d87634cf2 [parser] Drop accumulating non-simple flag
If the outer classifier will end up parsing an arrow parameter list we'd only
be in an inner classifier if the outer was already known to be non-simple.

Change-Id: I9fdfb5539b3a7989869f7190f0919699fe8e5c90
Reviewed-on: https://chromium-review.googlesource.com/c/1276630
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56589}
2018-10-12 08:36:43 +00:00
Shiyu Zhang
6ec90ecee2 Reland "Create a fast path to get migration target when updating map"
This is a reland of c285380ca8

Original change's description:
> Create a fast path to get migration target when updating map
>
> During map updating, store the pointer to new map in the
> raw_transitions slot of the old map that is deprecated from map
> transition tree. Thus, we can get the migration target directly
> instead of TryReplayPropertyTransitions when updating map.
>
> This can improve Speedometer2.0 Elm-TodoMVC case by ~5% on ATOM
> Chromebook and ~9% on big-core Ubuntu.
>
> Change-Id: I56f9ce5183bbdd567b964890f623ef0ceed9b7db
> Reviewed-on: https://chromium-review.googlesource.com/1233433
> Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56303}

Change-Id: Idf0b7716b92a6a15bfe58721c2c34dbd02b31137
Reviewed-on: https://chromium-review.googlesource.com/c/1270261
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Shiyu Zhang <shiyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/master@{#56588}
2018-10-12 08:21:13 +00:00
Clemens Hammacher
56b8ab5d07 [Liftoff] Fewer pinned registers on store
On ia32, we were pinning too many registers, resulting in no unpinned
byte registers left (we only have three byte registers since {ebx}
is reserved for the root register).
It turns out that on most paths, we don't actually need to pin any
registers, since {Store} is often the last call for an operation (like
any store or set_global). If registers need to be pinned, only pass
those that must be kept alive across the {Store}. This allows to
compute a more narrow set of pinned registers on demand inside {Store}.

Plus minor drive-by changes.

R=titzer@chromium.org

Bug: chromium:894374, chromium:894307, v8:6600
Change-Id: Ic4d7131784c193dc7a2abf0e504d9973f6d5c5f1
Reviewed-on: https://chromium-review.googlesource.com/c/1275819
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56587}
2018-10-12 08:11:52 +00:00
Georg Neis
b59608d5a2 [turbofan] Remove native_context member from JSNativeContextSpecialization.
We don't need to store the native context explicitly anymore, the
broker already has it.

Bug: v8:7790
Change-Id: I1096953e3c56bed9d3a8d7d37b108888ef4ac7ec
Reviewed-on: https://chromium-review.googlesource.com/c/1270594
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56586}
2018-10-12 07:53:32 +00:00
Jakob Gruber
7a43aa532e [ia32,root] Remove porting helper function
TBR=sigurds@chromium.org

Bug: v8:6666
Change-Id: I85dbc33a4baf5fb3775a6f557fc146437e17ab80
Reviewed-on: https://chromium-review.googlesource.com/c/1276430
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56585}
2018-10-12 06:10:58 +00:00
v8-ci-autoroll-builder
977e5a7a6c Update V8 DEPS.
Rolling v8/build: 85ceec4..dbb4fad

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cd3378c..c8b97e3

Rolling v8/third_party/depot_tools: 2fddb95..066e110

Rolling v8/third_party/fuchsia-sdk: 6e1868c..9647596

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

Change-Id: Ia8e468cdad8510de141672485ce58583613e908b
Reviewed-on: https://chromium-review.googlesource.com/c/1278491
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@{#56584}
2018-10-12 03:49:53 +00:00
Jakob Kummerow
d4612bbd61 Move MessageTemplate enum into its own header file
The primary purpose of this is to untangle a circular dependency
objects.h -> handles.h -> objects.h. Most compilation units only
need message-template.h, without the rest of messages.h.
Bonus: change the enum to an enum class for improved type safety.

Bug: v8:3770
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8102c55197a450811de2588a68a08e7f99ea6b9e
Reviewed-on: https://chromium-review.googlesource.com/c/1272193
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56583}
2018-10-11 23:01:32 +00:00
Frank Tang
9f50f9359b [Intl] Remove usage of NewStringFromStaticChars
Bug: v8:5751
Change-Id: I17e2a5b489e84edb87805dd49dc144d6503d2c27
Reviewed-on: https://chromium-review.googlesource.com/c/1275146
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56582}
2018-10-11 22:36:16 +00:00
Junliang Yan
71898faf88 PPC/s390: [async] Introduce dedicated JSAsyncFunctionObject.
Port a63987a41a

Original Commit Message:

    This JSAsyncFunctionObject represents the implicit generator object
    inside of async functions, and also holds the outer promise for the
    async functions. This in turn allows us to get rid of the .promise
    in the Parser / BytecodeGenerator completely, and will make it
    possible to build zero-cost async stack traces independent of the
    concrete synchronous part of the stack frame (which currently breaks
    in Node.js).

    In the bytecode all the async function operations now take this new
    JSAsyncFunctionObject instead of passing both the .generator_object
    and the .promise, which further simplifies and shrinks the bytecode.
    It also reduces the size of async function frames, potentially making
    the suspend/resume cheaper.

    This also changes `await` to use intrinsics instead of calling to
    special JSFunctions on the native context, and thus reduces the size of
    the native contexts.

    to TurboFan.

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

Change-Id: Ife0aa45b11580f316e657942485907cf78336e4b
Reviewed-on: https://chromium-review.googlesource.com/c/1276867
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56581}
2018-10-11 22:09:15 +00:00
Tom Anderson
817dd11741 Fix v8::internal::Simulator::ResetState on arm
BUG=chromium:894427
R=machenbach

Change-Id: I129f512960ffc81b607bcdae1e43ddb94358d1df
Reviewed-on: https://chromium-review.googlesource.com/c/1277609
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56580}
2018-10-11 21:42:38 +00:00
Toon Verwaest
1486ea9c6a [parser] Hoist invalid pattern/arrow reporting out of BinaryOp loop
We only need to report once that we're in an invalid path for binding patterns
and arrow formals.

Change-Id: I8c7edc1c2a9f431c98e09725d0534e661db76634
Reviewed-on: https://chromium-review.googlesource.com/c/1276626
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56579}
2018-10-11 18:20:03 +00:00