Commit Graph

1835 Commits

Author SHA1 Message Date
Brad Nelson
d51f4c8268 [wasm] Adding public usage metric for WebAssembly.
BUG=v8:7068
R=kschimpf@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iaf29d3696094722853fb67b29c697860752e256e
Reviewed-on: https://chromium-review.googlesource.com/763995
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49431}
2017-11-16 20:31:15 +00:00
Yuki Shiino
f576902c99 Add support of Maybe<void> as a template specialization.
Blink wants to use Maybe<T> as a return type of (author) callback
functions, where T can be type void.  So, this patch adds support
of Maybe<void>.

Bug: chromium:778580, chromium:779036
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id654bafc5ceac8ef6f755902418f250c353a8837
Reviewed-on: https://chromium-review.googlesource.com/771730
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49416}
2017-11-16 15:29:26 +00:00
Leszek Swirski
61e04e2867 [compiler] Add new "no cache reason" enum values
Add enum values to the "no cache reason" API which reflect new types of
no-cache reason we will want to distinguish.

Also, renames one of the enum values (BecauseExtension ->
BecauseV8Extension) because it was confusing. It's a V8-only type of no
cache reason, so it shouldn't affect embedders.

Bug: chromium:769203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I41d4ecfb35b2e91b71562b4f23b15d20f16a943c
Reviewed-on: https://chromium-review.googlesource.com/769010
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49367}
2017-11-14 19:46:45 +00:00
Andreas Haas
98c40a4bae [platform] Return task runners as shared_ptr
At the moment, task runners are returned as unique_ptr. This is
inconvenient, however. In all implementations I did, the platform holds
a shared pointer of the task runner and wraps it in a wrapper class just
to return it as a unique_ptr. With this CL the platform API is changed
to return a shared_ptr directly.

R=rmcilroy@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ide278db855199ea239ad0ae14d97fd17349dac8c
Reviewed-on: https://chromium-review.googlesource.com/768867
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49366}
2017-11-14 19:26:34 +00:00
Igor Sheludko
c00bb6da1c [runtime] Prepare Map fields definition for extending instance type field.
Bug: v8:5799
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2c412f40aba6135dd0dafc7daa57420071ffee1c
Reviewed-on: https://chromium-review.googlesource.com/768414
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49361}
2017-11-14 16:21:54 +00:00
Andreas Haas
ffee558e14 [cleanup] use unique_ptr for the DefaultPlatform
With this CL, {CreateDefaultPlatform} returns a unique_ptr to indicate
that the caller owns the returned memory. We had several memory leaks
where the memory of the DefaultPlatform did not get deallocated.

In addition, the {TracingController} of the {DefaultPlatform} also gets
received as a unique_ptr. Thereby we document that the {DefaultPlatform}
takes ownership of the {TracingController}. Note that the memory of the
{TracingController} was already owned by the {DefaultPlatform}, but it
was not documented in the interface, and it was used incorrectly in
tests.

This CL fixes the asan issues in 
https://chromium-review.googlesource.com/c/v8/v8/+/753583	
([platform] Implement TaskRunners in the DefaultPlatform)

R=rmcilroy@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I0d1a6d3b22bb8289dc050b1977e4f58381cec675
Reviewed-on: https://chromium-review.googlesource.com/755033
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49349}
2017-11-14 09:57:18 +00:00
peterwmwong
81931e726b Remove NativeWeakMap
Bug: v8:7016
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I5a509fb91a337eec4a58ab4a13d7104e8ba3ff23
Reviewed-on: https://chromium-review.googlesource.com/760677
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49346}
2017-11-14 09:23:08 +00:00
Michael Lippautz
c44da6c271 [api] Refine description for PersistentBase::MarkActive
Bug: chromium:780749
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ifd7da70dd9adffe5de7f126539c4780799d55673
Reviewed-on: https://chromium-review.googlesource.com/763528
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49323}
2017-11-13 13:19:42 +00:00
Yuki Shiino
84ad1f7c71 Export Context::BackupIncumbentScope.
This patch adds a missing V8_EXPORT to Context::BackupIncumbentScope.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ic4146ee1dad2f84222671fc54b4a463282356417
Reviewed-on: https://chromium-review.googlesource.com/762834
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49316}
2017-11-13 07:32:47 +00:00
Karl Schimpf
1719ecb9dc Add capability to handle CSP 'wasm-eval' in V8
Like CSP flag 'unsafe-eval', which communicates if both JS source
files and WASM binary files may be compiled, this CL adds a similar
flag for the compilation of WASM binary files.

