Commit Graph

79322 Commits

Author SHA1 Message Date
Daco Harkes 8a2b7bb5d5 [vm/ffi] Support Unions
Closes: https://github.com/dart-lang/sdk/issues/38491

tools/test.py ffi ffi_2
TEST=tests/ffi(_2)/(.*)by_value_(*.)_test.dart

Change-Id: I6d29f7e3c3046cda4a15c9b42063c66b064787be
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194420
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-04-15 10:16:27 +00:00
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

Fixes: https://github.com/dart-lang/sdk/issues/28793

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Xiao Yu d84f359786 Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
Bug: https://github.com/flutter/flutter/issues/72723
Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
Auto-Submit: Xiao Yu <xster@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-04-15 09:25:17 +00:00
Michal Terepeta f6b257307f Make some tweaks to how we detect generated files
I've seen occasional flakiness in our testing of this feature, but
couldn't pinpoint the reason for it. However, decreasing the frequency
how often we check for changes of the `command.log` and looking at a
larger chunk of the file seems to help (based on running th tests
multiple times).


Bug: http://b/184120864
Change-Id: Ie28a6e5aa71e7d86e0afc47906051ee1c05ed44c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194786
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-04-15 08:14:57 +00:00
Jens Johansen a9e6de318c [CFE] Avoid AllocateContext in ConstantEvaluator.canonicalize
putIfAbsent uses a closure and the VM allocates a context,
replacing it with ??= which doesn't should be better.

In a previous iteration it was found - with 95% confidence - a
~4ms (~10%) improvement, but for whatever reason those results
cannot currently be reproduced.

Change-Id: Id80a4eb0c0018c5827ab37b08507e70a5a5529a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194761
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-15 06:54:36 +00:00
Johnni Winther 47acb386d7 [cfe] Add id testing for inferred variable types
* including inferred parameter/return types for local functions
* added testing for inferred type arguments on literals and bounded variables

Change-Id: I02bceef3f5a41af7794cc63769cf4959321700d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195260
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-04-15 05:06:56 +00:00
Stephen Adams 813019a9c5 [dart2js] Remove old-rti substitution property from namer
Change-Id: I696220cba191b5df4ffd14abd62a718708366f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195308
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-04-15 04:46:56 +00:00
Konstantin Shcheglov 3c59708054 Make several fields of FileState non-nullable.
With external libraries separated, we always have the fields.

R=brianwilkerson@google.com

Change-Id: I91038198921670f7739b82ed7f88abd67a2debca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195304
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-15 01:21:06 +00:00
Brian Wilkerson 374e35ce87 Migrate the highlight region computer
Change-Id: I580a10014c217cec9b225b7d45c9cc72b37d8614
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195303
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-15 01:00:26 +00:00
Brian Wilkerson 4f57626aaa Migrate the mocks used by tests and tools
Change-Id: If5093c5ba1b53fb1d96390b0740e1337acec9958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195307
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-15 00:14:36 +00:00
Paul Berry 3186fa521e Migration: handle more complex extension method invocations.
Fixes #45574.

Bug: https://github.com/dart-lang/sdk/issues/45574
Change-Id: Iecf7acfebc1c59e5518edec4b8c287996d80c80d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-14 22:56:46 +00:00
Alexander Markov 37f723520f [vm/compiler] Canonicalize v1 = Phi(v2, v1)
Previously, compiler canonicalized Phi instructions which reference
only one value (modulo redefinitions):

   v1 = Phi(v2, v2, ..., v2)

This change extends the canonicalization rule to also allow the Phi
to reference itself:

  v1 = Phi(v2, v2, ...., v2, v1, ...., v1)

Such Phi instructions may occur in loops when local variable is not
mutated (remains the same on the back-edge).

TEST=ci
Change-Id: I2838c4307a6dd3067d52624db66487ba4682538c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195043
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-04-14 21:51:11 +00:00
Ryan Macnak e67dd9c2c5 Reapply "[vm, service] Gather used and capacity from various mallocs."
Avoid weak linking on iOS.

TEST=ci
Change-Id: Iafcb5bfdea0520d50363486e67031e1d5302d32b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161461
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-14 21:50:31 +00:00
Konstantin Shcheglov c3c371b971 Remove Either2.mapAsync(), test toString().
We can use just `map()` with the right return type.

R=brianwilkerson@google.com

