Commit Graph

45852 Commits

Author SHA1 Message Date
Ulan Degenbaev
4a90e48689 [heap-profiler] Annotate global handles retained by console and debugger.
Bug: chromium:811842
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I72163abf0b20b123fb541fe0a1b168e036ef044e
Reviewed-on: https://chromium-review.googlesource.com/919063
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51360}
2018-02-19 12:21:52 +00:00
Peter Marshall
e77e4e2fc2 [cleanup] Type-ify NumberToString in CSA
Change-Id: Id616646bbeebe91e3e575d40799f01611a57643f
Reviewed-on: https://chromium-review.googlesource.com/924281
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51359}
2018-02-19 12:05:02 +00:00
Ulan Degenbaev
466d157cb7 [api] Add API for annotating retainer of a strong global handle.
This adds PersistentBase::AnnotateStrongRetainer(const char*) function.

The annotation is used by the heap snapshot generator to show the edges
from the (Global handles) root to the global handles.

Bug: chromium:811842
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I1a9e3e53a53aeaf2b590709fab8dd4ecf7e8f252
Reviewed-on: https://chromium-review.googlesource.com/916788
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51358}
2018-02-19 11:42:03 +00:00
Gabriel Charette
8b53b9d908 Preempt ConcurrentMarking tasks ASAP when cancelling marking.
Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867

Bug: chromium:812178
Change-Id: I2abe28c6e953df42cffdcbd7ea35df9d29849905
Reviewed-on: https://chromium-review.googlesource.com/924030
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51357}
2018-02-19 10:59:42 +00:00
Gabriel Charette
e9750cb806 Preempt ConcurrentMarking tasks instead of merely pausing in PauseScope.
Follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/924867

This is the core goal of the initial CL @
https://chromium-review.googlesource.com/c/v8/v8/+/922103
which was since split into multiple to diagnose a bots-only failure.

Bug: chromium:812178
Change-Id: I4c4e0b517737e020862917bd89fa6ce38244e597
Reviewed-on: https://chromium-review.googlesource.com/924031
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51356}
2018-02-19 10:54:34 +00:00
Predrag Rudic
a8f68c205f MIPS[64]: Skip cctests until WasmF64 support is implemented in Liftoff
Change-Id: I101cd4eea87f17a1454c3e2b39c421e304509e61
Reviewed-on: https://chromium-review.googlesource.com/919085
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51355}
2018-02-19 10:53:28 +00:00
Gabriel Charette
4b49f84434 Add a trace event when pausing/preempting concurrent marking.
This will let us identify in traces whether unwinding after receiving
the preemption event is slower than desired and should be optimized.

Adding it to pausing while working on removing it in
https://chromium-review.googlesource.com/c/v8/v8/+/922103
will allow gathering traces that highlight the issue.

R=mlippautz@chromium.org

Bug: chromium:812178
Change-Id: I0555c6825e0792769c9ae2d748d7cc35df4f6fed
Reviewed-on: https://chromium-review.googlesource.com/924122
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51354}
2018-02-19 10:48:19 +00:00
Gabriel Charette
f4b4109936 Introduce ConcurrentMarking::StopRequest API.
This was extracted from https://chromium-review.googlesource.com/c/v8/v8/+/924073/10
after it became clear that using COMPLETE_TASKS/PREEMPT_TASKS where
it should make sense to doesn't work in practice for now.

Experimental CLs which led to the above conclusion:
 - https://chromium-review.googlesource.com/c/v8/v8/+/924865
   (COMPLETE or CANCEL -- still broken)
 - https://chromium-review.googlesource.com/c/v8/v8/+/924866
   (CANCEL only, as before, works)
 - https://chromium-review.googlesource.com/c/v8/v8/+/924028
   (CANCEL and PREEMPT -- broken as well)

Introducing this unittested API allows to reduce the size
of the CLs causing hard-to-diagnose bots-only failures
and fix them individually follow-ups @

 1) https://chromium-review.googlesource.com/c/v8/v8/+/924029
 2) https://chromium-review.googlesource.com/c/v8/v8/+/924031
 3) https://chromium-review.googlesource.com/c/v8/v8/+/924030