That is, a WASM binary file will be compiled only if the new flag is
defined, or the flag for 'unsafe-eval' allows it. These flags are
implemented as callback functions on the isolate. The callbacks get a
(CSP) context, and a string, and returns the corresponding value of
the flag.

Both callbacks are initialized with the nullptr, and is used to
communicate that no CSP policy is defined. This allows this concept to
work, independent of it running in Chrome.

It also does a small clean up in api.cc to use macro CALLER_SETTERS,
instead of explicit code when appropriate.

Bug: v8:7041
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Idb3356574ae2a298057e6b7bccbd3492831952ae
Reviewed-on: https://chromium-review.googlesource.com/759162
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49243}
2017-11-09 00:40:42 +00:00
Alexei Filippov
295c9cc643 [cpu-profiler] Add static CollectSample method to the CpuProfiler API.
The method forces all running profilers attached to the provided isolate
to collect a sample with the current stack.

It is going to be used to synchronize trace events generated by embedder with the samples
collected by the profiler.

Also it will finally allow us to break dependency of isolate on CPU profiler.

BUG=chromium:721099

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I81a0f8a463f837b5201bc8edaf2eb4f3761e3ff8
Reviewed-on: https://chromium-review.googlesource.com/750264
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49236}
2017-11-08 19:48:40 +00:00
Leszek Swirski
5b0a753d2a [code-cache] Keep track of extensions not caching
Bug: chromium:769203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iffb7e92fb9c08c42f03ad28c8defb516454a2d3d
Reviewed-on: https://chromium-review.googlesource.com/753740
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49158}
2017-11-06 20:07:38 +00:00
Franziska Hinkelmann
12eb3e975e [cleanup] Fix typos
Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I9df5beca6444a42aa35c624760265a3cc02182b6
Reviewed-on: https://chromium-review.googlesource.com/753450
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49135}
2017-11-06 11:15:04 +00:00
Jakob Gruber
91ec9872fb [error] Add use counters for non-standard Error features
V8 provides non-standard Error API through:

Error.captureStackTrace
Error.prepareStackTrace
Error.stackTraceLimit

Let's add use counters to gauge how wide-spread these are used.

This is the V8 side of required changes.
The Chromium-side CL: https://crrev.com/c/753446

Bug: v8:6975
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I917cd6344a01670799f6cbf88a4bfff8e8d0d6ad
Reviewed-on: https://chromium-review.googlesource.com/753443
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49113}
2017-11-03 18:32:02 +00:00
Leszek Swirski
f571da954c [compiler] Split compilation timer on caching decision
Rather than having a single script compilation timer, split it into
multiple timers depending on the state of the (blink-owned) code cache
and (v8-owned) complation cache. This is intended to replace both the
script compilation time timer, and the compilation heuristic enum.

Also keep track of why blink might not want us to produce (or consume) a
code cache, and split the compilation timer on this as well.

Note, there is currently no timer for streaming sources, so these won't
show up in the histograms.

Bug: chromium:582873
Bug: chromium:769203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ia32fff044f919e20e3cec73329e62e01e421b72a
Reviewed-on: https://chromium-review.googlesource.com/746922
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49065}
2017-11-01 17:10:45 +00:00
Natalie Silvanovich
d521a1e261 Adding index accessor counter
Change-Id: I7e833c3b06cfb3ff9eda663c2bee4981013744b0

Adding index accessor counter

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ic353c11fa0f430537819387d17eedeec5466d9cc
Bug: 
Reviewed-on: https://chromium-review.googlesource.com/741169
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Natalie Silvanovich <natashenka@google.com>
Cr-Commit-Position: refs/heads/master@{#49061}
2017-10-31 22:20:02 +00:00
Sathya Gunasekaran
67aae25f61 [module] Remove experimental status for dynamic import API
Bug: v8:5785
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ia386725996beb8f47f97930c9dfc8a9639887fea
Reviewed-on: https://chromium-review.googlesource.com/744739
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49045}
2017-10-31 00:33:36 +00:00
Andreas Haas
c690f54d95 [platform] Add TaskRunner to the platform API
With the existing platform API it is not possible to post foreground
tasks from background tasks. This is, however, required to implement
asynchronous compilation for WebAssembly. With this CL we add the
concept of a TaskRunner to the platform API. The TaskRunner contains
all data needed to post a foreground task and can be used both from a
foreground task and a background task. Eventually the TaskRunner should
replace the existing API.

