Commit graph

69465 commits

Author SHA1 Message Date
Sigurd Meldgaard
be1ddc8a64 Bump pub revision in DEPS
New commits included in this revision:
```
$ git log --pretty=oneline 4d8ecbd409d773fec47da33b7e6c8db0b51487fd..429a06039d185149f387a65e3503b0693ce6d24e
429a06039d185149f387a65e3503b0693ce6d24e (HEAD -> master, origin/master, origin/HEAD) Parallel fetching of available versions (#2280)
6705b085b9bf4754a4c8002a070f436f115dc4d1 Retry on all SocketExceptions (#2254)
a1820273b9f3c7bb5a13d26cd14d30d5bab187ae Use a unqiue file name for the snapshot during testing. (#2303)
72686563e767f8a359e48a267a2c323953a6a0ef Include osx and windows testing on Travis (#2299)
a7a66821d13920b9b22cc394dfa55c679e971e40 Fail travis for lints and warnings (#2301)
25aa24c023453f064dad8f3cce1bbd55269d0efa Omit languageVersion when there is no SDK constraint (#2300)
82e60a3dcb3afe753563e7d304827fb650bc4833 Use LOCALAPPDATA for system cache on windows (#2297)
ceaa86f2c7eb35f044b4c202268a17361de68d13 Enforce and fix lints from package:pedantic (#2291)
6ce1606564352c305bd0f6d97704f0f7f6ebbca0 Use more collection literals for args (#2293)
be245e6baeebb71aaf3b3a260fcfbbb011a9a7e0 Rename some test utilities from Mock to Fake (#2294)
f7638ce85298df7d9e73d717dd4d81f499681720 Refactor Set.add following !Set.contains (#2295)
390022b24bc076cb934385936ac7904f045a75ba Filter out `null` from `getCachedPackages`. (#2292)
0eea0c4421ed0b83c8597b62dacf68b93de172b9 Fix existing hints and lints (#2290)
7cf2fe860a40517ccb65f5efdda9e4dc350142c3 promote strict deps failures to errors from warnings (#2289)
```

Change-Id: I62782b29e16092114940df00811bfdd20c8045fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131839
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-01-16 14:45:59 +00:00
Danny Tuppeny
f689f145b1 Only call applyFileRemoved for analyzable files
Currently this is called for non-Dart files and may be contributing to a crash in Flutter - see https://github.com/flutter/flutter/issues/46616#issuecomment-574224525 and following comments.

Bug: https://github.com/flutter/flutter/issues/46616
Change-Id: I52fe539c265426dcd2ea978c2fbc8abfdfe4998f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131835
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-01-16 14:44:06 +00:00
Samir Jindel
d0909e068a Reland "[vm/aot] Only patch call-sites to monomorphic entry-points when the receiver is proven to be a heap object."
This reverts commit 5f81efb4a3.

Reason for revert: 3xH bot is green again.

Original change's description:
> Revert "[vm/aot] Only patch call-sites to monomorphic entry-points when the receiver is proven to be a heap object."
> 
> This reverts commit ab2026af45.
> 
> Reason for revert: Flutter 3xH is broken on Golem.
> 
> Original change's description:
> > [vm/aot] Only patch call-sites to monomorphic entry-points when the receiver is proven to be a heap object.
> > 
> > Flutter Gallery ARMv8: -0.8% total, -1.3% instructions
> > Flutter Gallery ARMv7: -0.7% total, -1.2% instructions
> > 
> > There are some performance regressions, in four categories:
> > 
> > 1. Arithmetic on num types (e.g. MinLib, MaxLib):
> >    We believe arithmetic on num types is rare in practice, and can be optimized later
> >    by specializing the call-sites.
> > 
> > 2. Lack of types (e.g. MeshDecompression, ImagingGaussianBlur, Crypto*):
> >    These (and similar benchmarks) are written in a very untyped style, which is not
> >    representative of Dart 2 style. We've confirmed that the regressions disappear if
> >    the benchmarks are annotated with appropriate types.
> > 
> > 3. Megamorphic calls which are specialized in the benchmark (e.g. DeltaBlue):
> >    DeltaBlue uses string interpolation in one place, so the toString() method in the
> >    string interpolation helper is monomorphic for _Smis. However, in a realistic programs,
> >    string interpolation is used much more frequently and with different types, so it's very
> >    unlikely that this call would be monomorphic. When string interpolation is removed, there's
> >    a remaining 1.3% regression on DeltaBlue which is not yet accounted for.
> > 
> > 4. Noisy benchmarks
> >    The remaining regressions are on benchmarks which show frequent jitter historically.
> > 
> > There are also 1-4% improvements on many benchmarks (Golem's "noise" analysis is hiding
> > many of them, look at the graphs).
> > 
> > For the reasons above, we believe the regressions justified by the code size improvement.
> > 
> > Change-Id: Ic9b281d4383a6111de9d6f44347976ffa61a6ca6
> > Cq-Include-Trybots:luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-bare-linux-release-simarm64-try
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128667
> > Commit-Queue: Samir Jindel <sjindel@google.com>
> > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
> 
> TBR=kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,sjindel@google.com
> 
> Change-Id: I411aae4b230f2a08146ad3bf3e7a10aa6592db0e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-bare-linux-release-simarm64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131660
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>