Change-Id: I9b05e75babd9019876a6194d6b49bf2b7e3982f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-14 21:43:06 +00:00
Brian Wilkerson a28d35ae9e Migrate ContextManager
Change-Id: I0306c2485af0de4edf5e12e2cd3c13afdc3e8729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-14 21:42:26 +00:00
Ryan Macnak 06a73eb14d [vm, compiler] Propagate constants across boxing and unboxing.
TEST=ci
Change-Id: Ic8126305f293b1af9a393822e45004a949d023fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195055
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-14 20:48:15 +00:00
Danny Tuppeny 1aa56ed7b1 [analyzer] Migrate LSP semantic tokens + generation script to null-safe
Change-Id: I3d903a406808c50d995c50b8f890db8f97de8cd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195276
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-14 20:08:15 +00:00
Kallen Tu c851cd31b5 [cfe] Core List properties enabled with const functions.
Change-Id: I3bac87b7be213756fc24fbb026f663f14c390e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195200
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-14 20:02:45 +00:00
Ryan Macnak f54bb55244 Reland "[vm, service, observatory] Add ability to retrieve the set of all instances of a class, implementation hierarchy or interface hierarchy as an array."
Filter Class::direct_subclasses/implementors_ to remove tree-shaken classes.

TEST=ci, manual UI interaction
Bug: https://github.com/dart-lang/sdk/issues/45564
Change-Id: Ia2a46e9701745ce88dffa95a86b7756f3ab0921d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194110
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-14 19:40:20 +00:00
Ryan Macnak 2b8641ee94 [vm, compiler] Misc compiler debugging enhancements.
TEST=ci
Change-Id: Ic6179842b1e0bdea475d0f863c44f4accf826da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195100
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-14 19:34:15 +00:00
Danny Tuppeny 7e50eedf80 [analyzer] Migrate LSP constants + ClientCapabilities to null-safe
Change-Id: Id7d1e4dae9eb9b1a29d82244d503dfdf2a9c2524
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195275
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-14 19:00:25 +00:00
Konstantin Shcheglov a505f2dc55 Replace FileState.external() with Either2<FileState?, ExternalLibrary>. (try 2)
Global presubmit looks green.
https://test.corp.google.com/ui#id=OCL:368340336:BASE:368343419:1618375425236:9f9f89c1

Change-Id: Idaf44452f83f00102cc14579ccdd688bb7e14dbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195190
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-14 18:44:56 +00:00
Konstantin Shcheglov 6628a0eca5 Stop reporting StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_BLOCK
Change-Id: I4e3aff4a16015910e1f3cb48e8dd12892e63531a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-14 18:38:05 +00:00
Joshua Litt 298795da23 [dart2js] Create DeferredHolderExpression to defer holder names.
Change-Id: I5a6b2f56d0e63e8979687e16841a8696b9c6507f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194113
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-04-14 18:27:25 +00:00
Danny Tuppeny 7ea96c93d5 [analyzer] Migrate generated LSP code to null-safe
Change-Id: Ibed2e796bfcfe2ad48460cf1029a9fd9034e6418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195274
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-14 18:24:25 +00:00
Ryan Macnak b2a1e758d0 [test] Add regression test for issue 45674.
Fixed by 55645786bc.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/45674
Change-Id: Ibe3872710b98e69c1ac9dd216c424e8b42536331
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195187
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-14 18:12:35 +00:00
Tess Strickland e0bfa18c7c [vm] Standardize equality instance methods in C++.
In the codebase, we have several different interfaces for equality
instance methods on a type T:

- bool Equals(const T&) const;
- bool Equals(const T*) const;
- bool Equals(T*) const;

This CL standardizes on `bool Equals(const T&) const;`, and adjusts any
related functions to match.

TEST=Existing test suites, as this is an internal refactoring.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Change-Id: I2ebcf2b861732ce65c6f1c673b2df2a2c7f5dd4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195071
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-04-14 16:20:25 +00:00
Danny Tuppeny 133f9936e0 [analyzer] Ensure server-generated diagnostics are recorded to be merged in with plugin errors
Fixes https://github.com/dart-lang/sdk/issues/45678.

Change-Id: I90d2908d1299f3b18efe74f3741d32bbd39e3beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-14 16:11:38 +00:00
Brian Wilkerson 61fda382c2 Migrate the LSP protocol generator
Change-Id: Ib44004af7ee760c3cec4f6bb72e7adba0b64988e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195180
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-14 16:08:51 +00:00
Johnni Winther 71293ec389 [kernel] Migrate scanner and value_class
Change-Id: Id4ff972a9a56e878a991680f76f6264b55db27eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-14 13:35:44 +00:00
Daco Harkes 4558112105 Rereland "[vm/ffi] Disallow Pointers and structs in finalizers and expandos"
`Dart_NewWeakPersistentHandle` and `Dart_NewFinalizableHandle` in
`dart_api.h` do no longer accept `Pointer`s and subtypes of `Struct`s
as values passed in to the `object` parameter.

