Commit Graph

51040 Commits

Author SHA1 Message Date
Michael Achenbach
4efa9aacdd Revert "[test] Skip test on gc fuzzer"
This reverts commit 2148d82732.

Reason for revert: bug was fixed

Original change's description:
> [test] Skip test on gc fuzzer
> 
> TBR=marja@chromium.org
> 
> Bug: v8:8286
> Change-Id: I862d557c22e373c81171f0bb33b23d37157fbccd
> Reviewed-on: https://chromium-review.googlesource.com/c/1273120
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56527}

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

Change-Id: I9bf0632815acdd1ea29f5e622e8313b061ddd20e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8286
Reviewed-on: https://chromium-review.googlesource.com/c/1275805
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56548}
2018-10-11 07:03:27 +00:00
Michael Achenbach
6ddb157cfa [test] Migrate test configs for main console
This migrates the test configurations of all builders on the main
console (aka client.v8) to the V8 repository, preparing removal from
build/scripts/slave/recipe_modules/v8/builders.py.

NOTRY=true

Bug: chromium:830557
Change-Id: I40b8f31ab48426c7122c87e0221d6f05dc205e81
Reviewed-on: https://chromium-review.googlesource.com/c/1273237
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56547}
2018-10-11 06:47:47 +00:00
v8-ci-autoroll-builder
3dc35cfa4e Update V8 DEPS.
Rolling v8/build: a5cd715..85ceec4

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

Rolling v8/third_party/depot_tools: 83bd7f4..2fddb95

Rolling v8/tools/clang: 2e889f5..a245b95

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

Change-Id: I3c04bbbf1f7bbeb5230ab9f68c30de05401c8aec
Reviewed-on: https://chromium-review.googlesource.com/c/1275350
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@{#56546}
2018-10-11 03:51:22 +00:00
Ben Smith
bf3c8b8ff3 [wasm] Cleanup wasm-module-builder.js
Use naming similar to the spec: "table" instead of "function table",
"element segment" instead of "function table init".

Change-Id: Ib1b6cdfa566f8bd00017ccedf9440084204f10ff
Reviewed-on: https://chromium-review.googlesource.com/c/1273612
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56545}
2018-10-10 22:50:57 +00:00
andrew-cc-chen
0c96874258 [s390] cleaned up code gen and instruction selector for atomic64 binop
and load

Change-Id: I710e82b2c2e0f4802d0efb11875a37b186828350
Reviewed-on: https://chromium-review.googlesource.com/c/1263828
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56544}
2018-10-10 20:30:37 +00:00
Junliang Yan
d0b6bdfd83 make kWasmCompileLazyFuncIndexRegister naming consistent
R=titzer@chromium.org

Change-Id: Ia39d4ec981e6a539cc7466c7b20ff5bd85a49090
Reviewed-on: https://chromium-review.googlesource.com/c/1274266
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56543}
2018-10-10 20:29:32 +00:00
Michael Lippautz
d8d2533d5b Revert "[heap] Run phantom handle callbacks on tear down"
This reverts commit fa65063a98.

Reason for revert:
This changes API contract with Blink as some state is destroyed before
actually tearing down the Isolate. Flushing the second round tasks
then tries to access various state that is already gone on the Blink
side. See bugs.

Bug: chromium:893944, chromium:893549, chromium:890631

Original change's description:
> [heap] Run phantom handle callbacks on tear down
>
> Pending phantom handle callbacks are not reliably executed if the heap
> shuts down. This can cause to memory leaks or other unwanted behaviour,
> like in wasm where the NativeModules (held in Managed objects
> implemented via phantom handles) unregister from the WasmEngine in the
> second-pass callback. This must be executed before tearing down the
> WasmEngine.
>
> This CL fixes this by running pending callback synchronously on heap
> tear down.
>
> R=ulan@chromium.org, mlippautz@chromium.org
>
> Bug: v8:8208
> Change-Id: I27b630c4d8f1fb12309040ea2179b64eed38710a
> Reviewed-on: https://chromium-review.googlesource.com/1249101
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56286}

TBR=ulan@chromium.org,mlippautz@chromium.org,clemensh@chromium.org