TBR=kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,sjindel@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I36e4e9d598033fcc934c2cdf5b061aa11255d3b2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-bare-linux-release-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131837
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2020-01-16 14:21:16 +00:00
Brian Wilkerson
e08e18f369 Add edits for more fixes in the preview tool
Change-Id: Ice5cff20f4df1215265b75cf2b1c1fad83aec2a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131946
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 14:16:06 +00:00
Jens Johansen
566cd23ec8 [CFE] Cleanup no longer used 'normalize' for types
Change-Id: Ib0fd8bcce0d7c6face60a55272b29aa28a40ac93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131830
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-01-16 12:50:43 +00:00
Martin Kustermann
9520235bfe [vm/async] Ensure all service tests run with both, --causal-async-stacks/--lazy-async-stacks
Running all existing tests with/without lazy async stacks ensures that
the existing functionality for --lazy-async-stacks does not regress.

There are still a few smaller things to be done in the debugger for lazy
async stacks.

This CL also ensures:

   * The inner closure, i.e. AsyncClosure/AsyncGenClosure, is not
     inlined if FLAG_lazy_async_stacks is on.

   * Fixes a crash in dartkb mode, when the function of the Bytecode
     object is null.

   * Does a simple integration of the lazy async stacks in debugger.cc -
     to ensure a stack is returned via vm-service.

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

Change-Id: Ibc1e887a457e2c456ae65d9ed5fa92434f122a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131825
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-01-16 12:47:03 +00:00
Alexander Thomas
f9e9f37068 [testing] Pass the experiment flags to all batch runners
Sometimes, the batch runners need the experiment flags set. This is
especially true when running in NNBD mode which needs to be enabled in
the VM running the batch runner as well as in the test code.

Previously this was only done for the CFE batch runner, this CL moves
the logic to apply to all compilation commands using batch runners.

Change-Id: I9358ae7cfed4f082075ef91b59408edcb2912361
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131831
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-01-16 12:24:14 +00:00
Victor Lima
afa98b977a [vm] Ensure abstract classes are marked as such and get a size of 0 in shared class table.
Change-Id: If19444e702a2b73a829bd9f581ff36ad041ecf41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131801
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-16 10:34:53 +00:00
Alexander Thomas
aed137824e [infra] Add dart2js NNBD builder to the test matrix
Initially, this will just do the build. The dart2js team will add
testing in a separate CL.

