Commit Graph

35087 Commits

Author SHA1 Message Date
Paul Berry 6853db8e77 Update code to avoid breakages when language issue #1274 implemented.
In preparation for supporting inference of non-nullability from local
boolean variables, we need to change a small amount of code to avoid
test breakages.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: Ia49e37f9ba2cd94967c7e1d411a3269593c0eeb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176501
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-17 15:16:04 +00:00
Paul Berry 4510f1dc98 Flow analysis: add the ability to promote based on local boolean vars.
This CL adds functionality to FlowAnalysis.variableRead so that if the
truth value of the variable is known to be correlated with other flow
analysis state, that state can be restored.  This allows promotion
based on boolean variables in addition to boolean expressions, e.g.:

    int? x = ...;
    var xIsNotNull = x != null;
    if (xIsNotNull) {
      print(x + 1); // Ok; x is known to be non-null.
    }

This functionality is not enabled yet; it is hidden behind the flag
`allowLocalBooleanVarsToPromoteByDefault`.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I2a0183b69d285193db7acb36cc6af5c34e165c2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176500
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-17 15:16:04 +00:00
Paul Berry 5c19c9f5e4 Flow analysis: store ExpressionInfo in SSA nodes.
This CL modifies flow analysis API so that when a variable is written
or initialized, if the written expression has non-trivial flow
analysis information, it is captured in the SsaNode associated with
the variable.

The stored information is not yet used; in a follow-up CL, I will add
the ability to retrieve it on a read and use it for promotions.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I1e2590205d4a0c59f4400a119f3d6b380a11414c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-17 15:16:04 +00:00
Paul Berry c64842e582 Flow analysis: Make arguments to VariableModel constructor named.
This makes the call sites a lot easier to read.

Change-Id: I26a538e6dcc3971a6604565f18929949bb9ca740
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176383
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-17 15:16:04 +00:00
Paul Berry afc9a4eeff Flow analysis: implement the new attachFinally algorithm.
When https://github.com/dart-lang/language/issues/1274 (Infer
non-nullability from local boolean variables) is fixed, this algorithm
will replace the `restrict` algorithm is currently used at the bottom
of a try/finally statement to combine the flow models from the `try`
and `finally` blocks.  The new algorithm has very similar behavior to
the old one, however since it is based on SSA nodes it (a) is able to
make slightly more promotions than the old one, and (b) will be able
to properly update SSA nodes so that local boolean variables assigned
inside a `try` block will be able to used for promotion after the
`finally` block.

The new functionality is hidden behind a flag for now, so there's no
customer-visible change yet.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I1d37f981688f58da1e5c6c7eee48f2319c997cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174960
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-17 15:16:04 +00:00
Dmitry Stefantsov 6b7442ce14 [cfe] Check types in declared interfaces of local functions
Closes #44476.

Bug: https://github.com/dart-lang/sdk/issues/44476
Change-Id: Id3457d4e6cc2248e773f40e2c9a22b88de58b659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176245
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-12-17 10:14:43 +00:00
Sigmund Cherem 368d9f375f web: fix js-number patches to avoid assignment errors
Change-Id: Ie4ae4b1aa1a67a0153168d30d27d16d005c564a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176483
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-12-17 04:35:53 +00:00
Joshua Litt b606a183cb [dart2js] Add closed world phase to serialization_test.
Change-Id: I83f983c6971d62bc6f65b39b8dde80024a7cb1d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176325
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-12-16 22:46:12 +00:00
Stephen Adams 8a37dcf3d4 [dart2js] Reduce number of ParameterStructures
There are 3271 unique ParameterStructures in a big app.
This change reduces the number of instances from 242681 to 13262.

I'm not sure it is worth a full canonicalizaton, for comparison, there
are ~350k Selectors, fully canonicalized.

Change-Id: Iff99fab2e31adb4c5d829ffc3078de8b3e834389
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176324
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-16 21:35:22 +00:00
Konstantin Shcheglov 4f15c4af8f Cache directory to BazelWorkspacePackage mapping.
We have a huge performance issue internally because of this.
This CL makes analysis from 3x to 7x faster.