In addition, this CL contains a default implementation of the
TaskRunner. This implementation has tempory workaround for platforms
which do not provide a TaskRunner implementation yet. This default
implementation should be deleted again when all platforms provide a
TaskRunner implementation.

R=rmcilroy@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I6ea4a1c9da1eb9a19e8ce8f2163000dbc2598802
Reviewed-on: https://chromium-review.googlesource.com/741588
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49041}
2017-10-30 16:17:08 +00:00
Toon Verwaest
bc8c97c72a [api] Remove deprecated FunctionCallbackInfo::Callee
This especially simplifies arm64 CallApiCallbackStub alignemnt handling.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I26e9c075702161a3f1c70f94ec83d149d2d8f33a
Reviewed-on: https://chromium-review.googlesource.com/741600
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49004}
2017-10-27 14:16:49 +00:00
Toon Verwaest
07de62ca18 [lazy-accessor-pairs] Don't take the fast paths if the context needs to be switched
(This is a reland of cb84b6f624)

This works in the ICs since compiled handlers are not shared anymore.

Bug: chromium:759734
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I3b7d6ae34bb4cfa213f679354fac56fb51bfd5ed
Reviewed-on: https://chromium-review.googlesource.com/739822
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48999}
2017-10-27 11:31:34 +00:00
Michaël Zasso
d8550099a3 [build] Fix V8_VERSION_STRING with embedder string
Fixes the value of V8_VERSION_STRING to add the embedder string when the
patch level is zero.

BUG=v8:5740

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Idfe2020fe857865ff75a91ddb57f18ed23dfe3a7
Reviewed-on: https://chromium-review.googlesource.com/732992
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48834}
2017-10-23 14:31:52 +00:00
Adithya Srinivasan
f65251be3c Add JSSpecialApiObjectType to fast path
HTMLCollection and NodeList have InstanceType
JS_SPECIAL_API_OBJECT_TYPE, and therefore always run the slow case
of GetAlignedPropertyFromInternalField. This slows down the performance
of indexedPropertyGetter for both types, which are very commonly used
in websites.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I36bd2cd7d9bbc19149e15174f6868b8a1f1658c8
Reviewed-on: https://chromium-review.googlesource.com/726529
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48760}
2017-10-19 17:30:52 +00:00
Alexey Kozyatinskiy
b1cd96ec4b [inspector] added V8InspectorClient::maxAsyncCallStackDepthChanged
R=dgozman@chromium.org

Bug: none
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I0fa10978266feb3c3907ce1f3386ae7a34a33582
Reviewed-on: https://chromium-review.googlesource.com/726490
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48705}
2017-10-18 19:49:57 +00:00
ccyongwang
39b2227bbd fix compile error when use PersistentValueMap.
In PersistentValueMap, SetWeak function should supply WeakCallbackType arguments.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I70a59e90b7ea0a10f695419e57ae9bfb8d5ba852
Reviewed-on: https://chromium-review.googlesource.com/684002
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48529}
2017-10-13 10:23:57 +00:00
Michael Hablich
bc5d1c0989 Bump version to 6.4
TBR=machenbach@chromium.org
NOTRY=true

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I819f879e68743248a2d96b2aad20136a7841a69e
Reviewed-on: https://chromium-review.googlesource.com/715763
Commit-Queue: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48499}
2017-10-12 13:00:37 +00:00
Jan Krems
1c5529993d Reland "[modules] Implement import.meta proposal"
This is a reland of ed6f00fb8e
Original change's description:
> [modules] Implement import.meta proposal
> 
> Rewrites references to import.meta to a new GetImportMetaObject runtime
> call. Embedders can define a callback for creating the meta object using
> v8::Isolate::SetHostGetImportMetaObjectCallback. If no callback has been
> provided, an empty object with null prototype is created.
> 
> This adds an example implementation to d8 that sets meta.url.
> 
> Bug: v8:6693
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I6871eec79da45bba81bbbc84b1ffff48534c368d
> Reviewed-on: https://chromium-review.googlesource.com/707902
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48433}

TBR=adamk@chromium.org

Bug: v8:6693
Change-Id: Ie2d746ad996a56ed6ff50b832f320fe44e02f231
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/712834
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48468}
2017-10-11 15:37:10 +00:00
Sathya Gunasekaran
a5565227f2 Revert "[modules] Implement import.meta proposal"
This reverts commit ed6f00fb8e.

