Commit Graph

35087 Commits

Author SHA1 Message Date
Sam Rawlins 5ece7f3a6e dev_compiler: Remove unnecessary imports
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Icad2908772eb42593c0149a99b8256d470490670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177241
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-01-05 19:57:57 +00:00
Darren Chan 1dc9c56f34 [analyzer] Fix GnWorkspaceTest for Windows.
Use convertPath to account for Windows vs non-Windows path seperators.

Change-Id: I9115c04acc986161d120fb363627fe2e302831f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
2021-01-05 17:42:09 +00:00
Daco Harkes 0d7cdcbcce [vm/ffi] Document marking struct fields as external
Add the suggestion to mark the struct fields as external to both the
CFE and analyzer error message on field initializers for Structs.

Closes: https://github.com/dart-lang/sdk/issues/44024

Change-Id: Ie7b20abe34d96d31df9616c112fbc975351ce0de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177602
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-01-05 16:24:09 +00:00
Darren Chan bb19112f22 [analyzer] Use package_config in GN workspaces.
Per http://fxr/445334, .packages files are no longer used within the
fuchsia tree. This inadvertently caused http://fxb/65752, where vscode
integration is broken.

This cl fixes this by updating _findPackagesFile to look for
`*package_config.json` files instead of `.packages` files.

Fixed: http://fxb/65752
Change-Id: I676fcecff49fd980255391555daca3ce5d5d9de9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
2021-01-05 14:43:38 +00:00
Sigurd Meldgaard 8a71e75a46 Detect pubspec presence and dependency on package:test from dart test --help
One shortcoming is that `dart help test` doesn't follow the same rules.
This is harder to address.

Bug:https://github.com/dart-lang/sdk/issues/44369
Change-Id: Idb5b86251ebbe71ecb70292ee93d26b3d71263fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175060
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-01-05 14:09:39 +00:00
Devon Carew 11b3e34e32 [pkg:analyzer] add an example of using the analysis context collection API
Change-Id: Ic00410c941861a791b549c799c113b5364ba6486
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174981
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-04 21:35:58 +00:00
Brian Wilkerson 6143fb5668 Improve some diagnostic messages
Change-Id: Ic351c2addff76dea8fe49c7e2ce68b46043f0814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-04 16:43:08 +00:00
Brian Wilkerson 95c680e640 Enhance add_null_check to cover more cases
Change-Id: I9817a300bc4600b72396fb1cd35463e6fa2f3953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-03 17:39:57 +00:00
Konstantin Shcheglov 24e0fa09ce Fix RemoveUnnecessaryParenthesesTest for Windows.
Using absolute offsets does not work well, on Windows lines endings
are `\r\n` vs. just `\n` on Mac.

R=brianwilkerson@google.com

Change-Id: Ia64e532687bcb7b197cff3ffb4514391fcc1d84e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-03 06:52:46 +00:00
Konstantin Shcheglov d407e16cff Fix for LintNames.unnecessary_parenthesis
Change-Id: Ia31ed2b35cc93a6eab030a39705597f006fc3da4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-02 19:22:36 +00:00
Konstantin Shcheglov ea775a6a0f Migrate SearchEngineImplTest to AnalysisContextCollection.
Change-Id: Ide259d4baf2a309a08ae74019ecb95d54d97f365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-02 19:21:16 +00:00
Brian Wilkerson 2318119845 Support make_variable_nullable fix when variables are initialized to null
Change-Id: I816aa5fd173816aba8c2cd0be242ca8465f2c33b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-02 16:05:36 +00:00
Sam Rawlins 3e7afdee8f analyzer_cli: Remove unnecessary imports
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I621f187a7ec654235b21a77f28258bba7ef8c179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-30 23:42:50 +00:00
Sam Rawlins 689b088e6d telemetry: Remove unnecessary imports
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I75ca15c391e0c77840e65d27b26583f15b59eea4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-30 22:38:50 +00:00
Stephen Adams 0ab7c7ec51 [dart2js] InterfaceType tweak
Avoid duplicate empty lists.

Change-Id: Ibad5f4263a5cef8f7086473d9eebc13612323ebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177040
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-30 19:52:10 +00:00
Stephen Adams 969ff148d0 [dart2js] Don't store empty variable map in KernelToLocalsMap
Reduces dart2js heap for link phase of modular compile by ~100MB.

