Commit Graph

51350 Commits

Author SHA1 Message Date
Benedikt Meurer
50f713c9a2 [promises] Add fast-path for native promises to Promise.all.
This CL introduces a new fast-path for `Promise.all(a)` for the case
that elements in `a` are native promises, and the Promise.prototype
and Promise function itself are intact. If so, we can skip the lookups
of "resolve" on Promise and "then" on the result of invoking "resolve",
which are both quite expensive, and we can instead directly call the
PerformPromiseThen() operation on the element of `a`.

In addition to that we don't need to create and chain a result promise,
since this is only used when either async_hooks or DevTools are enabled.
Otherwise it's a "throwaway promise" only used to satisfy the operation
parameter signature (see https://github.com/tc39/ecma262/pull/1146).

This results in a significant performance improvement on `Promise.all()`
heavy code. For example the parallel-promises-es2015-native test goes
from around 84ms to roughly 68ms, which is almost a 20% improvement.

Bug: v8:7253
Ref: tc39/ecma262#1146
Change-Id: Iab9c57edb26d13a467b0653fd8de6149c382efc6
Reviewed-on: https://chromium-review.googlesource.com/c/1293374
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56858}
2018-10-22 14:35:50 +00:00
Clemens Hammacher
5edf567a85 [wasm] Turn Result methods into named constructors
This removes the {error} and {verror} methods of {ResultBase} and
introduces a named constructor {Error} instead. This allows to
construct an error result in a single expression, and moves {Result}
closer to a container that is initialized once and is immutable
afterwards (just the {MoveErrorFrom} method is still violating this
pattern).

R=titzer@chromium.org

Bug: v8:8238
Change-Id: Iec16c8c6d66300ee82a48e8a9e941c72ae26e202
Reviewed-on: https://chromium-review.googlesource.com/c/1293370
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56857}
2018-10-22 14:34:46 +00:00
Camillo Bruni
956da336c1 [tools] Always set --data-path for content_shell
Making --data-path a subdir of --user-data-dir makes it easier to clean up
data after a benchmark run.

Bug: chromium:861668
Change-Id: If44527163ea396b11346d65d76411d03a5b9a424
Reviewed-on: https://chromium-review.googlesource.com/c/1292065
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56856}
2018-10-22 14:19:35 +00:00
Marja Hölttä
5bbb6e7827 Revert "[js weak refs] Add WeakCell.clear()"
This reverts commit 49bd7f50dc.

Reason for revert: breaks nonintl build since the added string is inside wrong ifdefs

Original change's description:
> [js weak refs] Add WeakCell.clear()
> 
> BUG=v8:8179
> 
> Change-Id: Ic0d9af273a8a92177bf60e4be0dd5bddaf31868c
> Reviewed-on: https://chromium-review.googlesource.com/c/1292058
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56853}

TBR=marja@chromium.org,hpayer@chromium.org,gsathya@chromium.org

Change-Id: I7d6831cfd8a5263ee327c2a80274d1cd10dd65cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8179
Reviewed-on: https://chromium-review.googlesource.com/c/1293573
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56855}
2018-10-22 14:16:52 +00:00
Michael Starzinger
f4c39c1a8b [wasm] Switch exception values encoding to {FixedArray}.
This changes the encoding of values stored in exception objects from a
typed uint16 array (a JSObject) to a {FixedArray} instead. Note that it
increases the memory footprint of the encoding, but will allow accessing
elements directly from generated code and also encode reference types
properly. The memory footprint can/should be optimized only after the
implementation is feature complete.

R=clemensh@chromium.org
BUG=v8:8341

Change-Id: If67c4e498d815e14f95d014e6a1f7a6725aa0b3a
Reviewed-on: https://chromium-review.googlesource.com/c/1293371
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56854}
2018-10-22 13:35:31 +00:00
Marja Hölttä
49bd7f50dc [js weak refs] Add WeakCell.clear()
BUG=v8:8179

