Commit Graph

79322 Commits

Author SHA1 Message Date
Ryan Macnak e1f5039854 [test] Remove assumption that machine word size implies Smi size.
This assumption will soon become false with compressed pointers.

TEST=ci
Change-Id: Ia95ffdcd0c55d649190fcd4764dc3878ecdeb6a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184540
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-02-12 17:08:23 +00:00
Martin Kustermann 4e84c97af7 [gardening] Mark service{,_2}/valid_source_locations_test as slow
TEST=Attempt at making timing out tests pass.

Change-Id: Id972bf437eef103b5e923a0ab7fdeb4b6433c727
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184781
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-02-12 16:57:53 +00:00
Daco Harkes 34e3f571ac Reland "[vm/ffi] Disallow empty Structs"
Closes: https://github.com/dart-lang/sdk/issues/43974

TEST=tests/ffi/vmspecific_static_checks_test.dart

Change-Id: I35e6f5315826a751e5ce017a6a618c2c224c0f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180189
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-02-12 15:35:29 +00:00
Martin Kustermann 4172bea7b8 Revert "Async read as bytes"
This reverts commit a32498b929.

Reason for revert: Causes reload tests to fail:

```
% out/ReleaseX64/dart --hot-reload-rollback-test-mode --no-enable-isolate-groups tests/standalone_2/io/http_basic_test.dart

Crash when compiling null, at character offset null:
Unsupported operation: DillMemberBuilder.buildMembers
#0      DillMemberBuilder.buildMembers (package:front_end/src/fasta/dill/dill_member_builder.dart:75:5)
#1      SourceClassBuilder.build.buildBuilders (package:front_end/src/fasta/source/source_class_builder.dart:154:25)
#2      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:397:8)
#3      ConstructorScope.forEach (package:front_end/src/fasta/scope.dart:585:11)
#4      SourceClassBuilder.build (package:front_end/src/fasta/source/source_class_builder.dart:183:18)
#5      SourceLibraryBuilder.buildBuilder (package:front_end/src/fasta/source/source_library_builder.dart:2561:31)
#6      SourceLibraryBuilder.build (package:front_end/src/fasta/source/source_library_builder.dart:955:7)
#7      SourceLoader.buildComponent (package:front_end/src/fasta/source/source_loader.dart:957:40)
#8      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:353:14)
<asynchronous suspension>
#9      withCrashReporting (package:front_end/src/fasta/crash.dart:122:12)
<asynchronous suspension>
#10     IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:298:37)
<asynchronous suspension>
#11     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:69:29)
<asynchronous suspension>
#12     IncrementalCompilerWrapper.compileInternal (file:///.../sdk/pkg/vm/bin/kernel_service.dart:337:23)
<asynchronous suspension>
#13     Compiler.compile.<anonymous closure> (file:///.../sdk/pkg/vm/bin/kernel_service.dart:212:45)
<asynchronous suspension>
#14     _processLoadRequest (file:///.../sdk/pkg/vm/bin/kernel_service.dart:872:37)
<asynchronous suspension>
```

Original change's description:
> Async read as bytes
>
> Change-Id: I9b893dc992c95e6aa59368b9c7613ba7008d6fcd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184523
> Reviewed-by: Anna Gringauze <annagrin@google.com>
> Commit-Queue: Anna Gringauze <annagrin@google.com>
> Auto-Submit: Gary Roumanis <grouma@google.com>

TBR=sigmund@google.com,grouma@google.com,annagrin@google.com