Bug: v8:8208
Change-Id: I4b403fd84473edb8895c3725ff3348574c54247b
Reviewed-on: https://chromium-review.googlesource.com/c/1274085
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56542}
2018-10-10 18:50:54 +00:00
Junliang Yan
8343e75b35 s390x: [wasm] Use a tuple as the instance for JS imports
Port a2b3480611

Original Commit Message:

    This CL refactors the implementation of WASM->JS import wrappers in order
    to make the wrapper code shareable. Instead of specializing to the import
    index, we use a tuple as the object ref in the both the import and indirect
    tables. The tuple allows the wrapper code to load both the calling
    instance and the target callable, rather than relying on code specialization.

    This requires some tricky codegen machinery, because WASM call descriptors
    expect an instance argument in a given register, yet the wrappers receive
    a tuple, the code generator must generate a prologue that loads the
    instance (and the callable), since it is not possible to express this at
    the graph level.

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

Change-Id: I34302b8ff737296fc98c032f1e9848b4bb9fae13
Reviewed-on: https://chromium-review.googlesource.com/c/1273866
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56541}
2018-10-10 18:43:34 +00:00
Michael Lippautz
dfa56840fe [heap] Use non-nestable tasks for finalizing garbage collection
Pass on information about the embedder state using the fact that tasks
are run from top level

Bug: chromium:893944
Change-Id: I01441778770c5acc784540e496eec5c3fdb87796
Reviewed-on: https://chromium-review.googlesource.com/c/1273048
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56540}
2018-10-10 18:38:14 +00:00
Benedikt Meurer
585b4eef6a [turbofan] Improve NumberMultiply typing rule.
The NumberMultiply typing rule gave up in the presence of NaN inputs,
but we can still infer useful ranges here and just union the result
of that with the NaN propagation (similar for MinusZero propagation).
This way we can still makes sense of these ranges at the uses.

Bug: v8:8015
Change-Id: Ic4c5e8edc6c68776ff3baca9628ad7de0f8e2a92
Reviewed-on: https://chromium-review.googlesource.com/c/1261143
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56539}
2018-10-10 18:16:17 +00:00
Nico Weber
54723cae72 v8: Build with -Wexit-time-destructors.
Bug: chromium:101600, v8:8257
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie6c4f80cdec855355c0b8985e4f8a88da2ddfef9
Reviewed-on: https://chromium-review.googlesource.com/c/1273322
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56538}
2018-10-10 18:01:26 +00:00
Jaroslav Sevcik
1e06ed35ad [test] Add type confusion poisoning test for polymorhic access.
Bug: chromium:866847
Change-Id: Icfda750c64c31ab48a882822883f6cef51c5bf92
Reviewed-on: https://chromium-review.googlesource.com/c/1270918
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56537}
2018-10-10 17:57:57 +00:00
Junliang Yan
bc2d6ccf91 s390x: [wasm] Use a name for the lazy compile func index
Port 4cbec82cbe

Original Commit Message:

    Pure refactoring CL. Introduce a symbolic name for the register
    used to hold the function index when calling the lazy compile stub.
    This makes it easier to see this contract when looking at the
    macro assembler.

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

Change-Id: I320373dfe4734b27b85217a829bf574bc7b90a2d
Reviewed-on: https://chromium-review.googlesource.com/c/1273825
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56536}
2018-10-10 17:36:13 +00:00
Michael Achenbach
a19044e243 [test] Bump shards on slow optional trybot
Also skip the slowest test.

TBR=sergiyb@chromium.org
NOTRY=true

Change-Id: I9646dc750fafe47a0680e57ed029ab24a521d1a3
Reviewed-on: https://chromium-review.googlesource.com/c/1273885
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56535}
2018-10-10 17:22:13 +00:00
Mike Stanton
696b2ceddd [Builtins] Array.prototype.splice performance improvements
a) The current size of the backing store for the array under splice
    wasn't considered. Additionally, allocate the array with the
    normal growing strategy.

b) Use primitives memcpy and memmove when
   appropriate. These calls are wrapped in new CSA functions
   MoveElements and CopyElements, which use the C functions when a
   write barrier isn't needed (otherwise they just copy elements
   in a loop).

