Konstantin Shcheglov
79396b13bf
Migrate analyzer flat buffer generator to null safety.
...
Change-Id: If16c57cc443002f90f7f94b2e08294eb8bb44225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183766
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-09 17:14:00 +00:00
Konstantin Shcheglov
36c63c1269
Issue 44865. Report USE_OF_VOID_RESULT for ConstructorFieldInitializer.
...
Bug: https://github.com/dart-lang/sdk/issues/44865
Change-Id: I4af50cc92a155df08895eb3699cf86a3a6c45858
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183763
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-09 17:13:49 +00:00
Alexander Aprelev
6ac90525a0
[vm/concurrency] Allow for background compiler to disable field unboxing.
...
Issue dartbug.com/36097
TEST=existing test suite
Change-Id: Idd0c26fe9c81a733685105aa944b96ed58bc2765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182669
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2021-02-09 16:27:13 +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
Alexander Thomas
31528c6327
[sdk] Add placeholders for 2.13 changelog entries
...
Change-Id: I27a070764d5a0551e6a42000201ff9bd7ee2ab7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183690
Reviewed-by: William Hesse <whesse@google.com >
2021-02-09 14:38:46 +00:00
Johnni Winther
9bd9b3ccd6
[kernel] Use List.generate instead of List.filled in ast_from_binary.dart
...
In preparation for null safety migration, List.filled is replaced
with List.generate in ast_from_binary.dart where the element can be
created by a simple function expression.
Change-Id: I17bc68edebb8dc7d8918d87e9cdc38a9a8711682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179761
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-02-09 13:58:03 +00:00
Daco Harkes
aa2a6f8581
[vm/ffi] Change type of typedDataBase parameter for load and store
...
So that it can be invoked from `CArray` which has a backing store
that is either TypedData or Pointer.
Bug: https://github.com/dart-lang/sdk/issues/35763
TEST=tests/ffi(_2)/*
Change-Id: I30bb0c1e848f2ac4f47919009106d5428ed66453
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183683
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2021-02-09 13:01:49 +00:00
Johnni Winther
b60e0aa5a1
Revert "[kernel] Ensure that visitors don't implicitly returns null"
...
This reverts commit ce81216885 .
Reason for revert: Flutter dependency
Original change's description:
> [kernel] Ensure that visitors don't implicitly returns `null`
>
> This is in preparation to migrate package:kernel to null safety.
> For the visitor interfaces to support non-nullable return types, the
> implementations must avoid using `null` as return value in its base case.
>
> TEST=Refactoring
>
> Change-Id: Ie5e4153f8d3779d94957bb13b3d2d2a942040ff2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179760
> Commit-Queue: Johnni Winther <johnniwinther@google.com >
> Reviewed-by: Jens Johansen <jensj@google.com >
TBR=jensj@google.com ,johnniwinther@google.com
Change-Id: I61b838d3371e6b1de2427716d056324c120be499
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183689
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-02-09 12:41:12 +00:00
Daco Harkes
5c4a916dc8
[analyzer/ffi] Support inline arrays in Structs
...
This CL does not add inline arrays to `dart:ffi` yet, only to the mock
SDK in the analyzer for testing the analyzer. This means we can review
and land it separately.
Closes: https://github.com/dart-lang/sdk/issues/44747
Bug: https://github.com/dart-lang/sdk/issues/35763
Change-Id: I7df6a61ea4cfa522afd12194dd2f3573eb79b3ef
Cq-Include-Trybots: luci.dart.try:analyzer-analysis-server-linux-try,analyzer-linux-release-try,analyzer-nnbd-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183684
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2021-02-09 11:38:06 +00:00
Johnni Winther
ce81216885
[kernel] Ensure that visitors don't implicitly returns null
...
This is in preparation to migrate package:kernel to null safety.
For the visitor interfaces to support non-nullable return types, the
implementations must avoid using `null` as return value in its base case.
TEST=Refactoring
Change-Id: Ie5e4153f8d3779d94957bb13b3d2d2a942040ff2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179760
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-02-09 09:46:46 +00:00
Jens Johansen
cb89632bdc
[CFE] Reproduction of error on recomile even without change (slight variation)
...
This is a slight variation of
https://github.com/dart-lang/sdk/commit/6aee7d0eb82c420a907af0a1da5e90ca66736db2
that was fixed in
https://github.com/dart-lang/sdk/commit/019ce33409e246973a217a7f9655444bc13d2619
This one still fails.
Change-Id: I92d62d96b3783243c0ff3ee2dab20f9c7c5ec22a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183663
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2021-02-09 07:30:12 +00:00
Jens Johansen
6c4bc07b42
[CFE] Fix leakTester after changes to vm_service
...
vm_service was changed in https://dart-review.googlesource.com/c/sdk/+/182600
Change-Id: Ieb52349c970727889fb7ba87b90fbd408281d28d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183662
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2021-02-09 07:28:32 +00:00
Sam Rawlins
7b1c194057
Analyzer: deduplicate resolution tests where the null safety test has no new test cases.
...
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I4620377cb78a2e3d89e772322636a775bcfd8ba0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183782
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-02-09 04:31:47 +00:00
Leaf Petersen
1a03d262d4
Set CFE weak/strong nnbd flag in the static error updater
...
Change-Id: Icfe7c5d41e5851fe9aadbf16daca2e753c65e86e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183361
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2021-02-09 02:25:44 +00:00
Sam Rawlins
88332241f0
Analyzer: Deduplicate some resolution tests
...
In each included file, there is a test, and a WithNullSafety test which _does
not override_ any test cases from the base test. So the test classes are
combined into one, which is null safe. No test cases are added or removed, but
because of sorting, the diffs may be large.
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: Ia9bd2c512ccaa5b8de6fbe454c1275f1b8e889a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183783
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-02-09 01:34:02 +00:00
Alexander Aprelev
937a716b09
[io/ssl/mac] Retain certificates used by trust certification evaluation.
...
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/174340 , which moved construction of macos certificate list from boringssl structures from worker thread back to main thread, however it seems to have resulted in certificates in certificate list being prematurely released.
This cl explicitly passes/retains certificates lists to worker thread to be released after certificate trust is evaluated.
Avoid using deprecated SecTrustEvaluate if running on recent versions of OS.
Fixes https://github.com/flutter/flutter/issues/73971
TEST=flutter/examples/image_list on mac osx 10.13.6 simulator 10.3.1
Change-Id: I36829a9b236fab2bbbe952314ce277c436ea0e10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183620
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2021-02-09 01:19:57 +00:00
Konstantin Shcheglov
d0725fee3d
Update multiple packages to null safety releases.
...
Change-Id: Ia561bddb6dcdcdac945599c8f4d275285607e2ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183761
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-09 01:17:00 +00:00
Konstantin Shcheglov
aa5cf01135
Issue 44889. Enable null safety in tool/experiments/experiments_test
...
Bug: https://github.com/dart-lang/sdk/issues/44889
Change-Id: I7e424d68f81a7558428e3e92c159d1aea5974188
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183764
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-09 01:06:40 +00:00
Ben Konyi
fbbc99e1e9
[ VM ] Ensure Dart C APIs perform type checks when invoking functions
...
and constructors
Dart_New, Dart_InvokeConstructor, and Dart_InvokeClosure were not
checking the types of arguments before performing invocations.
Fixes https://github.com/dart-lang/sdk/issues/44205 .
TEST=DartAPI_*_Issue44205
Change-Id: I6c06e3e8a0a88b9caa7e2212c4a2c8e43d39b4f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182962
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2021-02-08 23:30:05 +00:00
Mayank Patke
c0dd78ccd7
[dart2js] Ensure type arguments are propagated to call methods that
...
need them.
Change-Id: I8ccf9d782675c790376dac95bf7f35a174544791
Fixes: https://github.com/dart-lang/sdk/issues/41449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182640
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-02-08 23:23:34 +00:00
Mayank Patke
b615f08e58
[dart2js] Add failing tests for issue #41449 .
...
Bug: https://github.com/dart-lang/sdk/issues/41449
Change-Id: I5526d3f6d15945bdf2ba0f790e1c803471b139c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183120
Reviewed-by: Stephen Adams <sra@google.com >
2021-02-08 23:23:34 +00:00
Sam Rawlins
82bcd13476
Change PubPackageResolutionTest to use null safety.
...
Some tests had some issues migrating to null safety that I
could not immediately hash out, or may warrant some more discussion.
So I've added WithoutNullSafetyMixin, and we can incrementally
migrate these after this CL.
Many tests have little no-op tweaks to make them null safe, like
initializing variables, adding late, making nullable.
Nest steps:
1. Remove `WithNullSafetyMixin` applications.
2. Remove `WithoutNullSafetyMixin` in every position with a TODO for
#44666 .
3. For every file with pair(s) of test classes (one pre-null safety,
and one null safety), move around test cases so that they generally
run with null safety, unless they are testing things very specific to
before and after null safety.
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I0512dedcda42e864fd580af4842702095937bdb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183140
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-02-08 23:06:04 +00:00
Stephen Adams
08f90cad84
[dart2js] Use 'num(ber)' wherever possible instead of 'double'
...
JSDouble represents doubles that are not integers. It is usually wrong
to use JSDouble, so use JSNumber instead where we mean 'all double
values'.
This fixes #44818 by not mistakenly pretending that division cannot
have an integral result.
Will follow up with a CL to rename JSDouble.
Fixed: 44818
Change-Id: Ic324df2ee1f2c7434bc0b064c0dbd7b6800ad93b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183360
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2021-02-08 22:06:54 +00:00
Paul Berry
680f5e6da5
Clean up error message nomenclature around metadata vs annotations.
...
Change-Id: I866900d2c4baca6ee000885f2126de2a97e643ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182800
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2021-02-08 22:00:04 +00:00
Brian Wilkerson
8f05ecae6e
In edit benchmark, wait for initial analysis before editing the file
...
Change-Id: I2dbf5df9fa87d5e7f58260bd311673d2c2b53bd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183703
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Danny Tuppeny <danny@tuppeny.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-08 21:23:44 +00:00
Gary Roumanis
fd2a520f8e
Update package:sse dep
...
Change-Id: I1768c275b652ce7c86e001221c8fc849087dd034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183701
Reviewed-by: Nate Bosch <nbosch@google.com >
Auto-Submit: Gary Roumanis <grouma@google.com >
Commit-Queue: Gary Roumanis <grouma@google.com >
2021-02-08 20:26:08 +00:00
Konstantin Shcheglov
557112403e
Prepare to publish analyzer 0.42.0-nullsafety.0 and _fe_analyzer_shared 15.0.0.
...
Bug: https://github.com/dart-lang/sdk/issues/44290
Change-Id: I3e1be773b4a8b2ec4be2eb93608b10d26858db9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183143
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-02-08 19:51:15 +00:00
Konstantin Shcheglov
d48fb41e68
Remove dev_compiler/test/testing.dart
...
Change-Id: If100f15d9798a90c7389f15cdf99d0b1cf60e6dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183460
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-08 18:58:21 +00:00
Konstantin Shcheglov
86636aff07
Use empty placeholders for List(s) in elements.
...
Change-Id: I1d63fe018a0a78cfdf2e9e7ec91aefdc9cd91bb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183500
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-02-08 18:09:33 +00:00
Daco Harkes
6d58f653b1
[samples/ffi] Fix integer overflow
...
Closes: https://github.com/dart-lang/sdk/issues/44887
Change-Id: Ia45a9109ab4e7688e18669cbed2c30c1f92277f4
Cq-Include-Trybots: luci.dart.try:vm-kernel-ubsan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183641
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2021-02-08 14:47:17 +00:00
Dmitry Stefantsov
c6bd2afc10
[cfe] Remove a side effect from computeConstCanonicalType
...
Closes #44857 .
Bug: https://github.com/dart-lang/sdk/issues/44857
Change-Id: I1082fded9a0b06cbcf30c484975b0cf464db75a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182781
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2021-02-08 13:22:13 +00:00
Dmitry Stefantsov
d3f3cfd531
[cfe] Report cyclic typedef use in bounds of type parameters
...
Closes #43975 .
Bug: https://github.com/dart-lang/sdk/issues/43975
Change-Id: Ia7e7b6c46d3c0d2eaa2e809008847d3f47897d2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182780
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2021-02-08 13:13:23 +00:00
Jens Johansen
da4e3f4bbe
[CFE] Textual outline requires ScannerConfiguration
...
The incremental compiler now passes the correct nnbd settings and
extension methods settings.
Change-Id: I89e6bad8af330c3c81f141c260b2325aca4a5bb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182630
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-02-08 12:10:27 +00:00
Dmitry Stefantsov
63737581f8
[cfe] Encourage the use of the const NeverType objects
...
TEST=Covered by existing test base.
Change-Id: Ie858bd5a765d71fa4095eab3373a6ecdb063b260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183006
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-02-08 10:36:40 +00:00
Jens Johansen
23a841c463
[CFE] Add a reordering fuzzing step to the strong unit tests
...
This CL:
* Adds a "reordering fuzzing step", i.e. it tries to sort the fields,
procedures etc in both ascending order and descending order
to verify that there are on crashes and no changes in error vs
no error. This has been tested on http://dartbug.com/34803
before the fix landed.
* Introduces an attempt at "visiting the outline" of the "direct from
parser ast".
Change-Id: Ic3f5a776839030bb48a35eeee8575b37c19be453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182504
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-02-08 10:00:10 +00:00
Jens Johansen
801e3331df
[CFE] Remove unused stuff 'metadata collector' and 'documentation comment'
...
Change-Id: I5826dca4e328752ceaa5b788f2d85669ceb1f0d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183008
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2021-02-08 09:46:20 +00:00
Johnni Winther
909c44cecf
[cfe] Support dart2js and dartdevc targets in expectation tests
...
Change-Id: If087dfaf291f02812aa1191328a10ad2a5f135ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183007
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-02-08 08:30:20 +00:00
Sam Rawlins
8432b379e7
Analyzer: Prepare tests for null safety.
...
Tests that include, for example, a field `int a;` need to be migrated to
something which is both legal in pre-null safety, and in null safety. So no `?`
etc,. Additionally:
* parameters to `main` must be correct,
* new flow analysis may change inference,
* avoid `List()`
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I77b7c3a6f391953c74824153012c1a537f8bebe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183520
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-02-07 19:45:56 +00:00
Konstantin Shcheglov
9624709abf
Remove ForMixin and IfMixin.
...
Change-Id: I1487d5487b43c910f8ac313dd3ea54430da48009
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183420
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-07 02:13:46 +00:00
Konstantin Shcheglov
8a88268f20
Eliminate 'lazy' from AST.
...
Change-Id: Ied5452b85824f169d92957f852864589d94d32da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-06 18:11:16 +00:00
Johnni Winther
531a3a4ffd
Reland [dart2js] Remove GlobalsLocalsMap from JClosedWorld
...
The removes the GlobalsLocalsMap from JClosedWorld and instead includes
it as a part of GlobalInferenceResults.
Previously landed in https://dart-review.googlesource.com/c/sdk/+/181620
but reverted.
Change-Id: I384b21bf285009c82ca9ec8740443cda0a6fa493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183001
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2021-02-06 08:11:16 +00:00
Johnni Winther
6849d737a6
Reland: [dart2js] Refactor closure data to use AST nodes instead of locals
...
This CL avoids creating locals using KernelToLocalsMap when computing
closure data for the J-model. Instead the closure data uses
ir.VariableDeclaration, JTypeVariable, and internal locals (ThisLocal
and BoxLocal) internally, and the accessor function require passes
a KernelToLocalsMap to convert the internal model to a Locals upon use.
The converted Locals are cached internal for performance only.
This prepares for splitting the GlobalLocalsMap and KernelToLocalsMap
from the JClosedWorld.
Previously landed in https://dart-review.googlesource.com/c/sdk/+/180820
but reverted.
Change-Id: Ic6a2ab63de7cb31c89dd50ca2af3f205a792fd74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183000
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2021-02-06 08:11:16 +00:00
Konstantin Shcheglov
2e3ac0cf15
Don't assert that T2 and T3 are num subtypes.
...
Bug: https://buganizer.corp.google.com/issues/179461891
Change-Id: I87be38a09aade855413382b1d86476c295c4e317
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-06 02:57:06 +00:00
Konstantin Shcheglov
4e347a9800
Use Map.of() instead of Map.from() in flow analysis.
...
Fixes an issue with using `Map<Variable, _>` instead of
`Map<Variable?, _`, which happens at runtime with `Map.from()`.
Bug: https://buganizer.corp.google.com/issues/179461891
Change-Id: Ic317119f7b575fdf4f7b59a8d7ba7f29fab4e76e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-06 02:57:05 +00:00
pq
7844db28a0
add test dir checking to LinterContext
...
Change-Id: I53730f982a265d063c29cf8e485f1d4d84a6b65d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2021-02-06 02:05:19 +00:00
Loren Van Spronsen
c426bc5eff
Correct the inline grammar in the SimpleStringLiteral dartdoc.
...
Change-Id: I03956ea2e7f2dfba45bab265b0ab7a7b86559224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-02-06 01:46:48 +00:00
Brian Wilkerson
cf2e85f035
Generalize FeatureComputerTest to make writing more tests easier
...
Also, fixed a small bug found by updating the code used to find the node.
Change-Id: Id64e66f4d50f70aaadd3e56e37a83b257d119b9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183181
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-02-06 01:24:28 +00:00
Leaf Petersen
fe3cd179cf
Add presubmit check for package_config.json .
...
Change-Id: Ida784b6e73601e0309e10b2808f46e70926eabc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183045
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2021-02-06 01:02:38 +00:00
Ben Konyi
848121e6d4
Reland "[ CLI ] Improved consistency of -D and --define across tools and commands"
...
- Added support for --define to the VM and dart2js
- Added support for -D and --define for `dart run` and `dart compile js`
Remaining improvements:
- Add support for providing multiple comma separated values for `dart
run`, `dart`, and `dart2js`
Related issue: https://github.com/dart-lang/sdk/issues/44562
TEST=Updated CLI tests and added new dart2js tests.
This reverts commit e49937769f .
Change-Id: I5f9275b829665eb5e8695403d67f230e752ab0e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183180
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2021-02-05 23:53:28 +00:00
Paul Berry
d5fc9fb06f
Unit test generic annotation functionality of AstCloner.
...
The update to AstCloner was made as part of
ba5064fa31 , but it couldn't be unit
tested until now due to the lack of parser support.
Bug: https://github.com/dart-lang/sdk/issues/44838
Change-Id: If2fd5ce41a46c3460b5f90ba854f22ae1baef11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2021-02-05 22:43:08 +00:00