Change-Id: Icc199316537ac303ad6f3a8ac7161aa4da67ad40
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184780
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-12 15:29:39 +00:00
Johnni Winther af0c951d9f [kernel] Partial migration of package:kernel wave 1 (part 3)
Change-Id: Ib4dcc0bc32cba392352adbc3f73861353333e37c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-02-12 13:52:20 +00:00
Johnni Winther 6c1e985e76 [kernel] Partial migration of package:kernel wave 1 (part 2)
Change-Id: Ib1093ab9414a80f97f51d54589653f62ec34e30a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184267
Reviewed-by: Jens Johansen <jensj@google.com>
2021-02-12 13:52:20 +00:00
Lasse R.H. Nielsen 0b70cec33d Update dart:async library documentation.
It's a little too pompous about being essential.
(Also, never call `listen` if you don't want the subscription).

Change-Id: I15b3193abaafa31223f889d864d32a225b3b43ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183681
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-12 13:48:13 +00:00
Martin Kustermann 461fb4ec8e [vm/concurrency] Remove redundant fields in Isolate
The object store related fields in [Isolate] are not needed anymore:

  Isolate::object_store_
  Isolate::cached_object_store_
  Isolate::object_store_shared_ptr_

and can be directly accessed from [IsolateGroup].

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Refactoring of existing implementation.

Change-Id: Ia01da92cbb4e7cf5862c8419e27578ea07d4bdf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184268
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-12 13:14:37 +00:00
mnordine d9361f7112 Close tick around command
Closes https://github.com/dart-lang/sdk/pull/44932
https://github.com/dart-lang/sdk/pull/44932

GitOrigin-RevId: b960d88094381918dc8d0dc1df42975caeeac425
Change-Id: I25327aaa9e72d477ee819ea58e5199eee11621b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184105
Reviewed-by: Michael Thomsen <mit@google.com>
2021-02-12 12:59:46 +00:00
Daco Harkes 65fab2397b [vm/ffi] Remove deprecated Struct.addressOf getter
This got deprecated in Dart 2.12 stable. Removing for the next release.

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

Change-Id: Ifdbcf76178be6fca8603d478d629b6b6655b7123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184463
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-12 09:16:02 +00:00
Clement Skau 0914f10a8e [TestRunner] Recognise TCP/IP ADB devices.
This makes the TestRunner's ADB class able to recognise TCP/IP ADB
devices, e.g. "localhost:1234  device".

TEST=Tested 'tools/test.py -n dartk-android-release-arm ..' with
remote device.

Change-Id: I1ee8d27736e30c61cf057e0bc34a75667a0f9bb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184465
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-02-12 08:52:40 +00:00
Martin Kustermann b80ab44a53 [vm/concurrency] Move class registration from Isolate to IsolateGroup
We share the program across all isolates within a group. So hot-reload
should not depend on a particular isolate. This CL moves class
registration (which hot reload triggers) from Isolate to IsolateGroup.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Refactoring of existing implementation.

Change-Id: Ibdb4e67a095c7f2f3e3c1a8f8194bd0ca936b140
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184266
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-12 07:53:46 +00:00
Ben Konyi fa8ea6dfaa [ package:vm_service ] Update tests to be compatible with pub run test
Will allow for tests to be enabled in google3 as pub or portions of pub
are used to run VM tests.

Previously the test harness was configured to look for a URI with a data: scheme to determine if it was being run via pub run test (pub generates its own harness and spawns the test from that). We were parsing the test URI out of this data URI, which wouldn't work correctly in google3.

This change assumes that if Platform.script.scheme == 'data', the test is being run via pub from the root directory of the package. In that case, we can assume there is a 'test' directory and simply use 'test/$scriptName'as the path for the testee process.

TEST=N/A

Change-Id: I589605ebc7001adc9d8595ca8347c0af329b9c28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184541
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-02-12 07:12:54 +00:00
Martin Kustermann c95714d069 [vm/concurrency] Add NoActiveIsolateScope to precompiler & bg compiler
With --enable-isolate-groups we will start sharing JITed code. The JITed
code - which will be executed by all isolates - should therefore not
depend on a particular isolate's state, flags or any other
isolate-specific information.

To avoid accidental bugs where the compiler starts using
isolate-specific information, we ensure the compiler runs without a
current isolate.

This CL doesn't add NoActiveIsolateScope because on unoptimized compiles
of natives, the compiler calls out to embedder for eager native
resolution of native functions. This API forces embedder to callback
into VM atm.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Adds more checking.

Change-Id: I6c86674c010b74c15855652415706dbaa8749d33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183692
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-12 05:59:05 +00:00
Martin Kustermann 8e887672f4 [vm/concurrency] First changes for hot-reloading with isolate gropus.
This CL moves the [ProgramReloadContext] from [Isolate] to
[IsolateGroup] - since the program is shared across isolates. Amongst
other things, it also deoptimizes stacks of all isolate mutators.

There is still future work to do for hot-reloading multiple isolates
within a group, this is only the first change.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Refactoring of existing implementation.

Change-Id: Ic394de265e3922f84657de2da25a46179b624647
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183693
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-12 05:48:15 +00:00
Martin Kustermann 02f65fa501 [vm/concurrency] Make clustered snapshot serializer independent of current isolate
Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Mainly refactoring, stress tests for --enable-isolate-groups with JIT will come in the future.

Change-Id: Iebb2fb8bd144cb9abd21916856a04f49f85541c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183680
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-02-12 04:32:48 +00:00
Martin Kustermann 92af830255 [vm/concurrency] Move background compiler related state from Isolate to IsolateGroup
As part of making the compiler independent of `Isolate` we have to move
various state from `Isolate` to `IsolateGroup`. This CL moves background
compiler and related state.

One background compiler will be shared for all isolates within a group.

Issue https://github.com/dart-lang/sdk/issues/36097
Fixes https://github.com/dart-lang/sdk/issues/44938

TEST=Mainly refactoring, stress tests for --enable-isolate-groups with JIT will come in the future.

Change-Id: I66e863651d0b37c431ce1864e505b5413850cbde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183401
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-12 03:40:14 +00:00
Leaf Petersen e585bd5655 Add gclient sync to package_config.json presubmit message
Change-Id: I1f53911efc0e809e23bdee4cd522aff9b76c8c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184640
Auto-Submit: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2021-02-12 01:44:47 +00:00
Gary Roumanis a32498b929 Async read as bytes
Change-Id: I9b893dc992c95e6aa59368b9c7613ba7008d6fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184523
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Auto-Submit: Gary Roumanis <grouma@google.com>
2021-02-12 01:28:05 +00:00
Sam Rawlins 726e6c65a9 Add non-function typedef tests to for_in_* diagnostics
This also standardizes on using otherwise unused elements in an expression
statement so as to avoid UNUSED_ELEMENT results.

Bug: https://github.com/dart-lang/sdk/issues/44078
Change-Id: I660530509c6224f1aca01d3317483583ea9c581a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-12 00:34:39 +00:00
Konstantin Shcheglov 27e707268f Always crawl up in getOptionsFile()
Change-Id: I424cd625f05d9bc10ae0366e0332e96496633062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 23:24:11 +00:00
Konstantin Shcheglov 8a80001cb9 Fix null checks in generated summary format.
Change-Id: Ie8c0f19c1604a92c07b8be98301d5ee8f89a2ed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 22:21:57 +00:00
Konstantin Shcheglov 6944a2c1ec Use extensions in FfiVerifier.
Change-Id: Ib9fe8c4c327508e29aaa330054359b75157bb805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 20:43:37 +00:00
Alexander Markov d3073c24bc [gardening] Mark vm/dart_2/causal_stacks/async_throws_stack_lazy_non_symbolic_test as slow
These tests are slow and have flaky timeouts on dartkp-*-simarm and
dartkp-*-simarm64 bots. On dartkp-linux-release-simarm64 this test
recently becomes non-flaky timeout. Trying to increase the time
allocated to run those tests.

Change-Id: I1252b19fa7dbf7e592043a76c1402a2454793b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184501
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-02-11 18:45:54 +00:00
Ben Konyi 7ce8e3ba2e [ DartDev / CLI ] Fixed issue where analytics flags were not being forwarded to the CLI
Forwarding logic seems to have been accidentally removed in
f3fe9dc3b3.

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

TEST=pkg/dartdev/test/analytics_test.dart

Fixed: 44968
Change-Id: Ib3c107233276ca6592247e23268f9af7ede52285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184502
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-02-11 18:45:06 +00:00
pq fbf07bc7b7 migrate towards a shared nonLintProducerMap
Introduces a new map datastructure and migrate BulkFixProcessor to use it.

Change-Id: I6294cce875ac5e5052b363282454af6dadf011f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-02-11 18:37:30 +00:00
Danny Tuppeny 235292605e [analyzer] Filter code actions returned from LSP server based on params.context.only
Fixes https://github.com/Dart-Code/Dart-Code/issues/2854.

Change-Id: If6036a4361b68ae2daa66b99755dfa9b9a8adcfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-11 18:16:20 +00:00
Daco Harkes 0bada8c212 [cfe/ffi] Refactor dart:ffi transformations
Introduces the `NativeTypeCfe` type hierarchy for cleaner calculation
of sizes and offsets of native types and cleaner code generation.

The transformation ensures we're only visiting the structs in
topological order, which means the struct type can always look up its
(indirectly) nested structs in the `structCache`.

This simplifies adding inline arrays
(https://dart-review.googlesource.com/c/sdk/+/183640), packed structs,
and unions to this transformation.

`typedDataBaseOffset` is moved to the `FfiTransformer` because the
dependent CL uses it in the `FfiUseSiteTransformer`.

Bug: https://github.com/dart-lang/sdk/issues/35763
Bug: https://github.com/dart-lang/sdk/issues/38158
Bug: https://github.com/dart-lang/sdk/issues/38491

TEST=tests/ffi(_2)/(.*)by_value(.*)_test.dart

Change-Id: I345e02c48844ca795f9137a5addd5ba89992e1c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184421
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-11 18:09:05 +00:00
Daco Harkes fca959e5f6 [vm/ffi] Add class to vm:ffi:struct-fields pragma
This CL changes `@pragma('vm:ffi:struct-fields', [...])` to
`@pragma('vm:ffi:struct-fields', _FfiStructLayout([...]))` which makes
it easier to add more data in subsequent CLs.

Extends `FindPragma` to allow returning multiple matched pragma's, so
that we can filter them. (In this case to avoid matching user-defined
pragma's that do not have an instance of the private class.)

Separated out from https://dart-review.googlesource.com/c/sdk/+/183640
because of the extra constant in existing expectation files.

Bug: https://github.com/dart-lang/sdk/issues/35763
Bug: https://github.com/dart-lang/sdk/issues/38158

TEST=tests/ffi(_2)/*_by_value_*_test.dart

Change-Id: Idef9f82e9b53c2a32dffabcec19669eae550fe2f
Cq-Include-Trybots: luci.dart.try:front-end-nnbd-mac-release-x64-try,front-end-linux-release-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184181
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-02-11 18:09:05 +00:00
Konstantin Shcheglov c749c0e3a9 ConstructorDeclaration always has a body, at least EmptyFunctionBody.
Change-Id: I5cbc5317256d02cd1422233107ce469e8d8935f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184341
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 18:08:15 +00:00
Alexander Aprelev 26c0de0acf [vm/deferred] Keep deferred library prefix status on isolate.
This is to ensure that deferred library status is per isolate, rather than per isolate-group.

TEST=deferred_isolate_test.dart

Issue dartbug.com/36097

Change-Id: I1fb8b8f1830aac688a078fe0a82b06c7daa856fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184040
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-02-11 18:00:59 +00:00
Konstantin Shcheglov 3d8d4b4c2b FunctionExpression always has a body, at least EmptyFunctionBody.
Change-Id: I0d09df2571436f30a7706e657a98056a021e25e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 18:00:11 +00:00
Konstantin Shcheglov 244964d893 Refactor ContextBuilder.createPackageMap() and createWorkspace() into static methods.
There are places when we need to call createWorkspace(), but we don't
have enough data to create full ContextBuilder, because we don't
know SdkManager.

Change-Id: I12ec5701ecab897bf1c49c478e8487c7ca348a29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:52:53 +00:00
Konstantin Shcheglov bb696cb6c2 Fix null checks in ConstantVerifier.
Here we apply two techniques:
1. Group pieces of data that always available together;
2. Pass implied data explicitly.

Change-Id: I7d78e9783e9a47bb56ec4e2c8782e6e643b9f5eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:52:08 +00:00
Konstantin Shcheglov 0fb52e9f78 Fix some null checks.
Change-Id: Idd3d88d1f7dd6e2250088498734396b98f8c5375
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:44:49 +00:00
Konstantin Shcheglov 90e54dee18 InstrumentationLogger in InstrumentationLogAdapter is not null.
Change-Id: Ie4ab159002c74796429e5176cd09abdcd1a90ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184382
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:44:05 +00:00
Konstantin Shcheglov 1d5555e67a Remove support for variants in summary format.
We don't use it anymore.

Change-Id: I3c1eaa7bb19629275a2839fd53607d5388178a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:36:46 +00:00
Konstantin Shcheglov 0ffaacc8a6 Fix null checks in dependency tracking.
Mostly replacing fields that we implicitly expect to be filled by the
time when the consumer method is invoked, with explicit parameters.
So, we let the type system to prove that they are not null.

Change-Id: I13e2d943f124886bdb37971ec20cbc0893b0ea78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184384
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:36:01 +00:00
Konstantin Shcheglov c323f218a7 Fix a few null checks in CodeChecker.
Change-Id: I585ce017319e2b47f76a29180a669806853dbbf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184385
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:28:41 +00:00
Konstantin Shcheglov be1c75dcae Fix null checks in DeadCodeVerifier.
Change-Id: I23afbb131d8cbe16ed49ed7ce90dd0a2ca5fbae7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184400
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-11 17:27:57 +00:00
Ryan Macnak 34ce22dcc1 [vm] Remove "ctx" register name from ARM and ARM64.
We no longer have a fixed CTX register.

TEST=ci
Change-Id: Ie15a66077f69444e834bf14576dd7422512c1552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184207
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2021-02-11 16:33:43 +00:00
Daco Harkes 096612ff46 [vm] Fix BitmapBuilder backing store growth
If the length was set longer than the backing store, on a call to
`Set(index, false)`, and subsequently a call `Set(index-1, true)` was
done, it would try to write outside the backing store.

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

TEST=runtime/vm/bitmap_test.cc
TEST=tests/ffi_2/function_structs_by_value_generated_test.dart/0

Change-Id: Ib636e90b0f6acace9ec8b71557370c281e9e4a99
Cq-Include-Trybots: luci.dart.try:app-kernel-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184423
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-02-11 16:14:13 +00:00
Danny Tuppeny ab8335b4fd [analyzer] Don't fail to initialize LSP server with non-file:// workspace folders/roots
Change-Id: I52fa0620ef563ff0362cb86b24ffc287e8e007c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-11 16:10:19 +00:00
Daco Harkes f358afca9e [vm/ffi] Migrate package:ffi Utf8 and Utf16 uses
Change-Id: I41d79969881015266273a3ce566ee402df11791d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184481
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-11 13:13:32 +00:00
Daco Harkes 9068fa59a0 [vm/ffi] Roll package:ffi to 0.3.1-nullsafety.0
Change-Id: I39efd96c98f40d0416cd738985da6f7210bfaaea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184480
Reviewed-by: Clement Skau <cskau@google.com>
2021-02-11 13:13:32 +00:00
Michal Terepeta f0a4b8a6d7 Revert "[VM/runtime] Avoid comparing unfinalized type parameters."
This reverts commit 18f0599224.

Reason for revert: Breaks internal tests: http://b/179942377

Original change's description:
> [VM/runtime] Avoid comparing unfinalized type parameters.
>
> This is done by simplifying the code looking for a type argument vector overlap between class and super class.
>
> TEST=all existing ones
>
> Change-Id: I96b11deb3450de380280c693d05e9b70a01e3383
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184202
> Commit-Queue: Régis Crelier <regis@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

TBR=alexmarkov@google.com,asiva@google.com,regis@google.com

Change-Id: I2fbebbb9f429a9ee389ab891cb3775c6d88eca9f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184424
Reviewed-by: Michal Terepeta <michalt@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-02-11 12:35:46 +00:00
Sam Rawlins 931203b702 Analyzer: Migrate undefined_operator_test test cases to null safety.
Behavior has changed sufficiently for some of these test cases that I split the
test class into two:

* Any tests which concerned null were moved strictly to the pre-null-safety
  class; different diagnostics are reported under null safety.
* Any tests which concerned type promotion and compound assignment were
  duplicated; promotion changed enough that both cases can be tested.

Change-Id: I069e03b2f97539b0824954b00a5c0484265dd0ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184106
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-11 00:27:06 +00:00
Sam Rawlins 1f870bd3cd analyzer: Deduplicate two WithNonFunctionTypedefTest classes
Since non-function typedefs are enabled by default with
PubPackageResolutionTest, these test classes are currently
unnecessarily split.

Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I0ab32931371fb917df11e45250c84528af9b9e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184206
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-11 00:25:51 +00:00
Regis Crelier 18f0599224 [VM/runtime] Avoid comparing unfinalized type parameters.
This is done by simplifying the code looking for a type argument vector overlap between class and super class.

TEST=all existing ones

Change-Id: I96b11deb3450de380280c693d05e9b70a01e3383
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184202
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-02-10 23:12:16 +00:00
Brian Wilkerson 1ee6459ded Fix a bug in addParameter handling
Change-Id: Id321108ce4fbd096ba79212f530486ec2318fba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184205
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-10 22:49:33 +00:00