Bug: chromium:880780
Change-Id: I39a917c71036f52250c68f2cced77a1c24f97b67
Reviewed-on: https://chromium-review.googlesource.com/c/1243104
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56534}
2018-10-10 15:24:43 +00:00
David Benjamin
d4f749cae4 Const-correct DelayedEntryCompare.
libc++'s _LIBCPP_DEBUG gets upset when comparators take non-const
references.

Bug: chromium:893810
Change-Id: I838ff08bfd53893984f0ce41a9d78d6f1d80a324
Reviewed-on: https://chromium-review.googlesource.com/c/1272184
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56533}
2018-10-10 15:23:38 +00:00
Sigurd Schneider
1e3a8d36e8 [ia32,root] Disable test triggering known issue
Disable a new test that triggers a known issue with the arguments
adaptor trampoline.

TBR=jgruber@chromium.org

Change-Id: Id89b71e49e5dbef06d75758d98ed162c07fc34f4
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1273052
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56532}
2018-10-10 14:56:46 +00:00
Jakob Gruber
aac2f8c933 [coverage] Filter out singleton ranges that alias full ranges
Block coverage is based on a system of ranges that can either have
both a start and end position, or only a start position (so-called
singleton ranges). When formatting coverage information, singletons
are expanded until the end of the immediate full parent range. E.g.
in:

{0, 10}  // Full range.
{5, -1}  // Singleton range.

the singleton range is expanded to {5, 10}.

Singletons are produced mostly for continuation counters that track
whether we execute past a specific language construct.

Unfortunately, continuation counters can turn up in spots that confuse
our post-processing. For example:

if (true) { ... block1 ... } else { ... block2 ... }

If block1 produces a continuation counter, it could end up with the
same start position as the else-branch counter. Since we merge
identical blocks, the else-branch could incorrectly end up with an
execution count of one.

We need to avoid merging such cases. A full range should always take
precedence over a singleton range; a singleton range should never
expand to completely fill a full range. An additional post-processing
pass ensures this.

Bug: v8:8237
Change-Id: Idb3ec7b2feddc0585313810b9c8be1e9f4ec64bf
Reviewed-on: https://chromium-review.googlesource.com/c/1273095
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56531}
2018-10-10 14:17:59 +00:00
Hai Dang
60d3ce727f Add iterator protectors for JSMapIterator/JSSet/JSSetIterator.
The MapIterator protector protects the original iteration behaviors of
Map.prototype.keys(), Map.prototype.values(), and Set.prototype.entries().
It does not protect the original iteration behavior of
Map.prototype[Symbol.iterator](). The protector is invalidated when:
* The 'next' property is set on an object where the property holder is the
  %MapIteratorPrototype% (e.g. because the object is that very prototype).
* The 'Symbol.iterator' property is set on an object where the property
  holder is the %IteratorPrototype%. Note that this also invalidates the
  SetIterator protector (see below).

The SetIterator protector protects the original iteration behavior of
Set.prototype.keys(), Set.prototype.values(), Set.prototype.entries(),
and Set.prototype[Symbol.iterator](). The protector is invalidated when:
* The 'next' property is set on an object where the property holder is the
  %SetIteratorPrototype% (e.g. because the object is that very prototype).
* The 'Symbol.iterator' property is set on an object where the property
  holder is the %SetPrototype% OR %IteratorPrototype%. This means that
  setting Symbol.iterator on a MapIterator object can also invalidate the
  SetIterator protector, and vice versa, setting Symbol.iterator on a
  SetIterator object can also invalidate the MapIterator. This is an over-
  approximation for the sake of simplicity.

Bug: v8:7980
Change-Id: I54ad6e4c7f19ccc27d7001f6c4b6c8d6ea4ee871
Reviewed-on: https://chromium-review.googlesource.com/c/1273102
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56530}
2018-10-10 14:10:29 +00:00
Marja Hölttä
ddbb12fa1e [js weak refs] Several fixes
1) As found by the GC fuzzer: missing HandleScopes.

2) The RecordSlot barrier was missing for NativeContext::AddDirtyJSWeakFactory.

3) Need Context::Scope to surround the cleanup function (if it results in an
error, we try to get native_context() from Isolate).

BUG=v8:8179,v8:8286

