Jens Johansen
d1a6dcfd1f
[CFE] Change wording from 'successes' to 'effectively constant'
...
Change-Id: Ie498a4481bc647a564aaedb20998b8a728337a37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165561
Auto-Submit: Jens Johansen <jensj@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-01 08:46:12 +00:00
Clement Skau
b4f49dc255
Revert "Flow analysis: promote to non-nullable on initialization"
...
This reverts commit 6a1c54ec30 .
Reason for revert: Triggers test failure:
https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-debug-x64/8247
Original change's description:
> Flow analysis: promote to non-nullable on initialization
>
> When flow analysis encounters a variable declaration of the form `T? x
> = expr;`, if the type of `expr` is `T`, then the variable is
> immediately promoted to type `T`.
>
> Fixes #43099 .
>
> Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
> Bug: https://github.com/dart-lang/sdk/issues/43099
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
> Commit-Queue: Paul Berry <paulberry@google.com >
> Reviewed-by: Bob Nystrom <rnystrom@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,rnystrom@google.com ,johnniwinther@google.com
Change-Id: I8549b48a734f527194ce11d82235b9d5c6e58185
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165564
Reviewed-by: Clement Skau <cskau@google.com >
Commit-Queue: Clement Skau <cskau@google.com >
2020-10-01 08:41:15 +00:00
Paul Berry
6a1c54ec30
Flow analysis: promote to non-nullable on initialization
...
When flow analysis encounters a variable declaration of the form `T? x
= expr;`, if the type of `expr` is `T`, then the variable is
immediately promoted to type `T`.
Fixes #43099 .
Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-10-01 01:15:31 +00:00
Paul Berry
94f1c0b4eb
Reland "Generate "late definitely assigned" error regardless of nullability"
...
This is a reland of 2d22e74e54
Original change's description:
> Generate "late definitely assigned" error regardless of nullability
>
> Change-Id: If55bd3312afa2ce87312bd4ebf31ab5ada40cc3f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164981
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Commit-Queue: Paul Berry <paulberry@google.com >
Change-Id: I2dda875039c56be93430bf8f6bdca9098141d35a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165400
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-10-01 00:44:31 +00:00
Paul Berry
2cf08d0a16
Update front_end golden files.
...
Change-Id: I440f6aa4b973d350c1de3531b2236a5c1bc9e751
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165401
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-30 19:37:35 +00:00
Jens Johansen
3198d7c307
[CFE] Constant evaluator doesn't throw
...
Change-Id: I32fb024f6c475addd430f0fd1b5b4584f0fca44b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162507
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-30 14:45:34 +00:00
Paul Berry
a4ecdfc6a2
Revert "Generate "late definitely assigned" error regardless of nullability"
...
This reverts commit 2d22e74e54 .
Reason for revert: Broke CFE bots
Original change's description:
> Generate "late definitely assigned" error regardless of nullability
>
> Change-Id: If55bd3312afa2ce87312bd4ebf31ab5ada40cc3f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164981
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Commit-Queue: Paul Berry <paulberry@google.com >
TBR=paulberry@google.com ,johnniwinther@google.com
Change-Id: I595d5bd307bba3a94aac43ef96040f8cd25e1b97
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165261
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-30 14:11:56 +00:00
Paul Berry
2d22e74e54
Generate "late definitely assigned" error regardless of nullability
...
Change-Id: If55bd3312afa2ce87312bd4ebf31ab5ada40cc3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164981
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-30 11:54:54 +00:00
Jens Johansen
d1ca72faa5
[CFE] Turn on constant evaluation stress test by default; include in expect files
...
Change-Id: Id6baac82e423746469871ea15bd2bc29d4e3a733
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164321
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-30 10:36:04 +00:00
Jens Johansen
6d7c92f016
[CFE] Add "strong" tests of the constant evaluator
...
This increases our "local" coverage of the constant evaluator.
Run with something like
`pkg/front_end/test/fasta/strong_tester.dart -DupdateExpectations=true -DstressConstantEvaluator=true -DskipVm=true`
there is now almost coverage of everything (or a comment in the code
suggests that the path is probably unreachable).
Note that
`out/ReleaseX64/dart pkg/front_end/test/vm_service_coverage_constant_evaluator.dart pkg/front_end/test/fasta/strong_tester.dart -DupdateExpectations=true -DstressConstantEvaluator=true -DskipVm=true`
has erroneous misses, for instance (but not limited to) asserts.
These are caused by errors in the VM.
A follow-up CL will be created to turn on "stressConstantEvaluator" by
default and print out any sucesses in the expect files.
Change-Id: I837837be4f0487fdbe57c5107e4b3415de189177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163060
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-30 07:54:32 +00:00
Nate Bosch
6a89415451
Allow nullsafety for package:intl
...
Change-Id: Iad9a67de93f1850105442441b47001e53748fd22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164802
Auto-Submit: Nate Bosch <nbosch@google.com >
Reviewed-by: Kevin Moore <kevmoo@google.com >
2020-09-29 20:47:39 +00:00
Paul Berry
5e8b2722c7
Fix handling of for-elements with unparenthesized bodies.
...
The CFE defers the final build of the body of a for-element until
after building the rest of the body. This caused a bug: if the body
was an assignment expression, flow analysis was not picking up on the
fact that the assignment was inside the loop.
Fixed by introducing a mechanism that allows the CFE to temporarily
pop the innermost structure on the AssignedVariables stack and then
push it again.
Change-Id: I11d526302934e9283807124ebd4a23e9d3e5ec66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164980
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-29 19:27:18 +00:00
Johnni Winther
e8683d25ed
[cfe] Include null check in shorting
...
Change-Id: Id0f96b5a2c40e37ded46c761612f2cbb8828ad18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161787
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-29 16:27:06 +00:00
Paul Berry
2575008f25
Generate "late definitely unassigned" error regardless of nullability
...
Change-Id: I3c3244cb1042087d31c6e90acc9863369e15ad44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164801
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-29 12:38:14 +00:00
Jonas Termansen
5f459d0228
[benchmark] Remove fasta_perf dependency on runtime/lib.
...
The pkg/front_end/tool/fasta_perf.dart benchmark used to require
runtime/lib in order to run but this directory is no longer required.
This change removes the check for whether it exists and then removes the
directory in SDK benchmark builds to avoid VM source code littering the
benchmark builds and blurring the distinction between build inputs and
build outputs.
Change-Id: Ibb02ce3bd6e4a65421c2bdd444ef0f78887fffa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164966
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-29 12:05:25 +00:00
Johnni Winther
4025dee2f8
[cfe] Ensure that default values on synthesized constructor are included in outlines
...
Closes #43538
Change-Id: I58f03d6d71e6de4744003cc28519a20c7e9e7f12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164787
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-29 11:09:14 +00:00
Paul Berry
0176a3d4c5
Fix flow analysis handling of late variables with initializers.
...
A late variable with an initializer is very similar to a function
expression, in that it may be evaluated at any time in the future
(possibly more than once, if it throws an exception), so flow analysis
models it that way.
Fixes #42990 .
Change-Id: I90ed00c8fd7388145f89011628e31ff7e85a5c43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-28 14:40:02 +00:00
Paul Berry
ca0f61fc84
Generate an error if writing to a potentially-already-assigned final var.
...
Change-Id: Iee4dccbc2c11290cdf56b3a95259f6401a123620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164246
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-28 14:36:14 +00:00
Dmitry Stefantsov
4129636e6c
[cfe] Report error on spreading a potentially nullable value
...
Closes #43495 .
Bug: https://github.com/dart-lang/sdk/issues/43495
Change-Id: Ic3ed18b8242a69dd35cf2e862d00e129274f46b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164561
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-09-28 10:55:27 +00:00
Srujan Gaddam
c990450628
[package:js] Add checks for external keyword
...
Checks to see if a JS interop member is correctly annotated with
the `external` keyword. If it is not, it must be one of several
exceptions to be allowed.
This CL also changes static errors to first check for `JS` and
`external` before processing the member as a JS interop member.
This makes it clearer whether a member is a JS member.
Change-Id: I412eeafbfe8773847bfb9c864e4fb9b65e2d632a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158083
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-25 23:30:34 +00:00
Paul Berry
280f639fda
Allow uninitialized final local variables to be assigned in null safety mode
...
This allows code such as the following (which is permitted in null
safety mode, since flow analysis can ensure that the final variable is
set exactly once before it is used):
final x;
if (...) {
x = ...;
} else {
x = ...;
}
use(x);
Change-Id: I8e5d83ad7cd4202ac1498faa5f699a56db1108f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164242
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-25 18:22:44 +00:00
Paul Berry
def50905c2
Make flow analysis handling of is/==/??=/?. consistent with mixed mode semantics
...
Bug: https://github.com/dart-lang/language/issues/1143
Change-Id: Id177f8b19c15ef246f21ddd840410cddfee2e5cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163600
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-09-25 08:35:03 +00:00
Johnni Winther
2414b293e1
[cfe] Throw error on exhaustive switch and expression of type Never
...
This requires a change to flow analysis that does not promote
expressions to Never through is-tests and equality tests.
Change-Id: Iec2ba5b78e61d205ad21dad6f07dbdb25fc746d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163380
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-09-25 08:35:03 +00:00
jlcontreras
75ffae6a5c
[cfe] Implements recursiveScanner to solve copyWith ambiguities
...
Change-Id: I087e12702d8164ad0a7383bb5b0665d58a516f7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162743
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Javier López-Contreras <jlcontreras@google.com >
2020-09-24 17:32:57 +00:00
Dmitry Stefantsov
d3114bac63
[cfe] Implement updates for UP and type parameters
...
Closes #43455 .
Bug: https://github.com/dart-lang/sdk/issues/43455
Change-Id: Iaf083b21f0cabfd0f6907f0bf0549b643cb08417
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164092
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-24 11:50:20 +00:00
Daco Harkes
a7fa63493f
[cfe] Give external field generated setters parameter names
...
The setters generated from external fields used not have a name.
This broke the assumptions in the VM when making stack traces.
Separated out from https://dart-review.googlesource.com/c/sdk/+/140290 .
Issue: https://github.com/dart-lang/sdk/issues/43533
Change-Id: I1816557eff891eaa7c531db1f4239159c66c325c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164093
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-09-23 22:42:09 +00:00
Jacob MacDonald
6cb9c66f28
Reland "Update SDK version to 2.11"
...
This reverts commit e834f9cf6e .
Reason for revert: Flutter has updated package versions to those that allow 2.11
Original change's description:
> Revert "Update SDK version to 2.11"
>
> This reverts commit 45ffef71e8 .
>
> Reason for revert: This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.
>
> TBR=athom@google.com ,johnniwinther@google.com ,jakemac@google.com
>
> Original change's description:
> > Update SDK version to 2.11
> >
> > Change-Id: I9ffec7e098fd77dcc0cd48b70613d919bda45672
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161342
> > Reviewed-by: Alexander Thomas <athom@google.com >
> > Reviewed-by: Jake Macdonald <jakemac@google.com >
> > Commit-Queue: Johnni Winther <johnniwinther@google.com >
>
> This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.
>
> TBR=athom@google.com ,johnniwinther@google.com ,jakemac@google.com
>
> Change-Id: Ie00b8c77a16d863105517856118459e3e289d914
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163704
> Commit-Queue: Alexander Aprelev <aam@google.com >
> Reviewed-by: Alexander Aprelev <aam@google.com >
> Reviewed-by: William Hesse <whesse@google.com >
TBR=whesse@google.com ,aam@google.com ,athom@google.com ,johnniwinther@google.com ,jakemac@google.com
Change-Id: Iec81adfb047b3f5387cdc817af3b08e6c086430a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164241
Auto-Submit: Jake Macdonald <jakemac@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Jake Macdonald <jakemac@google.com >
Commit-Queue: Alexander Thomas <athom@google.com >
2020-09-23 19:54:49 +00:00
Paul Berry
f157b5ff80
Flow analysis: promote type X&T on initialization.
...
When flow analysis encounters a variable declaration of the form `var
x = expr;`, if the type of `expr` is `X&T`, then the variable is given
the inferred type `X`, but it is immediately promoted to `X&T`.
Change-Id: I2a5ffca3860ab009f0942e6efc641c1604ab6323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163840
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-23 16:58:09 +00:00
Dmitry Stefantsov
734da2ca2c
[cfe] Update how errors are reported on uninitialized fields
...
Closes #42967 , #42844 , #40951 .
Bug: https://github.com/dart-lang/sdk/issues/42967
Bug: https://github.com/dart-lang/sdk/issues/42844
Bug: https://github.com/dart-lang/sdk/issues/40951
Change-Id: Iffa76b8bb507927b8ced07712f710dfbca58659c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163940
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-23 10:40:57 +00:00
Johnni Winther
5d8a9340ae
[cfe] Add support for using backend defined sentinels in late lowering
...
Change-Id: Iabcd0c79fb8f09c9de99856e50518eb7ace38464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163860
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-09-23 08:07:26 +00:00
Paul Berry
ef4c85e243
In null safe code, error if a final local is read when unassigned.
...
Previously, we did not permit a final local variable without an initializer.
This allows constructions like:
final int i;
if (...) {
i = 0;
} else {
i = 1;
}
use(i);
Change-Id: I0ca20c810993627c70ce84a9ad238e683df41595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163702
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-22 15:26:14 +00:00
Jens Johansen
ae594b8269
[CFE] Interative spell check mode for messages
...
Change-Id: I61a71250159ec88cee1aafa82f3749dc3ac13c06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163862
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-22 14:42:04 +00:00
Paul Berry
f860868740
Flow analysis: remove old "promotable via initialization" logic.
...
This logic was removed from the spec in
https://github.com/dart-lang/language/commit/b70bb3f90679eb1c67b7ee852e1322046b2e4777 .
Only a few places in the SDK itself were relying on this promotion
logic; I've fixed those places by adding explicit types.
Change-Id: Iaeaebe8dd5ab3e848699bc8ebc64a1ae80c1027a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-22 12:22:13 +00:00
Tess Strickland
37cfae173c
[pkg/native_stack_traces] Make package NNBD compatible.
...
Bug: https://github.com/dart-lang/sdk/issues/43304
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Iaf451047ce74add6520bd514bafae8b0e3c5fa59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161704
Commit-Queue: Tess Strickland <sstrickl@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2020-09-22 11:33:13 +00:00
Anna Gringauze
1c8020cfc7
Emit module and add logging with timer to expression compilation
...
- Emit module before expression compilation to JavaScript so the
ProgramCompiler has all types available.
- Add logging with ticker to expression compilation in expression
compilation worker in DDC and in frontend server.
- Remove excessively verbose logging
Related:
https://github.com/dart-lang/webdev/issues/1006
https://github.com/dart-lang/webdev/issues/1106
Change-Id: Ia3a985f2d12d27f0bcc2c5d3923db137070e9cdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162624
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-09-22 02:17:12 +00:00
Sam Rawlins
5a120eae40
Remove unused imports which share prefixes.
...
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: I2e64f0271ecbcaa7c791403f06e4e963a141b85b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163662
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-09-22 01:36:52 +00:00
Alexander Aprelev
e834f9cf6e
Revert "Update SDK version to 2.11"
...
This reverts commit 45ffef71e8 .
Reason for revert: This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.
TBR=athom@google.com ,johnniwinther@google.com ,jakemac@google.com
Original change's description:
> Update SDK version to 2.11
>
> Change-Id: I9ffec7e098fd77dcc0cd48b70613d919bda45672
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161342
> Reviewed-by: Alexander Thomas <athom@google.com >
> Reviewed-by: Jake Macdonald <jakemac@google.com >
> Commit-Queue: Johnni Winther <johnniwinther@google.com >
This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.
TBR=athom@google.com ,johnniwinther@google.com ,jakemac@google.com
Change-Id: Ie00b8c77a16d863105517856118459e3e289d914
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163704
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Reviewed-by: William Hesse <whesse@google.com >
2020-09-21 23:30:34 +00:00
Konstantin Shcheglov
8605286e11
Make constant-update-2018 available since 2.0.0
...
See https://github.com/dart-lang/language/issues/286#issuecomment-503614115
and https://github.com/dart-lang/sdk/issues/43462
Change-Id: Id844473e0cb371ffc4470a18993c66c8ad0427e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163503
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-21 20:39:32 +00:00
Dmitry Stefantsov
7252a146a2
[cfe] Report nullable property access in the LHS of ??=
...
Closes #43278 .
Bug: https://github.com/dart-lang/sdk/issues/43278
Change-Id: I4b8a938441c75462a98a1d72d5fb23d50b5f92b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162160
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-21 14:01:06 +00:00
Johnni Winther
45ffef71e8
Update SDK version to 2.11
...
Change-Id: I9ffec7e098fd77dcc0cd48b70613d919bda45672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161342
Reviewed-by: Alexander Thomas <athom@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-21 11:22:26 +00:00
Johnni Winther
0ab7d791a6
[cfe] Change late lowering to handle unsound null values
...
Change-Id: I91d3f0ee4350816ee4e80713b4d975085f8b3915
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163345
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-21 10:15:46 +00:00
Johnni Winther
9206b6cabb
Delete tests/kernel
...
regression_flutter51828_test moved to front_end expectation tests
Closes #42926
Change-Id: If177b844d9cf3542e3ec9c845ccd32f9b0a7a111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163582
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-21 08:33:26 +00:00
Konstantin Shcheglov
01154855d1
Make control-flow-collections, set-literals, spread-collections available since 2.0.0
...
See https://github.com/dart-lang/language/issues/286#issuecomment-503614115
and https://github.com/dart-lang/sdk/issues/43462
Change-Id: Ib8c37a2b5e3ce6c737e496bf285d946baf3a41d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-09-19 16:12:07 +00:00
Nicholas Shahan
850a481748
[cfe] Cleanup redundant null safety mode checks
...
The check is already performed in the `loadComponent()` method.
Change-Id: Ia3eeaf7a6517bc209d989b631b4bccce4b06eb56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163262
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-09-18 17:42:56 +00:00
Jens Johansen
60ef62a889
[CFE] Only include git staged files in explicit creation test
...
Change-Id: Ic1d006e6ce1596d5e4cb0f4e2222912d383c80ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163063
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-09-17 13:09:30 +00:00
Johnni Winther
f4501b6e83
Reland "[kernel] Rename Name.name to Name.text"
...
Including a deprecated getter to avoid breaking dependent code outside
the Dart repo.
Change-Id: I365957b7c2da6e0cb5c71eb8d2906b0dc6ff18ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163062
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-17 06:10:49 +00:00
Paul Berry
53e707f26d
Flow analysis: don't consider a foreach-declared variable to be written to.
...
When performing flow analysis for a "for each" loop such as `for (var
x in ...) { ... }`, we don't need to consider the iterated value to be
"written to" the variable `x`, since the actual runtime semantics are
to create a fresh instance of the variable `x` each time through the
loop, initialized to the iterated value.
Fixes #43136 .
Bug: https://github.com/dart-lang/sdk/issues/43136
Change-Id: I497c408c3efc26e93502de8ba0530bb5278e74c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-16 19:07:58 +00:00
Paul Berry
0eec9ee53c
Use promoted type to infer for-each iterables.
...
Fixes #42653 .
Change-Id: I90319b775207e6cc1c6b7a79d29b2c237b750845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162625
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-09-16 18:20:48 +00:00
Nicholas Shahan
8cc4a12938
[cfe] Move checks for all sound Components from .dill
...
Moving here allows the checks to cover more code paths including
the mode used in google3 where the no mixed .dills in sound mode
was not being enforced for ddc targets.
Change-Id: I1af1d63f96dd23f56d637bffd4eef397d4deb167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162823
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-09-16 16:54:08 +00:00
jonahwilliams
d0e095507c
[frontend_server] connect widget cache to frontend_server
...
Connect the widget cache to the frontend server to be enabled when
--flutter-widget-cache is provided as a flag.
See also: go/fast-single-widget-reloads
Bug: https://github.com/flutter/flutter/issues/61407
Change-Id: I9d1f2c59dbb1dc56bb7e6ac7ebd05a01d1d47803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162943
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Jonah Williams <jonahwilliams@google.com >
2020-09-16 15:09:18 +00:00