Commit Graph

229 Commits

Author SHA1 Message Date
Tobias Tebbi
45557b1f89 [torque] format namespaces without indentation
Bug: v8:7793
Change-Id: Id2a93f8ac8c512dbc5cdeb43a97e04d8d6684954
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2196130
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67748}
2020-05-12 14:06:17 +00:00
Simon Zünd
a40e093856 Move to slow-path in Array#sort if the array is no longer a FastJSArray
After sorting the work array but before writing the values back into
the actual receiver, we have an accessor check. This accessor check
needs to be stricter, in order to catch Array prototype protector
cell invalidations.

R=jgruber@chromium.org

Bug: chromium:1077508
Change-Id: I3c3bd4711f9019f9d4423701724319eee9d800a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2187171
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67638}
2020-05-07 08:08:39 +00:00
Tobias Tebbi
a3e97c41ff [torque] improve formatting of try-label
Bug: v8:10421, v8:7793
Change-Id: If11fc7666f04ed0914f5fdfcdaa87acb8655d956
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2169100
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67591}
2020-05-06 09:51:39 +00:00
Maya Lekova
f4e7fd514e [googletest] Update fuchsia-sdk deps in BUILD.gn
Apply the change from this CL to V8's version of googletest too:
https://chromium-review.googlesource.com/c/chromium/src/+/2059008

TBR=thakis@chromium.org

Bug: chromium:1076363
Change-Id: If51c47c88178e75bdc205dd6b72f6aa357ec2d4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2172742
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67506}
2020-04-30 15:41:07 +00:00
Sami Kyostila
9dbab9bbdb [tracing] Migrate tracing to Perfetto track events
This patch replaces V8's tracing implementation (i.e., the TRACE_EVENT
macros) with the track event base implementation from Perfetto. The
advantages of doing this are:

1) This allows us to remove most tracing-related backend code from V8.

2) V8 can start writing strongly typed trace event arguments, which
   are more compact, easier to process and more extensible than legacy
   JSON-based trace arguments.

For the time being, we still support the old trace macros when V8 is
embedded into Chrome and other embedders.

Design doc: https://docs.google.com/document/d/1f7tt4cb-JcA5bQFR1oXk60ncJPpkL02_Hi_Bc6MfTQk/edit#heading=h.398p6b4eaen2

Bug: chromium:1006766
Change-Id: Ie71474fbe065821772b13d851487ebbca680c4ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1947688
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67217}
2020-04-17 21:31:24 +00:00
Victor Costan
b78080ddad Roll v8/third_party/googletest/src/ 10b1902d8..e3f0319d8 (43 commits)
10b1902d89..e3f0319d89

This CL also removes references to gmock-generated-matchers.h, which was
removed from googletest in commit
41b5f149ab306e96b5b2faf523505d75acffd98a, and to
gmock-generated-function-mockers.h, which was removed from googletest in
commit fbf67a70d07543f40832d0cd7a58f304bc6ab1d1.