Reason for revert: tree is broken

NOTRY=true
NOTREECHECKS=true

Original change's description:
> [modules] Implement import.meta proposal
> 
> Rewrites references to import.meta to a new GetImportMetaObject runtime
> call. Embedders can define a callback for creating the meta object using
> v8::Isolate::SetHostGetImportMetaObjectCallback. If no callback has been
> provided, an empty object with null prototype is created.
> 
> This adds an example implementation to d8 that sets meta.url.
> 
> Bug: v8:6693
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
> Change-Id: I6871eec79da45bba81bbbc84b1ffff48534c368d
> Reviewed-on: https://chromium-review.googlesource.com/707902
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48433}

TBR=adamk@chromium.org,gsathya@chromium.org,jan.krems@groupon.com

Change-Id: I908a508d5db84cc8ae60d4fd4a0446bb570c1492
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6693
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/710760
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48434}
2017-10-11 00:05:13 +00:00
Jan Krems
ed6f00fb8e [modules] Implement import.meta proposal
Rewrites references to import.meta to a new GetImportMetaObject runtime
call. Embedders can define a callback for creating the meta object using
v8::Isolate::SetHostGetImportMetaObjectCallback. If no callback has been
provided, an empty object with null prototype is created.

This adds an example implementation to d8 that sets meta.url.

Bug: v8:6693
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I6871eec79da45bba81bbbc84b1ffff48534c368d
Reviewed-on: https://chromium-review.googlesource.com/707902
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48433}
2017-10-10 23:56:35 +00:00
Michaël Zasso
b096c44ffc [build] Introduce an embedder version string
Sometimes, the embedder might want to merge a fix to an abandoned branch
or to a supported branch but the fix is not relevant to Chromium.
This adds a new version string that the embedder can set at compile time
and that will be appended to the official V8 version.
The separator must be provided in the string. For instance, to have a
full version string like "6.0.287.53-emb.1", the embedder must set
V8_EMBEDDER_STRING to "-emb.1".

Related Node.js issue: https://github.com/nodejs/node/pull/9754

BUG=v8:5740
R=machenbach@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ifa2d9bd213795e6d54886436f8c3787ac6162823
Reviewed-on: https://chromium-review.googlesource.com/690475
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Cr-Commit-Position: refs/heads/master@{#48301}
2017-10-05 07:17:45 +00:00
Mathias Bynens
d3c9812143 [parser] Add use counter for U+2028 & U+2029
The context is the following proposal to make JSON a subset of
JavaScript: https://github.com/tc39/proposal-json-superset

There’s interest in performing a side investigation to answer the
question of what would happen if we stopped treating U+2028 and U+2029
as `LineTerminator`s *entirely*. (Note that this is separate from the
proposal, which just changes how these characters are handled in
ECMAScript strings.) This is technically a breaking change, and IMHO it
would be wonderful if we could get away with it, but no one really has
any data on whether or not we could. Adding this use counter lets us get
that data.

BUG=v8:6827

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ia22e8db1634df4d3f965bec8e1cfa11cc7b5e9aa
Reviewed-on: https://chromium-review.googlesource.com/693155
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48260}
2017-10-02 11:46:36 +00:00
Yang Guo
7f9de3dce9 [snapshot] add kProduceExhaustiveCodeCache option.
- Add kProduceExhaustiveCodeCache to v8::ScriptCompiler::CompileOptions
  to request eager compilation to add as much as possible to the code
  cache for the script.
- Repurpose ParseInfo::kLazy flag.
- Remove ParseInfo::kDebug flag.
- Remove --serialize-toplevel as it has become obsolete.

R=marja@chromium.org

Bug: chromium:768705
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ife14f7a1d1c02e525f0b9dbfd2452013d67c7167
Reviewed-on: https://chromium-review.googlesource.com/684019
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48160}
2017-09-26 09:53:53 +00:00
Sigurdur Asgeirsson
a787c3f9e1 Allow overriding DCHECK handling and make it non-fatal.
Bug: chromium:763010
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I7d479f8abb16ffd7ffc19d3a6b58da01f5feddd0
Reviewed-on: https://chromium-review.googlesource.com/661054
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48038}
2017-09-15 11:48:16 +00:00
Andreas Haas
549692cbc0 [wasm] Streaming compilation for WebAssembly.
In this CL I implement streaming compilation for WebAssembly,
as described in the design doc I have sent out already.

