Johnni Winther
2fd685727a
[cfe] Remove stray debug print
...
Change-Id: Iabf75ddb949e7ccab6539fdcb6629eb0a2dc6fcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137794
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-03-02 09:33:33 +00:00
Johnni Winther
56763db04b
[cfe] Support NoneTarget in expectation testing
...
Change-Id: Iff7fbc581eaf875cf9a09f4b994dff7bcf70cd3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137795
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-28 14:45:31 +00:00
Johnni Winther
dda5bcee00
[cfe] Handle invalid uri in opt-out work-around
...
Change-Id: Id5e8ee4578d6ff245e1345500e58ee3f800130ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137782
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-28 11:47:51 +00:00
Alexander Markov
88be7d1cae
[cfe] Fix hasImplicitSetter for late final fields
...
Unlike other final fields, late final fields without initializers have a
corresponding implicit setter. Previously, front-end was setting
Field.hasImplicitSetter to false for late final fields.
As a result, ClassHierarchy.getDispatchTarget was not returning such
field as a dispatch target for a setter invocation and TFA was inferring
incorrect types for late final fields (as if all setters for late
final fields disappeared).
Change-Id: I8f55f7ec8afa38e8cc3f54f85bd66c0381ae6318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137701
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Auto-Submit: Alexander Markov <alexmarkov@google.com >
2020-02-28 07:59:44 +00:00
Johnni Winther
51bc38f26c
[cfe] Fix uri in nnbd error
...
+ add support for configurations in messages tests
Closes #40789
Change-Id: I00b241df0e090a4736974e12598085d902ae9c77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137560
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-27 11:38:07 +00:00
Jens Johansen
3660b9ecc7
[parser] New syntax for null aware index (2nd try)
...
This reverts commit bc4893a3b3 .
The previous attempt failed because when we check if something is a
conditional expression we used a rewriter that didn't actually rewrite.
This further down the line (still checking if we can parse the expression)
results in errors occurring (that wouldn't have occurred if the rewrite
had happened) and the conclusion was thus that it wasn't a conditional
expression and we parsed it as a null-aware index operator (which gave
errors because it wasn't).
This 2nd try solves it by having a rewriter that actually rewrites,
but then allows to undo the rewrites after we're done parsing.
Change-Id: Ide3c0d6a870d4dc18b6d9475b0227d93c733dc7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136624
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-02-26 13:31:52 +00:00
Johnni Winther
4189237330
[cfe] Avoid crash on Never as bound
...
Change-Id: Ia7dc56774599a17d4a29d03ec8ec07cb01995fdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137300
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-26 10:19:07 +00:00
Jens Johansen
6262e8fe85
[CFE] Set InvalidLanguageVersion if in fact invalid, fix a lookup bug
...
Change-Id: Id93b6b859a1acd8410d4917063731b2fc049a63f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137301
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-26 09:56:53 +00:00
Johnni Winther
60582b3d7a
[cfe] Handle future or fields
...
Change-Id: Ie915ca0824f983966e5017e899a02d50ad14b091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136978
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-26 09:53:30 +00:00
Johnni Winther
53c59d9f4e
[cfe] Fix uri in non-nullable field error reporting
...
Change-Id: I5af35ad08a26f4aaf780573ddbbb878ef75472f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136977
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-26 08:07:41 +00:00
Jens Johansen
aad2b81f16
[CFE] Fixes to experimental invalidation strategy
...
This all worked previously, but there probably was a weird merge mistake
or something that deleted it.
Here the lost fixes are added again, with more testing.
Change-Id: I8941cb6c88c44e22b70c12c93f7256fb371177f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136976
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-02-26 08:02:02 +00:00
Alexander Markov
aa2c1a4950
[vm/nnbd] Add --null-safety option to VM's kernel compilers
...
This change adds --null-safety option to the front-end server and
gen_kernel tools. This option is forwarded to CFE via
CompilerOptions.nnbdMode.
Issue: https://github.com/dart-lang/sdk/issues/38845
Change-Id: I410b1d5466d93d9514cb7571bf37b32c848f136c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137106
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2020-02-25 19:04:43 +00:00
Dmitry Stefantsov
5f41447fd3
[cfe] Reintroduce UnknownType to the subtype relation
...
Closes #40744
Bug: http://dartbug.com/40744
Change-Id: Iec3374cbcaac163f2aa599eb8f44fcd5b1cbd3c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136975
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-25 14:20:51 +00:00
Johnni Winther
2ce1df7630
[cfe] Handle compilation from agnostic dill
...
Change-Id: Iecf2fda94ba1029931151b0d45d013da065859d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136965
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-25 12:10:20 +00:00
Johnni Winther
712834b285
[cfe] Create explicit ClassMembers for implicit accessors
...
Change-Id: I4458df2223424e4b49308ada2c55b13adfa669df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136966
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-25 11:37:52 +00:00
Johnni Winther
1e7669885d
[cfe] Handle late lowering field type inference
...
Closes #40581
Change-Id: I50f5ad10e4b37ad58b5c9ad05e593572857d1351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136636
Reviewed-by: Jens Johansen <jensj@google.com >
2020-02-24 13:29:25 +00:00
Johnni Winther
aa31a9162b
[cfe] Support constant evaluation in agnostic mode
...
Change-Id: Ia33ea19a091b1172eb9b4125f5f30a625886d34e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136632
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-24 13:29:05 +00:00
Johnni Winther
a9162bd599
[analyzer,cfe] Implement mixed inheritance id test for analyzer
...
Change-Id: Ie4ce09b83c2a96a5ad16c60d2924f18cd90a4089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136633
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2020-02-24 13:28:26 +00:00
Johnni Winther
5829fc7829
[analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
...
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-21 08:34:26 +00:00
Jens Johansen
bc4893a3b3
Revert "[parser] New syntax for null aware index"
...
This reverts commit cf4e044e07 .
Reason for revert: Breaks internal customer.
Original change's description:
> [parser] New syntax for null aware index
>
> Change-Id: Iea6b29eb897eb01863a92b223e270d225c3ca1ba
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135903
> Commit-Queue: Jens Johansen <jensj@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
TBR=brianwilkerson@google.com ,jensj@google.com ,johnniwinther@google.com
Change-Id: Ic0ff607c944e489f29bda7da37afd63c62d368eb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136600
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-02-20 14:11:08 +00:00
Dmitry Stefantsov
b7aff59973
[cfe] Report errors on case expressions without primitive equality
...
Bug: http://dartbug.com/40425
Change-Id: Ied2da91cc32b84f6e64c0b76541e020d1a2447b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136227
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-20 13:39:09 +00:00
Johnni Winther
5c869545f2
[cfe] Add option for agnostic nnbd mode
...
Change-Id: Ie37b0fcd30985992ce5c4973bf1cce1ccba181a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136580
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-20 12:47:38 +00:00
Jens Johansen
cf4e044e07
[parser] New syntax for null aware index
...
Change-Id: Iea6b29eb897eb01863a92b223e270d225c3ca1ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135903
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-02-20 12:33:28 +00:00
Dmitry Stefantsov
0f141be8bd
[cfe] Implement new rules around types of case expressions
...
Bug: http://dartbug.com/40425
Change-Id: I1f6e93bde663ab6f1a6a63e91aef4133af6e5253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136186
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-19 13:32:10 +00:00
Johnni Winther
17d8b6b015
[cfe] Do not hoist this expressions
...
Change-Id: I3ffa0ad7c5c8e98a23c28281ac7840480fd366ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136223
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-19 11:31:59 +00:00
Dmitry Stefantsov
59045afd1d
[cfe] Remove unnecesary uses of SubtypeCheckMode.ignoreNullabilities
...
Change-Id: I8b64ca39e7a153141885d428fc5bd95e446fcb49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135640
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-18 12:28:29 +00:00
Jens Johansen
26b7c905b7
[CFE] Bump version where NNBD is enabled by default to 2.8
...
Change-Id: I972a7cc0f5dbcf13779dac134143bb15003e58f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136180
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-02-18 12:28:19 +00:00
Johnni Winther
514a754150
[cfe] Add ClassMember.isProperty
...
Change-Id: I08e38f706f4606e80b607f180443924c85ee4b2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135905
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-18 11:05:04 +00:00
Lasse R.H. Nielsen
3f28a3496c
Change SDK to use package_config v1.9 (unreleased).
...
Change-Id: I405ac5e59d0b330c6fc6c63fab48d2d303734e59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136123
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-02-18 10:56:59 +00:00
Jens Johansen
a314cff6ee
[CFE] Indicate NNBD compilation mode on all libraries
...
Change-Id: I01236158b593d0e4bd7cf67017459f05fb9520a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136128
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-18 08:51:37 +00:00
Johnni Winther
b20c35c7d9
[cfe] Handle typed variable declarations during top-level inference
...
Fixes https://github.com/flutter/flutter/issues/50908
Change-Id: Ia7a04351eb9f2a557bb70c96c7938a28c8cbc835
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136127
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-17 15:00:05 +00:00
Johnni Winther
a9485e8b14
[cfe] Encode getter/field invocation as .call on property get
...
Current semantics with respect to evaluation order is retained.
Change-Id: I6794c8a720237536696afab2fe056042f8464ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129702
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-02-17 13:52:45 +00:00
Dmitry Stefantsov
d2d00ff357
[cfe] Allow unassigned late local variables
...
This is a partial fix for http://dartbug.com/40601 . It will be followed
by a CL disallowing definitely unassigned late local variables.
Bug: http://dartbug.com/40601
Change-Id: I2cdf95f8cc1cc6fbbb6a5de8d6fa0aa53c6e477d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135309
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-17 11:31:15 +00:00
Dmitry Stefantsov
ce6f19da80
[cfe] Implement NNBD changes for falling over in case blocks
...
Bug: http://dartbug.com/40425
Change-Id: I640891b24ddaaceafe84460ea7396095ab42a0db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135647
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-17 10:53:25 +00:00
Dmitry Stefantsov
d22c695e89
[cfe] Fix isSubtypeOf for cases like FutureOr<FutureOr<X%>>
...
Closes #40600 .
Bug: http://dartbug.com/40600
Change-Id: Iff1fbc7f4f499bc2ba154d5fe43494dae0511f94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135315
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-17 10:44:35 +00:00
Jens Johansen
81d4ac07d4
[CFE] Use package config v2
...
Change-Id: I32da9e8b2c1040db1521af4345f8e952c22bd30d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130864
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-12 10:07:25 +00:00
Johnni Winther
ed2df21191
[cfe] Decouple MemberBuilder from ClassMember
...
Change-Id: Ia9d3a3ffa51781cfef1af0451902fe97620d2517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135303
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-12 09:57:55 +00:00
Johnni Winther
776b984115
[cfe] Correctly register parameters as initialized
...
Change-Id: I43fe9d251a5b79f909dbfb7689f0a37faee0c54c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135307
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-12 08:18:25 +00:00
Dmitry Stefantsov
6a2c350a3e
[cfe] Fix isSubtypeOf for FutureOrs
...
Previously it was assumed both A <: B implies FutureOr<A> <: FutureOr<B>
and FutureOr<A> <: FutureOr<B> implies A <: B. This CL fixes the
implementation.
Closes #38905 .
Bug: http://dartbug.com/38905
Change-Id: I2c8d105659b310e3ab5db261ebdc81cbfa456ae1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135301
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-12 07:55:37 +00:00
Anna Gringauze
25559399ed
Reland "Implementation of evaluation to JS in frontend server"
...
This is a reland of 344c584ec4
First attempt failed due to lack of implementation of the new
API from SDK in Flutter/engine that this change introduces.
Fixed by creating dummy implementation in flutter/engine:
https://github.com/flutter/engine/pull/16309
Original change's description:
> Implementation of evaluation to JS in frontend server
>
> - made ProgramCompiler somewhat incremental by letting the user
> set the current library and class
> - fixed a bug in procedure_builder where extension method wrappers
> did not have correct fileEndOffset set, which prevented finding
> dart scope at a line when extension methods are used
> - added new compileExpressionToJs API to frontend server and
> frontend compiler interface
> - added ExpressionCompier class that combines IncrementalCompiler
> and ProgramCompiler to compile expression at given dart location
> to JavaScript
> - in JavascriptBundle, set the module name for library tracking in
> JavaScript and saved program compilers to a table for incremental
> reuse in expression compiler
> - Exposed generator from IncrementalCompiler for use in
> ExpressionCompiler
> - added tests for expression compiler
> - added test for compileExpressionToJs API in frontend server tests
>
>
> Change-Id: Ic5e7829e07030b8ad044da7d35bcf27e9fba81c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132701
> Commit-Queue: Anna Gringauze <annagrin@google.com >
> Reviewed-by: Alexander Aprelev <aam@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Reviewed-by: Gary Roumanis <grouma@google.com >
> Reviewed-by: Jake Macdonald <jakemac@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
Change-Id: I56426d2b6d831b2f8d8c57d468d0b54833a0062e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134561
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-02-11 18:31:44 +00:00
Dmitry Stefantsov
c3f75f0ca9
[cfe] Fix crashes due to wrong URIs in error reporting
...
Change-Id: I68de1cfca3c53c4406244a7f522dca7b174832cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135302
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-11 14:30:11 +00:00
Dmitry Stefantsov
2145850d40
[cfe] Check bounds for mutual subtyping in generic method overrides
...
Closes #40479
Bug: http://dartbug.com/40479
Change-Id: Ie98c4d316caa14ab51d838a05b1a2167024ce372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135061
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-11 13:18:41 +00:00
Dmitry Stefantsov
fd992e423e
[cfe] Normalize supertypes before nnbd-top-merging them
...
Closes #40454 .
Bug: http://dartbug.com/40454
Change-Id: Ia255c99c937a04876e04a0f0f5935147e55fbd35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134842
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-07 18:14:40 +00:00
Dmitry Stefantsov
a01dda1406
[cfe] Disallow use of non-nullable variables before assignment
...
Closes #40084 .
Bug: http://dartbug.com/40084
Change-Id: Iffacc803b90eb4a2e2cdbe872f36228e3677f9dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134727
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-07 13:31:17 +00:00
Johnni Winther
4267085fa5
[cfe] Handle opt-out Null override of opt-in Never
...
Closes #40387
Closes #40420
Change-Id: I2f0810cadcba5f74bdd5a47060ffb14dc8fe7f07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134702
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-07 10:02:05 +00:00
Johnni Winther
b978cb1cb5
[cfe] Support inference of lowered late field types
...
Closes #40373
Change-Id: Iddccbbafabe457fc8391dec8927a0e4fb3f6649b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134523
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-02-07 09:44:05 +00:00
Johnni Winther
80dacdf3a0
[kernel] Add Class.hasConstConstructor and Member.isNonNullableByDefault predicates
...
Closes #40440
Change-Id: I2776c165d23e2aa2bf5d7515741bd0f0d067b26d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134292
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-02-06 12:27:37 +00:00
Jens Johansen
ddd6e31dee
[CFE] Allow experimental invalidation to work on DillLibraryBuilders
...
This CL makes experimental invalidation work on DillLibraryBuilders,
and solves all found issues (e.g. old references (aka leaks)) with it.
Note: This CL introduces a few writes that seems weird (e.g. setting
variables that's about to be out-of-scope to null). This is done to
prevent "leaks", or probably more likely, prevent a "false positive"
leak detection and it currently gives a "clean bill of health" from
the leak detector.
Change-Id: I5b01df6e9ede710a5b624a8a4c21015214140318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134288
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-06 12:19:51 +00:00
Dmitry Stefantsov
af323cfa56
[cfe] Move isTop, isBottom, isObject, and isNull to CoreTypes
...
Change-Id: I15fbcc5b853e6786244994efef530a96436fb457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134721
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2020-02-06 11:56:51 +00:00
Dmitry Stefantsov
11790fe024
[cfe] Warn about non-nullable operands in null-aware operations
...
Closes #40094 .
Bug: http://dartbug.com/40094
Change-Id: I3af5258bf0845257915eb090889fde0fdcb96bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134339
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-02-06 11:06:41 +00:00