Bug: chromium:812178
Change-Id: Icdac456e9f7874b0c4b321ccdb8898297dad7d73
Reviewed-on: https://chromium-review.googlesource.com/924867
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51353}
2018-02-19 10:39:08 +00:00
Jakob Kummerow
bd0b32f545 Reland "[bigint] Add BigInt64Array, BigUint64Array"
This is a reland of dda0419ecd.

Originally reviewed-on: https://chromium-review.googlesource.com/914513
and landed as refs/heads/master@{#51342}.

Bug: v8:6791
Change-Id: I3b3a069da7a0e64c38a81b3110dc5ece4887cb19
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924665
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51352}
2018-02-19 10:23:18 +00:00
Yang Guo
004d90615a Remove tools/release/update_node.py.
Use tools/node/update_node.py instead.

TBR=machenbach@chromium.org

Change-Id: Ib6f7b93e92b27e967627517a0afe2fedd533f6c4
Reviewed-on: https://chromium-review.googlesource.com/924153
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51351}
2018-02-19 10:09:07 +00:00
Ulan Degenbaev
7e6d62852d [heap-profiler] Simplify snapshotting of the roots.
This replaces three passes over the roots with a single pass.
This also removes root synchronization logic.

The GC subroot index is computed from the |root| parameter of the visit
method. The new |description| parameter is used as an edge name.

Bug: chromium:811842
Change-Id: I03a9215d56b54b3eb5f7bc8b32d5b22ad091c68b
Reviewed-on: https://chromium-review.googlesource.com/916781
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51350}
2018-02-19 10:03:38 +00:00
Gabriel Charette
ba37a5f64a Add DCHECKs to confirm there are no pending tasks when calling ConcurrentMarking::ScheduleTasks()
This was extracted from https://chromium-review.googlesource.com/c/v8/v8/+/924073/7
in an attempt to isolate hard-to-diagnose bots-only failures there.

Bug: chromium:812178
Change-Id: I980b25ec7d775b74ade75e9166806740b93eea8e
Reviewed-on: https://chromium-review.googlesource.com/924026
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51349}
2018-02-19 08:13:45 +00:00
Gabriel Charette
330fa940c2 Extract the trivial cleanup bits from https://chromium-review.googlesource.com/c/v8/v8/+/924073/10
This is an attempt to isolate what's causing the hard-to-diagnose bots only
failures with that CL.

Bug: chromium:812178
Change-Id: I50ffe8953bebbbc6b5a5e2f689718662a537acb4
Reviewed-on: https://chromium-review.googlesource.com/924864
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51348}
2018-02-19 08:09:50 +00:00
Erik Luo
0cf89dd1be [debug] move side-effect tests into subfolder
Bug: chromium:810176
Change-Id: I089a1678dfbe0c3bb664e54818a6853f66d364b2
Reviewed-on: https://chromium-review.googlesource.com/923387
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51347}
2018-02-19 08:08:45 +00:00
Marja Hölttä
1124f5abaf [heap] Remove unnecessary AccessMode.
Change-Id: I4f1d3bd609c48a8deed04e3e59ef326c0e4735c3
Reviewed-on: https://chromium-review.googlesource.com/923985
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51346}
2018-02-19 08:02:35 +00:00
Sergiy Byelozyorov
de7a317428 Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: I5023040d3ce7753d39345033f91848e4f0ed36d9
Reviewed-on: https://chromium-review.googlesource.com/921101
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51345}
2018-02-17 07:44:59 +00:00
Michael Achenbach
cb7a15fede Revert "[bigint] Add BigInt64Array, BigUint64Array"
This reverts commit dda0419ecd.

Reason for revert: msvc unhappy:
https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/1434

Original change's description:
> [bigint] Add BigInt64Array, BigUint64Array
> 
> Bug: v8:6791
> Tbr: hpayer@chromium.org
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I637e9084d2fe4869ad0be2fb996149ab9940f346
> Reviewed-on: https://chromium-review.googlesource.com/914513
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51342}

TBR=jkummerow@chromium.org,neis@chromium.org,hpayer@chromium.org