In this implementation the decoding of sections other than the
code section is done immediately on the foreground thread.
Eventually all decoding should happen in the background. I
think it is acceptable to do the decoding on the foreground
thread for now because I have finished it already, and
decoding in the background would add even more complexity to
this CL.

Bug:v8:6785

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I285e1e5e1a5a243113c92571b25ee9bae551d0ed
Reviewed-on: https://chromium-review.googlesource.com/631721
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48022}
2017-09-15 06:36:25 +00:00
Georg Neis
0c246c33a3 [bigint] Introduce BigInt type.
BigInt is a new primitive type of arbitrary precision integers,
proposed in https://tc39.github.io/proposal-bigint.

This CL introduces a corresponding instance type, map, and C++
class to V8 and adds BigInt support to a few operations (see the
test file). Much more is to come. Also, the concrete representation
of BigInts is not yet fixed, currently a BigInt is simply a wrapped
Smi.

Bug: v8:6791
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ia2901948efd7808f17cfc945f0d56e23e8ae0b45
Reviewed-on: https://chromium-review.googlesource.com/657022
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47956}
2017-09-11 18:55:48 +00:00
Jeremy Roman
6716a7f641 Make v8::JSON::Stringify take Local<Value> instead of Local<Object>.
It is legal to stringify other kinds of values, like strings and numbers.
Since Local<Object> is convertible to Local<Value>, this is unlikely to
break callers.

Bug: v8:6810
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie8e97c86308d62cdf0a2a17490a6e20de58fc76e
Reviewed-on: https://chromium-review.googlesource.com/657633
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47935}
2017-09-11 05:17:28 +00:00
Marja Hölttä
9f21cab8c8 Revert "Reland#2 [parser] Refactor streaming scanner streams."
This reverts commit de9269f3c3.

Something's still wrong in the encoding handling (see bug).

Bug: chromium:763106
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Icd19dd42b84b9d090e191375a2942b9941110bcf
Reviewed-on: https://chromium-review.googlesource.com/657386
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47924}
2017-09-08 13:36:04 +00:00
Anna Henningsen
9b21865822 [api] Add optional data pointer to GC callbacks
This can be useful when there may be multiple callbacks attached by
code that's not directly tied to a single isolate, e.g. working
on a per-context basis.

This also allows rephrasing the global non-isolate APIs in terms
of this new API, rather than working around it inside `src/heap`.

TBR=hpayer@chromium.org

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2e490ec40d1a34ea812f25f41ef9741d2116d965
Reviewed-on: https://chromium-review.googlesource.com/647548
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47923}
2017-09-08 13:07:24 +00:00
Sathya Gunasekaran
ba145b32b4 [api] Fix typo in comment
R=adamk@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie59cc231e130fad391508e5c47e01d32d0a78806
Reviewed-on: https://chromium-review.googlesource.com/651357
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47857}
2017-09-06 16:57:44 +00:00
Franziska Hinkelmann
43bb277898 [api] Use query interceptor in Object.keys().
The V8 API provides interceptors. They are not part of the
EcmaScript specification. But their behavior should be consistent.
For example, when an EnumeratorInterceptor is defined, Object.keys(),
Object.entries(), and Object.values() should all have the
same number of entries.

This CL creates consistent behavior among these
functions. If a QueryCallback is present, it is used to
filter the result from the EnumeratorCallback for
enumerable properties.

Bug: v8:6627
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I4f4271ddeb99a5e85918148c5033923c149b9468
Reviewed-on: https://chromium-review.googlesource.com/649786
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47831}
2017-09-05 17:28:29 +00:00
Michael Hablich
88212a2a84 Updated version to 6.3
TBR=machenbach@chromium.org
NOTRY=true

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I59e5a30a469fa1a397ef55d2bc2bce550c5eed2f
Reviewed-on: https://chromium-review.googlesource.com/645706
Commit-Queue: Michael Hablich <hablich@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47740}
2017-08-31 11:21:35 +00:00
Sathya Gunasekaran
d138f8d7ef [promise] Reduce size of PromiseCapability by making it a struct
Bug: v8:5046
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I586dad351c950c119ec4d16693ce2a82395a8272
Reviewed-on: https://chromium-review.googlesource.com/640011
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47726}
2017-08-31 04:20:16 +00:00
Sathya Gunasekaran
dbfe4a49d8 [Modules] Introduce ScriptOrModule and HostDefinedOptions
This patch introduces a new container type ScriptOrModule which
provides the name and the host defined options of the script/module.