Change-Id: Ic0d9af273a8a92177bf60e4be0dd5bddaf31868c
Reviewed-on: https://chromium-review.googlesource.com/c/1292058
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56853}
2018-10-22 13:31:00 +00:00
Ross McIlroy
0c9c0adf62 [Lite] Disable optimization for Lite mode.
BUG=v8:8293

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic0e12cbcea76f76fce543714dee972c784095143
Reviewed-on: https://chromium-review.googlesource.com/c/1290795
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56852}
2018-10-22 13:16:24 +00:00
Toon Verwaest
2dc302ae95 [parser] Move async arrow param validation closer to its parsing
Change-Id: I16f68db6b7793e3d7839e0afcd7c5bd6753b0913
Reviewed-on: https://chromium-review.googlesource.com/c/1292063
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56851}
2018-10-22 12:58:54 +00:00
Stephan Herhut
0abf84a93a [tests] Run wasm/atomics* tests on release bots only
Change the status files to only run on release bots and furthermore
exclude those that run on an arm simultaor. This should still provide
sufficient coverage while keeping resource usage at bay.

Bug: v8:8331, v8:8332
Change-Id: I515e68929af660932a1224294bd09ebc05705324
Reviewed-on: https://chromium-review.googlesource.com/c/1292061
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56850}
2018-10-22 12:36:16 +00:00
Hai Dang
43bcadd7e6 [csa] Use memcpy to copy FixedArray if allocated in new space.
This improves the performance of copying Smi or Object arrays if
the new array is allocated in new space.

Bug: v8:7980
Change-Id: I8e91a879f603d118b4bb1393e7b8b92f4c0b3696
Reviewed-on: https://chromium-review.googlesource.com/c/1283053
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56849}
2018-10-22 11:52:31 +00:00
Florian Sattler
4e18f8685b [scanner] Add error state to scanner to prevent further processing.
BUG=v8:7926

Change-Id: Ib4dd3017c7d6f28025ab308063d7dedd0138dfa6
Reviewed-on: https://chromium-review.googlesource.com/c/1291470
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56848}
2018-10-22 11:24:33 +00:00
Toon Verwaest
98b257fe08 [parser] Simplify arrow formal parameter handling and improve message
This improves the error message for []=>{}. Now rather than pointing
at ] and saying that's the unexpected token, it reports
"SyntaxError: Malformed arrow function parameter list", pointing at [.

Change-Id: I88457dc9f929a7c2b07b36ea798f11e9a7d24414
Reviewed-on: https://chromium-review.googlesource.com/c/1293369
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56847}
2018-10-22 11:16:13 +00:00
Yang Guo
77582a4b63 [debug] scope iterator should not crash on API functions
Bug: v8:8333
Change-Id: I04bb28f909a1c144f513964115b4f2dfaced3146
Reviewed-on: https://chromium-review.googlesource.com/c/1291372
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56846}
2018-10-22 10:52:35 +00:00
Hannes Payer
581192aab9 [heap] Reclaim inaccessible memory.
Bug: chromium:897074
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I728572cda9a8914ee689eeee68a060b5713e4c6b
Reviewed-on: https://chromium-review.googlesource.com/c/1290972
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56845}
2018-10-22 10:21:57 +00:00
Ross McIlroy
69138876cd [tools] Add lite_mode status file parameter.
BUG=v8:8293

Change-Id: Ic58ac512d5f32d26756e21ca929dda79f133a40e
Reviewed-on: https://chromium-review.googlesource.com/c/1290982
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56844}
2018-10-22 10:15:10 +00:00
Toon Verwaest
763370fe26 [parser] Move 'async Identifier =>' handling to ParsePrimaryExpression
Change-Id: I7d95c0263649c69ff960925fcbde49e0ba9fa064
Reviewed-on: https://chromium-review.googlesource.com/c/1292059
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56843}
2018-10-22 09:53:29 +00:00
Andreas Haas
4cc03b61ae [wasm] Minor cleanup ExecuteCompilation for Turbofan
Two zones in ExecuteCompilation have the same scope, so we can combine
them.