Expandos no longer accept `Pointer`s and subtypes of `Struct`s
as values passed in to the `object` parameter.

Cleans up unused object_store->ffi_struct_class.

Reland 1: Allow importing `dart:ffi` from `dart:core` with
          `--enable-ffi=false`.
Reland 2: Allow the new `_Compound` class to extend `NativeType`. (This
          got triggered in this CL on the build because of the import
          from `dart:core`.)

Closes: https://github.com/dart-lang/sdk/issues/45071
Breaking change: https://github.com/dart-lang/sdk/issues/45072

TEST=vm/cc/DartAPI_FinalizableHandleErrors
TEST=vm/cc/DartAPI_WeakPersistentHandleErrors
TEST=tests/ffi(_2)/expando_test.dart

Change-Id: I133278e16bd75cd2bb6234e7ddf042ffa0a54fd6
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195079
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-04-14 12:07:18 +00:00
William Hesse 2eef08eb95 [infra] Make download of jsshell conditional
The jsshell is used rarely for benchmarking and testing.
Make download of it conditional, at least until it is uploaded
and moved to CPID, to help migration to python3.

To download the shell in a checkout, add
"checkout_javascript_engines": True
to the "custom_vars" in a .gclient solution.

Change-Id: I693a4b402ffebca28d94c124624c4bd897315818
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195261
Reviewed-by: Alexander Thomas <athom@google.com>
2021-04-14 11:16:16 +00:00
Tess Strickland 2f56446250 [vm] Change missed Hashcode -> Hash() from CL submitted in parallel.
TEST=Build succeeds.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try
Change-Id: Idc107eb4e84e7e80cdb87454c2c6e27787682525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195262
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-04-14 10:34:43 +00:00
Tess Strickland 0f8861e3ba [vm] Standardize hashing instance methods in C++.
In the codebase, we have several different interfaces for instance
methods that return a hash:

- uword Hash() const;
- intptr_t Hash() const;
- uint32_t Hash() const;
- intptr_t Hashcode() const;

This CL standardizes on `uword Hash() const` and adjusts any related
functions to match.

TEST=Existing test suites, as this is an internal refactoring.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Change-Id: If2cbce57f3fae0f0d24031b6e324f0323c965f41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195067
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-04-14 10:04:48 +00:00
Tess Strickland dc88076767 [vm] Handle WSRs more generally in v8 snapshot profile writing.
Instead of special-casing the current fields that may have
WeakSerializationReferences, handle WSRs appearing as elements
or properties of objects more generally. This removes existing
special casing and avoids the need for it in case of new
future uses of WSRs.

For artificial nodes being added for dropped
WeakSerializationReference targets, add them as kArtificial nodes
(not kSnapshot) that has the original offset (element) or
name (property). The replacement is added as a kSnapshot node
that has a negative offset with the same magnitude as the
artificial node (element) or ":real_<property name>" (property).
This simplifies the work done in pkg/vm_snapshot_analysis to
use the artificial nodes instead of replacement ones for
reassembling hierarchies and the like.

This CL also cleans up the old SerializerWritingObjectScope
class, both moving it to Serializer::WritingObjectScope and
allowing nesting of WritingObjectScopes with the correct
semantics.

Thanks to this, not only can we recur when under a WritingObjectScope
instead of lifting recursion outside of those scopes, but we can
also create artificial nodes for non-empty per-code object pools and
static call target tables instead of attributing their contents
as supposed elements of the Code object being written.

TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test

Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Ib945c5afcd89b1458b8be3559b6eae24048aba2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194243
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-04-14 08:44:58 +00:00
Johnni Winther d8f2b7cc44 [kernel] Make .function non-nullable on Procedure, Constructor, and LocalFunction
TEST=existing

Change-Id: I4d0ae16291414e58207b7de0466d989d27997619
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195074
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-04-14 08:17:28 +00:00
Jens Johansen 0c22d58a7e [CFE] Fix 'first compile took' message in leak test
Change-Id: Ib36c1d3316f69983b7e852787850039405efa12b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195073
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-04-14 06:44:08 +00:00
Nate Bosch 17bac2f180 Update to the latest http_throttle
Change-Id: I3631b294de8aee0ae1430eb0d1c5c90641fcd363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195171
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-04-14 00:43:54 +00:00
Konstantin Shcheglov cc265dc81c Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_METHOD
I will work on removing other such hints in following CLs.

