Commit graph

82061 commits

Author SHA1 Message Date
Jens Johansen c3d9664956 [CFE] Unmark dart2js late lowering as semi fuzz failures
It no longer fails.

Change-Id: I512d01a273c1c8f68991e92862f7bd9e87fdd7b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215421
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-10-04 13:07:46 +00:00
Paul Berry 33f69b0ced Clean up documentation/comments handling for shared errors.
For errors that are shared between the front end and the analyzer, we
move the `documentation` and `comment` fields from
`pkg/analyzer/messages.yaml` to `pkg/front_end/messages.yaml` (where
the rest of the information about the error is).  This eliminates the
need to have any entries at all for these shared errors in the
`pkg/analyzer/messages.yaml` file, so we no longer need the boolean
flag `copyFromCfe` in this file.

This simplifies generation of analyzer error codes, so we go ahead and
take this opportuntity to remove the old `syntactic_errors.g.dart`
file, and instead code generate all the shared messages directly into
`syntactic_errors.analyzer.g.dart`.

In a follow-up CL I'll rename `syntactic_errors.analyzer.g.dart` back
to `syntactic_errors.g.dart` to reduce confusion.

Change-Id: I1e314e51c94ef595d9d6de8ba2b30e12a18382a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215155
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-04 13:03:26 +00:00
Johnni Winther b6b81ebad1 [cfe] Setup correct scope for builder outline expressions on extension fields
Closes https://github.com/dart-lang/sdk/issues/47345

Change-Id: I3a666fde4d6dd802e6101ccbd55dff11c0179fba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215401
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-04 12:14:57 +00:00
Chloe Stefantsova fcd684e7d1 [cfe] Allow named arguments anywhere by the CFE
Change-Id: I36ecafe821fe328bd27cb40dafca78ad0bf5dd81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214803
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-04 11:57:41 +00:00
Loganaden Velvindron 8062c4cc67 Switch to TLS 1.2 as minimum requirement
According to https://tools.ietf.org/id/draft-ietf-tls-oldversions-deprecate-06.txt

TEST=Not applicable, config change.

Closes https://github.com/dart-lang/sdk/pull/41135
https://github.com/dart-lang/sdk/pull/41135

GitOrigin-RevId: e1dc037c1e22996b2085e3d16427525c033bdc01
Change-Id: Ic8340eee7fa26846302727672ca7989ce1e93c99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140481
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-10-04 09:51:38 +00:00
Martin Kustermann 7abf6bfab7 [gardening] Add coredump archiving support to iso-stress builder.
This is an attempt to enable archiving of coredumps on the
"iso-stress" builder, since we're often unable to reproduce crashes from
that builder.

Issue https://github.com/dart-lang/sdk/issues/46823

TEST=Adds test infra.

Change-Id: I9b7276198db9a6c98a74f55d466bf832b03e24f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214407
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-10-04 08:49:28 +00:00
mnordine 31afa1bf4b Incorrect wording
I think "contains" was meant here.

Closes https://github.com/dart-lang/sdk/pull/47359
https://github.com/dart-lang/sdk/pull/47359

GitOrigin-RevId: ee2dee2b732723b7cf73413d8fde2612f5fb533a
Change-Id: I78be99af3584dee00e4253a1ac32e3e476a01da6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215340
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-10-04 08:39:38 +00:00
Johnni Winther e2a689bafd [cfe] Split Dill/SourceLoader and Dill/KernelTarget
This moves all implementation code from Loader and TargetImplementation
down to the concrete subclasses, Dill/SourceLoader and Dill/KernelTarget,
respectively, and removes all unneeded code. Since TargetImplementation
is now only an interface, it replaces the role of its supertype Target.

Change-Id: I8a556ac5bc559432dbd19a6a48151469a2cb0238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214020
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-10-04 07:36:38 +00:00
Konstantin Shcheglov 6dd77ca4cc Prepare to publish analyzer_plugin 0.8.0
Change-Id: Ia1c799e7ed7e52eb86a01fe31fe05bb7c399720d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215244
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-04 05:04:58 +00:00
Konstantin Shcheglov 23cf71efba Fix g3/fixes_test on Windows.
R=brianwilkerson@google.com