Change-Id: I2d995a76770658848e3c9629333bedbc2ef43b82
Reviewed-on: https://chromium-review.googlesource.com/c/1273051
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56529}
2018-10-10 14:09:09 +00:00
Michael Lippautz
e8faae72c5 [platform] Add TaskRunner::PostNonNestableTask
The API will be used to post GC tasks that benefit from being executed
at top level.

Bug: chromium:843903
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I062855e810ca9a8d8af8ae8b66e02c85e108798b
Reviewed-on: https://chromium-review.googlesource.com/c/1273045
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56528}
2018-10-10 13:41:09 +00:00
Michael Achenbach
2148d82732 [test] Skip test on gc fuzzer
TBR=marja@chromium.org

Bug: v8:8286
Change-Id: I862d557c22e373c81171f0bb33b23d37157fbccd
Reviewed-on: https://chromium-review.googlesource.com/c/1273120
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56527}
2018-10-10 13:21:45 +00:00
Ben L. Titzer
98e3e32df2 [wasm] Cache import wrappers in NativeModule
Now that import wrappers are no longer specialized to an index, they
can be cached in the native module, keyed by
(WasmImportCallKind, FunctionSig). This saves instantiation time and
also fixes a (slow) memory leak.

R=mstarzinger@chromium.org

Change-Id: I5197bbfae79d6e811a01289b990db445373eea6c
Reviewed-on: https://chromium-review.googlesource.com/c/1270943
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56526}
2018-10-10 13:03:32 +00:00
Toon Verwaest
0ec99a4ec1 [parser] outline ParsePrimaryExpression again due to binary size increase
Change-Id: I15a22e7057d5e0fa154466a0ea3d7eba3bd5721c
Reviewed-on: https://chromium-review.googlesource.com/c/1273241
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56525}
2018-10-10 12:58:32 +00:00
Michael Achenbach
37871a0225 [release] Ignore binary-size tracking on auto-rolls
NOTRY=true

Bug: chromium:893991
Change-Id: I490c02266a367d93495a2de7516486aca2c8e26c
Reviewed-on: https://chromium-review.googlesource.com/c/1273118
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56524}
2018-10-10 12:28:08 +00:00
Tobias Tebbi
b38d3f98ec [build] disable asan on Windows for Torque
An asan bug on Windows breaks the chrome asan bot. This disables asan
for the Torque build step as a workaround.

Bug: chromium:893437
Change-Id: I4ccc25e7667abb3ea167c3e8af1210685ff06b9e
Reviewed-on: https://chromium-review.googlesource.com/c/1273105
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56523}
2018-10-10 11:47:40 +00:00
Ross McIlroy
8dd93a267f [ObjectStats] Record SourcePositionTables correctly in gc object stats.
Change-Id: I405172d79e0cbb043ce369ded625940178344dde
Reviewed-on: https://chromium-review.googlesource.com/c/1273104
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56522}
2018-10-10 11:40:44 +00:00
Matheus Marchini
8aaa186ed4 [postmortem] add postmortem metadata for Promises
R=bmeurer@google.com, yangguo@google.com

Change-Id: Ica3f6308d92079d6602e16da31fa01488f9cc6bd
Reviewed-on: https://chromium-review.googlesource.com/c/1261162
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56521}
2018-10-10 11:25:45 +00:00
Ben L. Titzer
a2b3480611 [wasm] Use a tuple as the instance for JS imports
This CL refactors the implementation of WASM->JS import wrappers in order
to make the wrapper code shareable. Instead of specializing to the import
index, we use a tuple as the object ref in the both the import and indirect
tables. The tuple allows the wrapper code to load both the calling
instance and the target callable, rather than relying on code specialization.

This requires some tricky codegen machinery, because WASM call descriptors
expect an instance argument in a given register, yet the wrappers receive
a tuple, the code generator must generate a prologue that loads the
instance (and the callable), since it is not possible to express this at
the graph level.

R=mstarzinger@chromium.org
CC=clemensh@chromium.org

Change-Id: Id67e307f7f5089e776f5439a53b5aee4b76934b6
Reviewed-on: https://chromium-review.googlesource.com/c/1268237
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56520}
2018-10-10 11:07:35 +00:00
Dan Elphick
ce9198e492 Reland "[snapshot] Factor out root serialization code"
This is a reland of 22b56f47e3