$ git log 10b1902d8..e3f0319d8 --date=short --no-merges --format='%ad %ae %s'
2020-04-01 absl-team Googletest export
2020-03-30 absl-team Googletest export
2020-03-23 absl-team Googletest export
2020-03-24 krystian.kuzniarek remove chapters on Autotools, Meson and plain Makefiles
2020-03-24 krystian.kuzniarek remove dead code in googletest-output-test
2020-03-24 pkryger Swap settimer and sigaction calls to avoid SIGPROF
2020-03-20 absl-team Googletest export
2019-07-11 adam.f.badura Add support for std::function in MockFunction (#2277)
2019-12-26 adam.f.badura Add tests for MockFunction deduction (#2277)
2020-03-17 absl-team Googletest export
2020-03-16 dmauro Googletest export
2020-03-13 absl-team Googletest export
2020-03-06 absl-team Googletest export
2020-03-03 absl-team Googletest export
2020-03-03 absl-team Googletest export
2020-03-11 romain.geissler Make sure IsATTY does not clobber errno.
2020-02-27 absl-team Googletest export
2020-02-25 absl-team Googletest export
2020-02-19 absl-team Googletest export
2020-02-21 johan.mabille Fixed warnings
2020-02-12 absl-team Googletest export
2020-02-11 absl-team Googletest export
2020-02-11 absl-team Googletest export
2020-02-10 absl-team Googletest export
2020-02-10 absl-team Googletest export
2020-02-07 absl-team Googletest export
2020-02-07 absl-team Googletest export
2020-02-06 durandal Googletest export
2020-02-05 absl-team Googletest export
2020-02-05 absl-team Googletest export
2020-02-03 absl-team Googletest export
2020-02-03 absl-team Googletest export
2020-01-31 absl-team Googletest export
2020-01-31 absl-team Googletest export
2020-01-29 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-24 absl-team Googletest export
2020-01-24 absl-team Googletest export
2020-01-23 absl-team Googletest export
2020-01-29 krystian.kuzniarek remove a dead reference to the Autotools script
2019-11-11 krystian.kuzniarek add documentation for the premature-exit-file protocol

Created with:
  roll-dep v8/third_party/googletest/src

Bug: chromium:1070043
Change-Id: If63ebef3355a8e9da53cfa131c50ba03a0ea650d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150068
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67138}
2020-04-15 07:23:10 +00:00
Johannes Henkel
105103f68a [DevTools] Roll inspector_protocol (V8)
New Rev: b7cda08cd6e522df2159413ba5f29d2a953cc1c4

Upstream Review:
"Drop redundant std::move in inspector_protocol."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2112636

Change-Id: If7832adf00f1c574960e5ca3c179e7b03255fc86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2113132
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66815}
2020-03-21 01:38:12 +00:00
Johannes Henkel
fa3aada528 [DevTools] Roll inspector_protocol (V8)
Upstream PR:
"Introduce a crdtp/dispatch.{h,cc} library."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1974680
"For the shallow parse of a DevTools message, allow "params": null."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2109466

New Revision: c69cdc36200992d21a17bf4e5c2f3a95b8860ddf

Change-Id: Icc447ff9ce408b24f5245c643dd2f1843da9255f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2076215
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66813}
2020-03-20 19:21:22 +00:00
Tobias Tebbi
4f4d73f225 [torque] Generate GC object visitors for Torque classes
In the process:

* Augment C++-generated Torque classes with SizeFor methods to
  calculate size of instances.

* Add a new "@generateBodyDescriptor" annotation that causes Torque to
  generate C++ BodyDescriptors code that can be used to visit objects
  compatible with existing V8 mechanisms, e.g. GC

* Fully automate C++ macro machinery so that adding non-extern Torque
  class doesn't require any C++ changes, including ensuring generation
  of instance types and proper boilerplate for validators and
  printers.

* Make handling of @export a true annotation, allowing the modifier to
  be used on class declarations.

* Add functionality such that classes with the @export annotation are
  available to be used from C++. Field accessors for exported classes
  are public and factory methods are generated to create instances of
  the objects from C++.

* Change the Torque compiler such that Non-exported classes implicitly
  have the @generateBodyDescriptor annotation added and causes both
  verifiers and printers to be generated.

* Switch non-extern Torque classes from using existing Struct-based
  machinery to being first-class classes that support more existing
  Torque class features.

Change-Id: Ic60e60c2c6bd7acd57f949bce086898ad14a3b03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2007490
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66621}
2020-03-09 11:37:37 +00:00
Johannes Henkel
2b4dd77925 [DevTools] Roll inspector_protocol (V8)
"Tweaks for emitting JSON"
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2071518

Change-Id: Ie05ff1390a5340e15c21788c58e8171cb442da10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2073205
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66509}
2020-02-29 00:36:02 +00:00
Johannes Henkel
1166f87a1c [DevTools] Roll inspector_protocol (v8)
"Remove ErrorSupport_.{h,cpp}.template as promised."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2045151
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2047663