In addition I moved measurement code at the end of the function so that
we don't have to store the result of the compilation in a helper.

R=clemensh@chromium.org

Bug: v8:8238
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I3b4790fa62adbe361d41be188c7f0510b12d957c
Reviewed-on: https://chromium-review.googlesource.com/c/1291072
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56842}
2018-10-22 09:34:42 +00:00
Michael Starzinger
5ee459e855 [wasm] Add exception attributes to binary format.
This adds an attribute field to the binary encoding of exception types
in the exceptions and import section. Currently the attribute value is
not used and expected to be zero, but it ensures the binary encoding is
extensible for future changes.

R=clemensh@chromium.org
TEST=unittests/WasmModuleVerifyTest
BUG=v8:8153

Change-Id: I6f0e10cb1b6515177d8200ebf1f4f0b122832868
Reviewed-on: https://chromium-review.googlesource.com/c/1291075
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56841}
2018-10-22 09:23:02 +00:00
Georg Neis
12e0d1f2f9 [turbofan] Don't optimize Function#bind in case of custom prototype.
Avoid calling Map::TransitionToPrototype (which reads and writes the
JS heap) by skipping the JSCallReducer optimization of Function#bind
whenever the receiver has a custom prototype.

Bug: v8:7790
Change-Id: Ie21475c5dc5c53d90c6afae8198837deb40dac8e
Reviewed-on: https://chromium-review.googlesource.com/c/1288631
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@{#56840}
2018-10-22 08:27:47 +00:00
Benedikt Meurer
2a08adbb6b [async] Gracefully handle suspended generators.
With async_hooks it's also possible that the "current microtask" is an
await task, whose generator is already suspended, when there's an
exception thrown in the AFTER callback. In that case we cannot build
a meaningful async stack trace.

Bug: chromium:897406, v8:7522
Change-Id: I682dc1fc3ebb1864e1c2061041ff99ced0313f0c
Reviewed-on: https://chromium-review.googlesource.com/c/1292057
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56839}
2018-10-22 07:06:22 +00:00
Hajime Hoshi
1a6517622f Add DUMP_ON_FAILURE and Platform::DumpWithoutCrash
This CL adds OnFailure::DUMP_ON_FAILURE representing a scope where base::
DumpWithoutCrash is called when V8 execution is detected. As V8 can't call base
functions, this CL also adds Platform::DumpWithoutCrash.

Doc: https://docs.google.com/document/d/1PStT6dPlSM7QfGUJQD6t6LNLTv_48gNMhY5RdEpt3XQ/edit?disco=AAAACJ6Xg0o&ts=5bc0be1b

BUG=chromium:870606

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I5df62fd99ed78adb4e2505aeaee3d526d6786e59
Reviewed-on: https://chromium-review.googlesource.com/c/1276325
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56838}
2018-10-22 06:33:25 +00:00
v8-ci-autoroll-builder
c20b0ded5f Update V8 DEPS.
Rolling v8/build: bd2533d..6455acf

Rolling v8/third_party/icu: ccad447..b029971

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