Nothing has changed. This is a reland of a speculative revert.

Original change's description:
> [snapshot] Factor out root serialization code
>
> Factors out a new method Serializer::SerializeRoot which attempts to
> serialize a given object as a Root if it is one and the Serializer's
> policy allows that root to be serialized (implemented as a new virtual
> method RootCanBeSerialized)..
>
> This is in preparation for adding a ReadOnlySerializer which change the
> way read-only roots are serialized.
>
> Bug: v8:8191
> Change-Id: I7fbb4e9520fba8b836a0b6bf95ca39abc3ded79e
> Reviewed-on: https://chromium-review.googlesource.com/c/1264698
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56494}

TBR=jgruber

Bug: v8:8191
Change-Id: I30a606b9c99f5651fae323d12f8f74b13bb085fa
Reviewed-on: https://chromium-review.googlesource.com/c/1273103
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56519}
2018-10-10 10:45:35 +00:00
Toon Verwaest
c4e2078618 [parser] Simplify SourceRangeScope
Change-Id: I44262469469565592c7c3f3cf29638ce65686e6f
Reviewed-on: https://chromium-review.googlesource.com/c/1273078
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56518}
2018-10-10 10:41:40 +00:00
Sigurd Schneider
9d53e539f0 [ia32, root] Enable root register verification
Bug: v8:6666
Change-Id: I702ca633de56a5e1228f281de89e8bf7c12002a4
Reviewed-on: https://chromium-review.googlesource.com/c/1273077
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56517}
2018-10-10 10:36:36 +00:00
Ben L. Titzer
4cbec82cbe [wasm] Use a name for the lazy compile func index
Pure refactoring CL. Introduce a symbolic name for the register
used to hold the function index when calling the lazy compile stub.
This makes it easier to see this contract when looking at the
macro assembler.

R=ahaas@chromium.org
CC=clemensh@chromium.org

Change-Id: I714f978883ced001a1435338dcefd96744bfb2ae
Reviewed-on: https://chromium-review.googlesource.com/c/1273099
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56516}
2018-10-10 10:35:31 +00:00
Sigurd Schneider
ed93fc67d3 [ia32,root] Enable compilation with the PreserveRoot register config
Change-Id: I2499c3ada16bdf51f7830847753b856aa8aaff46
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1270836
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56515}
2018-10-10 10:34:10 +00:00
Clemens Hammacher
7074113d7e [wasm][test] Refactor breakpoint inspector test
Before adding another test for removing breakpoint, this CL modernizes
the existing test for setting breakpoints.

R=kozy@chromium.org
CC=ahaas@chromium.org

Bug: chromium:837572
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I642f9673f327f4ec569a4f67a61b5e264cf25b8f
Reviewed-on: https://chromium-review.googlesource.com/c/1264636
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56514}
2018-10-10 10:24:32 +00:00
Jakob Gruber
47d34a317e Revert "[coverage] change block range to avoid ambiguity."
This reverts commit 471fef0469.

Reason for revert: A more general fix incoming at https://crrev.com/c/1273095.

Original change's description:
> [coverage] change block range to avoid ambiguity.
> 
> By moving the block range end to left of closing bracket,
> we can avoid ambiguity where an open-ended singleton range
> could be both interpreted as inside the parent range, or
> next to it.
> 
> R=​verwaest@chromium.org
> 
> Bug: v8:8237
> Change-Id: Ibc9412b31efe900b6d8bff0d8fa8c52ddfbf460a
> Reviewed-on: https://chromium-review.googlesource.com/1254127
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56347}

TBR=yangguo@chromium.org,neis@chromium.org,verwaest@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:8237
Change-Id: I39310cf3c2f06a0d98ff314740aaeefbfffc0834
Reviewed-on: https://chromium-review.googlesource.com/c/1273096
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56513}
2018-10-10 10:11:57 +00:00
Sigurd Schneider
1c13f23374 [ia32] Remove StaticArray operand constructor
Change-Id: Ie6606869acbeadea747c4e664c78cfbffe942321
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1273135
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56512}
2018-10-10 10:04:19 +00:00
v8-ci-autoroll-builder
076b52986d Update V8 DEPS.
Rolling v8/build: 1a0ce50..a5cd715