Change-Id: Ib23fecc6b96b66b88f9d48d788f4509ecad78355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-03 17:16:17 +00:00
Sam Rawlins f4180854c7 Refactor evaluateConstructorCall into a separate class
`ConstantEvaluationEngine.evaluateConstructorCall` was ~350 lines long,
with a few short-circuit returns scattered in various for-loops, and
variables used >100 lines from where they were declared or written to.
Much of the code in ConstantEvaluationEngine was dedicated to evaluating
some special functions like `String.fromEnvironment`, etc.
Moving to a new class, _InstanceCreationEvaluator, allows us to move
several helper methods which were only used by that method, and several
static functions. I also split the method into several single-purpose
helper methods.

Improvements to const instance creation expression evaluation should
be more straightforward with this new code, with more single-purpose
methods.

* Move `checkFromEnvironmentArguments`, `checkSymbolArguments`,
  `evaluateSuperConstructorCall`, `followConstantRedirectionChain`, and
  `isValidPublicSymbol` to the new class.
* ConstantEvaluationEngine is reduced from 800 lines to 300 lines.
* Make `getConstRedirectedConstructor` and `_nullObject` static.
* Refactor `ConstantEvaluationEngine.runtimeTypeMatch` into an extension
  on TypeSystem.
* Rename static strings and regexp to use lower_case.
* Use `var` where possible.
* Use single-quoted strings.


Change-Id: Ie28cb961d04c372836783ab2166b02d8ac67d149
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215158
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-10-02 03:01:37 +00:00
Nicholas Shahan ea4302d029 [ddc] Add constructor symbol information
- Adds tests for various types of constructors.
- Recognize when a constructor is const and mark the class symbol
  accordingly.

Change-Id: I9ae7fc2837a6821b196f06a267603fd18c3e5075
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208362
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-01 22:57:09 +00:00
Kevin Moore 6f4d79a7e9 Bump http to f35d1e1467092f6a5edb2abf7071c4a99e8c737a
Changes:
```
> git log --format="%C(auto) %h %s" 778174b..f35d1e1
 https://dart.googlesource.com/http.git/+/f35d1e1 Require Dart 2.14, prepare to release v0.13.4 (#626)

```

Diff: https://dart.googlesource.com/http.git/+/778174bca2c13becd88ef3353309190b1e8b9479~..f35d1e1467092f6a5edb2abf7071c4a99e8c737a/
Change-Id: I302deb4e99d9c040e05473cd944b1eb64b619191
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215243
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-10-01 22:50:37 +00:00
Alexander Aprelev 48db681c66 [vm/sendandexit] Add CHANGELOG for Isolate.exit([port, message]) change.
This is follow-up to 56403a0d35.

Change-Id: I222c04fd4d41e272eeb3e8fd62c55035eee1c12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215143
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-10-01 22:04:36 +00:00
Brian Quinlan c3171cf26e Add some more documentation for Platform.localeName.
Change-Id: I0b08cea81f47b03fcdf82fa378c37e28889113c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215153
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2021-10-01 22:00:06 +00:00
Ahmed Ashour a4d8f343ae Add a quick fix for avoid_escaping_inner_quotes
Fixes #47158

Change-Id: I447cf68d2da682bab93fb43b0ad61546a2217755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-01 21:55:15 +00:00
Konstantin Shcheglov 7fb8c7afea Rename analyzeSync() to analyze().
R=brianwilkerson@google.com

Change-Id: Ie05edb97b27d0820387184c5158c095549ab1a00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-01 21:27:37 +00:00
Robert Nystrom 822140714d Script to scrape corpus to evaluate "super." parameter proposals.
Change-Id: I7c0635c2fbe7ec3f739c35b8e6a3cd1d0e2bfe22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215120
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-10-01 18:54:48 +00:00
Alexander Markov f824db7bc2 [vm/compiler] Debug prints for flaky crash in compiler
This change adds debug prints for flaky crash in compiler which
only appears on bots.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/47314
Change-Id: I6653df11612d24e8a8e67e3e177484a70e308dcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215152
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-10-01 18:33:26 +00:00
Robert Nystrom 3ac34f791d Change references to "dartfmt" in runtime and tools to "dart format".
In Dart 2.15, we're removing "dartfmt" in favor of "dart format", so I'm
going through and fixing all the dangling references to the old name.