Change-Id: I49237fa323f0d3ea70e744d92d5cbdd4d5c4b39f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6791
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924663
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51344}
2018-02-17 06:01:31 +00:00
v8-autoroll
6574c66d72 Update V8 DEPS.
Rolling v8/build: c5c828a..e2c6aae

Rolling v8/buildtools: a09e064..2888931

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e7298f3..4aa92ef

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

Change-Id: Id6e6a5be6a6c2480a83489b2c5f82d8f7139c4b3
Reviewed-on: https://chromium-review.googlesource.com/924357
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51343}
2018-02-17 04:53:59 +00:00
Jakob Kummerow
dda0419ecd [bigint] Add BigInt64Array, BigUint64Array
Bug: v8:6791
Tbr: hpayer@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I637e9084d2fe4869ad0be2fb996149ab9940f346
Reviewed-on: https://chromium-review.googlesource.com/914513
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51342}
2018-02-17 04:52:29 +00:00
Michael Achenbach
77290e0d7f [build] Prepare removal of gyp-defines from landmine
Depends on: https://crrev.com/c/924114

TBR=yangguo@chromium.org

Bug: chromium:756691
Change-Id: Ibbc3bd35e8727296c1539edc961e3184830575ff
Reviewed-on: https://chromium-review.googlesource.com/924609
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51341}
2018-02-16 23:28:14 +00:00
Bill Budge
95e39b0623 [API] Don't use VM methods of v8::ArrayBuffer::Allocator.
- Replaces calls to Allocator Reserve, Free, and SetPermissions
  with equivalent page allocator calls (allocation.h).
- Un-implements these methods to catch usage, in preparation for
  removing these.

Bug: chromium:799573
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id233b7a9cfc8e332c64e514f6359e8b670c2d75e
Reviewed-on: https://chromium-review.googlesource.com/911883
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51340}
2018-02-16 22:51:17 +00:00
Mathias Bynens
fd9251dbec Ship JSON ⊂ ECMAScript
Intent to ship:
https://groups.google.com/d/msg/v8-users/YZnlGa8ZMoc/_w7H3x_BAgAJ

Bug: v8:7418
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I9e80dd98fa7b04fee3be591282e455f5576eeed2
Reviewed-on: https://chromium-review.googlesource.com/923728
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51339}
2018-02-16 22:21:45 +00:00
Bill Budge
018f119223 [memory] Add a test for RX page permission.
Bug: chromium:799573
Change-Id: I467c74b5b26bc6f1e1a35c1104df12b77f072bac
Reviewed-on: https://chromium-review.googlesource.com/923430
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51338}
2018-02-16 21:52:44 +00:00
Alexey Kozyatinskiy
6db8a9c079 [inspector] cleanup old failed to parse anonymous scripts
We already cleanup these scripts on frontend side. It is crucial to
cleanup them on backend side as well, since some web applications use
following logic: get some data from network, add this data to buffer,
try to parse buffer using JSON.parse. On each unsuccessfull JSON.parse
we get another scriptFailedToParse event.

Frontend logic of discarding scripts: https://goo.gl/FDtaWK

Some idea of smarter logic here: track what script ids are reported
using protocol and cleanup only script ids which reported not only as
part of scriptFailedToParse event.

R=alph@chromium.org

Bug: chromium:810812
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ifd67764c232e4abc7dc6e8e69a651bf9ac0e381b
Reviewed-on: https://chromium-review.googlesource.com/919834
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51337}
2018-02-16 20:55:24 +00:00
Michael Achenbach
667173aab8 [test] Add thread-pool-size numfuzzer
NOTRY=true

Bug: v8:7455
Change-Id: Icb82e8196bc16b4c8b0eebb3c5820e6b3d581735
Reviewed-on: https://chromium-review.googlesource.com/924309
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51336}
2018-02-16 20:49:17 +00:00
Michael Achenbach
93bfaa172d [test] Enable passing the thread-pool size to d8
This will enable some fuzzers to alter the thread-pool size.