Bug: https://github.com/dart-lang/sdk/issues/44484
Change-Id: I71edde0c9da1dd954c69d64cb7448494bf6f3bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-16 21:26:52 +00:00
Devon Carew 543364df65 Fix the user text for a quick fix.
Change-Id: Ie78c78b8c128e10ad6085a36f751e4f0b0656438
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-16 19:08:02 +00:00
Johnni Winther af9bce61c2 [cfe] Increase unit test suites timeout to 30min
Mac bots timeout with the current limit of 25min. Increasing to
30 for now. We probably need to shard the suites further but
that's for a follow-up when we have the (new) timings for the
Mac bots.

Change-Id: Iae9f48374cb49b53df070161c0eeea0c0355cdb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176445
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-12-16 18:25:02 +00:00
Danny Tuppeny eb409d97bc [Analyzer] Fix an issue where LSP semantic tokens may be missing for some "import" keywords
Change-Id: Idf5a60b1d41e12d07549865ad6d6bd26ef0ac6e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176446
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-16 18:23:07 +00:00
Brian Wilkerson 3ecab274a4 Expressions that cannot be evaluated should not throw an exception
This also adds a test case for another bug, which I'll attempt to fix
after this has landed.

Change-Id: I00f6bc707767777525a89ba8ea9fdf8a6f41a0ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176480
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-16 18:11:12 +00:00
Keerti Parthasarathy 0f71acfcf3 Consider dart lang as third party for options file.
Change-Id: I40b07053815a79fe870b5434a4cda93959cec497
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176323
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2020-12-16 16:22:52 +00:00
Konstantin Shcheglov ac18a7ba91 Implement search for TypeAliasElement.
Change-Id: I14c931277432d95c8ed2ae48d5339a878966ddc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176402
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-16 04:02:31 +00:00
Konstantin Shcheglov f8a6ac8fd4 Fix SearchTest on Windows.
TBR