New Rev: 1f2492b6768e8620ece36a784c8ecd7ae7091610

Change-Id: I4acc65f0aafa94e20921a3e9ff7843303034bb60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2044951
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66227}
2020-02-11 18:45:53 +00:00
Johannes Henkel
40e2bd1a9c [DevTools] Roll inspector_protocol (V8)
Upstream PR:
"Drop && from Serializable::TakeSerialized() &&."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2029933

New Rev: 75c465e8d425f2e0b5297245c7eb058411af493a

Change-Id: I11dafc589c8f0c5a7e158b9cc5ad5202ba8237e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2029335
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66189}
2020-02-09 12:24:31 +00:00
Johannes Henkel
2b078975e1 [DevTools] Roll inspector_protocol (V8)
Upstream PR:
"Implement crdtp::ErrorSupport, replacing the jinja2 template."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2036608

In addition; this PR includes removal of now unused routines
in string-util.h (StringBuilder and number conversions).

New Rev: e4ffb7288a17b2bbe2f7b7cd62abcb1d1e55681a

Change-Id: Iae14c001c1f468466a42cb1b842c0ded766fccc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037959
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66165}
2020-02-07 01:44:26 +00:00
Johannes Henkel
ff4e5da5a8 [DevTools] Roll inspector_protocol (V8)
Upstream: "Remove Parser_{h,cpp}.template as promised."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2040571

New rev: 9fd0f91cc4331f931b7ac4040ceaa36de43937d0

Change-Id: Ie8df73e1fa898d4d46090fa6597548b2e1ca9a4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039349
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66161}
2020-02-06 19:51:36 +00:00
Johannes Henkel
edaec0cb71 [DevTools] Roll inspector_protocol (V8)
"Remove the JSON parser and revamp Value::parseBinary."
Upstream review: https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2026351

In addition to the upstream changes, this PR includes the necessary
tweaks to the V8 inspector (now taking the detour via
CBOR to parse Javascript).

New Revision: 0e0a1995497511008864546c094e885f3f1e13a3

Change-Id: I5ccfea5a3e1bab3e183b45c87726747d17d06944
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020518
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66116}
2020-02-04 17:56:05 +00:00
Johannes Henkel
ab1b0ed8d5 [DevTools] Roll inspector_protocol.
Fixes edge cases for parsing / serializing codepoint 0xffff in JSON
with UTF16.

New Rev: 0213a8545f6362cd1cd5091cedf29747736552e8

Change-Id: I48b174cf1bd9263ace002996094f7143a1248766
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020502
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65985}
2020-01-24 23:40:42 +00:00
Johannes Henkel
9c934d3487 [DevTools] Roll inspector_protocol (V8)
Upstream Reviews:
"Remove writeJSON / toJSONString from generated protocol types."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2013082

Also, remove builderAppendQuotedString from string-util.h in v8 since it's
unused now and it relies on the jinja template code I'm deleting.

"Upon encountering a byte that's unexpectedly not ..."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2013764

New Rev: a84e91f6696a0b76e1a73286c9c2765154de9889

Change-Id: I26805c47950d880b5be2cfb9bdcb41a3f51218b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013561
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65940}
2020-01-23 02:16:58 +00:00
Johannes Henkel
94f9ad7da6 [DevTools] Roll third_party/inspector_protocol (v8)
This adds a DCHECK into v8-inspector-session-impl.cc, covering what
we previously checked within ConvertCBORToJSON.

Upstream reviews:

"Separate the lightweight check for CBOR messages from ParseCBOR."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2001536

"Remove Exported::writeBinary."
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/2005797

New Rev: ac6919eb836521a96cc18931f0bf270d8c1b53a1