TEST=Only changing tools

Change-Id: I83a5c00be925fdb536014a47dff2b488ed9f478b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215186
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-10-01 18:16:27 +00:00
Konstantin Shcheglov bc5a1138e0 Add several Flutter completion benchmarks.
When running DAS from sources, so might be not exactly as when running
from the snapshot, currently we have following numbers:

Before reverting to allow available declarations:
{das-flutter-completion-start: {micros: 15030209}, das-flutter-completion-smallFile-body: {micros: 619210}, das-flutter-completion-smallFile-body-withoutPrefix: {micros: 484791}, das-flutter-completion-smallLibraryCycle-largeFile-smallBody: {micros: 2348386}, das-flutter-completion-mediumLibraryCycle-mediumFile-smallBody: {micros: 3701027}, das-flutter-completion-mediumLibraryCycle-mediumFile-api-parameterType: {micros: 3332297}}

Current 2021-09-30 master:
{das-flutter-completion-start: {micros: 15194069}, das-flutter-completion-smallFile-body: {micros: 22721}, das-flutter-completion-smallFile-body-withoutPrefix: {micros: 7796}, das-flutter-completion-smallLibraryCycle-largeFile-smallBody: {micros: 552269}, das-flutter-completion-mediumLibraryCycle-mediumFile-smallBody: {micros: 3076925}, das-flutter-completion-mediumLibraryCycle-mediumFile-api-parameterType: {micros: 3010509}}

Current 2021-10-01 master, with snapshot:
{das-flutter-completion-start: {micros: 6657503}, das-flutter-completion-smallFile-body: {micros: 20596}, das-flutter-completion-smallFile-body-withoutPrefix: {micros: 7073}, das-flutter-completion-smallLibraryCycle-largeFile-smallBody: {micros: 556415}, das-flutter-completion-mediumLibraryCycle-mediumFile-smallBody: {micros: 85024}, das-flutter-completion-mediumLibraryCycle-mediumFile-api-parameterType: {micros: 331850}}

Change-Id: I1d76f4f15d36e316b553ffc6cfaf24551c7f9bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-01 18:01:49 +00:00
Konstantin Shcheglov 4f80522fe4 Prepare to publish analyzer 2.4.0 and _fe_analyzer_shared 27.0.0
Change-Id: I48d0f8fcd4f966c9c55542ae9d239095b81ea45c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215007
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-01 16:45:23 +00:00
Paul Berry 1954b914bc Add documentation to the analyzer messages.yaml file.
Change-Id: I967aba1bd189c7790df4c18c48d100839db7582a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215150
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-01 16:44:43 +00:00
Danny Tuppeny 98ee47a11a [dds] Export DAP classes required to build new debug adapters externally
Change-Id: I7bb05b2f467bad5e522898dfaa3d0f1e74c42b58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215081
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-10-01 16:31:34 +00:00
Danny Tuppeny df67dc892b [dds] Add some basic test reporting for DAP test adapter
Change-Id: I39ca29ee5809fd0d6ef30ee163298f66749bed0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215080
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-10-01 16:31:34 +00:00
Robert Nystrom 1a218ca03f Remove dartfmt from SDK artifact size benchmark.
Dart 2.15 won't contain it as a separate snapshot.

Change-Id: I8f356a4b9c88fd736f755d8f85b68f8e18f6ec78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215182
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-10-01 15:45:53 +00:00
Paul Berry 67a119abe8 Update nomenclature in messages.yaml files.
Change the terms `template`/`tip` in the analyzer and front end's
`messages.yaml` files to `problemMessage`/`correctionMessage`.