Change-Id: I2037c2010efe055b2564394f091206069a54de5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177220
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-30 17:38:40 +00:00
Sam Rawlins fee45f9554 VM: Remove unnecessary imports
TEST=Existing tests on existing bots

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I0c8ee9afa85da3a1a39a983841e62956e76dd509
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177242
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-30 14:52:48 +00:00
Sam Rawlins 78956cb8d4 analysis_server: Remove unnecessary imports
https://github.com/dart-lang/sdk/issues/44569

Change-Id: I0b5d237f532ab99c112247e9f24392ef317575dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177222
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-30 04:39:25 +00:00
Ben Konyi 34b4c914a4 [ DDS ] Add getStreamHistory RPC and package:vm_service extensions
Adds a DDS RPC which allows for stream history to be manually requested
in addition to being sent upon initial stream subscription.

Also adds an initial implementation of
package:dds/vm_service_extensions.dart, which adds DDS functionality to
the `VmService` class.

Fixes https://github.com/dart-lang/sdk/issues/44505

Change-Id: I198a6fd7fca15f131a6fdd95e7860a6f98ef06a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177182
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-12-30 02:30:15 +00:00
Konstantin Shcheglov f71639daa1 Enable package:pedantic/analysis_options.1.9.0.yaml and fixes.
Change-Id: I44a8236cb4569c8cec03a016c4861e32b0356aa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177201
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-29 23:41:45 +00:00
Konstantin Shcheglov ebbe6abdca Migrate package:analyzer_utilities to null safety.
Note that it uses package:analyzer that is not migrated yet, but is
being migrated. But it also uses package:html that we did not have
plans to migrate yet. Anyway, this CL will move us forward.

Change-Id: I6210c6baef8c20c0803a304d7bd99acc1f8ccd37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-29 20:58:35 +00:00
Johnni Winther b4d4316de0 [cfe] Rename stub kinds
ForwardingStub -> AbstractForwardingStub
ForwardingSuperStub -> ConcreteForwardingStub
MixinStub -> AbstractMixinStub
MixinSuperStub -> ConcreteMixinStub

TEST=refactoring

Change-Id: Ice76a41ce8e1071f553ed8fd3ecbb29c97377161
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177129
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-29 16:54:55 +00:00
Johnni Winther 42f09a71ba [vm] Re-resolve stub targets on mixin deduplication
This ensures that stub targets are re-resolved when performing
mixin deduplication. In particular member signatures, whose stub
target point the member signature origin, need to be re-resolved
since the origin is serialized together with the interface target
in PropertyGet, PropertySet and MethodInvocation, and if not
re-resolved, might point to removed members.

TEST=pkg/vm/test/modular_kernel_plus_ast_test.dart

Closes #44560

Change-Id: Ib2dd923fbf736a9defe2df38bbc71d442f80b7bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177127
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-12-29 15:01:35 +00:00
Stephen Adams 9e87100f54 [dart2js] Deserialized JsScopeInfos don't get modified
This means we can replace empty Maps and Sets with constant ones.
This reduces the heap for the link phase of a modular compile by 2.8%

Change-Id: If0b78d4f76f40e8b4628fabbf5fa2b9fa07db8be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177181
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-29 12:58:15 +00:00
Johnni Winther 5ed4e5becd [cfe] Pass references instead of fields/procedures
TEST=refactoring

Change-Id: I6e2d46af9bd58673bda847ea5cf981616e1118b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176667
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-29 11:46:15 +00:00
Dmitry Stefantsov 0642e7a245 [cfe] Deem all intersection types syntactically not nullable
Closes #44362.

Bug: https://github.com/dart-lang/sdk/issues/44362
Change-Id: Id54de1848e6af1108956476e241bab5c0ed96a4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177124
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-12-29 09:58:35 +00:00
Devon Carew 13b1af4c2e [pkg/dds] refactor parts into private libraries
Change-Id: Ic104627b676119742606f7b34b025c6f0d093db0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176600
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-29 00:59:24 +00:00
Johnni Winther 60702d4158 [cfe] Make field assignability immutable
Changes fields to be either mutable or immutable by construction.
This ensure that we don't create setter references for fields that
cannot be assigned to and is a prerequisite for replacing @fields/
@fields= canonical names with @getters/@setters.