Change-Id: I52076a8f77b27c24c3afb35c40afbbe94e0ca05c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2002935
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65854}
2020-01-17 22:22:08 +00:00
Tobias Tebbi
6e5e0aed55 [torque] properly support holes in FixedDoubleArray
Bug: v8:7793
Change-Id: I4fc039711eb9aa9d551144ea6fccc926d4803349
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993290
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65808}
2020-01-16 12:54:23 +00:00
Johannes Henkel
921d5ca17e [DevTools] Roll inspector_protocol (V8)
New Rev: 32a87e9a751db8f2903532134a7c8fc6932620ba
Removes protocol::SerializedValue

Upstream Review:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1991952

Change-Id: I4b3f216e748d60c371fac2fd22b94948dc29de72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991971
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65678}
2020-01-10 06:32:06 +00:00
Johannes Henkel
65cf3663c0 [DevTools] Roll inspector_protocol (V8)
Upstream PR: https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1990896

New rev: dee0c0c65cc2df6284e75ae9fca083dc604c9fca

Change-Id: I1a09d46ee572249bb2c3f4cbdfbc499b7e4f4aa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991803
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65667}
2020-01-09 17:02:47 +00:00
Johannes Henkel
4f9d3acd4b Add myself to OWNERS since I'm maintaining this package.
E.g. see
https://chromium.googlesource.com/deps/inspector_protocol/+log

Change-Id: I0b38d2813bbe99be2bcce12390369e57125e728d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991804
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65648}
2020-01-08 22:24:20 +00:00
Johannes Henkel
7d42062188 [DevTools] Roll inspector_protocol (V8).
Upstream PR: https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1989575
Remove support for emitting cbor into an std::string.

New Revision: b29d8a5d2bb56b3e555bb27a0e035a9d571c5f28

Change-Id: I6bf63822c4c6551db30f5902d1f27f6933b209a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989973
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65645}
2020-01-08 20:19:10 +00:00
Johannes Henkel
3e177c79bf [DevTools] Roll inspector_protocol (V8)
New revision: 3b0551d3904f7fc067e78905ce697002187fa7a5

Upstream reviews:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1972474
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1967550

Change-Id: Ie9cec5faf410cc80ddb178da30cda66d801196f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1972404
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65509}
2019-12-19 00:15:48 +00:00
Nico Hartmann
fdc9fade97 [torque] Enum language feature
This CL implements enums in Torque in three steps:

1.) It implements necessary changes to Torque's type system. In
particular, the constraints on constexpr types are relaxed such that
constexpr types can exist without a corresponding non-constexpr
version. Furthermore, constexpr and their non-constexpr counterpart
need not be of the same kind of type. This allows an AbstractType to
have a UnionType as its non-constexpr counterpart.

2.) The enum feature itself is realized as a pure desugaring in the
parser, where all required types, constants and macro specializations
(like FromConstexpr<>) are generated from a simple enum declaration,
such that enum entries are not just constants, but are namespace
scoped and have distinct types so that they can be used within
typeswitch constructs.

3.) Almost all of the existing constants defined in torque
(.tq files) are ported to new enum definitions.

Bug: v8:10053
Change-Id: I72426d3b1434f301fd690847e15603de0dc1021b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1964392
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65503}
2019-12-18 16:24:48 +00:00
Tobias Tebbi
bf8d8f1dc8 [torque] use macro keyword for methods
This makes it obvious that methods are actually macros.
Also, in the future, we might allow methods that are actually builtins.

Bug: v8:7793
Change-Id: Ib641c4b5a222b27c67aa0c31fd3611ed4a11842c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1967330
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65455}
2019-12-16 10:36:58 +00:00
Johannes Henkel
2f205f5a33 [DevTools] Roll inspector_protocol (V8)
New revision: 726836d7317a4031f48af9960bab51d7a2ab2867

The gist is that serialization is direct from
protocol objects to CBOR, no more detour via
protocol::Value.

Upstream PRs:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1956388
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1966418

Also:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1941035