Change-Id: I792ec4dde8b11c9e6117bb5d63ef9583cb86fadf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-14 00:43:08 +00:00
Konstantin Shcheglov 60a53afc5e Revert "Make AnalysisResult.path non-nullable, more non-nullable for ParsedLibraryResult and ResolvedLibraryResult."
This reverts commit 83ca0e87a0.

Reason for revert: breaks google3

Original change's description:
> Make AnalysisResult.path non-nullable, more non-nullable for ParsedLibraryResult and ResolvedLibraryResult.
>
> Change-Id: Iab3a8c6c81ace30049a93d0a453e2473634ba07a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195058
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: Iecaa81064450f536a45235d4d79d3b212a93918b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195188
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-14 00:41:59 +00:00
Srujan Gaddam 3d52fcd250 [dart:html] Type FontFaceSet.add result as nullable
Closes https://github.com/dart-lang/sdk/issues/45676

`FontFaceSet.add` can return null on Firefox, which leads to a crash
due to native null assertions. The scripts are modified to treat
the `add` return type as nullable.

Change-Id: I8fcff8ef716e8620f04c44f5fb8b3a5884b3d1db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195167
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-04-14 00:00:08 +00:00
Konstantin Shcheglov 5cd5a9f55d Exclude _fe_analyzer_shared/test/inference/inferred_type_arguments/data/ from analysis.
Change-Id: Ic909a11f29e577f7f4ee39fa52ea5fbd7ecf15b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195184
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-13 23:46:28 +00:00
Srujan Gaddam adc36a6563 Add CHANGELOG entry for 2.12.3
Specifies why a 2.12.3 patch is being released, but does not
contain a security advisory yet.

Change-Id: I07933586f49348dd16295c477932e4c7066b8414
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195057
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Franklin Yow <frankyow@google.com>
2021-04-13 23:29:08 +00:00
Srujan Gaddam ce5a1c2392 [dart:html] Fix sanitization for HTML templates
Bug: b/143778164

Resolves an issue where sanitization wasn't properly handled
when templates were involved.

Change-Id: Ic8f6f28036e18981eb934c2b39c2c0cd4e6f1a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195056
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-04-13 23:29:08 +00:00
Konstantin Shcheglov 1dcccbe30b Revert "Replace FileState.external() with Either2<FileState?, ExternalLibrary>."
This reverts commit 1605740703.

Reason for revert: breaks google3

Original change's description:
> Replace FileState.external() with Either2<FileState?, ExternalLibrary>.
>
> Change-Id: I092da57fc3ca57479ea6088ac1a174677c80270b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195170
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: I0fa3817b6022c0a4a767e48486fac2a6783cd5a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195186
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-13 23:18:49 +00:00
Konstantin Shcheglov 1605740703 Replace FileState.external() with Either2<FileState?, ExternalLibrary>.
Change-Id: I092da57fc3ca57479ea6088ac1a174677c80270b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195170
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-13 23:16:43 +00:00
pq fc03431d44 linter 1.3.0
Change-Id: Iac54e6cb25445d8e3d03f6575d2b821051442f48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195052
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-04-13 23:10:38 +00:00
Brian Wilkerson 04173573cf Migrate tests of data-driven support
Change-Id: Iac640c945112afa32d413e67f1b0809e58892dea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195169
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-13 19:54:48 +00:00
Martin Kustermann 5fdafa0f03 [vm/compiler] Change CSE condition to use field.has_initializer() instead of the bool on LoadStaticFieldInstr
This is a follow-up to

    https://dart-review.googlesource.com/c/sdk/+/192924/

TEST=Existing test suite.

Change-Id: I292b7c476709b104c69e9cc8273e11992a5a5d93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195078
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-13 19:52:27 +00:00
Nicholas Shahan 825b59ae6d [ddc] Source map fixes for debugger calls
- Fixes calls that pass `when` or `message` arguments
- Updates location information on the expression statement versions to
  point to the beginning of the `debugger()` call instead of the `;` at
  the end of the line.

Change-Id: I56e6d3358a4a4f0f04b4087d062c513fa6729bd3

Issue: https://github.com/dart-lang/sdk/issues/45544
Change-Id: I31838b5877d139554e3aa39c9833fd83ae729a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195053
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-04-13 19:40:46 +00:00