Bug: v8:7455
Change-Id: Ic9c9600cdb3dc50e860dbda8432a23bb20f1dd44
Reviewed-on: https://chromium-review.googlesource.com/924273
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51335}
2018-02-16 20:44:30 +00:00
Benedikt Meurer
a840f1f8f7 [async-await] Eliminate throwaway promise in async functions.
The ES2017 specification contains a so-called "throwaway" promise that
is used to specify the behavior of await in terms of PerformPromiseThen,
but it's actually not necessary and never exposed to user code. In
addition to that, hooking up the promise in await required a context (to
refer to the generator object) and two closures for the reject/fulfill
handling, which would resume the generator corresponding to the async
function. That meant, we had to allocate 4 additional objects for every
await.

Instead of using a JSPromise plus the callbacks, this CL adds logic to
allow PromiseReaction and PromiseReactionJobTask to carry arbitrary
payloads and Code handlers. We use this for await to avoid the
additional 4 objects mentioned above, and instead just have simple Code
handlers that resume the generator (for the async function), either by
throwing (in case of a rejection) or by resuming normally (in case of
fulfillment).

For this to work properly the JSGeneratorObject has to have a link to
the outer promise returned by the async function, so that the catch
prediction can still figure out what to do in case of promise rejection.
This is done by adding a new generator_outer_promise_symbol when the
debugger is active, which refers from the generator to the outer
promise.

With this change the doxbee-async-es2017-native test goes from around
100.54ms to around 82.45ms, which corresponds to a ~18% reduction in
execution time.

Bug: v8:7253
Change-Id: Iae25b3300bac351c3417be5ae687eff469b0e61f
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/924069
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51334}
2018-02-16 20:05:00 +00:00
Erik Luo
bcbdcea734 Set RuntimeAgent evaluate to use DebugEvaluate::Global
Bug: chromium:810176
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I330fa0bdf81d0bb926cf6db794736e89c069f8f2
Reviewed-on: https://chromium-review.googlesource.com/907707
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51333}
2018-02-16 19:56:20 +00:00
Benedikt Meurer
13ca9a0fd1 [turbofan] Properly optimize calls to promise extras.
Add TurboFan inlining support for the following V8 Extras:

 - v8.createPromise
 - v8.rejectPromise
 - v8.resolvePromise

These are used by the streams implementation in Chrome currently, and
were previously not inlined into TurboFan, although TurboFan already
had all the necessary functionality (namely the JSCreatePromise,
JSRejectPromise and JSResolvePromise operators). We might eventually
want to use these functions in Node core as well (at least short-term
for Node 10), to replace the C++ internal API functions with the same
name that are currently being used by parts of Node core.

For this to work, the rejectPromise and resolvePromise builtins had
to be moved back to CSA, as for JavaScript builtins we still have the
policy that the optimizing compiler must not inline them. But that's
straight-forward since the CSA has all the necessary functionality
available anyways.

Bug: v8:7253
Change-Id: I39ab015c379956cd58ace866e17f8ec23b2257b2
Reviewed-on: https://chromium-review.googlesource.com/924146
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51332}
2018-02-16 19:46:30 +00:00
Sergiy Byelozyorov
0405a54127 Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: Id0de15718308b3ed5d5c47be6959513b9a95dc34
Reviewed-on: https://chromium-review.googlesource.com/916762
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51331}
2018-02-16 17:57:00 +00:00
Andreas Haas
85c93e79ea [wasm] Add FLAG_wasm_write_protect_code_memory
This flag is the WebAssembly native heap equivalent to
FLAG_write_protect_code_memory.

R=mstarzinger@chromium.org

Bug: v8:7454
Change-Id: Id4f671af2e8676d08599c8c30ce03b00e9d33780
Reviewed-on: https://chromium-review.googlesource.com/924071
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51330}
2018-02-16 17:27:19 +00:00
Camillo Bruni
d0d85832c5 [printing] Use colon as separator
Drive-by-fixes:
- brief print prototype

