Lasse R.H. Nielsen
8a883fa54d
Change : to = for default values in pkg.
...
Leaves some in parser test:
pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart
TEST=Refactoring, covered by existing tests.
Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2022-08-24 15:57:16 +00:00
Johnni Winther
fed3bc0125
[_fe_analyzer_shared] Updated id testing to provide regeneration command
...
In most case, id testing annotations can be regenerated automatical.
This updates the error reporting to include the regeneration commands.
The test system now also runs all tests in case of failures instead of
stopping after the first found failure.
Change-Id: Ice865bddccd8d1da416a1072b3927ed6adfa48fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240048
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-04-05 20:34:53 +00:00
Johnni Winther
e9ba1d0481
[cfe] Apply phase 3 macro results.
...
This add supports for applying the result of phase 3 macros, so that
function bodies generated by macros are now included in the generated
AST.
Change-Id: I2ae5d00846dbffdfcb06086d1d1741703fae9fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234047
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-02-24 09:18:22 +00:00
Johnni Winther
f24c4fa919
[cfe] Add initial support for applying the phase 1 macro results
...
This adds support for the generating a synthesized augmentation
library for each library in which phase 1 macros were applied.
Current implementation piggybacks on the patch library support. The
intension is that both patches and augmentations are handled through
the same general mechanism. For now, the wording refers to augmentation
libraries as patch libraries where the implementation is shared.
Testing is extended to verify that the generated classes are
included in the resulting AST.
Change-Id: Ie0d4cfdc84b55ca87e0014794f14b38e442f08eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233101
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-02-16 09:19:49 +00:00
Johnni Winther
9b7be8d117
[cfe] Call MacroExecutor for phase 3 macros
...
This CL adds capability for calling MacroExecutor to apply phase 3
macros to function declarations.
Change-Id: I1ab5bf33c8d9c6ce0c6706fe2bcafe2298ff292b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227720
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-01-17 16:24:55 +00:00
Johnni Winther
093bfcd883
[cfe] Migrate remaining front_end/lib/ libraries
...
Change-Id: Ia6efe9046b80709605aef1e7f38fce523baafa91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206081
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-07-07 19:11:04 +00:00
Mayank Patke
679e214f51
Fix nullability issue in id_testing.
...
Change-Id: Id1703aabbe6f6e425f3965770292e32ad664664b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191861
Auto-Submit: Mayank Patke <fishythefish@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-03-18 11:00:58 +00:00
Konstantin Shcheglov
9f986d2501
Migrate package:analyzer to null safety.
...
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2021-02-01 18:56:04 +00:00
Konstantin Shcheglov
3d67e6f998
Migrate _fe_analyzer_shared to null safety.
...
Some notes.
1. `Token.next` is `Token?` because there are null(s) for comment tokens.
But I think that it is never `null` in code, because there is at
least EOF token. So, lots of `!` null checks.
2. `Link.tail` is never null when `isNotEmpty`, but the type system
cannot express it. So, some number of `!` null checks.
3. I keep assert(s) for now, and use comment
`// ignore: unnecessary_null_comparison`.
4. I disabled `can_get_rid_of_nnbd_issue_error`, I think it fails
because of changes in `_fe_analyzer_shared` language version.
Smoke test in google3 looks green.
https://test.corp.google.com/ui#id=OCL:346825148:BASE:346841611:1607632317129:6e87bf7
I have not tried yet full TAP, will do in the evening.
I have not tried yet Golem, or looked at benchmarks.
Change-Id: I651301e5d3a851dd77d73af960dac779cb0fc991
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2020-12-12 03:22:29 +00:00
Joshua Litt
cbbd76ef2c
[dart2js] Port deferred_loading_test to features.
...
Change-Id: I683f82fe1096963392f78f9dd3b640b66765b8b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166604
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-10-09 21:10:17 +00:00
Jens Johansen
4c0cab024e
[parser] No longer support ?.[ syntax
...
Update CFE tests (and a few analyzer tests) to match the new world
of the syntax being unsupported.
Fixes https://github.com/dart-lang/sdk/issues/42681
Change-Id: I71bc973f36dfb978ddb825edb68530d8e260a58a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157980
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-11 08:09:59 +00:00
Johnni Winther
135c44afd9
[analyzer,cfe,dart2js] Ensure id-testing shards are deterministic
...
Sharding was based on the directory listing. Now we sort the entities
by test name before sharding to avoid dependency on the file system.
Change-Id: I5e6ecc191d84eb1820c05bcef0a27d8b03d89286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156025
Reviewed-by: Jens Johansen <jensj@google.com >
2020-07-29 09:45:59 +00:00
Paul Berry
4a4bb55150
Make "ID" tests insensitive to what directory they're run from.
...
Previously, they needed to be run from the root of the SDK repo, which
made testing under IntelliJ a pain, since by default IntelliJ runs
executables from the root of the local package.
Change-Id: I89d9bbbca38307016fcea4717010c19b9720b463
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154285
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-14 15:33:59 +00:00
Mayank Patke
3b67681bcc
[dart2js] Clean up (pre-)NNBD unit test configurations.
...
Change-Id: Ife85aafa90b1b0347fabb6e95f3d6c00c5307cd2
Bug: https://github.com/dart-lang/sdk/issues/42063
Fixes: https://github.com/dart-lang/sdk/issues/42063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152440
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-06-25 18:44:32 +00:00
Johnni Winther
7fce125300
[cfe,kernel] Add AstPrinter
...
This CL adds a Node.toText method together with an AstPrinter. These
facility and better toString implementation on AST nodes while allowing
for toString independent printing of AST to use in testing. This also
add support for an integrated toString of custom/internal nodes.
Some work is still needed in bringing the toString implementation on
all nodes to the old quality, and not all internal nodes have
customized textual representations yet. This work is left for future
CLs.
Change-Id: Ib0bf8a0bc02f489dfacdc8aa5f96da9c52f26058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150923
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-06-16 17:15:10 +00:00
Johnni Winther
e7bebea059
[analyzer,cfe,dart2js] Make id-testing wildcard customizable and unsupported by default
...
Change-Id: Id11dc3c04d1d42853566e492b7d5aead4a35a724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145781
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-05-04 12:58:24 +00:00
Joshua Litt
32c3a2cde7
[dart2js] Rebase nnbd expectations for 3 tests.
...
cfe_constant_test
inlining_test
jfield_analysis
Change-Id: Ib2833507f4e19f3d6a1e5055977bccc962b2d791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144494
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-04-24 18:30:03 +00:00
Joshua Litt
6f5f7ad05c
[dart2js] rebase deferred_loading_test for nnbd.
...
Change-Id: Ia8cd18e19554afec57675bab64797984445556c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143820
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-04-23 01:17:58 +00:00
Johnni Winther
dc97454b63
[analyzer,cfe,dart2js] Add pretty printing to id testing
...
Adds support for pretty printing verbose annotations.
Adds support for force updating annotation texts useful for applying
the pretty printing to valid annotations.
Change-Id: I8fe9b6d2f8198bd5e160854053c8d964ef832a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129710
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-04-14 13:24:09 +00:00
Johnni Winther
25060e63c6
[cfe] Add tool for updating all id-tests and expectation tests
...
Change-Id: I191ebe0d59d44055a6818505db0112d3a452bdbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141242
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-03-27 14:52:20 +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
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
862d5012ae
[cfe] Handle explicit opt-out in nnbd-not-enabled message
...
Closes #39835
Change-Id: I4ffa3377289f45b7ea909b5477ba53508040b9d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131076
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-01-15 10:30:43 +00:00
Johnni Winther
84c2a50aa0
[analyzer,cfe,dart2js] An indices to annotations preserve original order in id_generation
...
Change-Id: I0894baa6771b1c5a11a33007feebd1886aea032d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130704
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-10 11:51:17 +00:00
Johnni Winther
c1dc711ee7
[analyzer,cfe,dart2js] Use id_generation to show annotation diff
...
Change-Id: I1f1d96b3be023e9e9cfa25425f57a540edad6f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130703
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-10 11:51:17 +00:00
Johnni Winther
008e6ae60b
[analyzer,cfe,dart2js] Add skipMap to id-testing
...
This supports skipping tests per configuration, for instance to add
nnbd-only tests and skip these in non-nnbd configurations.
Change-Id: I7eaebaa16d67129ce60cffa3594c766ff5e5bc66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130376
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-08 14:47:28 +00:00
Johnni Winther
d2fcd678fd
[analyzer,cfe,dart2js] Improve offset of generated library/class/member annotations
...
Change-Id: I76fea5f3479b5185433ec56efefb89071676e1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130375
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-01-08 14:47:28 +00:00
Johnni Winther
969fa962da
[analyzer,cfe,dart2js] Do not generate annotations for empty values.
...
Change-Id: I0efa6287a44e340f9dc242b4ffc84fc8723e1049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129718
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-03 20:12:39 +00:00
Johnni Winther
e3a20bf361
[analyzer,cfe,dart2js] Support annotated code generation
...
Add support for generating annotations from actual data using
option -g
Change-Id: I88d9cdb62a38d579234b15097c9e9bb3d81ebe8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129708
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-01-03 13:57:39 +00:00
Dmitry Stefantsov
d9d5fbc109
[cfe] Create TypeParameterTypes with default nullabilities
...
Change-Id: I85be937240ba5cc39840e78f374902c1e36521a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124327
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2019-11-19 11:22:43 +00:00
Paul Berry
c4b6df5009
Move ID testing infrastructure into _fe_analyzer_shared.
...
Change-Id: I9f2692dbe750f3c31f8c86e86fe732f34e166517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123860
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-11-01 12:39:00 +00:00