TEST=existing expectation tests and verification

Change-Id: I70b9a504ee6f221b7c334ac02620feb0d5f7ae01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176665
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-28 16:11:14 +00:00
Johnni Winther 5645bd0e06 [cfe] Don't replace dispatch target with interface target on super property set
In response to b/176332835

Change-Id: Id131ba44817aa55399ba3b44b9fe5db833847f75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177100
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-28 14:43:14 +00:00
Johnni Winther 52db62dd65 [cfe] Use MixinSuperStub
This CL adds stub for each concrete mixed in member into mixin
applications. The body of the stub calls the original member via
a super call.

This addition means that resolution of super access now use the
stub and not the original declaration as the target, which means
that it will be correct even when mixed in members are cloned. For
this reason, dart2js no longer needs to perform its own super
member resolution.

When a super call targets a mixin super stub (after cloning) it
can be optimized away by redirecting the call to the `stubTarget`
of the call. This optimization is performed in dart2js.

Since dart2js now uses the correct super target, its runtime
mixin application needs to avoid overriding members already
declared in the mixin application. These members are the
forwarding super stubs which ensure that correct runtime types
when members with covariant parameters are implemented.


Change-Id: Iab71ffcc400aa6a683987bc20b9553a263ebc8e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176526
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-25 23:32:17 +00:00
Srujan Gaddam bc43d06479 [pkg:js] Add errors for JS interop using @Native classes
Closes https://github.com/dart-lang/sdk/issues/44211

- Preprocesses and hashes Native classes defined in the sdk.
- Adds an error if you use a JS class with the same underlying name
as a Native class.
- Adds tests with different namespaces to test for the error.

Change-Id: I649e8b2346de8cc6d11205941a37152ce42104b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175423
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-12-24 00:00:46 +00:00
Konstantin Shcheglov bb8669aadf Remove 'unresolvedFile' from FileState.
Having a FileState with `null` part and URI poisons null safety migration.

Change-Id: Idd3b484591d1ca6f48eabb7f5614abfdcf6ff9bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176720
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-23 23:17:36 +00:00
Sigmund Cherem 49f80bbe4c [dart2js]: consolidate native allow list in a single place
Change-Id: If20412797233b2384bf083213aef292dde163db5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176982
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-12-23 22:52:46 +00:00
Sigmund Cherem e997621c0f [dartdevc] small cleanup tweaks to the ddb tool
Change-Id: I4691fbe24d94f7efca03c1c3c40a0a8cac20082c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176983
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-12-23 22:16:36 +00:00
Stephen Adams 65110c3448 [dart2js] Use LinkedHashMap in namer
Memory footprint of a LinkedHashMap is smaller for large maps.

Change-Id: I2230943514eeebd97a690419755d7b310471ea51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-23 20:48:11 +00:00
pq 03adde5555 quick fix for invalid null-aware ops after a short-circuit
Fixes: https://github.com/dart-lang/sdk/issues/41511

Change-Id: I4ebfb6aa896a4e8aaf1f6ed210bc86d811a81702
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-12-23 18:11:11 +00:00
Sigmund Cherem f376642572 [cfe]: include path to .dill file on version mismatch error messages
Change-Id: I8862abd55c111de2c81c5000539fb69268dcac06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176921
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-12-23 16:31:51 +00:00
pq 35f9425b6d add fix to make assigned final field late
Fixes: https://github.com/dart-lang/sdk/issues/44440

Change-Id: Iafdd448c5cae0c72e24b39e7e65a91c1810a0c6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-12-22 23:58:41 +00:00
Ben Konyi 22f82bce92 [ package:dds ] Regenerate sse_smoke_driver.dart.js
There was a syntax error in the generated code preventing the test from
completing.

Fixes https://github.com/dart-lang/sdk/issues/44474

Change-Id: Ifacfa0d9d3587ebfa52870372a35c1c2dbff4784
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176940
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-12-22 19:47:11 +00:00
Stephen Adams b9a771a66a [dart2js] Use fixed Lists in CodegenResult
0.5% heap reduction in link phase.