Rolling v8/third_party/depot_tools: db1e69e..83bd7f4

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

Change-Id: Iab28e206e9aa2b0376185abb1edb0d9fc4948a3f
Reviewed-on: https://chromium-review.googlesource.com/c/1273255
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@{#56511}
2018-10-10 09:51:25 +00:00
Sigurd Schneider
f805b43d9a [tools] Add embedded_builtins statusfile param
R=machenbach@chromium.org, sigurds@chromium.org

Bug: v8:6666
Change-Id: I9ac0fc393a9f9a66bebb72abd54a429e95aa078a
Reviewed-on: https://chromium-review.googlesource.com/c/1270840
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56510}
2018-10-10 09:48:43 +00:00
Maya Lekova
74aea87ac1 Revert "[snapshot] Factor out root serialization code"
This reverts commit 22b56f47e3.

Reason for revert: Speculatively reverting because it increases Android binary size unexpectedly, see https://ci.chromium.org/p/chromium/builders/luci.chromium.try/android-binary-size/72572

Original change's description:
> [snapshot] Factor out root serialization code
> 
> Factors out a new method Serializer::SerializeRoot which attempts to
> serialize a given object as a Root if it is one and the Serializer's
> policy allows that root to be serialized (implemented as a new virtual
> method RootCanBeSerialized)..
> 
> This is in preparation for adding a ReadOnlySerializer which change the
> way read-only roots are serialized.
> 
> Bug: v8:8191
> Change-Id: I7fbb4e9520fba8b836a0b6bf95ca39abc3ded79e
> Reviewed-on: https://chromium-review.googlesource.com/c/1264698
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56494}

TBR=jgruber@chromium.org,delphick@chromium.org,ygg@google.com

Change-Id: I7012abec0f33f655efc64dc44f7fa461d7e4b7e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8191
Reviewed-on: https://chromium-review.googlesource.com/c/1273098
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56509}
2018-10-10 09:14:15 +00:00
Michael Achenbach
007c674467 [test] Add task-delay-stress fuzzer configs
TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:8278
Change-Id: I000c31366f2b3d894208665ddb6cef49216099a6
Reviewed-on: https://chromium-review.googlesource.com/c/1273097
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56508}
2018-10-10 09:12:14 +00:00
Maya Lekova
918b5eea47 [test] Suppress another TSAN failure in ICU
Bug: v8:8110
Change-Id: I5d180782aed530b059978d4d594df91aa472656a
Reviewed-on: https://chromium-review.googlesource.com/c/1273015
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56507}
2018-10-10 08:55:27 +00:00
Benedikt Meurer
e24b95dc77 [esnext] Implement "Editorial: refactor PerformPromiseThen to allow no capability".
This implements the editorial change in https://github.com/tc39/ecma262/pull/1146
which removes the need to allocate the throwaway promise in await (the throwaway
promise was not exposed to user JavaScript anyways, but this spec change allows
us to rely on this behavior). Now we still need the throwaway promise for proper
before and after events with both DevTools (which might change) and PromiseHooks.
So if either DevTools or PromiseHooks is on, we call into %AwaitPromisesInit,
which then allocates the throwaway promise and does all the other debugger/hooks
related setup.

This gives around 7% improvement on the doxbee-async-es2017-native and around 1-2%
on the parallel-async-es2017-native benchmarks.

Bug: v8:7253, v8:8285
Ref: tc39/ecma262#1146
Tbr: ulan@chromium.org
Change-Id: I972ba0538ec8c00808e95b183603025c7e55a6d3
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1270798
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56506}
2018-10-10 08:41:14 +00:00
Toon Verwaest
5ac8805300 [parser] Make it explicit when marking destructuring patterns as assigned
Divide MarkExpressionAsAssigned into MarkExpressionAsAssigned and
MarkPatternAsAssigned so it's clear when we need to mark just a single variable
or an entire destructuring assignment pattern.

