Jens Johansen
61e97d010c
[CFE] Remove unreachable/unused code in constant evaluator
...
Change-Id: I0b30c7386ae9f2d201137189710efe0c722f627c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165801
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-05 08:08:16 +00:00
Johnni Winther
8b07d1902c
[kernel] Remove DirectPropertyGet/DirectPropertySet/DirectMethodInvocation
...
These nodes are no longer used.
Change-Id: I40c8df7376f0c40a4122c22d934fb3c6f6fd520d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165902
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-03 19:15:41 +00:00
Nate Bosch
3efed86147
Allow null safety for pub_semver
...
Change-Id: I73e2e718feb82a11131dc8479a792bb3dbe49b6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165920
Auto-Submit: Nate Bosch <nbosch@google.com >
Commit-Queue: Nate Bosch <nbosch@google.com >
Commit-Queue: Jake Macdonald <jakemac@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
2020-10-02 23:58:21 +00:00
Jacob MacDonald
d63d5d93a5
add flutter_driver to the allow list
...
Change-Id: I747999ae50a9f87a1e55bfc2f289ca2ff868f529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165871
Auto-Submit: Jake Macdonald <jakemac@google.com >
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Nate Bosch <nbosch@google.com >
2020-10-02 22:47:41 +00:00
Johnni Winther
bc06a90a0e
[cfe] Stop using DirectPropertyGet for enum encoding
...
DirectPropertyGet is a statically bound instance access used in the
VM mixin tranformation to encode fully resolved super access. The
access to `this.name` generated in `toString` of an enum is _not_
a statically bound instance access but just a regular instance access
whose runtime target happens to be known statically because the code
is generated. In JavaScript backend a statically bound instance access
requires a unique getter to avoid the dynamic lookup, and therefore,
though using DirectPropertyGet is an optimization
to the VM, it would be a regression to the JavaScript backends if
they didn't handle DirectPropertyGet as a PropertyGet.
This CL removes the misuse and thus enables JavaScript backends to
handle DirectPropertyGet with the intended semantics.
Change-Id: Ie41aefbf19e8c63244f10a1afda1ddbfdf7d3c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164085
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-02 20:21:30 +00:00
Paul Berry
7704cc9dbe
Fix flow analysis of a late initializer that is an assignment expression
...
Fixes #43621 .
Bug: https://github.com/dart-lang/sdk/issues/43621
Change-Id: I5847e34fba9d892085dd8e388f6d96912c46eb5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165682
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-10-02 12:09:08 +00:00
Jens Johansen
aaff0b67f0
[CFE] Enable 'unrelated_type_equality_checks' lint
...
Change-Id: I9cf739ca6e08203f1c2a33c680193777aef5c0c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165761
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-02 11:22:27 +00:00
Jens Johansen
fc7de901ee
[kernel] Make LogicalExpression operator an enum (and rename)
...
Change-Id: I6054e8e44133d2419582d74700c4223d51495978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165606
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-02 09:41:12 +00:00
Jens Johansen
8cdbfe947e
[CFE] Remove contextChain from constant evaluator; don't use try-finally
...
Change-Id: If62e71ae1aee5b33d00a361e5221f871331407aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165603
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-02 09:37:56 +00:00
Johnni Winther
7863f59dba
[cfe] Update uriUsesLegacyLanguageVersion to use experiment release version
...
The method 'uriUsesLegacyLanguageVersion' is used for automagically
running opt-in libraries in strong mode. This was still using the sdk
version as bar for opting in to null safety.
Closes #43605
Change-Id: Ic9a1836e022f60106d2bcf9a6c3d50aa56966028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165720
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-02 09:33:06 +00:00
Dmitry Stefantsov
0c8109c964
[cfe] Adjust error location for const constructors with late fields
...
Closes #43354 .
Bug: https://github.com/dart-lang/sdk/issues/43354
Change-Id: Idc8f4757a5589638eb4e3ce08cda2c5afa8d5202
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165604
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-02 08:30:16 +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
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
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
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
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
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
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
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
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