Change-Id: If06fb6e639194a4c80d1f2a6f437c76d5bfc029f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131827
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-01-16 10:09:10 +00:00
Dmitry Stefantsov
369bfd094a [cfe] Fix type inference for various if-null nodes
Change-Id: I70abfb7032194cac07028b50d16125e74b518bb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131823
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-16 09:39:49 +00:00
Jens Johansen
128771af8a [CFE] Version 2 of incremental compiler invalidation strategy
Change-Id: Iff860e2665dee64fc005a50237ae890986ddb0f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127896
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-16 07:50:39 +00:00
Sam Rawlins
b2842d9214 NNBD preview: alert user to disconnected preview server
Change-Id: Id6b84b5c5b948f5c562e9a4b9e10eecdb06f30a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131941
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 07:48:39 +00:00
Jaime Wren
2b573d65d8 Introduce _doExpectKeywordCompletions in ExpectedCompletionsVisitor
Change-Id: If5e2479eb9397dbb5a6ae6f9c3a0838841abeee9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131906
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-01-16 07:06:01 +00:00
Jaime Wren
8826b7e249 Improve the print output from completion_metrics.dart to match the expected input of the Files dialog in IntelliJ.
Change-Id: If6ff502a397a35d8937263e4b2ee9c683ed612a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 06:50:24 +00:00
Paul Berry
2b756f6b02 Migration: add FixBuilder support for IfElement.
One minor issue remains: when dead code elimination causes a
collection to become empty, migration should insert explicit type
parameter(s) to ensure that the empty collection will still get
analyzed as having the right type.  This is noted in TODO comments.

Change-Id: Ibed25f6cb8ed9eec3ddccb0444178960c6b35c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131843
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-16 06:45:35 +00:00
Paul Berry
53bef4bb07 Create an abstract layer to customize querying collection elements.
This will be needed for the NNBD migration engine, so that when it
re-runs resolution to see what the types will be in migrated code, it
can tell the resolver to skip or modify collection elements to account
for dead code elimination.

The runtime overhead of this abstraction should be negligible, since
under normal analyzer operation, there will only be a single const
instance of this class, and no instances of any subclasses.  So the VM
should be able to trivially inline all uses of the abstraction layer.

Also add SetOrMapLiteralImpl.becomeUnresolved(), which is used to
reset literals to the "unresolved" state before they are resolved.
This will be necessary so that when the migration engine re-resolves a
set or map literal, the determination of what kind of literal it is
will be made afresh.

Change-Id: Id8e95c944acb892c60d3d92a7facc20d08604211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131842
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 06:45:35 +00:00
Nicholas Shahan
dbc23399d4 [tests] Copy test for dart:* nnbd static errors to analyzer bot
The DDC bot is no longer triggered on changes to the analyzer package.
The analyzer team would naturally like to know if they are breaking this test so
it makes more sense to move it to their bot.

In a discussion with our team we opted to leave the test on our bot as well since
runs so quickly and makes it easier to notice errors earlier for some of our
workflows.

Change-Id: I0157fdc5a957239f432a448b546531487895da7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131717
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-01-16 06:45:34 +00:00
Ben Konyi
f6d8302028 [ dart:vmservice / NNBD ] Fixed NNBD analysis issues
Change-Id: I5fbaf410d157a9f1b6b0cf062f7a8c04ab3b99be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131883
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-01-16 06:37:31 +00:00
Sam Rawlins
9937277327 NNBD preview: Change navigation to be a tree; not interactive yet #40109
Change-Id: I42550b89533d4c1acba7998887f7601de2569f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131903
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 06:37:29 +00:00
William Hesse
009537bbf0 [infra] Empty SDK commit, to validate a fix for approval copying
TBR: athom@google.com
Change-Id: I7d29168b4146e1c6b9ea10008c5a7b3f922e2979
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131826
Reviewed-by: William Hesse <whesse@google.com>
2020-01-16 06:07:56 +00:00
Mark Zhou
515d4bd7ad [dartdevc] Emitting equality checks that disregard 'legacy' wrappers for type objects.
Currently does not work for function and generic function types.

Type object equality ignores legacy modifiers but preserves other nullability
semantics. This scheme constructs the runtime type object (normalized) at runtime,
caching it if necessary. This avoids the space overhead of emitting canonicalized
normalized types at compile-time but incurs a cost when runtimeType is called
for the first time per recursive subtype.

See: https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/feature-specification.md#runtime-semantics