Change-Id: I4eec5e59be17ef15b3e4698c6ef6852e185dfc88
Reviewed-on: https://chromium-review.googlesource.com/c/1293073
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@{#56837}
2018-10-22 04:25:13 +00:00
v8-ci-autoroll-builder
23cc30051b Update V8 DEPS.
Rolling v8/build: 8579f3d..bd2533d

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

Change-Id: I46a9153202602b8df138a9e2aeebdc8ef65ce4fa
Reviewed-on: https://chromium-review.googlesource.com/c/1293069
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@{#56836}
2018-10-21 03:45:30 +00:00
Alexei Filippov
4157c3b3e4 [tracing] Fix Unicode values in TracedValue
Do not encode single byte characters with \uXXXX.

BUG=chromium:895974

Change-Id: If8e0bdb19d326228a7d3d0c9559d4457c8bfd270
Reviewed-on: https://chromium-review.googlesource.com/c/1292679
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56835}
2018-10-20 19:44:45 +00:00
Sergiy Byelozyorov
4423c06151 [tools] Remove timestamp and print log levels at fixed width
Originally timestamps were added in crrev.com/c/1159361 to ease debugging. Since
then, however, timestamps were introduce to the LogDog viewer and are rendered
in a separate column, making it easier to scan text for important messages
starting with '>>>'. We do keep the log level, but make sure that it always
takes a fixed width such that the actual messages are aligned vertically.

R=machenbach@chromium.org

No-Try: true
Change-Id: I3a741069824aa25e674aca79da03a725017cb956
Reviewed-on: https://chromium-review.googlesource.com/c/1291370
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56834}
2018-10-20 07:53:34 +00:00
Jakob Gruber
24027a0b05 [ia32] Skip flaky test
Another flake possibly caused by code printing in combination with
embedded builtins.

TBR=sigurds@chromium.org

No-try: true
Bug: v8:6666,v8:8334
Change-Id: I6a82e66a516e9cd8a7e2bac05c6ca1214b508dc3
Reviewed-on: https://chromium-review.googlesource.com/c/1292909
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56833}
2018-10-20 07:52:29 +00:00
v8-ci-autoroll-builder
694f6bd710 Update V8 DEPS.
Rolling v8/build: 0353cd5..8579f3d

Rolling v8/test/wasm-js/data: 64bf5c7..7e3c46a

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/237fb2a..b026043

Rolling v8/third_party/depot_tools: 93277a7..98f1e59

Rolling v8/tools/swarming_client: 486c9b5..f78187a

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

Change-Id: I46c3e04ff35809c23d5646e5031abd5e5b9829e4
Reviewed-on: https://chromium-review.googlesource.com/c/1292682
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@{#56832}
2018-10-20 03:53:36 +00:00
Frank Tang
b8b7fe39cf [Intl] Remove some unneeded code fom intl.
Remove the file src/objects/intl-objects-inl.h
Remove Intl functions:
TypeFromInt(), TypeFromSmi(), IsObjectOfType(), AvailableLocalesOf()
CreateNumberFormat() and Handle<String> version of CreateICULocale
Also remove StringToICUService() inside
src/objects/intl-objects.cc

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ifbd7ce162e04b8563c09e3ee5d99c55c6ad7bf7a
Reviewed-on: https://chromium-review.googlesource.com/c/1290116
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56831}
2018-10-19 23:08:14 +00:00
Frank Tang
67776adeac [Intl] Add more tests for Intl.Segmenter
Bug: v8:6891
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I623f996c0d80cd23dcad6ffedac993678a2af959
Reviewed-on: https://chromium-review.googlesource.com/c/1289609
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56830}
2018-10-19 22:59:26 +00:00
Daniel Clifford
b51053d89e Reland: [builtins] Implement Array.prototype.slice in Torque
In the process:

- add volatile types for FastJSArray and remove the length_fast accessor
  from JSArray with the application of more rigorous typing.
- add micro benchmarks for testing all the interesting slice cases

Also update a few assorted places in .tq code to make them more
idiomatic.

The original version of this patch had an overly agressive assert that has
been loosened.

TBR=jgruber@chromium.org

Change-Id: I56870862f4b124d1b38372daa326182a526c874c
Reviewed-on: https://chromium-review.googlesource.com/c/1291375
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56829}
2018-10-19 21:27:19 +00:00
Jakob Gruber
0039b34097 [ia32] Skip flaky test
Flake possibly caused by code printing in combination with embedded
builtins.

