Johnni Winther
fdc765faad
[cfe] Make TypeParameter.defaultType non-nullable
...
TEST=existing
Change-Id: I0a8fdf09f742b55357411f12dc6164d4050bb83c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196283
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-04-21 13:51:50 +00:00
Dmitry Stefantsov
d6b79dab6c
[cfe] Correct argument count in extension member errors
...
Closes #45204 .
Bug: https://github.com/dart-lang/sdk/issues/45204
Change-Id: I5295704a8d470e639fe346dbbbf80ad28ff614a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190520
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-03-15 10:46:00 +00:00
Dmitry Stefantsov
c191551fac
[cfe] Remove BottomType
...
TEST=Covered by existing tests.
Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-02-24 13:21:55 +00:00
Johnni Winther
56f46b0659
Remove non-nullable experiment flag from front_end test cases.
...
This changes the CFE expectation test suites to use unsound null safety
as default to avoid passing --enable-experiments=no-non-nullable to opt
out old test folders.
This change removes most test folders from the 'strong' tester, since
this now only supports sound null safety, which requires all libraries
to be opted in. Instead, the 'weak' tester now runs all test folders.
Additionally the 'outline' tester is changed to use unsound null safety
so that it call be used on all test folders.
The 'fast_strong' tester is removed since it should just be run locally
and it can be run by passing an option to the other testers.
References to non-existing 'shaker' folder has been removed from
testing.json.
Change-Id: Ibcc306f7b27d06b9637c205238bc408194f1d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184787
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-02-18 12:29:18 +00:00
Johnni Winther
504d63288e
[cfe] Handle setter conflicts
...
Handle setter conflicts with non-setters and implicit setters.
Closes #44003
Closes #44844
Change-Id: I32c5e4022c187578e2cd37d13151c27451666dbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183660
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-02-09 15:56:35 +00:00
Dmitry Stefantsov
c1a401c5da
[cfe] Implement weak mode constant canonicalization update
...
Closes #44641 .
Closes #44246 .
Bug: https://github.com/dart-lang/sdk/issues/44641
Bug: https://github.com/dart-lang/sdk/issues/44246
Change-Id: I78cb0514a57ab3adafb3639b09ea8930791da030
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179340
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-01-22 12:06:49 +00:00
Lasse R.H. Nielsen
fe7efd5606
Update documentation in dart:core.
...
Fix null safety issues and tweak documentation where it can be improved.
Change-Id: Ia8cc20274ae151c454662bf5f137913787365a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177960
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Nate Bosch <nbosch@google.com >
2021-01-12 13:06:41 +00:00
Alexander Markov
9d1a307954
[vm] Add specialized factory constructors for small list literals
...
Flutter gallery in release mode:
AOT snapshot size arm64 -0.22%, arm -0.21%
instructions size arm64 -0.46%, arm -0.4%
TEST=existing tests
Fixes https://github.com/dart-lang/sdk/issues/44391
Change-Id: I4733e91ecf4601c0bcde725cf9e97f5db0b8bc13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175821
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2021-01-11 19:32:30 +00:00
Johnni Winther
bc9f91587e
[cfe] Support extensions by default in textual outline testing
...
Change-Id: I844aefe253041b755fa04c8467a8503715f232f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176442
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-12-17 17:57:43 +00:00
Johnni Winther
706632d994
[cfe] Use isPureExpression to ensure temp variables are not created for this expressions
...
Closes #44475
Change-Id: Ie5a767448e27d2f84b90ebd0ebe2287d897fcd6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176441
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-12-17 17:57:43 +00:00
Jens Johansen
c1d2c25ef1
[CFE] Add constant coverage in expect files
...
Change-Id: I0fc009708aa6e330366ad0689c4634a1df90d9c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175368
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-12-10 08:57:17 +00:00
Johnni Winther
3d19493f2d
[cfe] Add flag to identify lowered locals
...
+ add predicate helpers to identify these and extract their
original names.
TEST=pkg/front_end/test/predicates/predicate_test.dart
Change-Id: I4d94c575d010b6b01c985eaf5392b9e0e979d044
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175250
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-12-08 14:53:14 +00:00
Clement Skau
2d36c85ff8
[vm] Removes support for --causal-async-stacks
...
All existing embedders have been opted into --lazy-async-stacks, the
VM also uses it as it's default in all configurations.
After this CL, any user of --causal-async-stacks will get an error
message when trying to use it.
=> In any such case, please simply remove the flag.
TEST=Exhaustive CQ.
Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ia440afcf2dba464aa8b8cf381b93bbac8eb9f8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172564
Commit-Queue: Clement Skau <cskau@google.com >
Reviewed-by: Clement Skau <cskau@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-12-01 07:27:14 +00:00
Dmitry Stefantsov
d54e2bb568
[cfe,ddc,dart2js,vm] Add NullType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40122 .
TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-06 12:43:52 +00:00
Clement Skau
27ca552ddb
[SDK] Replaces async's _AsyncAwaitCompleter with _Future.
...
Run time (less is better) impact:
dart:
- Calls.AwaitAsyncCall -43.95% ~ -55.50%
- Calls.AwaitAsyncCallClosureTargetPolymorphic -40.33% ~ -53.58%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic -42.69% ~ -55.65%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -42.05% ~ -56.14%
- Calls.Await... 0% ~ -13%
dart-aot:
- Calls.AwaitAsyncCall -9.748% ~ -11.13%
- Calls.AwaitAsyncCallClosureTargetPolymorphic -8.673% ~ -13.19%
- Calls.AwaitAsyncCallInstanceTargetPolymorphic -9.799% ~ -11.74%
- Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -5.412% ~ -13.43%
Code size impact:
- flutter_gallery_app_so_brotli_size -0.1237% ~ -0.2410%
- flutter_gallery_readonlydata_size 0.1693% ~ 0.2041%
- flutter_gallery_instructions_size 0.1157% ~ 0.1779%
- flutter_gallery_total_size 0.1021% ~ 0.1413%
Bug: https://github.com/dart-lang/sdk/issues/39119
Change-Id: I64d28a8bea078277946d7be43737e265920c8f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126322
Commit-Queue: Clement Skau <cskau@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-11-05 09:51:13 +00:00
Clement Skau
c486a07b02
[VM] Fixes yield* exception handling in sync*.
...
This adds a mechanism similar to that used in async functions where
exceptions are caught in the synthetic code and passed into the
generated body to be rethrow'n.
This ensures the exception is throw'n from the same place as the
original yield*, as per the spec.
Bug: https://github.com/dart-lang/sdk/issues/42466
Change-Id: I054b9db568a49b046b6bb49f3e775bf093f83950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160221
Commit-Queue: Clement Skau <cskau@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2020-10-27 06:46:27 +00:00
Johnni Winther
45e3fb696d
Revert "[cfe] Use origin location for member signatures"
...
This reverts commit ed3b948b88 .
This CL caused out-of-memory on some Flutter tests.
Change-Id: Ib693f5b4a7271a070c1bab5861e49ac22437b8ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168952
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-24 09:19:24 +00:00
Lasse Reichstein Holst Nielsen
51f8304b71
Add documentation to the Type class.
...
Change-Id: I32986b440d1c45d3d2a6314c03ff8864e0dcac85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108804
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2020-10-23 12:41:52 +00:00
Johnni Winther
ed3b948b88
[cfe] Use origin location for member signatures
...
This is relanding https://dart-review.googlesource.com/c/sdk/+/168203
after it was reverted due to a problem in
https://dart-review.googlesource.com/c/sdk/+/168200
Change-Id: Id70d3e960b1edf1c5cdf92518b8e476084b1bb49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168645
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-10-22 07:45:29 +00:00
Johnni Winther
137c7b6c84
[cfe] Explicitly run front_end unittest without non-nullable
...
This prepares front_end unittests for turning on non-nullable by default.
Change-Id: I9588a2d026ab9f5b1dcf08a140d25bd5dca3d5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168346
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-20 13:13:33 +00:00
Michal Terepeta
5f18d498a0
Revert "[cfe] Avoid transforming members in other classes to no-such-method forwarders"
...
This reverts commit 87d3e03bf8 .
Reason for revert: Breaks internal builds (http://b/171258924 )
Revert "[cfe] Use CombinedMemberSignature to create noSuchMethod forwarders"
This reverts commit 13b7a83d57 .
Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924 )
Revert "[cfe] Use CombinedMemberSignature for creating simple legacy member signatures"
This reverts commit 170f05f91b .
Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924 )
Revert "[cfe] Use origin location for member signatures"
This reverts commit 354dcf4386 .
Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924 )
Change-Id: I51f524949f259351336a77f43847bf1d0d11f104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168487
Reviewed-by: David Morgan <davidmorgan@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Michal Terepeta <michalt@google.com >
2020-10-20 12:23:53 +00:00
Johnni Winther
1d96c40dc4
[cfe] Fix static extension field lookup
...
Lookup of the setter of an assignable static extension field loaded
from dill failed because the DillExtensionFieldBuilder didn't identify
itself as a field.
Change-Id: I379e0002ec8180b0ac1c5b1440bf9725a87e889e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168480
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-20 07:22:02 +00:00
Johnni Winther
354dcf4386
[cfe] Use origin location for member signatures
...
Change-Id: Iee3f79db7aa7600e9116e402d2d921308b07f8f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168203
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-10-19 15:34:17 +00:00
Johnni Winther
d8e4cdd621
[cfe] Handle bounded type variables in extension inference
...
Handle #43177 for the CFE.
Change-Id: I89f475a6c5dca060b75688fd4c121ab09aed9c4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160524
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-10-13 14:32:28 +00:00
Johnni Winther
16ea8422d5
[cfe] Fix encoding for sync*/async/async* extension tear-offs
...
The internal closure was wrongly marked with the async marker of the
torn-off method.
Change-Id: Ie29eee6ed77fb07e9c0992bd0e49590cc10edd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166634
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-09 10:42:56 +00:00
Johnni Winther
b2e33ee550
[cfe] Check getter/setter types on top level and extension members
...
Closes #43714
Change-Id: I07ee20cb3a65758dda2139e965aeb4fb36cf38c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166628
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-09 07:16:06 +00:00
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
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
e6ffc0b285
[parser] Issue different warnings for missing identifier based on whether the token is used or not.
...
E.g. "var = 42;" now has a different error message than "var default = 42;".
Fixes #22553
Change-Id: I58affe988569d8e79190b63f7267b471a1b0ebc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162182
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-09-14 08:55:18 +00:00
Johnni Winther
a1baa373ec
[cfe] Rename link and test options
...
Rename test.options files and TestOptions to folder.options and FolderOptions,
respectively. Rename link.options files and LinkDependencyOptions to
test.options and TestOptions.
This is to better reflect the current usage of these options.
Change-Id: Ibd3c49fa5bd1c9ce8a9eb5910417c12cd45845d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160723
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-08-28 11:14:38 +00:00
Johnni Winther
9be824c3ef
[cfe] Provide missing forEffect argument
...
Closes #43218
Change-Id: Id1f4d872cc77d2b7b8ae76b0cafd7bf5f5297949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160722
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-08-28 09:57:28 +00:00
Johnni Winther
6079377dc1
[cfe] Ensure default type on all declarations
...
Closes #43202
Change-Id: I3b8f6e24436aac7cdcdd2e1cce1448a1bcc122de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160521
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-08-27 18:21:57 +00:00
Jens Johansen
65968a481b
[kernel] ast-to-text shows combinators for imports/exports
...
Change-Id: If153dded362eb1fe5f4c52a92206ff8e86579c1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159248
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-08-20 10:24:48 +00:00
Johnni Winther
de224ac5f4
[cfe] Update ast-to-text to include member signature origins
...
Change-Id: I46e7fe831bc5e87981e78537b37565c62646210f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157961
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-08-17 13:41:49 +00:00
Jens Johansen
42214d2eb0
[CFE] Textual outline doesn't add line-break for empty classes
...
E.g. before this change an empty class output would have been
class Foo {
}
now instead it becomes
class Foo {}
this matches what the formatter does.
Change-Id: Id08edc5259bae00deff9a66b4ae745f21c192358
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158549
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-08-17 08:16:18 +00:00
Jens Johansen
330c7500d4
[CFE] Textual outline doesn't add space for empty methods
...
E.g. before this change a procedure output would have been
foo() { }
now instead it becomes
foo() {}
this matches what the formatter does.
Change-Id: Ieb538d61e527cbec26d1d65ed6de349311dd0163
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158548
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-08-17 08:16:18 +00:00
Johnni Winther
84e5eeaea4
[cfe] Ensure legacy result types for invocation and access in opt-out libraries (part 2)
...
- now also for binary, unary, index-get expressions
Related to #42660
Change-Id: I1bf656a901b64ec916596508167330a235f6c7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154941
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-21 07:45:44 +00:00
Jens Johansen
6de0f53e7c
[CFE] Set correct async markers in outline phase (2nd try)
...
This reverts commit b4b44d6b4b .
Change-Id: Iae68e6e84e0fbb214b22e1dec6788057f80a50ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153345
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-07-07 07:49:58 +00:00
Johnni Winther
3a4aad6b87
[cfe] Use test description uri for expectation file location
...
Previously the first file in the `Component.uriToSource` was used which
didn't work nicely with multifile tests.
Text outline expectations were already using the test description uri.
Change-Id: I0d4a7493cd1fa61beffba41f1ea859ca5e8ad08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151825
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-07-06 07:02:30 +00:00
Jens Johansen
b4b44d6b4b
Revert "[CFE] Set correct async markers in outline phase"
...
This reverts commit 2ad66bbffe .
Reason for revert: Seems to break some internal tests.
Original change's description:
> [CFE] Set correct async markers in outline phase
>
> Change-Id: I4ac1fe1f4195dea2c20b8e55963b7e7dffc2d289
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152330
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Commit-Queue: Jens Johansen <jensj@google.com >
TBR=jensj@google.com ,johnniwinther@google.com
Change-Id: Iaa272f1bee8f99dd93e9a351a03a67f67d83e871
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152641
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-06-26 07:49:57 +00:00
Jens Johansen
2ad66bbffe
[CFE] Set correct async markers in outline phase
...
Change-Id: I4ac1fe1f4195dea2c20b8e55963b7e7dffc2d289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152330
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-06-25 10:29:28 +00:00
Dmitry Stefantsov
929d5e4a98
[cfe,ddc,dart2js,vm] Add FutureOrType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/149297/
* https://dart-review.googlesource.com/c/sdk/+/149299/
* https://dart-review.googlesource.com/c/sdk/+/149320/
* https://dart-review.googlesource.com/c/sdk/+/149321/
* https://dart-review.googlesource.com/c/sdk/+/149323/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40123 .
Bug: https://github.com/dart-lang/sdk/issues/40123
Change-Id: Ice52250a98acfe455b1d7fa5bb0624c115ca5dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150934
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-06-15 12:18:46 +00:00
Jens Johansen
4dcf24ac7f
[CFE] Use BlockExpression for encoding cascades
...
Change-Id: I9c56cbed9880716af804c80c6ca34578ae6765a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148528
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-05-26 09:07:25 +00:00
asiva
ce5d18b0f0
[CFE] - Update exectations of CFE unit tests to account for NNBD unfork
...
These updated expectations were generated by running the script
pkg/front_end/tool/update_all.dart
Change-Id: I6b8f7c5e50160da96e90c44fa888bd9b072efd06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147321
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2020-05-07 23:16:21 +00:00
Clement Skau
2359f4dc68
[VM] Reworked: Remove unnecessary Closure.clone() from sync*.
...
Removes the Closure.clone() in sync* by adding an additional closure
around the rewritten sync* function body.
This is a re-worked version of the now reverted:
- https://dart-review.googlesource.com/c/sdk/+/136190
- https://dart-review.googlesource.com/c/sdk/+/144948
This CL includes changes from both the above CLs, in addition to:
- A new 'ShadowRewriter' transformer to do deep rewriting of
shadowed parameters.
Previous versions only rewrote the immediate sync* function, missing
references in nested rewritten functions.
Note: This CL is re-landing largely unchanged since the roll-blocking
issues suspected to be caused by this was later attributed to a
different set of changes.
I have independently re-run all failing external tests to verify
them passing for this CL.
Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: Id1670a93961180e8558d7c7eca65fe7e9115f07b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145402
Commit-Queue: Clement Skau <cskau@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2020-05-05 12:04:03 +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
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
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