Commit graph

81731 commits

Author SHA1 Message Date
Ahmed Ashour d6975c1905 master branch to main
Fixes #47190

TEST=None, only markdown files where edited.

Change-Id: Ife204f9c792b6bce30d0cd7bf2260ced11c8f2b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213049
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-09-15 06:22:23 +00:00
Jens Johansen 17503caa05 [CFE] Fix dangling reference to part imported as library
Before this CL:
If a library (say lib.dart) imports a file (say part.dart) that's
actually a part (of some other library (say main.dart)) an error is
given, but the "fake library" shortly representing the part is still
"linked" into the libraries dependency list.
This means that the component returned from a compilation is different
from the combination of libraries one can get to if walking all
LibraryDependency's. This also means that if we serialize the component
we can't load it back in (https://github.com/dart-lang/sdk/issues/46706).
It furthermore means that we have two different entities with the same
fileUri and importUri.

This CL rewrites a such import of a part to instead be an import of the
"parent", i.e. if a library lib.dart imports part.dart that's a part of
main.dart an error is issued, and the import is rewritten to be an import
of main.dart instead. The same thing happens to exports.

This alleviates the problems (i.e. no crashing if trying to load the dill,
no referenec to a otherwise non-existing library etc), and has the added
benefit of probably being what the user wants: Anything defined in
part.dart (that isn't private) is still in scope from lib.dart.

Change-Id: I17aca9db4edbf25b23d3ef301cf65589eeeb1635
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213344
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-09-15 06:20:03 +00:00
Sam Rawlins fd2d014112 Remove unnecessary imports from front_end
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I646f5994b40f2007f8d8d4b5ef35e2c9ffbd2376
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213423
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-15 05:51:03 +00:00
Sam Rawlins e08ee7abec analyzer: resolve function type alias type instantiation
This code is a little weird because of how this type instantiation
works:

```
typedef Fn<T> = void Function(T);

var x = Fn<int>.foo;
var y = (Fn<int>).foo;

extension on Type {
  int get foo => 1;
}
```

`x` is illegal under any circumstance, because calling a getter on a
type instantiation can _only_ resolve to a constructor, but function
types do not have constructors. But it's nice to resolve what we can,
and what the user may have meant, and we have to represent
`Fn<int>.foo` _somehow_. So it's a property access on a TypeLiteral.

Add two new codes because it is not correct to say that `foo` is not a
getter on 'Type' because that is beside the point. The issue is that
there is no possible getter on a type-instantiated type literal of
a function type alias (nor method, nor setter).

Add lots of tests, for calling a method, a getter, and a setter on a
function type alias literal. Add tests with prefixes, bounds, too
many and too few args.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: Icdf17506a64b3382226c5e50786784130d9e3bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213287
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-15 00:43:22 +00:00
Mayank Patke 74fa14a4c5 [dart2js] Replace references to NNBD with null safety.
Change-Id: Id23dce928425c99770ced629f866cee01fa2ef0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212240
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-14 23:39:15 +00:00
Konstantin Shcheglov 1795c2c804 Fix for '?.' and '?..' in binary AST.
Change-Id: I35ecb6ed10e52e47ca5690deacda0688bcb5a6f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213407
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-09-14 21:40:23 +00:00
Paul Berry 3295dda60c Add missing copyright notice to generate.dart
Change-Id: I943d0602744ff6e1841f07b79ea2bd421c646374
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213401
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-14 21:25:39 +00:00
Ryan Macnak 5c79501a64 [vm] Remove Dart_GetImportsOfScheme.
Dead since bda70c8489.

TEST=build
Change-Id: I0aed3d9d30a2b01f57f5d6a6bd02105fa89e3095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213405
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-14 21:18:37 +00:00
Konstantin Shcheglov e39818f306 Fix null checks in ToSourceVisitor.
Change-Id: Iebac674c6a6b631fb59932c16caab1a55df0f7bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213408
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 21:17:37 +00:00
Konstantin Shcheglov aa4cf21424 Fix UNNECESSARY_TYPE_CHECK_TRUE in analysis_server.
To fix before https://dart-review.googlesource.com/c/sdk/+/190360

Change-Id: I4e25a6efae59f54a1a717ca2345217f7dc764e59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213420
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 21:01:48 +00:00
Konstantin Shcheglov d88f8ed57b Clear more maps in FileSystemState._clearFiles()
Change-Id: Ide25cbeb425f94ae84519c0940188801c2f346a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213404
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 21:01:29 +00:00
Sam Rawlins 903e906a35 analyzer: Include the error code type in the unique name
Failing analyzer test cases which should reference an error
code with a shared code might print:

  Expected but did not find:
    CompileTimeErrorCode.UNDEFINED_SETTER [58, 3]

  Found but did not expect:
    UNDEFINED_SETTER_ON_FUNCTION_TYPE [58, 3, The setter 'foo' isn't defined for the aliased function type.]

  To accept the current state, expect:
    error(UNDEFINED_SETTER_ON_FUNCTION_TYPE, 58, 3),

which is erroneous; `CompileTimeErrorCode.` is needed as well.

Change-Id: Ic44c38dfcd6e6158cf51d2ce9162567a0f8c0006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-14 20:40:58 +00:00
Joshua Litt 76ac2ee172 [dart2js] Flip 'holder per part' flag.
Change-Id: I1ecf0d2628685738b0631040d6fe61d635164fb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-09-14 20:31:20 +00:00
Paul Berry 283ce865c8 Migrate pkg/analyzer/tool/messages/generate.dart to null safety
Change-Id: Ib0c80b380f895dc4d72aebbfb23f57c5e5978534
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-14 19:24:38 +00:00
Alexander Markov d90b297166 [vm/compiler] Refactor Precompiler::AddCalleesOfHelper to use switch
This is a follow-up to review comment
https://dart-review.googlesource.com/c/sdk/+/213288/1/runtime/vm/compiler/aot/precompiler.cc#998

TEST=ci

Change-Id: I59b7b03eb1a9b90bd107fc07906c333d3d63283d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213292
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-09-14 18:52:47 +00:00
Erik Ernst 60d878137d Add tests dealing with instantiated function constants
Change-Id: Ie8cb03a7f7bb14eebc7c2e14bb1c38c04e2e7995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213047
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-09-14 18:36:11 +00:00
Michal Terepeta 5da6490b1b Fix a bug when finding a package for a generated file
The recent change in `findFile` that uses the `bazel-bin`
symlinks was not supported by `findPackageFor` since the `blazeBins`
list would not necessarily contain the symlink path (we only added it
if there were no other paths). The user visible symptom of this was
that we would suggest importing packages with `package:blaze-bin.`
prefix.

I believe that we can simply always add the symlink as the last element
of `binPaths`, so that we recover the property one of its elements
corresponds to the generated file that we have found.

Bug: http://b/193636339
Change-Id: I818379b4770a477cbcb6b147a505f1f3c012bb6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213046
Commit-Queue: Michal Terepeta <michalt@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 17:53:01 +00:00
Alexander Thomas 3860f4bf06 [co19] Roll co19 to 21e89324642656dcd903e97352d9d16da6a361ee
2021-09-14 sgrekhov@unipro.ru Fixes 1196. Roll failures fixed and issue numbers added
2021-09-14 sgrekhov@unipro.ru Fixes 1195. Typo in error expectations fixed
2021-09-14 sgrekhov@unipro.ru Use '/' as a path separator when working with Uri
2021-09-13 sgrekhov@unipro.ru Fixes 1193. Add constant expression tests for explicit generics instantiation
2021-09-10 sgrekhov@unipro.ru Fixes 1191. Call method tests updated according to the changed spec
2021-09-10 sgrekhov@unipro.ru Update expectations according to the SDK issue 47060
2021-09-10 sgrekhov@unipro.ru Fixes 1194. Use more precised function type in Expect statement
2021-09-08 sgrekhov@unipro.ru Fixes 1192. call_method_* tests updated. Assertion actualized, new tests added
2021-09-07 sgrekhov@unipro.ru Fixes 1192. Fix call_method_A03_t01.dart test and make it to do some generic function instantiation
2021-09-07 sgrekhov@unipro.ru Fixes 1190. Isolate entry point is allowed to be a local function or instance method now

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I011bfc05b652ca7e941d3aed3b448a7dbc098fae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213350
Reviewed-by: William Hesse <whesse@google.com>
2021-09-14 17:40:25 +00:00
Ben Konyi b1491fc43e [ Service ] Test constructor tearoffs through VM service
Fixes #46240

TEST=runtime/observatory/tests/service/constructor_tear_off_test.dart

Change-Id: I335b16106db89dfede10d2ba3b73676465b306bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212627
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-09-14 17:14:31 +00:00
Sam Rawlins b113bd154b analyzer: use type arguments in constructor tearoff as const expression
https://github.com/dart-lang/sdk/issues/46020

Change-Id: Ib985b70773bb1a4c90742af0742a89e78f84ac98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213293
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-14 17:05:48 +00:00
Konstantin Shcheglov 89fd6fce30 Remove unused 'astBytes' in LinkResult and PackageBundleBuilder.
Change-Id: Ife01597ca011a0642d92a35e45d3adaa07f9dff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213296
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:57:48 +00:00
Konstantin Shcheglov 7262decaea Remove WithNonFunctionTypeAliasesMixin and WithNullSafetyMixin from analyzer_plugin tests.
So, consistently with analyzer/, by default enable everything, and
disable with WithoutNullSafetyMixin as necessary.

Change-Id: I89079d3c1122a14ad338aa8f0d8008086a1fcb89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213295
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:57:45 +00:00
Konstantin Shcheglov 33c6606085 Merge NonNullableSubtypingCompoundTest into SubtypingCompoundTest.
Change-Id: I00b833b409b0c888a91a43654bad1dac4d644824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213294
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:49:45 +00:00
Konstantin Shcheglov a4b3ae735a Don't use ElementsTypesMixin in resolution tests.
Change-Id: Ia4a8ebf9f31e22958ff63d7ce02f1ef76bb560aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213320
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:49:42 +00:00
Konstantin Shcheglov 9dd6854112 Rename id tests configs, all features are enabled by default.
Change-Id: Iea3739c2be173847a49d8838f399ebfd751b9713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:41:41 +00:00
Konstantin Shcheglov c68d2c3919 Replace more ElementsTypesMixin with AbstractTypeSystemTest.
Change-Id: Ifa0601ba5181189ef17a35e4a9ba2118d213eb53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213291
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-14 16:41:40 +00:00
Sigurd Meldgaard b4c19b93c9 Bump package:usage.
Most of these are from a single PR that did not get squashed.

Running `git log --format=%C(auto) %h %s e0780cd8b2f8af69a28dc52678ffe8492da27d06..016dd302b494e4ff70a7850957ec895eced9d220` in third_party/pkg/usage ✓
 016dd30 Prepare release (#160)
 076c653 Merge pull request #152 from sigurdm/batching
 1d6b343 Remove debug print
 c073fb7 Use correct limit for bytes
 1d89875 Send batch early if full
 2896a85 Update README.md
 da20fab Delete travis.sh
 7c351a3 Merge
 0424091 Update build.yaml (#159)
 4f2a050 Use a Duration for batching delay
 aa3f3ce address review
 318ebe5 Fix
 71ddec1 Send remaining hits on waitForLastPing
 1c895a7 Parametrize client-id in test
 0ae7733 Fix pubspec
 2255b3d Merge remote-tracking branch 'origin/master' into batching
 14d3702 Merge remote-tracking branch 'origin/master' into batching
 1c3393d Handle batching implicit waiting for a 'batchDelay' future
 219b764 TODO about size of payloads
 aaee6d9 Fix AnalyticsMock
 a8ec5b4 Remove mockito as dep - didn't use it
 e26fcce Allow batching of hits

Change-Id: I801c0d9114fb90e1dc94c3e2552c1cd90a8f0c18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213349
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-09-14 16:22:16 +00:00
Ryan Macnak b32bde155d [vm] Label virtual memory allocations on Android.
TEST=examine /proc/pid/smaps and Observatory's "process memory" page
Change-Id: I03922c9c604ceef8901a8946481d0ccc31110b72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213289
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-09-14 16:10:10 +00:00
Sigurd Meldgaard d787e78d21 Bump pub
New commits in this revision:

git log --format=%C(auto) %h %s cafadd17ba285dad9ebe6d34c617bc0d70d096b3..98a01e1cdbf441f030f1be76417860b6b372663d ✓
 cafadd17 Don't use null safety (yet) (#3112)
 98a01e1c Store credentials in a config directory (#3092)
 4ee280b7 Fixed messages (#3110)
 bbdac802 Third party hosted pub registry authentication (#3007)
 b1bedc53 `--examples` for get/upgrade/downgrade/add/remove (#2857)

Change-Id: Ibf6ffe33820c97114958c1564a7c22a46ff73d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213348
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-09-14 16:05:00 +00:00
Riley Porter 0dd3c97147 Optimize js_util callConstructor for 0-4 arguments.
Some usages of `callConstructor` will have unnecessary checks
removed, when checks on the arguments can be elided. The
compilers will optimize further if they can.

Example optimizations: https://paste.googleplex.com/4594240957972480

Change-Id: I0e6e7e4d1268580cbfab84599b1c9da6fc64e7c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213114
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-09-13 22:43:10 +00:00
Mayank Patke 14940d1c9c Reland "[dart2js] Enable by default and remove the --experiment-late-instance-variables flag."
This is a reland of 681e292b02

Original change's description:
> [dart2js] Enable by default and remove the
> --experiment-late-instance-variables flag.
>
> Change-Id: Ibb3cfa6d7b02883c82909930f7eb1142803dbc0f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200902
> Commit-Queue: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>

Change-Id: If4d3c12e7f6a71d2c305283597b679e8b925493c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206980
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke a6c90f1601 [dart2js] Fix some unnecessary bailouts in inference.
Change-Id: If60fe11871da062c52265d821cbf0d7a1185e643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209845
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke f5b8cc2c76 [dart2js] Improve type inference for createSentinel.
Treating createSentinel as returning a value of type Never caused issues
whenever its result flowed into a union, since the union would just
simplify to its other component. This meant that if a late field started
out uninitialized and was later initialized to a constant, we would see
it as only ever having the constant value. This caused isSentinel to
always return false even if the field hadn't been initialized yet.

Instead, we support a late sentinel value in the abstract value domain
and use this value as the return type of createSentinel during
inference. Additionally, inference treats _lateReadCheck as a simple
narrowing to exclude the late sentinel value.

Change-Id: I086bfd77576930e3ca2a4cfc9bd63476b6636685
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210646
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke 93164ae2a6 [dart2js] Add failing tests for b/192964907.
Change-Id: I67228672db2ab603cc0b174f0c28fe0a2d972916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206944
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-13 21:59:20 +00:00
Mayank Patke 39fd70e816 [dart2js] Refactor typemasks.
Change-Id: I13886baba98f70614cd05e6ee5cb38421264b537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210645
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-13 21:59:20 +00:00
Alexander Markov 4744f66f6f [vm/compiler] Minor improvements for AOT compilation time
* When testing for pragmas in the inliner, call function.has_pragma()
  early to avoid more expensive Library::FindPragma query.

* When scanning through object pool entries in
  Precompiler::AddCalleesOfHelper, skip over OneByteString and null
  objects quickly. They are leaf and there could be a huge number of
  those objects.

AOT gen_snapshot time of a large Flutter application built in
flutter/release mode for arm64 (best of 5 runs):
Before: 81.589s
After:  74.415s (-8.79%)

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/43299
Change-Id: I960451c73b42dab9845f0e0eafacaa9bb23720e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213288
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-13 21:25:30 +00:00
Danny Tuppeny f9512796e2 [analysis_server] Prevent duplicate LSP completion registrations for Dart
... when using plugins that register for Dart files.

Fixes https://github.com/Dart-Code/Dart-Code/issues/3555.

Change-Id: Idadcda0b04f86eb40d11a69e8eadc7120c873ae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-13 21:14:00 +00:00
Ahmed Ashour c1f63c05b8 Remove unnecessary raw string from protocol_generated
Fixes #47146

Change-Id: I6710a8bb32e5ec770e570c93612f44a9ce63bc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212744
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-13 21:10:40 +00:00
Nicholas Shahan 58416605e2 [ddc] Add types to super.method tearoffs
Helper methods for locations in constructors (`super` not available)
were missing type information for the tearoff. This replaces the use
of a helper that would itself would be torn off.

Added a new form of helper method that performs the tearoff and
binds the type. NOTE: Generic type arguments are still applied
outside of the helper.

Change-Id: I8dafe0d8357ecc9e1d070046a82e9e83e1a16ed9
Fixes: https://github.com/dart-lang/sdk/issues/47175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212861
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-09-13 19:50:59 +00:00
Ryan Macnak 700969604a [vm] Require C11 thread_local support.
Thus requiring iOS 9+.

TEST=build
Change-Id: I40062753ae030231d4e4ae428c9145f4370cb9a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213283
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
2021-09-13 19:30:30 +00:00
Ryan Macnak ebb1a53a44 [infra] Add missing out directories for Android with compressed pointers.
Change-Id: I5c14fa58ee282b824d1eefee04301f4206aab2f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213286
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-13 19:22:50 +00:00
Stephen Adams 089bebcae7 Tweak Duration.toString to be more web-friendly
Change-Id: I588e089124d5c2fc62caa19cc2206c81666d6e8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213183
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-13 18:19:00 +00:00
Konstantin Shcheglov 8c9dcc92f5 Issue 46850. Allow 'super' in instance late field initializers.
Bug: https://github.com/dart-lang/sdk/issues/46850
Change-Id: I90560e7e9d75ef450b47d584e0fa0f35123e0e61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213029
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-13 18:02:09 +00:00
Alexander Markov 125482c0c6 [vm/compiler] Skip AOT unit test vm/cc/TypePropagator_NonNullableLoadStaticField on ia32
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47183

Change-Id: I775f4a60debef5856e273f284b9a0f236b03f24d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213103
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-13 17:59:29 +00:00
Paul Berry fcf15f69fc Run code generator for syntactic_errors.g.dart.
It appears that this code generation step got out of date because
there's no test verifying that code generation has been run (see
https://github.com/dart-lang/sdk/issues/44888).  I will follow up with
a unit test to make sure that it doesn't fall out of date again.

Change-Id: I695897eb24af4f632fbcf917d888d3aca5e0abba
Bug: https://github.com/dart-lang/sdk/issues/44888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213280
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-13 17:50:10 +00:00
Alexander Markov 30abce99f3 [vm] Treat static final fields with trivial initializers as const
When loading a value of a static final field with trivial initializer
generate a Constant instruction instead of LoadStaticField.

Initializer of a static field is considered trivial if it is null, int,
double, String or bool literal.

TEST=vm/cc/StreamingFlowGraphBuilder_StaticGetFinalFieldWithTrivialInitializer
Fixes https://github.com/dart-lang/sdk/issues/47120

Change-Id: Id2bfc3da8c14376f7f1ef829265cca29a018bad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212873
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-13 16:51:59 +00:00
Konstantin Shcheglov 1d6f4c742f Rename subtypes of AbstractTypeSystem[WithoutNullSafety]Test
Change-Id: I2ab8a19a5bae165b4904e412f783b69e11344cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213120
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-13 16:05:09 +00:00
Sam Rawlins 02afb5a7f5 Analyzer: tidy function reference parsing.
Check for odd case of attempting to type instantiate an extension (it's not supported).

Re-write some TODOs as comments.

Change-Id: I14fd2a4e21139939ca60e415be9ac31b93ea50ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-13 15:29:39 +00:00
Danny Tuppeny d74199de8f [analysis_server] Add support for new TEAR_OFF highlight kinds to LSP
Change-Id: I924037e639a8f37df085a7831f970ebc5334ba16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-13 15:15:00 +00:00
Chloe Stefantsova 2048ab37f1 [cfe] Add shown and hidden elements to Extension Kernel node
TEST=existing

Change-Id: I8271cb7f4731dea289c855b0c5384f8e181530c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212761
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-13 13:18:19 +00:00