Konstantin Shcheglov
0d5ab9380a
Add getNotPotentiallyConstants() and isConstantTypeExpression().
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I1db7d336f71d307274917d49f8f414217e62dd16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 03:11:52 +00:00
Konstantin Shcheglov
cc1ddfb337
Issue 36212. Fix for updated part without library.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/36212
Change-Id: Ib0c43685c0b9f167591232d384a7fc5e426c07d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97007
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 02:13:12 +00:00
Konstantin Shcheglov
d597166f9b
Remove Dart tasks and work manager.
...
R=brianwilkerson@google.com
Change-Id: I5aaaa0ea5051b4ae639457d260486dbc973abcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-16 00:49:22 +00:00
Paul Berry
b9ce1496f1
Sort declarations in expr_builder_test.dart
...
Change-Id: Ib6bf858e5f13385031152a189a05294829de76d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96990
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 22:53:05 +00:00
Paul Berry
44753660ec
Prepare to publish analyzer 0.35.4
...
Change-Id: I265b0d0bf970f3962a66689895e7dd640fea91a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97006
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-15 22:33:45 +00:00
Brian Wilkerson
43c13284e4
Revert "Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features""
...
This reverts commit 75679e06c2 .
Reason for revert: Missed the SDK constraint in one place (or a set literal was added).
Original change's description:
> Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
>
> This is a reland of 5fdb3c5057
>
> Original change's description:
> > Add hints to check the SDK constraints for both set literals and for the ui-as-code features
> >
> > Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
> > Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> > Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
>
> Change-Id: Ic2fd6d4ad82b6882e20373d224177ea8ebc4685b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97121
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Paul Berry <paulberry@google.com >
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,brianwilkerson@google.com
Change-Id: I27c980cc5ed352b13c7510df55c704f7a6622837
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97046
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 19:54:26 +00:00
Brian Wilkerson
75679e06c2
Reland "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
...
This is a reland of 5fdb3c5057
Original change's description:
> Add hints to check the SDK constraints for both set literals and for the ui-as-code features
>
> Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Change-Id: Ic2fd6d4ad82b6882e20373d224177ea8ebc4685b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 17:38:15 +00:00
Brian Wilkerson
7f8eed0862
Update the partial constant evaluator to handle a limited subset of map literals in unresolved code
...
Change-Id: I1f37dd57628912b971f5323432b19f9ca272c675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97021
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 16:11:15 +00:00
Paul Berry
02ffcb8f42
Add summary support for if elements.
...
Change-Id: I32582b9608bcf92cabfac94e1d796036198818a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-15 15:39:25 +00:00
Konstantin Shcheglov
af633531ab
Report key/value type mismatch.
...
R=brianwilkerson@google.com
Change-Id: If4d4710228935816b98d1250f73b2c1fc600be56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-15 14:18:34 +00:00
Paul Berry
b216335e69
Add summary support for spread elements.
...
Change-Id: I5c306225aacca997ef104e7a2b18001dab38201d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96966
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-15 12:53:44 +00:00
Paul Berry
652948175e
Use a dynamic downward inference context for invalid ambiguous set/map literals.
...
Change-Id: I734c77f41b28f27751548e58bfeabb40e0bfa95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-15 12:19:05 +00:00
Konstantin Shcheglov
262878086d
Extract _ConstLiteralVerifier and split it into literal / operation methods.
...
R=brianwilkerson@google.com
Change-Id: I4e3412625cd8c1350bdf7dbc32d92000bc53600e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-15 00:33:13 +00:00
Brian Wilkerson
c3005ee81f
Add error codes for expressions in maps and map entries not in maps
...
Change-Id: I2fdebac61f697710b4fd945f694c28626dabee93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96985
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 22:01:53 +00:00
Konstantin Shcheglov
208f8b5441
Restore checks for leaf elements in ErrorVerifier.
...
We still need to check static types of leaf elements.
But constants might report additional errors using actual value types.
This fixes regressed:
co19_2/LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/09
co19_2/LanguageFeatures/Control-flow-collections/static_semantics_A01_t02/11
R=brianwilkerson@google.com
Change-Id: Id3a6f650507f4b51028ccbde914da9fae836ed03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 21:11:47 +00:00
Brian Wilkerson
0f4a208c3e
Revert "Add hints to check the SDK constraints for both set literals and for the ui-as-code features"
...
This reverts commit 5fdb3c5057 .
Reason for revert: This change broke the flutter bot.
Original change's description:
> Add hints to check the SDK constraints for both set literals and for the ui-as-code features
>
> Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
TBR=scheglov@google.com ,brianwilkerson@google.com
Change-Id: Ib29592b382cfd3d6b8c39caefc0db63495af1a0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 21:08:39 +00:00
Brian Wilkerson
5fdb3c5057
Add hints to check the SDK constraints for both set literals and for the ui-as-code features
...
Change-Id: I1046e57304d56e6d7f088ea1a8a054318a45ac37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96837
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 20:25:24 +00:00
Konstantin Shcheglov
ca2fc831c4
Check types of values in constant List/Set against the element types.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I19c2b37596dae8fd9f3afb1fadf842be4c944b44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 19:53:44 +00:00
Paul Berry
7c3ab264e5
Change link methods to take a DeclaredVariables object.
...
Change-Id: I6cc36f9152fb90642ec3261418e60ac3bdbe5acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96922
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-14 19:52:24 +00:00
Dan Rubel
5d6e17a20d
Improve initializer missing comma recovery
...
Fix https://github.com/dart-lang/sdk/issues/33241
Change-Id: Iab230a9f10f51b1d5ca22a8b8d74751a51d5f9f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-03-14 19:25:04 +00:00
Paul Berry
5e1397fc4e
Remove unused import
...
Change-Id: I18837fe28a92fffc3a8f80460f34f14e94bb19de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96962
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 17:56:16 +00:00
Konstantin Shcheglov
7418238239
Implement LibraryElementForLink.session and return (empty) AnalysisSessionForLink.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug: https://buganizer.corp.google.com/issues/127956822
Change-Id: Ifc93882d9ae7ae6079497fb10f3feea7ac6fb9e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 15:39:18 +00:00
Konstantin Shcheglov
eeb19b0416
Remove usages of ExtensionManager and package:plugin in general.
...
R=brianwilkerson@google.com
Change-Id: I489e72464474b3d40d7678f44562f65934f93288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 15:31:08 +00:00
Konstantin Shcheglov
d5ab8b4da2
Resolve ForElement(s) in separate scopes.
...
R=brianwilkerson@google.com , paulberry@google.com
Context: co19_2/LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A04_t01
Change-Id: I09e63e0821015993aa47736efd729411a9bd67e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96833
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 01:11:26 +00:00
Brian Wilkerson
037b273753
Make List literal inference match the proposal
...
Change-Id: I8c70fc80d1965a407141c4d1c8e90f1d32bd44ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96847
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 00:16:56 +00:00
Mike Fairhurst
1bd7920367
Resolve generic function default parameter values
...
Change-Id: I060ee8f61b8cb74482b92d4057e4183f1e4ca269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96701
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Mike Fairhurst <mfairhurst@google.com >
2019-03-13 22:44:18 +00:00
Paul Berry
31c47567dc
Remove AnalysisOptionsForLink and plumb analysis options through linker.
...
This is a non-breaking change; the only way linking is exposed to
clients is through `SummaryBuilder`, which can get the analysis
options from the context.
Fixes #35747 .
Change-Id: I273408f33a881ac32ab248cbc8f3e0644630563b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96829
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-13 22:39:53 +00:00
Konstantin Shcheglov
078c834f25
Extract CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS test and fix for spreads in sets.
...
R=brianwilkerson@google.com
Change-Id: I1667d6bdde78a35a542f2ec525d5328573322600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96830
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 21:31:31 +00:00
Brian Wilkerson
b5528fa84d
Improve the docs for isSet and isMap in SetOrMapLiteral
...
Change-Id: I7b6769cdb89e728c7678361855481fd4ab307d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96827
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-03-13 20:54:01 +00:00
Paul Berry
d3a0293a9d
Replace unnecessary ?.s with ..
...
They were triggering a lint (null_aware_in_logical_operator).
Change-Id: Ia6124ae4828270b1d231b44199c376adc04fcc79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96848
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-13 20:23:31 +00:00
Konstantin Shcheglov
f08e213bb1
Extract CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS tests.
...
R=brianwilkerson@google.com
Change-Id: Ic73cdade894f4d5832427d193eaa0c33e51676b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-13 19:28:34 +00:00
Konstantin Shcheglov
2b00685d38
Make SetOrMapLiteral set/map unless we are linking, so going to infer it.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I676975b4fd861f37fcd58c48782f0a4fa59ce178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-13 19:16:59 +00:00
Konstantin Shcheglov
81fa14eb3c
Hollow out AnalysisContextImpl.
...
R=brianwilkerson@google.com
Change-Id: I4ebc67de74cc4bbda63c9f0a8f7c11dbc3f25b21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96720
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 15:18:22 +00:00
Brian Wilkerson
4a7556840f
Rename tests ending with Test_Driver
...
Change-Id: I1b4822630a2508e8a41ba6c5564eae5a54f56622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96740
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 13:38:22 +00:00
Konstantin Shcheglov
0a337bb36f
Report CONST_SPREAD_EXPECTED_LIST_OR_SET and CONST_SPREAD_EXPECTED_MAP.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I70eb31a19c447d17b4cc60ae2ff3caadb35cc6bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96712
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-13 06:40:05 +00:00
Konstantin Shcheglov
578fdb0408
Call becomeMap/becomeSet() in AstCloner.
...
So, that we have a decided kind for constants.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Iee2937e8d525c16e57c8efb4807806edeb19e125
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-12 21:08:04 +00:00
Brian Wilkerson
16e40cef2f
Generate a diagnostic when a set or map literal is ambiguous
...
Change-Id: Ia105468cf921ee2548ed48e286297e10f921a986
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-12 17:50:40 +00:00
Paul Berry
2d6ddf2aff
Remove unnecessary override from PartialResolverVisitor
...
Change-Id: If05409eadb6dd0baa39dfa6bfe087ae046fe57db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96661
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-12 15:09:12 +00:00
Paul Berry
ba3b9b3b65
Sort static_type_analyzer_test.dart
...
Change-Id: I4767ea98e947279d1af5d4295d1c8e66c02dee80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96660
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-12 14:59:42 +00:00
Konstantin Shcheglov
016e3172d1
Default parameters, more metadata, import dart:core.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ibf31dcc7e0fbea3935f75c7472a23eac4c2999eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96522
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-12 00:26:01 +00:00
Brian Wilkerson
b87c44d6b3
Generate diagnostic for non-bool conditions in if elements
...
Change-Id: I36bd37a3a3bdfea7ca0853d90299b5fa7d36a352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-11 21:51:31 +00:00
Konstantin Shcheglov
74395d940f
Comment out test_import_short_absolute that fails on Windows.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ic613b1c0f1acb5fc8cac0023cfd989b2dabccf0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96521
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-11 21:39:47 +00:00
Konstantin Shcheglov
15842d4583
Build more import scopes, support for enums.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I78c7a8be5b5d4ea9c9ecbc82f0c1101d7819dd30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-11 20:16:26 +00:00
Paul Berry
f2029f54cd
Fix type inference of map/set literals when the context is a type parameter.
...
Change-Id: Ic78cfd838e7fce4f362770c0827d71b351711e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-11 19:48:26 +00:00
Brian Wilkerson
bfb30bffe0
Fix a bug in the ConstantVerifier so that conditional elements are lazily verified
...
Change-Id: Ib8b8d5af3dc3a27280116d275616bf26a482bb90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96360
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-03-11 19:14:38 +00:00
Paul Berry
abd1854176
Fix recording of map/literal context type.
...
Previously, we were using the storage space provided by
`InferenceContext.getContext` for two purposes: 1. to store the
inference context passed down from the parent AST node, and 2. to
store the refined inference context computed by
ResolverVisitor._computeContextType. After type inference, the data
that remained was the refined interface context (2); however,
ErrorVerifier._checkForRawTypeErrors was expecting to be able to
retrieve the downward inference context in order to report
`HintCode.STRICT_RAW_TYPE` correctly. This caused a failure in
test_strictRawTypes_emptyMap (in checker_test.dart).
This CL fixes the issue by storing the refined inference context (2)
in a field in `SetOrMapLiteralImpl`, so that it doesn't overwrite the
downward inference context (1).
It also fixes an issue that was previously obscured by this bug, where
we weren't copying over the downward inference context when replacing
a set literal with a map literal. (This fix will become irrelevant
after the next breaking change release of the analyzer, when we stop
creating different objects for set vs. map literals, and simply use
the base class `SetOrMapLiteralImpl`).
In addition, ResolverVisitor._computeContextType has been renamed to
_computeSetOrMapLiteralContextType to clarify that it only computes
context information for set/map literals.
Change-Id: I62a9c4bb6fe755acf60b881948538216af81b515
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96261
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-11 16:50:43 +00:00
Konstantin Shcheglov
a8b3461f2e
New summaries work snapshot.
...
1. Extract LinkingBundleContext to store references and types.
2. Resolve and resynthesize metadata for many nodes.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I88334bd4509efe0182a4bba6a67edac99ed51886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96262
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-03-11 15:21:32 +00:00
Paul Berry
9e7627b6a1
Re-land "Eliminate uses of old AST node types from pkg/analyzer/lib/src/summary"
...
There are two bug fixes:
- Due to dartbug.com/33441, it's possible that a set/map literal
resynthesized from a summary will have neither its `isSet` or
`isMap` boolean set to `true`. We work around the problem for the
short term assuming such literals are maps.
- The linker method ConstNode.collectDependencies hadn't been updated
to handle the new summary nodes `makeUntypedSetOrMap` and
`makeTypedMap2`.
This CL includes unit tests for these two bug fixes.
Original change description:
> Eliminate uses of old AST node types from pkg/analyzer/lib/src/summary
>
> Change-Id: Ida907040d0461d9ae723421eeac71f4e19a8d4b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95284
> Commit-Queue: Paul Berry <paulberry@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Bug:
Change-Id: Ie26be4e0e241872ef4c7e183ada1f1d6b5f6e7f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96264
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-03-11 14:43:22 +00:00
Brian Wilkerson
210361ae63
Move IgnoreInfo out of the task model code base
...
Change-Id: Ib164e66ed96325042c9ab18de6489ab2d1c700ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96263
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-11 13:20:14 +00:00
Konstantin Shcheglov
fa90c9abe5
New summaries work snapshot.
...
1. Extract TokensWriter and TokensContext.
2. Type parameters for more declarations.
Change-Id: Iaeeaa5c8da98c9fa5dce65244ccb28e66d3656a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-10 17:06:28 +00:00