Change-Id: I89f742a4fd47b5eb8ebd98ce6e10ecba0501cf66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1958956
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65448}
2019-12-13 17:31:25 +00:00
Michael Starzinger
fde8d2ced1 Remove mstarzinger@ from OWNERS files.
R=hpayer@chromium.org

Change-Id: I2b9a77317cd4dcf8502c237b7f8f167b80859859
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1962866
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65443}
2019-12-13 11:13:14 +00:00
Johannes Henkel
4a98a2608b [DevTools] Roll inspector_protocol. (V8)
Add Exported::AppendSerialized (consistency with Serialized interface).
Deprecate Exported::writeBinary.

Upstream PRs:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1958506
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1941035

Change-Id: I50d6db05ea7c1336022b0b63e5ec2c69488ab525
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1958575
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65436}
2019-12-12 20:18:26 +00:00
Johannes Henkel
a16b2c7eef [DevTools] Roll inspector_protocol (V8)
New revision: f5a3199a3f37c7e48a9ffdbee04aa5c8f38d2889

Use crdtp::span<uint8_t> instead of const ProtocolMessage&. (V8)
Also includes a PR which moves Serializable into the crdtp library
and adds a simple test. Hadn't rolled this yet.

Upstream review:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1952196

Change-Id: If78bc8f11be8fb248dd66babc0190870312f7ec4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1952158
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65356}
2019-12-05 22:31:08 +00:00
Johannes Henkel
ce3ce2f66d [DevTools] Roll inspector_protocol (V8) (strtod)
New revision: 7a44a37f66b58358dd8ab85ccde1998fafa95e53

Upstream review:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1899564

Previously, we used a wrapper library, v8-inspector-protocol-encoding.h
to inject the string<->number conversion into the cbor parser. This
meant that the unittests, in
third_party/inspector_protocol/crdtp/json_test.cc inadvertently did
not run with the same string<->number conversion code. Thus, we missed
that the production implementation would return INF for out of range
double literals, as opposed to rejecting the incoming JSON.
When switching the library to the build dependency on json_platform_v8.cc
as it's in this change, the test immediately failed which made it
trivial to fix the implementation.

Old implementation:
https://chromium-review.googlesource.com/c/v8/v8/+/1913424/6/src/inspector/v8-inspector-protocol-encoding.cc

New implementation (checks std::isfinite):
https://chromium-review.googlesource.com/c/v8/v8/+/1913424/6/third_party/inspector_protocol/crdtp/json_platform_v8.cc

Change-Id: Ia48fe1f4e359eea47d0ede9ceadea1fd635292e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1913424
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65219}
2019-11-27 17:35:47 +00:00
Johannes Henkel
f6a76fad93 [DevTools] Roll inspector protocol (Cleanup) (V8)
New revision: 4c2a3acaea9f2e7958081dd361f81e20e9eff5e7

This cleanup cl does not change any behavior, it just
cleans up some headers and does a class rename
(StreamingParserHandler->ParserHandler). It was reviewed
upstream
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1924792
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1925679
and does not touch V8 code. Would like to get
this in to make it easier to review subsequent changes.

Thanks!

Change-Id: Ie9fe1434bafeb4f5090244f823d1e482ff805dd0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1925721
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65106}
2019-11-21 19:13:53 +00:00
Tobias Tebbi
e34c42db27 [torque] type context of JS builtins as NativeContext
That's possible because JS builtins are JSFunctions that embed a
NativeContext.

Bug: v8:7793
Change-Id: Id2bf7844fcfb53df733100f1e3e554f25a78482a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1926150
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65068}
2019-11-20 14:14:27 +00:00
Mike Stanton
b4bfbce6f9 [Builtins] Math.abs and Math.imul ported to Torque
This is part of a general move of math builtins away from
builtins-math-gen.cc.

Change-Id: Ifb6e5d4779bb9e6f69ff7c58d09ca8fc94f4cc66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914210
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64943}
2019-11-13 20:23:15 +00:00
Johannes Henkel
b67cafe716 [DevTools] Roll inspector_protocol (v8) (file split)
This decomposes the crdtp library into multiple files.
Since it wasn't previously rolled
it's a bit more than just that.