Change-Id: Ic973ea701247236ab460b631aa6c0f0ce4622c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176401
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-16 01:13:20 +00:00
Konstantin Shcheglov 02edd6c182 Migrate SearchTest to PubPackageResolutionTest.
Change-Id: Ife51f8eb24bbb50e0f4bba4fa8358ec1f3a9368c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-16 01:05:09 +00:00
Sam Rawlins 6eddd878c0 dart migrate: Fix preview_site_test on windows
Change-Id: Ib0fc934eb1620017da20a444ced58a8d9e63f540
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-15 23:45:01 +00:00
Sam Rawlins cad324cf79 Analyzer: Extract all parser tests to individual files
Change-Id: Ia3f85355186e25d4cc38fcb15ed3770a1db5805c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176360
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 22:57:21 +00:00
Konstantin Shcheglov a64db87a71 Test that legacy code that use non-function type aliases.
Change-Id: I8b80c2eb6f2ccc9a1d523e4350a47715cde1c411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176322
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-15 22:42:51 +00:00
Sam Rawlins fe2205ebde dart migrate: Simplify final output code
Change-Id: Ib472bf14d8dd06efeeb17b2c81fdb97bb886b214
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176340
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-15 22:01:11 +00:00
Konstantin Shcheglov c272975f92 Report errors when non-function type alias expands to a type parameter.
Change-Id: Ibed352c45972f1ff6477566a2c2dcf98839fb44b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 21:57:01 +00:00
Konstantin Shcheglov 9f0f569eaf Fix TopLevelInferenceTest on Windows.
Change-Id: I77f1fa123335325718cac7dbd4ec8a535fa618a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-15 20:02:45 +00:00
Paul Berry 1eb147d8af Flow analysis: add infrastructure for tracking SSA nodes.
This is the first step in a sequence of CLs to support type promotion
based on local boolean variables
(https://github.com/dart-lang/language/issues/1274).  To do this, we
will need a way to reliably tell whether a variable's value has
changed from one point in program execution to another, and to
associate additional information with a particular value of a
variable.  We'll accomplish both of these tasks by associating each
variable with a pointer to an "SSA node".  This pointer is updated to
point to a fresh node whenever the variable is written to, or two
different possible values come together at a control flow join.

Note that when a variable is write captured, it becomes impossible to
track when/if its value might change Previously we tracked this using
a `writeCaptured` boolean; now we track it by setting the SSA node
pointer to `null`.

This CL just lays the groundwork infrastructure and unit tests it;
there is no user-visible change.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: Id729390655c9371cba264816b418f6c0463e1758
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-12-15 19:22:01 +00:00
Danny Tuppeny 222f3dcd11 [Analyzer] Prevent two sets of parens being inserted for setState() when LSP's completeFunctionCalls is enabled
Fixes https://github.com/Dart-Code/Dart-Code/issues/3006.

Change-Id: Idc1ac2b41208a13a887e0c0ece98a255114fc634
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-15 19:21:31 +00:00
Lasse R.H. Nielsen e40ae3ba25 Add missing @Since markers on unmodifiable set additions.
Change-Id: I84e94736a425d45b6b1334e90f7991fa31070713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176240
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
2020-12-15 18:48:41 +00:00
Sam Rawlins 56fb42cb62 dart migrate: enable incremental migration workflow
Also:
* Print out details when applying migration
* Also fix title text position to not scroll out of view.

Change-Id: Idc4b703535400956f78d76ab7959f40cf77a0bc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175860
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-12-15 17:59:41 +00:00
Johnni Winther 76dcd9e37d [cfe] Ensure implicit-as and typedef reference are legacy erased
TEST=existing expectation tests

Change-Id: I48571347ef95b709a0804d284902ac6af7115afd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176083
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-15 15:34:40 +00:00
Jens Johansen 75e6406f5e [CFE] Fix incremental compiler bug when library claimed to have other library as part
This CL fixes a bug where the incremental compiler could potentially
* invalidate to few builders,
* output too few libraries, or
* crash

if one library claimed to have another (stand-alone) library as part.

This could happen when the library claimed to be a part was invalidated,
though it wouldn't always because it is sensitive to ordering.

The issue is that the library claiming to have another library as a part
lists that library as its part. Normally such a "pair" is only one
library and thus only has one LibraryBuilder (when from dill). Because
it's actually two libraries though, there are actually two LibraryBuilders.
Under normal circumstances we map from the part uri to the "main builder"
but in this case that could (depending on ordering) override the actual
builder which caused the bug.

Change-Id: Iff9037575ff53b48126b20f9fc5a6c8a52ed5198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176241
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-15 15:20:10 +00:00
Jens Johansen 9673d47a06 [CFE] Fix crash when trying to use DillLibraryBuilder as part
Change-Id: I612b7d5a50c6f60513529ae1bb8365e2a91ca014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176084
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-15 13:44:50 +00:00
Jens Johansen f94c7a10ef [CFE] Set accessor problem on malformed uri (aka set as synthetic)
This avoids a crash caused by libraries with such an uri being
used as a part, and a DillLibraryBuilder thus being added (or attempted
to be added) to a list of SourceLibraryBuilders.

Change-Id: I4f7dc8e982e86407337b2c6ea2e3ef608e7f1064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176081
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-15 07:50:49 +00:00
Konstantin Shcheglov 18e157f62e Test indexing of non-function type aliases.
Change-Id: I6c4fd466a06a2c3e6767f5e7f31cc2c671ba8ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 07:21:34 +00:00
Konstantin Shcheglov c11039702c Replace FindElement.functionTypeAlias() with typeAlias().
Change-Id: I88a5b889310df8a39b54318907ba8bbd68b26b9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176183
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 07:13:41 +00:00
Konstantin Shcheglov c860af98d8 Remove ClassElementImpl.collectAllSupertypes()
We have API for this now.

Change-Id: I89c68cae5e4205f7ac1200041cb72f5b6842305e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 07:13:30 +00:00
Sam Rawlins 13f9993511 Analyzer: Extract parser test base classes, helpers
Each of the *_Fasta test cases has a lot of test cases from the
corresponding *Mixin mixin. I started to combine _all_ of these
in parser_test.dart, but the file became too long; the formatter
was freezing IntelliJ.

So I've extracted out the non-test classes into parser_test_base.dart.

I'd like to extract each test class into its own file. For now, I
reduce half a dozen *_Fasta/*Mixin pairs into individual test classes.

Change-Id: I8dd7f28a6fe23e31f956cdb2f1d221669db376dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176064
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-15 03:57:59 +00:00
Konstantin Shcheglov ced8f5d1d8 Migrate IndexTest to PubPackageResolutionTest.
Change-Id: Idf285edac51c2bec5b1b57b4a831889156c795ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 02:10:20 +00:00
Devon Carew b782d5815f [pkg/nnbd_migration] add types to public API
Change-Id: Ie4a7bbe75dd8045b20361c3fa1e08784b990e951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176142
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-12-15 01:34:29 +00:00
Konstantin Shcheglov 17c6567054 Use FindElement in SearchTest and remove findChildElement().
Change-Id: I78d0c0fe7ae5a1453167b28fedeb79d3e53b7d29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 00:42:09 +00:00
Brian Wilkerson edb381a527 Fix path completion on under Windows
Change-Id: Ic33e65fd5174cf19e27b41196161f9c7fd06ff3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-15 00:34:09 +00:00
Konstantin Shcheglov 49332e66fd Use assertSimpleIdentifierAssignmentTarget() more, assertSimpleIdentifier(element).
Change-Id: Ib484c676d65cdcbdb19e53d5b8dadfd4054408c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176068
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-15 00:16:09 +00:00
Konstantin Shcheglov 7324bb164f Switch IndexTest to FindElement.
R=brianwilkerson@google.com

Change-Id: I4d947350ea17211b2025f2f18c703ac2866cd068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-14 22:36:39 +00:00
Konstantin Shcheglov 9717c775e4 Deprecate FunctionTypeAliasElement.function
Change-Id: Id629afa92c6681ba796aed75b24c4251fd86810f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-14 22:26:29 +00:00
Konstantin Shcheglov 6606edee3c Add ElementVisitor.visitTypeAliasElement
R=brianwilkerson@google.com

Change-Id: Id2e2fa118d5d9f363201aeb5384806bc6536c973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-14 21:20:29 +00:00
Danny Tuppeny 26cee4e0db [Analyzer] Produce string highlight tokens for literal string parts of interpolated strings
Change-Id: Idadfc90ba34d4a533964b34799585d7254b16830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176121
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-14 20:37:29 +00:00
Danny Tuppeny cb2ede57b7 [Analyzer] Add LSP support for textDocument/semanticTokens/full
Fixes https://github.com/Dart-Code/Dart-Code/issues/2202 + many more.

Change-Id: Ia2e8ec2415836a77618821144699971e97b4fc5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-14 20:37:29 +00:00
Johnni Winther e64839cd3f [dart2js] Remove code for creating constructors in unnamed mixin applications
This is now handled by the CFE

Change-Id: I78ae8897408cd7e78998ee9bedba87102f2b4fd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175481
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-12-14 19:16:18 +00:00
Paul Berry c171f92beb Flow analysis: check that implicit downcasts don't promote.
Bug: https://github.com/dart-lang/language/issues/1362
Change-Id: I4d7e9a15a8f138e53b6f620d32a9f90e6ceed818
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175902
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-14 19:09:28 +00:00
Konstantin Shcheglov ab2645c9f4 Regenerate messages/codes_generated.dart after removing template from Code.
Change-Id: I6c02558c983a3e5504529f086e11cce4c23b5cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176062
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2020-12-14 17:32:07 +00:00
Sam Rawlins 33a9d169ef Analyzer: prepare for null safety with explicit casts, and boolean defaults
Change-Id: Ic2e13b96903b9e23ad86ae1af86b912ac1a8636c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-14 17:13:48 +00:00