Change-Id: Ia188b3d9b15944a1859676f483df229225ce8404
Reviewed-on: https://chromium-review.googlesource.com/c/1270945
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56505}
2018-10-10 08:37:15 +00:00
Hai Dang
2293f88074 [js-perf-test] Add micro-benchmarks for spreading maps and sets.
Bug: v8:7980
Change-Id: I640119fc9a9af66370c47f4d5b16244a1cc3f716
Reviewed-on: https://chromium-review.googlesource.com/c/1256810
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56504}
2018-10-10 08:32:15 +00:00
Toon Verwaest
a4a8917335 [parser] Only check Token::IN/accept_IN if it's a binary op
Change-Id: Icdab6d279ca42bf44f29db257484acd74666baab
Reviewed-on: https://chromium-review.googlesource.com/c/1273075
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56503}
2018-10-10 08:30:55 +00:00
Benedikt Meurer
0038e5f05f [async] Improve async function handling.
This change introduces new intrinsics used to desugar async functions
in the Parser and the BytecodeGenerator, namely we introduce a new
%_AsyncFunctionEnter intrinsic that constructs the generator object
for the async function (and in the future will also create the outer
promise for the async function). This generator object is internal
and never escapes to user code, plus since async functions don't have
a "prototype" property, we can just a single map here instead of tracking
the prototype/initial_map on every async function. This saves one word
per async function plus one initial_map per async function that was
invoked at least once.

We also introduce two new intrinsics %_AsyncFunctionReject, which
rejects the outer promise with the caught exception, and another
%_AsyncFunctionResolve, which resolves the outer promise with the
right hand side of the `return` statement. These functions also perform
the DevTools part of the job (aka popping from the promise stack and
sending the debug event). This allows us to get rid of the implicit
try-finally from async functions completely; because the finally
block only called to the %AsyncFunctionPromiseRelease builtin, which
was used to inform DevTools.

In essence we now turn an async function like

```js
async function f(x) { return await bar(x); }
```

into something like this (in Parser and BytecodeGenerator respectively):

```
function f(x) {
  .generator_object = %_AsyncFunctionEnter(.closure, this);
  .promise = %AsyncFunctionCreatePromise();
  try {
    .tmp = await bar(x);
    return %_AsyncFunctionResolve(.promise, .tmp);
  } catch (e) {
    return %_AsyncFunctionReject(.promise, e);
  }
}
```

Overall the bytecode for async functions gets significantly shorter
already (and will get even shorter once we put the outer promise into
the async function generator object). For example the bytecode for a
simple async function

```js
async function f(x) { return await x; }
```

goes from 175 bytes to 110 bytes (a ~38% reduction in size), which
is in particular due to the simplification around the try-finally
removal.

Overall this seems to improve the doxbee-async-es2017-native test by
around 2-3%. On the test case mentioned in v8:8276 we go from
1124ms to 441ms, which corresponds to a 60% reduction in total
execution time!

Tbr: marja@chromium.org
Bug: v8:7253, v8:7522, v8:8276
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1269041
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56502}
2018-10-10 06:37:53 +00:00
v8-ci-autoroll-builder
8d4e11415d Update V8 DEPS.
Rolling v8/build: a7674ea..1a0ce50

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9ec8468..357c5c2

Rolling v8/third_party/depot_tools: 71e3be7..db1e69e

Rolling v8/third_party/icu: c52a2a2..ccad447

Rolling v8/tools/clang: 7792d28..2e889f5

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

Change-Id: I103aff00a9a5c2218c6152a9da8d0307a2cb07c1
Reviewed-on: https://chromium-review.googlesource.com/c/1272192
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@{#56501}
2018-10-10 03:49:45 +00:00
Igor Sheludko
33ebe358a5 [cleanup] Split the mutable roots list into immovable and movable
... and remove Heap::RootCanBeWrittenAfterInitialization() and
Heap::RootCanBeTreatedAsConstant() in favour of RootsTable::IsImmortalImmovable().

Bug: v8:8238
Change-Id: I804d06136de9584b8c4940fd8ab9d18fb3ef7980
Reviewed-on: https://chromium-review.googlesource.com/c/1270837
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56500}
2018-10-10 00:05:11 +00:00
Michael Lippautz
15dd4cafc6 [heap] Add helper for visitation using slot snapshot
Change-Id: Ib24a7f2c8c69828c5457595f891dbcb6b2a70296
Reviewed-on: https://chromium-review.googlesource.com/c/1270923
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56499}
2018-10-09 18:53:02 +00:00