Upstream review: https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1907115

New Revision: d020a9e614d4a5116a7c71f288c0340e282e1a6e

Change-Id: I5c588469654bec3e933804ac706fa967c6fe57bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1907973
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64902}
2019-11-12 10:27:01 +00:00
Igor Sheludko
e309b2d995 [builtins] Port %TypedArray%.prototype.set to Torque
... in an uintptr friendly way.

Drive-by-fix:
1) IsForceSlowPath() check is integrated into Cast<FastJSArray>
2) disable tests incompatible with --force-slow-path in "slow_path" variant

Bug: v8:8906, v8:4153
Change-Id: I427f117073bc295120aa52fb3fe023ee04d58302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899988
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64799}
2019-11-06 12:51:21 +00:00
Tobias Tebbi
bf8e06b1f4 [torque] fix tree-closing formatting of array-sort.tq
Bug: v8:7793
Change-Id: Id454a12e515c693fec6ccf11976cbf5cceec25ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893332
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64678}
2019-10-31 13:14:39 +00:00
Tobias Tebbi
a3dbc638c6 [torque] add bounded quantification to generics
This has two advantages:
- It improves error messages by avoiding wrong template instantiations.
- More flexible overloads by disabling generics for overload resolution
  when their constraints are violated.


Bug: v8:7793
Change-Id: I7d2b8ef736988e8de16d25a4a4b16b49e27c6a11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890097
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64676}
2019-10-31 12:06:47 +00:00
Johannes Henkel
6f6942db91 [DevTools] Roll inspector_protocol (v8)
New revision: d2fc9b958e1eeb1e956f3e2208afa9923bdc9b67

To roll this I need to update some call sites; this is because the
Serializable interface is changing.

Upstream change / review was here:
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1879870

Change-Id: I93c4747609c6003baf1c160a68b8fb6bb07ac565
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1879519
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64618}
2019-10-29 16:36:56 +00:00
Igor Sheludko
e9ca78766c [builtins] Handle uintptr overflow in Array.prototype.sort
... and let it gracefully crash with OOM.

Bug: v8:4153, chromium:1018598
Change-Id: I20dd9874cdbdf78665de3a83d0bc1611dc088c68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1883551
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64589}
2019-10-28 13:26:06 +00:00
Tobias Tebbi
e0c1ca5a30 [torque] fix formatting of union types
The Torque formatter script did a hack to put spaces arount the | of
union types. This was broken when the inserted comment ended up on the
end of a line. For this reason, and since it doesn't make sense to
fight the Google-wide TypeScript style for union types, this CL reverts
to not putting spaces around union types.

Bug: v8:7793
Change-Id: Ic0acf9e1da82540432a8e21b58497a6a7d523b9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1871604
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Joshua Litt <joshualitt@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64536}
2019-10-24 10:05:25 +00:00
Johannes Henkel
54bd00af8a [DevTools] Roll inspector_protocol (v8)
New Revision: bbc72612409377752c8fd2e7a63a1a5947b7dc4b

Change-Id: I625c056b35ffa0658a9063da52ec17178db213a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1866967
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64392}
2019-10-18 23:16:26 +00:00
Johannes Henkel
844cf4d8a8 [DevTools] Roll inspector protocol (v8)
New rev: a14dad30f0e5b0fc05911856d5a20b1ffe89fd9b

Change-Id: I92a70bb8e5fef13e7422d609d3899ea1092def8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847785
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64257}
2019-10-11 21:22:31 +00:00
Simon Zünd
db3df9f67c Remove unnecessary HasOwnProperty check from Array#sort
During deletion in the write-back phase, we do not necessarly need
to check with HasOwnProperty before calling DeleteProperty. Since this
is observable behavior when using proxies, we remove the HasOwnProperty
check to mirror more closely what Spidermonkey does.

R=jgruber@chromium.org