Change-Id: I2ed52dfc65e56375222297583d4e3bd97bd98b8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176860
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-22 18:16:11 +00:00
Danny Tuppeny 0d878d1d97 [Analyzer] Ensure semantic tokens are sorted correctly before handling overlaps
Change-Id: I10a236d7c911867c654939d25c02208fa465ea3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176524
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-22 18:15:41 +00:00
Stephen Adams 6acb187d4a [dart2js] Release codegen shard buffers
Change-Id: Iebf3a85920f141cff1595529b55b7cbac240434a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176601
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-21 19:44:49 +00:00
pq eaa0f5d19a quickfix to remove deprecated lints from options files
Change-Id: I0440450257416570feb68e71e78f1f7f4e042287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176700
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-21 19:25:59 +00:00
Danny Tuppeny 3ee3dac08e [Analyzer] Disable LSP semantic tokens
There's a race condition in semantic tokens that's causing errors that I've yet to track down or reproduce in a test (though can relatively easily reproduce manually).

Change-Id: Icf65ec52e0307ed71f10c74ded120076e4fcd90c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-18 20:29:15 +00:00
Daco Harkes b6b82dd3ac [vm/ffi] Support nested structs
This CL adds support for nested structs in FFI calls, callbacks, and
memory loads and stores through the Struct classes itself.

Nesting empty structs and nesting a structs in themselves (directly or
indirectly) is reported as error.

This feature is almost fully implemented in the CFE transformation.

Because structs depend on the sizes of their nested structs, the structs
now need to be processed in topological order.

Field access to nested structs branches at runtime on making a derived
Pointer if the backing memory of the outer struct was a Pointer or
making a TypedDataView if the backing memory of the outer struct was
a TypedData.

Assigning to a nested struct is a byte for byte copy from the source.

The only changes in the VM are contained in the native calling
convention calculation which now recursively needs to reason about
fundamental types instead of just 1 struct deep.

Because of the amount of corner cases in the calling conventions that
need to be covered, the tests are generated, rather than hand-written.

ABIs tested on CQ: x64 (Linux, MacOS, Windows), ia32 (Linux, Windows),
arm (Android softFP, Linux hardFP), arm64 Android.
ABIs tested locally through Flutter: arm64 iOS.
ABIs not tested: ia32 Android (emulator), x64 iOS (simulator), arm iOS.
TEST=runtime/bin/ffi_test/ffi_test_functions_generated.cc
TEST=runtime/bin/ffi_test/ffi_test_functions.cc
TEST=tests/{ffi,ffi_2}/function_structs_by_value_generated_test.dart
TEST=tests/{ffi,ffi_2}/function_callbacks_structs_by_value_generated_tes
TEST=tests/{ffi,ffi_2}/function_callbacks_structs_by_value_test.dart
TEST=tests/{ffi,ffi_2}/vmspecific_static_checks_test.dart

Closes https://github.com/dart-lang/sdk/issues/37271.

Contains a temporary workaround for
https://github.com/dart-lang/sdk/issues/44454.

Change-Id: I5e5d10e09e5c3fc209f5f7e997efe17bd362214d
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169221
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-18 09:34:35 +00:00
Michal Terepeta ba0a7c5df7 Disable watching for files generated by Bazel
Apparently this is causing some performance issues, so we might
want to disable this until we can benchmark and optimize it.

Bug: 44484
Change-Id: I8a661b128cbc8fdd425e4d3516a7ac132e511a99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176521
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-12-18 08:26:55 +00:00
Paul Berry 474edbe27f Flow analysis: do not treat null vars as equivalent to null.
When analyzing code like this with the
`allowLocalBooleanVarsToPromote` flag enabled, don't treat a variable
containing `null` as equivalent to a literal `null`.  For example:

    f(int? x) {
      var y = null;
      if (x != y) {
        print(x + 1); // ERROR: x must be null checked.
      }
    }

The rationale is that flow analysis doesn't promote variables that are
known to be `null` to the `Null` type, so it seems like it would be
inconsistent if we used the fact that they're `null` to promote other
variables.

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: Icfa14104936a26732353921e3a29a840c53d4d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176560
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-12-17 19:31:34 +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
Danny Tuppeny 5f28cb13f8 [Analyzer] Use "variable" LSP semantic token for field declaration/references
Change-Id: I4daef717459cc2d91c642b024f564368576f5512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-17 16:59:33 +00:00