Rationale: these terms were previously agreed on for unifying the
analyzer and front end, and they are currently used in the
`Diagnostic` class, which is part of the analyzer public API.
Change-Id: Ifaed92ab5176bba7b7f4c3bb915e9839520330f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215149
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-01 15:32:06 +00:00
Paul Berry 97255ff97e Code generate analyzer errors from the analyzer's messages.yaml file.
Change-Id: I1687acd7c777733caf93e20d703554c2a7da26cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-01 15:24:13 +00:00
Sigurd Meldgaard eb39128530 Tool for bumping dependencies
Aims to automate the process of bumping a single dependency.

To bump pub_semver to the newest commit invoke as:

```
> dart tool/manage_deps.dart bump pub_semver
```

Change-Id: I16a3edabfb03adbd4460fb3cd81738a792e44d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213764
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-10-01 14:15:16 +00:00
Paul Berry bdbb4baea5 Create a YAML file to hold analyzer error text.
I've included both the YAML file (`messages.yaml`) and the script I
used to create it (`extract_errors_to_yaml.dart`), so that we can keep
the YAML file up to date until we finish writing logic that code
generates the analyzer errors from the YAML file.

Change-Id: Icbdcaf63a37105b666b11f7356e3fa246a8d65cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214133
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-01 13:04:39 +00:00
Alexander Thomas cbe578bb17 Add a security policy for the Dart SDK
Bug: b/200122212
Change-Id: I7f7f11f24034c525cb0f3baab3120ba15b3cb9d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215061
Reviewed-by: Michael Thomsen <mit@google.com>
2021-10-01 13:01:31 +00:00
Sam Rawlins 8029600b24 analyzer: Use correct instantiated type in const function-typed assignment
This fix is pretty simple; we have the inferred type available on [node], so we just need to create a new DartObject which uses that type.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: Ib53ff381b8c9c864f97eb2a4869d3798e028c30f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-10-01 12:51:59 +00:00
Sigurd Meldgaard 72f7fee598 Bump pub to 37d05928939b3100e7e55c3dff922651db1de1e1
Changes:
```
> git log --format="%C(auto) %h %s" a817863..37d0592
 37d05928 Don't ignore 'packages/' over the root-dir (#3162)
 85e11718 Add in-memory cache to store version listings (#3163)
 46f79d5b Use source.hasMultipleVersions to decide when to show version constraint. (#3159)
 0e553a07 Warn against likely bad env-var name (#3146)
 30580bee Migrate src/git to null-safety (#3158)

```

Change-Id: Ic04937ad0adbeb228770087dedb25ccfcc4f3206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215202
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-10-01 10:49:16 +00:00
Robert Nystrom d1383452cc Change "dartfmt" to "dart format" in FFI tools.
Change-Id: I9fe047c79ec79728f26184ee2cf69c7776099568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215185
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-10-01 05:56:55 +00:00
Robert Nystrom 5fbde4d850 Remove mention of "dartfmt" from analyzer README.
In Dart 2.15, we're removing "dartfmt" in favor of "dart format".

Change-Id: Id26b32872e72e97a45cfd1e28defea9adc38aa24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215183
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-01 04:41:04 +00:00
Stephen Adams 09b15a583c [dart2js] Move --csp flag handling to 'features'.
Change-Id: Iae6c01c10121023a02f8c850247f41007727ea75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215009
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-10-01 04:23:24 +00:00
Robert Nystrom 765a6cf282 Change "dartfmt" to "dart format" in dart2js_info tool.
Change-Id: Id21c2f2ceb58f5007c55eeea6a1d57bb09f2f0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215184
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-10-01 01:01:54 +00:00
Robert Nystrom 0ea8347576 Remove references to dartfmt in various comments and docs.
Change-Id: I02112ce2920d71f84ce4808c13a62e1a1765d83f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215181
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-10-01 00:56:14 +00:00
Brian Quinlan 8e6f639a7e Add some extra documentation for Platform.operatingSystem
Change-Id: I8918fd7476be72c426d6009122e7c90a2d078bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215144
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2021-09-30 22:58:44 +00:00
Riley Porter 1332c63a4c Revert "Add a generic return type for js_util functions"
This reverts commit 46486cf260.

