Commit Graph

5104 Commits

Author SHA1 Message Date
Konstantin Shcheglov cf3a034210 Implement promotion via initialization in flow analysis.
Change-Id: I10a5f6bfeb5a05dd144db5212c9f31796f5a2385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145502
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-30 16:26:27 +00:00
Johnni Winther a9b81e18d9 [cfe] Handle dynamic return in async
Closes #41437

Change-Id: I493b516f0b72fc1da097b92bd75150aea8e60ba7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145042
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-30 12:39:04 +00:00
Jens Johansen c08bcbb25e [CFE] Enable textual outline sorting in test suite
Change-Id: Iccf35b9cb3dce96487ca9ba688394e3b05be2e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145401
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-30 08:25:17 +00:00
Jens Johansen b1435ec38a [CFE] Textual outline can sort data
Change-Id: Iac337903aace923f2cff8797840aa5cdbfded03f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-30 08:25:17 +00:00
Jens Johansen f66e1ed7be [CFE] Textual outline expect files
Change-Id: I5cc3339880d0a77fbbcbd9f8a22e1186e5e2a5df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145380
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-30 08:25:17 +00:00
Johnni Winther e046afac1f [cfe] Don't print nullability on Null in messages
Change-Id: I530d3eef1a0af73d68aaccf33095ab2dcaf4747c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145461
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-30 08:16:24 +00:00
Dmitry Stefantsov b67a1313ae [cfe] Add an option to inspect internal state of text serialization
The option is added to the unit testing framework and is supposed to
be used locally.

Change-Id: Ia043ca35d27c15e597fe1b66429f923ccb24f3dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144825
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-04-29 10:36:40 +00:00
Clement Skau 12a5c93d4a Revert "Reland "[VM] Remove unnecessary Closure.clone() from sync*.""
This reverts commit 1bf25798fa.

Reason for revert: Rolling back as it breaks more external targets and is currently blocking rolls.

Original change's description:
> Reland "[VM] Remove unnecessary Closure.clone() from sync*."
> 
> This reverts commit 430c75b5fa.
> 
> Reason for revert: We probably don't care about the dartkb breakages.
> 
> Original change's description:
> > Revert "[VM] Remove unnecessary Closure.clone() from sync*."
> > 
> > This reverts commit ca94ad7112.
> > 
> > Reason for revert: Appears to break dartkb.
> > 
> > Original change's description:
> > > [VM] Remove unnecessary Closure.clone() from sync*.
> > > 
> > > Instead, this CL wraps sync*'s sync_op in an additional function
> > > that captures local copies of the necessary closure state.
> > > Notably this state includes the parameters of the original sync* function
> > > as these also need to be cloned for each instance.
> > > 
> > > 
> > > Note: a large number of .expect files have a small number of changes
> > > due to the additional wrapper function, as well as some extra plumbing.
> > > 
> > > Bug: https://github.com/dart-lang/sdk/issues/37753
> > > Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
> > > Commit-Queue: Clement Skau <cskau@google.com>
> > > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> > 
> > TBR=vegorov@google.com,cskau@google.com
> > 
> > Change-Id: I89e517196f03622337f909f0fcecbdc77c9dda93
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: https://github.com/dart-lang/sdk/issues/37753
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144920
> > Reviewed-by: Clement Skau <cskau@google.com>
> > Commit-Queue: Clement Skau <cskau@google.com>
> 
> TBR=vegorov@google.com,cskau@google.com
> 
> Change-Id: I78589c83cbb17151ca4ab8f811b4f18f252fb9c1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/37753
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144921
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Clement Skau <cskau@google.com>

TBR=vegorov@google.com,cskau@google.com

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

Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: I879df17bd282d01468fa010b94a8c89afdb8cd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145361
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-04-29 09:52:30 +00:00
Jens Johansen 6dcdec5e26 [CFE] Extends the crash reproduction minimizer to work on more than one file
E.g., reproducing #40707:

$ time out/ReleaseX64/dart pkg/front_end/test/crashing_test_case_minimizer.dart --platform=[...]/flutter_web_sdk/kernel/flutter_ddc_sdk.dill --invalidate=[...]/gallery/lib/main.dart --target=ddc --widgetTransformation [...]/gallery/lib/main.dart
[...]

