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>
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>
`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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
When specializing x == y comparisons where one of the operands is known
to be a Smi but the other one is *not* only emit StrictCompare
if either x or y are nullable. For non-nullable equality comparisons
prefer EqualityCompare which allows to avoid redundant boxing as
non-nullable integer values are highly likely to be unboxed.
TEST=vm/dart{,_2}/aot_prefer_equality_comparison_il_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try
Change-Id: I1153f111dcbb518d25d753dc4357c72522389951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214962
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Our current unit testing infrastructure does not make it possible to
test AOT compilation pipeline end-to-end, because it does not run TFA
when generating Kernel.
This makes it challenging to write regression tests for certain issues.
Instead we extend test runner with a capability to perform IL matching
when running AOT tests.
runtime/docs/infa/il_tests.md provides details on how to write such tests.
TEST=manually
Change-Id: I6f5220b814f4a5d8c053efacd3711df495dea404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214961
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>