Bug: v8:7310
Change-Id: I4df82bd76c05ff48a5860bd14cf7711140c0b062
Reviewed-on: https://chromium-review.googlesource.com/923737
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51329}
2018-02-16 16:41:59 +00:00
Camillo Bruni
c6b0ccc54b [printing] Fix ScopeInfo printing
Bug: v8:7310
Change-Id: I13cc97aa138ad95248e1d366bd0d326cbe1a090e
Reviewed-on: https://chromium-review.googlesource.com/923736
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51328}
2018-02-16 15:01:35 +00:00
Peter Marshall
33e0ded0c7 [cleanup] Only accept TNodes in CSA StringToNumber.
Change-Id: Idf3a38c0750071263c6450a17d311cbab632523c
Reviewed-on: https://chromium-review.googlesource.com/924141
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51327}
2018-02-16 14:53:55 +00:00
jgruber
e249dd878f Add pretenure argument to NewUninitializedFixedArray
Will be needed in a follow-up (the constants cache builder needs to
grow arrays in old space).

Bug: v8:6666
Change-Id: Ibd911ffd30e2b0f43881e649b5601111d23e4509
Reviewed-on: https://chromium-review.googlesource.com/924068
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51326}
2018-02-16 14:11:35 +00:00
jgruber
b88db2588e [builtins] Add v8_enable_embedded_builtins gn flag
This flag will be used to toggle things for isolate-independent
builtins during development.

Bug: v8:6666
Change-Id: I8a97f08b3d677a01a2a55a4c6445e71e74471f51
Reviewed-on: https://chromium-review.googlesource.com/924067
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51325}
2018-02-16 13:52:25 +00:00
Camillo Bruni
8255eeb936 [runtime] Add SCOPE_INFO_TYPE InstanceType
Bug: v8:7310
Change-Id: I82e7ada4c0f7e415887a859719eb01bb45fd3012
Reviewed-on: https://chromium-review.googlesource.com/921742
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51324}
2018-02-16 13:42:05 +00:00
Peter Marshall
c140e29b6e [cleanup] Make NewJSPromiseWithoutHook private in factory.
Change-Id: I2f2b688b50d8f3b6d5aeb17bb0ed88148660b490
Reviewed-on: https://chromium-review.googlesource.com/924066
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51323}
2018-02-16 13:38:05 +00:00
Jakob Kummerow
8ac70e8663 Work on -Wimplicit-fallthrough for v8
This doesn't enable the warning yet, but adds V8_FALLTHROUGH annotations
in enough places so that v8 can build with the warning on on my linux box.

Found one real bug
(in effect-control-linearizer.cc,
https://chromium-review.googlesource.com/c/v8/v8/+/850392/3/src/compiler/effect-control-linearizer.cc#825
).

Bug: chromium:812686
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3542550b9c24b545641d0f0fc43f28f2780b0ab3
Reviewed-on: https://chromium-review.googlesource.com/911731
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51322}
2018-02-16 13:32:25 +00:00
Clemens Hammacher
ba1b51a2b9 [wasm] Avoid redundant checks of br_table targets
When decoding a br_table instruction, check each br target only once,
even if it appears several times in the break table.
Also, only mark the merge points as reached after calling the interface
method. This is consistent with the behaviour for br and br_if, and is
needed for implementing Liftoff correctly.

Drive-by: Remove {BreakTo} method which hides trivial functionality
behind a non-trivial method name.
Drive-by^2: Remove redundant reachability tests.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: I3f2678c0a6b801b94065dc3e0d452bc2ff82dd50
Reviewed-on: https://chromium-review.googlesource.com/921581
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51321}
2018-02-16 11:58:05 +00:00
v8-autoroll
095eb47b23 Update V8 DEPS.
Rolling v8/build: 89fa02a..c5c828a

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

Change-Id: I5c2b4120f994f8354f92df5d00d36874c6215cc1
Reviewed-on: https://chromium-review.googlesource.com/923522
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51320}
2018-02-16 04:46:05 +00:00
Michael Achenbach
245ca17759 Whitespace change to trigger bots
Change-Id: I9420be73a48db83b622e40f1c2b0dc4364a8d5d0
Reviewed-on: https://chromium-review.googlesource.com/923120
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51319}
2018-02-16 00:10:00 +00:00
Adam Klein
fe55db0c4a [cleanup] Remove unused array iterator private symbols
R=gsathya@chromium.org