This patch also introduces a new PrimitivesArray that can hold
Primitive values, which the embedder can use to store metadata.

The HostDefinedOptions is passed to V8 through the ScriptOrigin, and
passed back to the embedder through HostImportModuleDynamically for
module loading.

Bug: v8:5785, v8:6658, v8:6683
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I56c26fc9a680b273ac0a6691e5ad75f15b8dc80a
Reviewed-on: https://chromium-review.googlesource.com/622158
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47724}
2017-08-31 00:28:56 +00:00
Sergei D
11ba497cd8 Delegate getting current wall-clock time to the Platform interface.
To enable executing code in a context of a particular time or date (e.g. when
codepath depends on whether it's say evening or New Year) there is a need for
a way to provide it bypassing actual system time.

Bug: chromium:751993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iee35d97b74345f63fff814a65a6f134d7c970341
Reviewed-on: https://chromium-review.googlesource.com/598666
Commit-Queue: Sergei Datsenko <dats@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47700}
2017-08-30 06:28:09 +00:00
Adam Klein
ce05578aa6 [api] Mark non-Isolate constructors of String::Utf8Value/Value for deprecation
Also remove last internal callers of the to-be-deprecated APIs.

Bug: v8:2487
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Id72cf363eac86e4b4dbf7df83bdb848071260b90
Reviewed-on: https://chromium-review.googlesource.com/639326
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47690}
2017-08-29 17:42:34 +00:00
Jeremy Roman
779bb1b172 [snapshot] Make the API external reference table const.
Chromium side: https://chromium-review.googlesource.com/c/chromium/src/+/639552

Bug: chromium:759831
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I1b217c4fa4c930733dcfab982879bf41936a3a83
Reviewed-on: https://chromium-review.googlesource.com/639551
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47683}
2017-08-29 14:15:10 +00:00
Mateusz Czeladka
fe598532ec Pass Isolate pointer to String::Utf8Value/Value constructors
As part of J2V8 development (https://github.com/eclipsesource/J2V8),
we realized that we had a subtle bug in how Isolate scope was created
and it's lifetime managed, see:
https://github.com/eclipsesource/J2V8/issues/313.

Mentioned above bug was fixed, however, what we also noticed is that
V8 API has been constantly and slowly moving to such an API, in which
one has to pass Isolate explicitly to methods and/or constructors. We
found two more places that might have been overlooked. This contribution
adds passing of Isolate pointer explicitly to constructors of
String::Utf8Value and String::Value classes.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I61984285f152aba5ca922100cf3df913a9cb2cea
Reviewed-on: https://chromium-review.googlesource.com/593309
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47656}
2017-08-28 18:17:08 +00:00
Sergei D
837b801666 Export default implementation of getting wall-clock time.
Derived projects need easy access to the original V8's implementation of
time to implement Platform interface.

Bug: chromium:751993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I97ee77929fda5930e7d75ca8609797673485cec3
Reviewed-on: https://chromium-review.googlesource.com/636884
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Sergei Datsenko <dats@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47638}
2017-08-28 09:28:23 +00:00
Jochen Eisinger
03850446dc Remove deprecated tracing methods from v8::Platform
Embedders should implement them via the v8::TracingController interface
and return a pointer to an instance of that interface from
v8::Platform::GetTracingController

BUG=v8:6511
R=fmeawad@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: If17b013c7ce4cf540a186767fd6e1b5e00e0dab2
Reviewed-on: https://chromium-review.googlesource.com/554770
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47549}
2017-08-23 13:31:30 +00:00
Adam Klein
1385f95fed Revert "[api] Use query interceptor in Object.keys()."
It caused crashes in the extension process on Canary.

This reverts commit b6059a67ca.

Also revert followup test CL:

  "[api] Add test for EnumeratorCallback and for...in."

as it depends on the logic in the reverted change.

This reverts commit 56772de7f9.

Bug: chromium:757371, v8:6627
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id110128e6dc858a5a60ffc0175e8bb927b90bfc5
Reviewed-on: https://chromium-review.googlesource.com/626720
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47522}
2017-08-22 18:42:17 +00:00
Jochen Eisinger
749b9c062e Remove deprecated allow code-gen callback
BUG=chromium:732736
R=marja@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2c0a96b76ae977e53a418d22175bcc487f548786
Reviewed-on: https://chromium-review.googlesource.com/543238
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47509}
2017-08-22 13:42:56 +00:00