TBR=sigurds@chromium.org

No-try: true
Bug: v8:6666,v8:8334
Change-Id: Ia6ad44fc0bffcf2adf3d3172672c504789324f16
Reviewed-on: https://chromium-review.googlesource.com/c/1291379
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56828}
2018-10-19 17:02:03 +00:00
Clemens Hammacher
749d1fdaff [wasm] Remove WasmCompilationUnit::FinishCompilation
This method only recorded stats of the generated code object. Since
both counters that are updated are thread-safe anyway, we can just
update them from the background instead (during {ExecuteCompilation}).

R=mstarzinger@chromium.org

Bug: v8:7921
Change-Id: Ia6074be8339b100f328938136ecb10144fc79f12
Reviewed-on: https://chromium-review.googlesource.com/c/1291074
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56827}
2018-10-19 15:03:54 +00:00
Clemens Hammacher
e32daf0a3a [wasm] Move error reporting out of FinishCompilation
And remove the TurboFan/Liftoff specific {FinishCompilation}
implementations completely. Compilation errors are now stored in the
{WasmCompilationUnit} directly as a {Result<WasmCode*>}. They are
retrieved via {WasmCompilationUnit::ReportError}, which moves the error
to the {ErrorThrower}.
This prepares more changes to completely remove the {FinishCompilation}
phase.

R=titzer@chromium.org

Bug: v8:7921
Change-Id: I4f9a6e919359aeab074880d0d38211500b76e4ec
Reviewed-on: https://chromium-review.googlesource.com/c/1290975
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56826}
2018-10-19 14:56:14 +00:00
Sigurd Schneider
2f6f7b298b [mjsunit] Disable atomics*-stress tests
TBR=herhut@chromium.org

Notry: true
Change-Id: I6e7cb57b5e59405e040d3d574a8e6f630ac27cf3
Bug: v8:8331, v8:8332
Reviewed-on: https://chromium-review.googlesource.com/c/1291369
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56825}
2018-10-19 14:53:04 +00:00
Sathya Gunasekaran
714334ee82 Add warning if result of Object::ToArrayIndex is unused
Change-Id: Id50564cc1a83de218fb30293bed3eb0a8fcdd8c0
Reviewed-on: https://chromium-review.googlesource.com/c/1283011
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56824}
2018-10-19 14:40:31 +00:00
Clemens Hammacher
7921b73afb [wasm] Use getter for WasmResult::value
Previously, this was just a field on the WasmResult, which is not
allowed according to the style guide.
A special r-value accessor for the value is needed for the cases where
the contained type is not copyable, e.g. unique_ptr.

R=titzer@chromium.org

Bug: v8:8238
Change-Id: Ia3c14c4c62c3c2e07f1dc4594f1bc9d1da88f91e
Reviewed-on: https://chromium-review.googlesource.com/c/1290974
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56823}
2018-10-19 14:32:02 +00:00
Marja Hölttä
f8d6c4c003 [js weak refs] Make the cleanup task a microtask
BUG=v8:8179

Change-Id: I7c74b3d209ef320ea9f36c684f35a03ff9ce1539
Reviewed-on: https://chromium-review.googlesource.com/c/1291069
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56822}
2018-10-19 14:20:00 +00:00
Toon Verwaest
880537178a [parser] Only look through RewritableExpression to check Assignment
RewritableExpression always contain Assignment until rewriting; which
we only do after parsing a function. We don't call ->Is on possibly
rewritten expressions afterwards (we'll simply visit them instead).

Change-Id: I3be91e9f6701994a571d280515c9da34257f5425
Reviewed-on: https://chromium-review.googlesource.com/c/1291071
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56821}
2018-10-19 14:13:20 +00:00
Stephan Herhut
24767d76ca [tests] Do not run variants of atomics stress tests
The atomics and compare-exchange stress tests are intended to test
code generation only anyway and can be quite slow. So skip all the
variants.