Change-Id: I76d714c5e618d77f334d90862bb7d3c9b0b8d305
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130727
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-01-15 21:21:27 +00:00
Jaime Wren
418707beb6 In completion_metrics.dart, print out line numbers instead of character offsets.
Change-Id: Ifc083b5a4938bdc7bbae57e42559f61d6310df33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131904
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-15 21:13:14 +00:00
Konstantin Shcheglov
6525fc9057 Fix for crash: type 'DefaultParameterElementImpl' is not a subtype of type 'FieldFormalParameterElementImpl'
#0      ResolutionVisitor.visitFieldFormalParameter (package:analyzer/src/dart/resolver/resolution_visitor.dart:458:7)
#1      FieldFormalParameterImpl.accept (package:analyzer/src/dart/ast/ast.dart:4123:49)
#2      ResolutionVisitor.visitDefaultFormalParameter (package:analyzer/src/dart/resolver/resolution_visitor.dart:370:21)
#3      DefaultFormalParameterImpl.accept (package:analyzer/src/dart/ast/ast.dart:2999:15)
#4      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7520:20)
#5      FormalParameterListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4451:17)
#6      RecursiveAstVisitor.visitFormalParameterList (package:analyzer/dart/ast/visitor.dart:887:10)
#7      FormalParameterListImpl.accept (package:analyzer/src/dart/ast/ast.dart:4447:49)
#8      ResolutionVisitor.visitFunctionExpression.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:596:25)
#9      ResolutionVisitor._withNameScope (package:analyzer/src/dart/resolver/resolution_visitor.dart:1275:8)
#10     ResolutionVisitor.visitFunctionExpression.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:591:7)
#11     ResolutionVisitor._withElementHolder (package:analyzer/src/dart/resolver/resolution_visitor.dart:1253:8)
#12     ResolutionVisitor.visitFunctionExpression (package:analyzer/src/dart/resolver/resolution_visitor.dart:590:5)
#13     FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:4969:49)
#14     ResolutionVisitor.visitVariableDeclaration.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:980:27)
#15     ResolutionVisitor._withElementHolder (package:analyzer/src/dart/resolver/resolution_visitor.dart:1253:8)
#16     ResolutionVisitor.visitVariableDeclaration.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:979:9)
#17     ResolutionVisitor._withElementWalker (package:analyzer/src/dart/resolver/resolution_visitor.dart:1264:8)
#18     ResolutionVisitor.visitVariableDeclaration (package:analyzer/src/dart/resolver/resolution_visitor.dart:971:7)
#19     VariableDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:10408:49)
#20     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7520:20)
#21     VariableDeclarationListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10512:16)
#22     ResolutionVisitor.visitVariableDeclarationList (package:analyzer/src/dart/resolver/resolution_visitor.dart:995:10)
#23     VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:10506:15)
#24     FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3993:17)
#25     RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:857:10)
#26     ResolutionVisitor.visitFieldDeclaration (package:analyzer/src/dart/resolver/resolution_visitor.dart:449:11)
#27     FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:3988:49)
#28     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7520:20)
#29     ResolutionVisitor.visitClassDeclaration.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:245:22)


Change-Id: I2402751a3b88e9df934a2f6660813826244f827a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 21:10:47 +00:00
Jaime Wren
74bf68a99d Improve printPercentage(..) in pkg/analysis_server/lib/src/status/pages.dart to take an optional fractionDigits to pass to num.toStringAsFixed(..)
Change-Id: I641cf541626ef149663fc3f652b9f1ca1dfb02a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131847
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-01-15 19:56:55 +00:00
Mike Fairhurst
689e0feab2 [nnbd_migration] Mark implicit dynamic for type params as nullable
Looks like we used to do this, but we stopped when we started changing
this pattern:

```
dynamic x = 1;
int y = x;
```

Our first iteration treated `dynamic` as nullable all the time. This is
not ideal in the example above. So we went back and instead began
treating `dynamic` as nullable only when it was observed to have a null
value.

However, in the case of unbounded type parameters:

```
class C<T> {}
```

We don't want to wait to observe:

```
C<Object> o = C(null);
```

before treating the bound as nullable.

Change-Id: I50b8ca6188d82cd62f795ada99a355afe2eae771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131714
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-01-15 19:50:16 +00:00
Konstantin Shcheglov
9ae4849386 Report LATE_FINAL_LOCAL_ALREADY_ASSIGNED.
Change-Id: Ifa1706b6aecf53ec15578b13a4cc5931fbba3b2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-15 19:28:56 +00:00
Jaime Wren
b38263736a Rename a class in pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
Change-Id: I6e7cbe671a1030e5a523f1c5085442cce27093a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131884
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-15 19:26:13 +00:00
Jaime Wren
b227f19168 Improve the print output from the completion_metrics.dart tool, output for collection is now:
Summary for /usr/local/google/home/jwren/github/collection:
Total number of completion tests   = 11487
Number of successful completions   = 9945 (86.6%)
Number of unsuccessful completions = 1542 (13.4%)