Reason for revert: Causes dart analyzer and dart linter to find
issues within google3 and flutter, causing breakages and blocking
the roll.

Original change's description:
> Add a generic return type for js_util functions
>
> Allows further optimization to pass along return type
> information and remove extra AsExpression casts.
>
> Change-Id: I87aef171887e3f9af4c80003ff284eb2503d0cdb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214460
> Reviewed-by: Srujan Gaddam <srujzs@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Riley Porter <rileyporter@google.com>

TBR=sigmund@google.com,srujzs@google.com,rileyporter@google.com

Change-Id: I6f4ff8f51f44d3e2eb1a140c93485ebe28189984
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215160
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-09-30 22:52:12 +00:00
Mayank Patke 36a2120b73 [dart2js] Use Field.fieldReference in late lowering.
Change-Id: Iead2390ff5a9fffa611e8e4af96ab2ecfa6b93d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-30 20:54:54 +00:00
Brian Wilkerson dbbaf94d39 Add a fix for unnecessary_getters_setters
Change-Id: I8098f61dd83083a5772230cbeae4273c5d3f3d35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-30 20:35:37 +00:00
Alexander Aprelev 56403a0d35 [vm/sendandexit] Introduce Isolate.exit([port, message]).
This exits current isolate immediately. If [port] is provided, then [message] is verified and sent out as isolate exits.

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47164

Change-Id: I513f4d7ceb5d74820f4aee60f5799b7b5193f2e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214312
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-09-30 20:20:24 +00:00
Jake Macdonald ead8b7f6ac add test that repros issue #47338
This currently fails for the CFE with:

static error failures:
- Unexpected error at line 137, column 14: A value of type 'int?' can't be assigned to a variable of type 'int' because 'int?' is nullable and 'int' isn't.
- Unexpected error at line 137, column 25: Operand of null-aware operation '!' has type 'int' which excludes null.

Bug: https://github.com/dart-lang/sdk/issues/47338
Change-Id: Ia55e19a0bf296a8427f6510d6ddda5016acdecea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215101
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2021-09-30 18:14:44 +00:00
Riley Porter 46486cf260 Add a generic return type for js_util functions
Allows further optimization to pass along return type
information and remove extra AsExpression casts.

Change-Id: I87aef171887e3f9af4c80003ff284eb2503d0cdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214460
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-09-30 17:13:49 +00:00
Sam Rawlins fc7bb0db54 Correct span for dead collection-if (then and else)
Fixes https://github.com/dart-lang/sdk/issues/47305

Change-Id: I58c3bb005fa0fea73092063120f1a2aa9ad1744b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215016
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-30 16:59:10 +00:00
Konstantin Shcheglov 5521b19af5 Add assertHasLintFix() to help with testing g3 specific lint fixes.
Bug: https://buganizer.corp.google.com/issues/200632192
Change-Id: I5ea9d73ba440485ffeb72a189b3e77d24cb6bea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-30 16:52:38 +00:00
Ryan Macnak 1e4a611ca4 [vm, service] Create edges from the root to objects on read-only pages in heap snapshots.
This prevents objects, such as InstructionSection, that have no ordinary references from being labeled as "Uncollected Garbage".

TEST=examine heap snapshot in an AOT build with bare-instructions enabled
Bug: b/200288075
Change-Id: If576d7f9eabb80afaca1b600507c3a9629beeafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215006
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-09-30 16:50:58 +00:00
Devon Carew bafa71a8ae Add the ability to specify additional imports for doc samples.
Change-Id: I1c9592d4ce66d08aafacd5ae9722defa114c9953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214867
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-09-30 16:35:59 +00:00
Konstantin Shcheglov 8c41cc9537 Issue 47302. Enable type parameters as potentially constant expressions.
Bug: https://github.com/dart-lang/sdk/issues/47302
Change-Id: I95d1b94efe5cc2877d37bc5ac615869233395189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215014
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-30 15:42:29 +00:00