Notry: true
Change-Id: Idf443b134558990c7eac43301fa816399794b9d5
Reviewed-on: https://chromium-review.googlesource.com/c/1291077
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56820}
2018-10-19 13:40:00 +00:00
Stephan Herhut
0dee58fa26 [tests] Disable atomics stress test on predictable bots.
The atomics stress tests use shared array buffers to record
non-deterministic interleaving of execution in web workers. This
produces non-deterministic heap results even in predictable mode.

NOTRY=true

Change-Id: Ic41c53bb6f5c67393fed7b9670c13cee6bc3481b
Reviewed-on: https://chromium-review.googlesource.com/c/1290979
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56819}
2018-10-19 13:35:49 +00:00
Predrag Rudic
441425302f MIPS[64]: Port: [async] Introduce dedicated JSAsyncFunctionObject.
Port commit a63987a41a

Original 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.
>
>Drive-by-fix: Introduce a dedicated JSCreateAsyncFunctionObject operator
>to TurboFan.
>
>Bug: v8:7253, v8:7522
>Change-Id: I2305302285156aa1f71328ecac70377abdd92c80
>Ref: nodejs/node#11865
>Design-Document: http://bit.ly/v8-zero-cost-async-stack-traces
>Reviewed-on: https://chromium-review.googlesource.com/c/1273049
>Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
>Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
>Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
>Reviewed-by: Maya Lekova <mslekova@chromium.org>
>Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
>Cr-Commit-Position: refs/heads/master@{#56554}

Change-Id: I5a11bd31bf2aac2e2b94779fa03b85ee88d7dbc4
Reviewed-on: https://chromium-review.googlesource.com/c/1288811
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#56818}
2018-10-19 13:10:05 +00:00
Sigurd Schneider
1dc1d1ae4e [assembler] Move ConstantPools out of src/assembler.h
Drive-by: Eliminate unnecessary includes to src/assembler.h.

Bug: v8:8238
Change-Id: Ia0408b993b8b1c21a76c947f406f96b63fe41994
Reviewed-on: https://chromium-review.googlesource.com/c/1288810
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56817}
2018-10-19 11:38:39 +00:00
Toon Verwaest
cf38caeab1 [parser] Check overflow in parser productions rather than token handling
Added to crucial productions that will incur in any infinite recursion:
- In ParsePrimaryExpression
- In all ParseUnaryExpression subrules
- In ParseDoWhileStatement
- In ParseBlock

Change-Id: Iaee295eb5652e57712d029999b36078fea3b7dab
Reviewed-on: https://chromium-review.googlesource.com/c/1290794
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56816}
2018-10-19 11:27:23 +00:00
Sigurd Schneider
5bc96c9191 Revert "[builtins] Implement Array.prototype.slice in Torque"
This reverts commit 41ba3d3eb0.

Reason for revert: Speculative revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Fuzzer/27370
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20predictable/19895

Original change's description:
> [builtins] Implement Array.prototype.slice in Torque
> 
> In the process:
> 
> - add volatile types for FastJSArray and remove the length_fast accessor
>   from JSArray with the application of more rigorous typing.
> - add micro benchmarks for testing all the interesting slice cases
> 
> Also update a few assorted places in .tq code to make them more
> idiomatic.
> 
> Change-Id: I76ec2bb25b65a869180af1f7288419dc1f0a9c37
> Reviewed-on: https://chromium-review.googlesource.com/c/1281603
> Commit-Queue: Daniel Clifford <danno@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56806}

TBR=danno@chromium.org,jgruber@chromium.org,tebbi@chromium.org

Change-Id: I1f2c82b4c3ab0848857f620facacf9604d4fcd11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1290973
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56815}
2018-10-19 11:24:34 +00:00
Sigurd Schneider
bb54f99982 Revert "[embedded] Share a single RelocInfo between all trampolines"
This reverts commit 1bf6e73553.