Change-Id: Ie53fdb3be7cac847ac1612a90b93c7eacd72f41d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131846
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-01-15 19:11:24 +00:00
Jaime Wren
bbec798aca Implement the rest of the visit* methods in pkg/analysis_server/tool/completion_metrics/visitors.dart, members sorted.
Change-Id: I763e57740c40051c268b13222b9528f2b15eab1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131845
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-01-15 18:56:05 +00:00
Nicholas Shahan
a5a8ea008b [dart:async] Fix error in NNBD fork
The `is!` check is causing test failures when null flows through as `value`.
There is still no type promotion in place to make this work without the cast.

`null is! int*` is true while `null as int*` is a safe cast.

Fixes runtime failures in:
- language_2/async/identifier_test
- language_2/await/and_ifnull_test
- language_2/invalid_returns/async_invalid_return_00_test/none
- language_2/invalid_returns/async_invalid_return_01_test/none
- language_2/invalid_returns/async_invalid_return_02_test/none
- language_2/invalid_returns/async_invalid_return_03_test/none
- language_2/invalid_returns/async_invalid_return_04_test/none
- language_2/invalid_returns/async_valid_returns_test
- language_2/regress/regress26668_test
- lib/async/future_foreach_test
- lib/async/futures_test
- lib_2/async/future_foreach_test

Change-Id: I25d0dfb10d558ef7c167f99d1fba11f379cd8815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131719
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-01-15 18:25:04 +00:00
asiva
1564d596bb [VM/isolate] Migrate 'dart:isolate' and patch files for NNBD
Change-Id: I1e894815599d9b1dbb0551428eb7a679a23edd6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131483
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-01-15 18:09:04 +00:00
pq
55637a41a8 linter bump to 0.1.109
Change-Id: I975655beb1fd8c5eca986da498e9707b85efd50f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-15 17:27:34 +00:00
William Hesse
1a00ccfa96 [infra] Use analyzer-unittest-asserts and cfe-unittest-asserts configurations
There were multiple builders using the same unittest-asserts-linux
configuration, which caused confusion on the results feed. Analyzer unit
tests will now use the analyzer-unittest-asserts configuration and
front-end builders will use the cfe-unittest-asserts configuration.

Other front-end builder configurations starting with fasta- are renamed
to start with cfe-.

Before landing this change, the results.json files on the builders will have
duplicate results, showing the current test results under the new configuration
names, added to them.  This will avoid "new test" and "new failing test"
messages for the new configurations.  These must be added to the results.json
on GCS that is picked up by the first new run, but can safely be added to
earlier ones on GCS as well.

Change-Id: I947814e8c82eef84f79334e6871f1cd3b1d8af0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131821
Reviewed-by: Alexander Thomas <athom@google.com>
2020-01-15 15:40:45 +00:00
Johnni Winther
249414d34a [cfe] Avoid crash on late field override
Change-Id: I588b5e608ac89482c1198354975a028b48db7071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131800
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-01-15 14:03:04 +00:00
Paul Berry
8ff8fdb1c2 Migration: small simplification to _PassThroughBuilderImpl.
Instead of storing planIndex in the class (which makes it hard to
follow what methods are expected to update it, and consequently hard
to tell that _processPlans will process each plan exactly once), pass
it between _processPlans and _handleRemoveEditPlans so that it's
clearer how it is updated.

Change-Id: I1b03ad2b8bb0ae5e488d02827d2a4a56f37ede21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131711
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-01-15 13:00:53 +00:00
Paul Berry
d1a7c25b38 Migration: test removal of all list elements when there is a trailing separator
Change-Id: I35e98c967b18b9585f0cd0e08af8957120a27320
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131710
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-15 13:00:53 +00:00
Johnni Winther
fd5bf3ed6b [cfe] Add opt-out version of general testcases
Change-Id: Idf0ea17fdf16c465f32367067b3d77a2e9492367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131077
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-15 11:42:29 +00:00
Dmitry Stefantsov
d747c51d8f [cfe] Use nullable context on LHS of if-null expressions
This is a fix for CFE of the same issue as reported in
https://github.com/dart-lang/sdk/issues/39694