Change-Id: I67768b1d8b13e695b956b2fa0624dcb28fd0664d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809366
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63866}
2019-09-18 12:39:43 +00:00
Jakob Kummerow
3aa4f05d0c [wasm-c-api] Roll bf31edf: Fix life times of host info
Host info used to be stored on the global reference underlying a Ref;
now it is stored in a JSWeakMap and hence tied to the lifetime of the
actual object on V8's heap.
Additionally, the internal metadata needed for C-API functions is now
stored on the SharedFunctionInfo and no longer overlaps with the host
info mechanism.

Bonus content:
Roll 6db391e: Remove a few more leftover uses of _enum types

Change-Id: Ibb1fa4b0dd5157fef15c030bac705a11aa3beaea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1768368
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63400}
2019-08-26 14:28:51 +00:00
Tobias Tebbi
1ef99b93cc Reland "[torque] introduce JSAny type for user-accessible JavaScript values"
Changes in the reland: Rebased and added a check that JavaScript-linkage
builtins use JSAny in parameters and return type, plus the necessary
cleanups for this test to pass.

Design Doc: https://docs.google.com/document/d/1z6j0pWHnNIfId0v00uWN2HBrGRDJxJfYuCr5K7Kr1xA

This reverts commit 4418a7b96a.

Original change's description:
> Revert "[torque] introduce JSAny type for user-accessible JavaScript values"
>
> This reverts commit 79b00555ea.
>
> Reason for revert: needs more discussion
>
> Original change's description:
> > [torque] introduce JSAny type for user-accessible JavaScript values
> >
> > This CL introduces a JSAny type for user-exposed JavaScript values and
> > a few new types to define it. Especially, it splits Symbol into
> > PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed
> > symbols).
> >
> > The change is mostly mechanical, but a few things are interesting:
> > - PropertyKey and JSPrimitive were designed to coincide with the spec
> >   notions of IsPropertyKey() and primitive value, respectively.
> > - Since Name is an open type, we define AnyName to be the known
> >   subtypes of Name. This is not too elegant, but by using AnyName
> >   instead of Name, typeswitch can properly conclude something if a
> >   subtype of Name is excluded.
> >
> > Small drive-by changes, which were necessary:
> > - Allow subtyping on label parameters.
> > - Fix the formatting of typeswitch, it was broken with union types
> >   in case types.
> >
> > Bug: v8:7793
> > Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#63114}
>
> TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org
>
> Change-Id: Ifde7881d74afe407628f40047997339d54cb2424
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:7793
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741652
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63115}

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

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

Bug: v8:7793
Change-Id: Icca34e3824f55009b984d9348fd21884400f0081
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1769316
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63395}
2019-08-26 13:25:12 +00:00
Jakob Kummerow
116cbea5ed [wasm-c-api] Roll 7865f7d: Expose possible traps during Instance::make
Change-Id: Iadc6fa94ac2b77a8a8b0f1dbf3c28fc97ff13930
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1765608
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63361}
2019-08-23 09:46:29 +00:00
Johannes Henkel
d0e718a7cf [DevTools] Roll inspector_protocol
New revision: d114a62e144cdfdae697fe0af6581ce39a31af37

Change-Id: I865edf40848d5593ae80a5ee0ed65c0c472a5a89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1713234
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63328}
2019-08-22 07:01:05 +00:00
Jakob Kummerow
2d17bf79d5 [wasm-c-api] Roll 3094fe2: Implement Global::get/set for refs
Change-Id: Ibab34553f1499bd5dee7cf7477284783cc0660fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1763534
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63318}
2019-08-21 15:54:59 +00:00
Jakob Kummerow
ec9bc860b4 [wasm-c-api] Roll 351b9b7: Support multiple return values
This just adds the upstream tests; our implementation already had support.

Change-Id: If8d340ebe79eae65d12164a01883482d521b8451
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1762287
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63280}
2019-08-20 14:48:14 +00:00