Reason for revert: Breaks nosnap builds:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/21209

Original change's description:
> [embedded] Share a single RelocInfo between all trampolines
> 
> Creates a single RelocInfo to be used by all builtin trampolines and
> stores it as a root. All trampolines then substitute this for their
> trampoline at generation time with DCHECKs to make sure it is
> identical.
> 
> Also forces all non-trampoline RelocInfo ByteArrays for builtins to be
> generated into RO_SPACE.
> 
> On x64, this results in the OLD_SPACE part of the startup snapshot
> decreasing in size from 166096 to 131248 (-34848) bytes and RO_SPACE
> (in the read-only snapshot) increasing from 31176 to 31248 (+72) bytes.
> 
> Bug: v8:8295
> Change-Id: I69f4a899b738f2023ed42501c2b9797d34305b06
> Reviewed-on: https://chromium-review.googlesource.com/c/1276468
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56811}

TBR=ulan@chromium.org,jgruber@chromium.org,delphick@chromium.org

Change-Id: I57239af6f3fc9c403977da0561b8fe32c1a758e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8295
Reviewed-on: https://chromium-review.googlesource.com/c/1291070
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56814}
2018-10-19 11:21:03 +00:00
Camillo Bruni
78e5763181 [CloneObjectIC] Avoid FieldType confusions
Do not propagate FieldTypes for kField properties.

Bug: chromium:881247
Change-Id: Ia6af451cd6f3ba22a9ced1f3b43fc4cfc8f7084e
Reviewed-on: https://chromium-review.googlesource.com/c/1288637
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56813}
2018-10-19 11:03:21 +00:00
Stephan Herhut
9c00157351 [wasm] Add stress test for I64 atomics
This test is modelled after the atomics-stress test but supports 64 bit
operands.

Bug: v8:6532
Change-Id: I313b1ade74a58201b3fa097ba5b1515754a685db
Reviewed-on: https://chromium-review.googlesource.com/c/1234414
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56812}
2018-10-19 10:51:21 +00:00
Dan Elphick
1bf6e73553 [embedded] Share a single RelocInfo between all trampolines
Creates a single RelocInfo to be used by all builtin trampolines and
stores it as a root. All trampolines then substitute this for their
trampoline at generation time with DCHECKs to make sure it is
identical.

Also forces all non-trampoline RelocInfo ByteArrays for builtins to be
generated into RO_SPACE.

On x64, this results in the OLD_SPACE part of the startup snapshot
decreasing in size from 166096 to 131248 (-34848) bytes and RO_SPACE
(in the read-only snapshot) increasing from 31176 to 31248 (+72) bytes.

Bug: v8:8295
Change-Id: I69f4a899b738f2023ed42501c2b9797d34305b06
Reviewed-on: https://chromium-review.googlesource.com/c/1276468
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56811}
2018-10-19 10:39:05 +00:00
Stephan Herhut
c7a1743115 [wasm] Add stress test of atomic opcodes.
This test runs random sequences of atomic wasm operations on multiple
threads and tries to compute an equivalent sequential interleaving that
would reproduce intermediate results.
By its nature, this test might time out and is flaky.

Bug: v8:6532
Change-Id: Iafdab4561cbf37a5c3fa9b8af9d0fbaaf5681608
Reviewed-on: https://chromium-review.googlesource.com/c/1195366
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56810}
2018-10-19 09:59:05 +00:00
Daniel Bratell
45d5312e1d Removed headers from a jumbo exclude list in cctest
Headers are not included in jumbo builds so excluding
them has no meaning and will cause problems in a future
version of jumbo. This patch removes two such headers.

Change-Id: I19eadf989ff69a4e1116ba265ecb37236d67efd4
Reviewed-on: https://chromium-review.googlesource.com/c/1290793
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#56809}
2018-10-19 09:58:00 +00:00