Change-Id: Ied7fb27c8074f4c4ddbac29c8470544e9f32712a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131065
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-15 10:53:04 +00:00
Johnni Winther
862d5012ae [cfe] Handle explicit opt-out in nnbd-not-enabled message
Closes #39835

Change-Id: I4ffa3377289f45b7ea909b5477ba53508040b9d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131076
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-01-15 10:30:43 +00:00
Johnni Winther
99e2a348b3 [dart2js,cfe] Move filenames.dart to _fe_analyzer_shared
... and use it fix perf_test on Windows

`currentDirectory` is replaced by `Uri.base` (the former sounded more magical than it was!)

Change-Id: I5fb8dc5dba004ebad221d4b39d213d51964c5ea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131622
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-15 10:12:23 +00:00
Daco Harkes
8ee8f882ea [vm/ffi] Migrate dart:ffi to nnbd
Everything in FFI is nonnullable, because C does not accept null values or return null values (nullptr == 0, not null).
The only thing that needed migration in the FFI api is operator == (dynamic other) --> operator == (Object other).

This CL does not migrate any tests as the VM cannot run any tests yet.

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

Change-Id: I5efc772b61228bd1bd4d95be1b7bcd969f0c9ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131380
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-01-15 09:47:44 +00:00
Jens Johansen
ca565d946f [vmservice] Make sure one can request several heap snapshots
Also extend test to verify one can find expected instances through the
heap snapshot.

Change-Id: Ie4d83100b0702f6e0ceb7ae351b1d49d85d385a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131066
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-01-15 08:53:23 +00:00
Johnni Winther
d302d7f10a [cfe] Insert member signatures for nnbd aware inheritance
Change-Id: I86dbbd586434af81b6dc4f4ae748cbd8177d06e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129080
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-15 07:36:28 +00:00
Jaime Wren
5e42c5a4ad Special case in completion_metrics.dart, some keyword suggestions come out of the DAS completion engine such as "import '';", instead of "import"
Change-Id: I6de32a6a2c770a78a2fd3e1103969b5f2f62f9e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131716
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-01-15 05:54:44 +00:00
Konstantin Shcheglov
c3a2ed9555 Fix failing tests on unittest-asserts-release-win after analyzer Packages change.
Change-Id: Iec83b5d02d10e3b93f2e1e734bd155189f9ef2d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131780
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 03:10:24 +00:00
Vijay Menon
4a488b16b7 Reland "De-dup js_util between ddc and dart2js"
Fixes the original CL by restoring files temporarily needed by Flutter (until cleaned
up on Flutter side).

Change-Id: I2561339c797e1d5168646e59782ca0fcd10d79af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131582
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-01-15 02:08:04 +00:00
Konstantin Shcheglov
924f4e0549 Downgrade receiver of type Never to hint.
Bug: https://github.com/dart-lang/sdk/issues/40057
Change-Id: I49f56b7efa4c88a86fda071c6063b308062784bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 01:33:24 +00:00
Ben Konyi
93c3c28d2b [ VM / dart:vmservice ] Migrate dart:vmservice to NNBD, cleanup outdated code
Change-Id: I84ef4cea95a20171d842ea0f0db668c1dbbe5dae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131480
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-01-15 01:00:34 +00:00
Ryan Macnak
e0c366a3c8 [vm] Update dart:mirrors for Dart 3.
Also back-ports all non-type changes to the Dart 2 version for the sake of testing.

Bug: https://github.com/dart-lang/sdk/issues/40045
Change-Id: Idda6b6c5e8508efe4db79f27f41d0a2485b9f197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131485
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-01-15 00:56:24 +00:00
pq
8163dbea4f completions for yield statements
Change-Id: I4ac28ebf4d5b2c49926a31704a81ccf2fd14106d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131718
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-01-15 00:49:24 +00:00