Adds a couple tweaks to improve the lint reporting.
Change-Id: I6e85e323cc2f34f1236d46046b033c9bc72999c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387130
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
We will never use it on Windows, only on Mac / Linux.
Change-Id: I01c54ddabefa7269c50432978cd5e609da448b1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387128
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The lint must be enabled for a Pub package.
The lint rule reads once the file `analyzer_use_new_elements.txt`
from the root of the package (next to `pubspec.yaml`). The it uses
the read file until DAS is restarted.
The file should have path prefixes from the root of the package.
See the included example for DAS.
It could be also the whole directory, e.g. `lib/src/services/correction/dart/`.
These are just path prefixes, not regular expressions.
Change-Id: Ia3e5ed5f1366302a7d82189cb158f78024fa3a17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Although saying that VariableDeclaration is _FragmentDeclaration, is
not quite correct. Maybe we should have separate LocalVariableDeclaration.
Change-Id: I81d606258b2c1a639b2df4a11b8da13ef56e98e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386902
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We'd like to properly support cases like:
```
a.dart:
import 'b.dart';
class A extends B {}
class C {}
b.dart:
import 'a.dart'
class B extends C {}
```
Here both A and B will request a reference to the other during
linking.
We break the cycle by storing libraries in the map after they are
initialized, but before we recursively link them. Now an access to a
library proxy has different guarantees:
* during linking, it guarantees to return an intialized library.
* during program execution, it guarantees to return a linked
library.
Aside from this change, this CL does a minor change to the logic on
`hotReloadEnd` to not change the state of the `libraries` array on a
hot-reload. This change is technically not necessary, but may help us
more clearly track the invariants of the library map: the new logic
keeps updates to the map monotonic over time.
Change-Id: Id2aafa3d94c6bff32b7ddb326f883f978bff6bf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385324
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This is no longer used since support for legacy code < 2.12
has been dropped.
Change-Id: Id0e67445407c9b110218625d8e3a7ad5230d75cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386966
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This test is already slow on SIMARM configurations, spawning DDS in
SIMARM is also slow and can cause the test to timeout (e.g. on vm-aot-linux-debug-simarm_x64).
Related to https://dart-review.googlesource.com/c/sdk/+/385121
Change-Id: Icfa31d8d56efe3480d8223ef4c852322e0d652da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387201
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
This CL changes the specification parser grammar to support a switch
expression that has zero cases (this is a missing update, the feature
specification already has it). It also changes several language tests
such that they expect a 'syntax error' rather than a 'compile-time
error'. This makes no difference for any tool except the specification
parser, for which it is needed (in general, a test that is expected
to have a compile-time error will parse just fine, so we need a
separate test outcome expectation for syntax errors).
Change-Id: Ifa00c11ce6c57053bd490e11a41d6e8d7b82a2d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384600
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
After these changes the tests pass 100% of the time on all expected configurations.
- Emit 'unittest-suite-wait-for-done' at the start of tests to allow for async code loading. Tests must therefore emit 'unittest-suite-done' when they complete. Calling `asyncStart` and `asyncEnd` helpers will achieve this.
- Fix test_runner runtime.
- Add file deps on necessary files (dart2js platform dill & flute) to dart2wasm_hostasserts config.
- Mark dart2js compilation test as slow.
Change-Id: Iee993deb3905ccd50068325a5c5fd0bf0512a513
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386980
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
* Infer range for CheckArrayBound and GenericCheckBound instructions.
* Extend Constraint instruction to non-Smi values bounded by list
length.
* Unwrap UnboxInt64 during canonicalization of range boundaries.
* Use symbolic range for UnboxInt64 of list length.
As a result, bounds check can be eliminated in a loop over a growable
list:
```
for (int i = 0; i < a.length; ++i) {
final value = a[i];
...
}
```
TEST=runtime/tests/vm/dart/regress_56726_il_test.dart
Fixes https://github.com/dart-lang/sdk/issues/56726
Change-Id: Ic56df18f6fbf26abf91d6ecbff24d68678dccb60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386522
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This CL adds support in the grammar for augmenting external top-level
declarations (getter, setter, function, variable). It also adds this
support to several kinds of declarations, and then factors out the
`AUGMENT?` part of each alternative of `declaration` (because we are
now allowing `augment` on every alternative).
This CL is a continuation of
https://dart-review.googlesource.com/c/sdk/+/387160
where the first batch of changes in this area were made.
Change-Id: I7f02709f29d0f13010ac44c4428f90250a38948c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387221
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This CL adds support in the specification parser (Dart.g) for omitting
the implementation from several kinds of declarations. This is needed
because it must be possible to omit the implementation and provide it
in an augmentation.
The implementation is the initializing expression of a variable, the
function body of a top-lovel or static getter, setter, or method, or
the function body of a factory constructor.
Change-Id: If305dae376ba1c5aabcdd698824aca5d5b0fb97a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387160
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>