Change-Id: Ia03ec888617a492720c78b6c105323182fec351e
Reviewed-on: https://chromium-review.googlesource.com/922784
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51318}
2018-02-15 23:50:43 +00:00
Adam Klein
5aad943dfe Remove mtrofin and rossberg from OWNERS
Tbr: jarin@chromium.org
Change-Id: I17477e2c82398b228a366a3d1fd8eb521dd51eae
Reviewed-on: https://chromium-review.googlesource.com/922270
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51317}
2018-02-15 23:48:43 +00:00
Michael Achenbach
967a2d4762 Whitespace change to trigger bots
TBR=easterbunny

Change-Id: I22f05b717ecdf4e480d6edc09937f2a69544d9f9
Reviewed-on: https://chromium-review.googlesource.com/922901
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51316}
2018-02-15 23:42:43 +00:00
Adam Klein
1de6157f0a [api] Make all one-arg constructors explicit
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5fc71633f2412c2bec3a4363a40da9920a3e25e2
Reviewed-on: https://chromium-review.googlesource.com/922386
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51315}
2018-02-15 19:32:35 +00:00
Jakob Kummerow
a46ffa0dca [bigint] Fix: toLocaleString does not take arguments
Bug: v8:6791
Change-Id: I43c43d217f00720ab666ff9908555fcd0fffe3b5
Reviewed-on: https://chromium-review.googlesource.com/919566
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51314}
2018-02-15 19:24:15 +00:00
Mathias Bynens
9d3002fd76 [esnext] Make ECMAScript a syntactic superset of JSON
This patch makes ECMAScript a syntactic superset of JSON by allowing
U+2028 and U+2029 in string literals.

Proposal repo: https://github.com/tc39/proposal-json-superset

Bug: v8:7418
Change-Id: I7ef4ae6d85854ebc44a66e0eaf789814576832b7
Reviewed-on: https://chromium-review.googlesource.com/921228
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51313}
2018-02-15 17:01:15 +00:00
Andreas Haas
9bd1e7d392 [wasm] Clear owned_memory list of native modules after freeing
The call to isolate_->AdjustAmountOfExternalAllocatedMemory in
WasmCodeManager::FreeNativeModuleMemories can cause a GC, which can
indirectly call WasmCodeManager::FreeNativeModuleMemories again. It
seems that this recursive call can cause memory to be deallocated
twice. With this CL we clear the list of owned_memory after all entries
were deallocated so that we cannot deallocate them again.

I think this CL fixes a crash we saw on ChromeCrash. I don't know how
to reproduce the issue though, or how to write a test for it.

R=mstarzinger@chromium.org

Bug: chromium:812532
Change-Id: I3b66274f9b72919952a4211e984192c0867a6c22
Reviewed-on: https://chromium-review.googlesource.com/921226
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51312}
2018-02-15 15:07:05 +00:00
Georg Neis
a50bc8ac8d Reland "[ic] EmitElementStore: don't miss when hitting new space limit."
This is a reland of af677f29b1, fixing
an issue with negative indices.

Original change's description:
> [ic] EmitElementStore: don't miss when hitting new space limit.
>
> CSA::EmitElementStore used to bail out (IC miss) via
> CSA::CheckForCapacityGrow when the capacity hits the new space
> limit, causing the store IC to go megamorphic in my example (see
> referenced bug). With this CL, we do what TF'ed code does already:
> call into Runtime::kGrowArrayElements (in this situation), thus
> staying monomorphic.
>
> Here's a contrived test case:
>
> ////////////////////////
> let x = [];
>
> function bar() {
>   for (let i = 0; i < 50000; ++i) x[i] = i;
> }
>
> function foo() {
>   for (let i = x.length; i < 100e6; ++i) x[i] = i;
> }
>
> bar();
> foo();
> ////////////////////////
>
> This took about 4s on my machine, now it takes 3s.
>
> Bug: v8:7447
> Change-Id: I7f268fc55835f363d250613ce0357444a663051c
> Reviewed-on: https://chromium-review.googlesource.com/918723
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51297}

Bug: v8:7447, chromium:812451
Change-Id: I345b5e5b2437c4f50e42bbd87947630f24cd95eb
Reviewed-on: https://chromium-review.googlesource.com/921201
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51311}
2018-02-15 12:27:18 +00:00