DONE


Uri file://[...]/gallery/.dart_tool/package_config.json has this content:
{
  "packages": [
    {
      "name": "flutter",
      "rootUri": "file://[...]/flutter/packages/flutter",
      "packageUri": "lib/",
      "languageVersion": "2.2"
    },
    {
    }
  ],
  "generatorVersion": "2.9.0-3.0.dev.flutter-b0d35855d8"
}



====================


Uri file://[...]/gallery/lib/main.dart has this content:
import 'package:flutter/material.dart';
class RootPage extends StatelessWidget {



====================


Uri file://[...]/flutter/packages/flutter/lib/foundation.dart has this content:
export 'src/foundation/diagnostics.dart';



====================


Uri file://[...]/flutter/packages/flutter/lib/material.dart has this content:
export 'widgets.dart';



====================


Uri file://[...]/flutter/packages/flutter/lib/src/foundation/diagnostics.dart has this content:
abstract class DiagnosticableTree with Diagnosticable {



====================


Uri file://[...]/flutter/packages/flutter/lib/widgets.dart has this content:
export 'src/widgets/framework.dart';
export 'src/widgets/widget_inspector.dart';



====================


Uri file://[...]/flutter/packages/flutter/lib/src/widgets/framework.dart has this content:
import 'package:flutter/foundation.dart';
abstract class Widget extends DiagnosticableTree {
}
abstract class StatelessWidget extends Widget {



====================


Uri file://[...]/flutter/packages/flutter/lib/src/widgets/widget_inspector.dart has this content:
abstract class _HasCreationLocation {
}
class _Location {



====================



real    5m28.400s
user    7m24.233s
sys     0m9.895s

Change-Id: Ide66ad928699b781f3cfa8de11536cc8125983e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145080
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-28 15:22:09 +00:00
Jens Johansen 2b0685ab43 [CFE] Update expect files for UTF16_LE test
Change-Id: Ib20024303a2e74a7bf1098996e01272f4601afb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144841
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-28 12:25:38 +00:00
Johnni Winther 712efa2a49 [cfe] Handle problems and recovery in non-null check
Closes #41597

Change-Id: I781d70d7cd720ab09d68a22ead1639bf37953955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144941
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-28 08:06:48 +00:00
Clement Skau 1bf25798fa Reland "[VM] Remove unnecessary Closure.clone() from sync*."
This reverts commit 430c75b5fa.

Reason for revert: We probably don't care about the dartkb breakages.

Original change's description:
> Revert "[VM] Remove unnecessary Closure.clone() from sync*."
> 
> This reverts commit ca94ad7112.
> 
> Reason for revert: Appears to break dartkb.
> 
> Original change's description:
> > [VM] Remove unnecessary Closure.clone() from sync*.
> > 
> > Instead, this CL wraps sync*'s sync_op in an additional function
> > that captures local copies of the necessary closure state.
> > Notably this state includes the parameters of the original sync* function
> > as these also need to be cloned for each instance.
> > 
> > 
> > Note: a large number of .expect files have a small number of changes
> > due to the additional wrapper function, as well as some extra plumbing.
> > 
> > Bug: https://github.com/dart-lang/sdk/issues/37753
> > Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
> > Commit-Queue: Clement Skau <cskau@google.com>
> > Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> 
> TBR=vegorov@google.com,cskau@google.com
> 
> Change-Id: I89e517196f03622337f909f0fcecbdc77c9dda93
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/37753
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144920
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Clement Skau <cskau@google.com>

TBR=vegorov@google.com,cskau@google.com

Change-Id: I78589c83cbb17151ca4ab8f811b4f18f252fb9c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144921
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-04-28 06:17:20 +00:00
Konstantin Shcheglov 3e26a5d0dd Issue 40957. Report the language feature, and recommend to set SDK constraint.
...but don't recommend to enabled any experiment.

R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/40957
Change-Id: I556ce9952b28d0b079521ac46558f8e3adf352c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144982
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-27 22:11:46 +00:00
Konstantin Shcheglov eada4d8d65 Implement Factor in flow analysis.
Bug: https://github.com/dart-lang/sdk/issues/40014
Change-Id: I8d21d3c3368495d9d0dbb1cd52317b053657a176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-27 18:47:08 +00:00
Johnni Winther 3f18d37333 [cfe] Implement NNBD_TOP_MERGE update
Change-Id: I6b204b5d7def6a9d1dd4709e47f95eb102741489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144763
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 16:28:08 +00:00
Johnni Winther 3c0e9642d2 [cfe] Ensure default type on generic forwarding stubs/method signatures
Change-Id: Iad6246c55f45953bffe2c3de4a2e30a32db347d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144820
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 16:25:18 +00:00
Johnni Winther b8343d071d [cfe] Support Never and Never? in function literal parameter type inference
Closes #41415

Change-Id: Ia98c916da00e663ba909d6c38c6d9dc70d740bb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143812
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 15:11:08 +00:00
Johnni Winther e9ca413263 [cfe] Handle nullable access to extension members
Closes #41349
Closes #41495

Change-Id: I1893502592af1615184b5dd294e1835b51959a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144761
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 13:47:08 +00:00
Clement Skau 430c75b5fa Revert "[VM] Remove unnecessary Closure.clone() from sync*."
This reverts commit ca94ad7112.

Reason for revert: Appears to break dartkb.

Original change's description:
> [VM] Remove unnecessary Closure.clone() from sync*.
> 
> Instead, this CL wraps sync*'s sync_op in an additional function
> that captures local copies of the necessary closure state.
> Notably this state includes the parameters of the original sync* function
> as these also need to be cloned for each instance.
> 
> 
> Note: a large number of .expect files have a small number of changes
> due to the additional wrapper function, as well as some extra plumbing.
> 
> Bug: https://github.com/dart-lang/sdk/issues/37753
> Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,cskau@google.com

Change-Id: I89e517196f03622337f909f0fcecbdc77c9dda93
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144920
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-04-27 07:45:04 +00:00
Clement Skau ca94ad7112 [VM] Remove unnecessary Closure.clone() from sync*.
Instead, this CL wraps sync*'s sync_op in an additional function
that captures local copies of the necessary closure state.
Notably this state includes the parameters of the original sync* function
as these also need to be cloned for each instance.


Note: a large number of .expect files have a small number of changes
due to the additional wrapper function, as well as some extra plumbing.

Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-27 07:37:39 +00:00
Johnni Winther 6c21ed6314 [cfe] Support class hierarchy changes in ChangedStructureNotifier
Closes #40707

Change-Id: I0a9e0b11d0f597dfed7182dd869382057d04e5dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144821
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-26 19:51:29 +00:00
Joshua Litt 32c3a2cde7 [dart2js] Rebase nnbd expectations for 3 tests.
cfe_constant_test
inlining_test
jfield_analysis

Change-Id: Ib2833507f4e19f3d6a1e5055977bccc962b2d791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144494
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 18:30:03 +00:00
Johnni Winther d59d0752e2 [cfe] Avoid hoisting in top-level inference
Change-Id: I1ae642c241557f0c5d00a56ab6af350408aef1bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144513
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-23 13:35:09 +00:00
Dmitry Stefantsov 52df6d0eb7 [cfe] Clean up the remaining TextSerializationFailure statuses
Change-Id: I96ea244589ae9c103b0f061198ebd0b57b8184d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144401
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-04-23 06:28:48 +00:00
Joshua Litt 6f5f7ad05c [dart2js] rebase deferred_loading_test for nnbd.
Change-Id: Ia8cd18e19554afec57675bab64797984445556c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143820
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-23 01:17:58 +00:00
Dmitry Stefantsov 64b8ded48b [cfe] Leave unrecognized types in substitution unchanged
The CL allows type substitution to run over types with implementations
of DartType unknown to it.  Such types will be left unchanged in the
substituted type.

Closes #41199.

Bug: https://github.com/dart-lang/sdk/issues/41199
Change-Id: I335056ff02576d621a815dbd14fad3b3ffab017e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144361
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-22 13:18:07 +00:00
Aske Simon Christensen 8800e65ae1 [kernel] Specialized string (de)serialization.
This makes the string (de)serialization independent of the core library
UTF-8 encoder/decoder so we can change that without affecting kernel
serialization.

It also speeds up serialization and deserialization by a few percent.

Change-Id: I347e471ed0174cc5cb191335dd7c47e6eb3dad59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140293
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-04-22 11:46:24 +00:00
Jens Johansen 66ab9407cd [CFE] Add (experimental) tool to minimize a compiler crashing reproduction
E.g.
```
$ out/ReleaseX64/dart pkg/front_end/test/crashing_test_case_minimizer.dart pkg/front_end/parser_testcases/error_recovery/utf_16_le_content.crash_dart
[...]
Got it down to 12 bytes: [100, 59, 100, 59, 110, 40, 41, 123, 34, 34, 100, 33]
That's 'd;d;n(){""d!' as text
```

Change-Id: Ic71a258c590d3e1ca5cff0c1dcb724c9578dbfc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144289
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-22 11:45:34 +00:00
Dmitry Stefantsov 56df960ddf [cfe] Refine text serialization testing: skip free variables
The CL reduces the number of false positive cases in the round-trip
serialization unit testing by refining the verifier analysis.  Not it
doesn't attempt to make the round trip over the sub-trees containing
free variables.

Change-Id: Ib6fb2e72f7543ea7d99c5273c337801f3ad1bec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144285
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-04-22 10:27:08 +00:00
Jens Johansen 676c2df9a2 [CFE] Fix parser expect output when there's errorTokens all over the place
Change-Id: I5509f866bb33e91f49d873678761e00ce8601654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144284
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-21 13:03:43 +00:00
Jens Johansen 4084c4cc24 [kernel/CFE] Use kernel 'Version' class for versions
Define a "Version" class in kernel that allows easy comparison between
versions (e.g. a < b, a >= b etc).

Use this Version class in CFE.

Change-Id: I2f382e7bb3c2083258743b9b66a909a88d575dbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144283
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-21 09:44:52 +00:00
Konstantin Shcheglov 61c8ac8b46 Issue 40088. Promote to NonNull of the declared type on assignment.
Bug: https://github.com/dart-lang/sdk/issues/40088
Change-Id: Icc2c720e24c2e6a85994497cd12bf34957d99d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144040
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-21 03:01:54 +00:00
Konstantin Shcheglov a12c36dd97 Issue 41557. Support for breaks out of labeled blocks.
Bug: https://github.com/dart-lang/sdk/issues/41557
Change-Id: Ica1c6c04acf600cb20d11a195d6c6da73197733c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143889
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-20 16:30:56 +00:00
Jens Johansen 97e0983094 [parser] Fix NP in scanner caused by never setting eof
This e.g. happends on input that's UTF-16 LE.

Also see https://github.com/flutter/flutter/issues/54840.

Note that this doesn't really fix much, because the scanner still
tries to read the input as utf8 (which it potentially isn't, and isn't
in the test cases added) and it thus basically outputs garbage.

Change-Id: I7198928dc6f0dd16728c1c04ccd4286faae8dd20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143586
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-20 13:21:46 +00:00
Johnni Winther d38070604d [cfe] Include problems reported outside serialized component in expectations
Change-Id: Ia0996bd759cd2447e1812dcf3934fa16a648500f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143813
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-04-20 12:07:56 +00:00
Dmitry Stefantsov 5b342eb9a3 [cfe] Refine analysis of text serialization verifier
The verifier now determined what is supported for the serialization
more precisely, resulting in less TextSerializationFailures in the
unit tests.

Change-Id: I3728f56c9cb5042420b6a13acb2ed06f4be6a924
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143809
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-20 10:01:46 +00:00
Johnni Winther 7425ef9470 [cfe] Support --link-dependencies on fasta compile
Change-Id: I8af2d127764e4ef60a1ea0a5ab0804a417ce42f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143808
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-20 08:34:36 +00:00
Johnni Winther d690a0c7c4 [cfe] Handle nullability of typedefs
Closes #41496
Closes #41498
Closes #41499
Closes #41501
Closes #41505

Change-Id: I425b6137f9ea41d01c95332ef1f7d43ca7afb5a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143811
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-20 07:03:55 +00:00
Dmitry Stefantsov d5dea0056b [cfe] Improve diagnostics on text serialization failures
This CL also includes the following changes:
- The .registerTags() method is added to the Case combinator.
- The actual canonical names' root is passed into the deserializer.
- Some text serialization failures are fixed and the corresponding
status entries in text_serialization.status removed.

Change-Id: I222dfa3fc348dddf83e0c6edb92f15d08b8e73e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143803
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-04-17 10:53:47 +00:00
Jens Johansen a85a7fc254 [kernel/CFE] Better mixed compilation mode handling
* Throw a specific error on mixed compilation mode; let the incremental
  compiler ignore that error when trying to initialize (i.e. it doesn't
  initialize from it, but it doesn't show any warning either).
* Allow some mixed mode stuff: Eventually the SDK should be in agnostic
  mode, so we should allow mixing agnostic with non-agnostic.

Fixes #41493.

Change-Id: Idb33fb31afe6bbba6d74134cb722ca825751898b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143583
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-17 10:22:46 +00:00
Johnni Winther 594f77715b [cfe] Handle potentially constant type expression in is expression
Closes #41385

Change-Id: Ia2fa829621931d52c5e41ac0414d12b9caa1256d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142860
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-16 09:07:21 +00:00
Johnni Winther f48a3afbae [cfe] Handle nullability difference in LUB computation
Closes #41114

Change-Id: Ifc7d3a35c4274bbb5651ced1c28c984e5c1a34ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142985
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-04-16 06:52:30 +00:00
Jens Johansen 9f06c32b45 [CFE] Fix crash when implementing or mixing in a functionType
Bug: 41265
Change-Id: Idf4fbc44c210008c3c94639c138adbd3afec2cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143522
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-16 06:35:50 +00:00
Alexander Thomas 3c85da7778 [release] Bump version to 2.9
Change-Id: I2fc393cbb7a9111f4c09db6a2a7a202eeb88992c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142996
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-04-15 18:36:42 +00:00
Johnni Winther da95c79901 [cfe] Handle nnbd is-test in constant evaluation
+ detect ~/ evaluation errors

Change-Id: Ic3f979c7516ed9aa2da0eab8b8d902987107c189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142982
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-04-15 17:29:43 +00:00
Johnni Winther eb18db2116 [cfe,kernel] Add Field.isInternalImplementation
This bit is required to support synthesized field used for the late
lowering. These fields should not be seen as part of the interface,
that is, classes that implement the class declaring the late field should
not be required to override these fields.

Closes #41436

Change-Id: I9a98322bdd1842b46bde34fff1176a7577672e0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142998
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-15 13:46:43 +00:00
Sam Rawlins 2feaa2ad81 analyzer: Add SecurityLintCode and a new getter on ErrorCode, isIgnorable
`isIgnorable` is the new way to determine whether a report from the
analyzer can be ignored. Codes with an ERROR severity are not ignorable,
and the new SecurityLintCode is not ignorable.

Change-Id: Ied72f1b61808eda088b947b8836e0cf1dfdd9850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143331
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-15 01:51:59 +00:00
Johnni Winther dc97454b63 [analyzer,cfe,dart2js] Add pretty printing to id testing
Adds support for pretty printing verbose annotations.
Adds support for force updating annotation texts useful for applying
the pretty printing to valid annotations.

Change-Id: I8fe9b6d2f8198bd5e160854053c8d964ef832a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129710
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-14 13:24:09 +00:00
Johnni Winther 208ab625c1 [cfe] Avoid reporting missing implementation on internal fields for late lowering
Closes #41436

Change-Id: Ib6227a34ca188a379f8910a2911082caef280d79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142984
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-14 12:21:19 +00:00
Martin Kustermann e2b6cc93b6 [vm/async] Update async transformation to take NNBD mode into account
The removal of unsafeCast causes flutter galley size regressions:

  - armv7: -0.43%
  - armv8: -0.21%

which we should look into recovering by having better inlining heuristics.

Issue https://github.com/dart-lang/sdk/issues/41373
Closes https://github.com/dart-lang/sdk/issues/41307

Change-Id: I7c0ba4c9598e13f01e807a607c83d50cf03e9abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142501
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-11 08:56:52 +00:00