Commit Graph

82532 Commits

Author SHA1 Message Date
Brian Quinlan 5e990591b9 Fix a bug where windows would not currently follow symlinks in stat() calls.
Also clarify documentation.

TEST=Updated tests to cover stats() calls on symlinks.
Bug: https://github.com/dart-lang/sdk/issues/20389
Change-Id: I8555bacc2f83cad024ad8ef7c2f23aa97069ed2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218671
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2021-11-01 16:33:01 +00:00
Paul Berry 65d157b5bb Fix type of receiverTypeObject in AssignmentVerifier.verify.
It was not necessary for this argument to support both `String` and
`DartType`; we can ensure that we always pass in a `DartType` by
calling `ClassElement.thisType`.

Change-Id: I94ac2fed7495b8267edea003d1fd088649c2d4a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-11-01 15:32:50 +00:00
Sam Rawlins 930697a158 Improve messaging of invalid yield type
Fixes https://github.com/dart-lang/sdk/issues/47379

We use a separate message for yield expressions, so that the yielded
type can be used. In checking against the yielded type, we also stop
reporting in some cases, which removes duplicate errors.

Change-Id: I2ce036086ca06d5ff32531afd4b1812f17b908ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218745
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-11-01 15:28:51 +00:00
Sam Rawlins 243fb5c383 analyzer: Support non-proper rename type alias constructor tear-offs
An alternative to https://dart-review.googlesource.com/c/sdk/+/218582

In the case of a constructor tear-off through a non-proper rename type
alias, we store the type alias on the FunctionState in constant
evaluation.

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

Change-Id: I3bcbc11fceafc3a688eb956cf0459ad1dbde6307
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218746
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-01 04:29:01 +00:00
Konstantin Shcheglov 2f66c077c9 Extract CompletionSuggestion.copyWith() into an extension.
Change-Id: I7cc391f91f74b5f9d37435a78d04c773f3672fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218744
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-31 22:02:20 +00:00
Konstantin Shcheglov 0d74a3e436 A few renames of TypeName to NamedType.
Change-Id: Ie0eae6906457a28665855eb16371ad2230d1104a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218743
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-31 21:51:00 +00:00
Konstantin Shcheglov 56bb1d56e1 Rename AstTestFactory methods that return NamedType.
Change-Id: I2546ca0352b4149509d80ad6dde97b2eb686491b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218741
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-31 19:33:00 +00:00
Konstantin Shcheglov a4ebee9438 Use NamedType in ResolvedAstPrinter.
Change-Id: I8241a175a851cc1fe97a0daebd065f2a1ec75656
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218740
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-31 19:32:40 +00:00
Konstantin Shcheglov 3f6815a9e6 Stop using getResolvedLibrary2 in dartfuzz.
Change-Id: I1023be7cc595398748a4862f3dc181b32466275a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218584
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-30 01:22:31 +00:00
Brian Wilkerson cd59d39fe3 Remove some unused code from the fix support
Change-Id: Ia5f04d51e92d0dea0f1b44878a3f268f1f629f96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218670
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-29 21:02:39 +00:00
Konstantin Shcheglov 0908835478 Tests for extension members completion, support not yet imported.
Change-Id: Idd0d2ad814f2365fa724b246f8d84e56e7dedd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218669
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-29 20:54:09 +00:00
Mayank Patke 639cfd857f [dart2js] Provide unit tests with the sound null safety fileset.
Change-Id: Ife2f60025c635d7fc335cbb1533a0dcf50ced8ab
Fixes: https://github.com/dart-lang/sdk/issues/47558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218668
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-10-29 20:29:40 +00:00
Konstantin Shcheglov 19661d7f72 Fix errors in mock SDK.
Change-Id: I27263ddbad45881d92a98ec237851dbed37cc4da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218666
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-29 20:17:50 +00:00
Konstantin Shcheglov 4f495fa6bd Use CompletionTarget.dotTarget in TypeMemberContributor.
Change-Id: Ie39d6030f1b52f42c5ae579b43ef65f88ef71914
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218667
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-29 20:17:30 +00:00
Konstantin Shcheglov f706631f63 Move dotTarget to CompletionTarget.
Change-Id: Idaf40cdedcb90fd68f00fd3ab994ac53c7fe1ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218665
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-29 18:34:15 +00:00
Brian Quinlan d1d2adb5dc Fix a bug where setAccessTime would also set the modified time on Windows.
TEST=issue_35112_test.dart
Bug: https://github.com/dart-lang/sdk/issues/35112
Change-Id: I4c7a1795250447888ec1cbde71bf2799c3467b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218182
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-10-29 18:19:49 +00:00
Konstantin Shcheglov c1b3d96e97 Enable named_arguments_anywhere in analyzer unit tests.
Change-Id: Ie83d07dd3c2fe16459abcd2b534440078c66a4b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-29 18:16:09 +00:00
pq aad6da844e respect awaited used results
Fixes: https://github.com/dart-lang/sdk/issues/47569

Change-Id: If5391899603ad6ee4295d1d3a8fabba9a26a958f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-10-29 18:09:23 +00:00
Kevin Moore 74dea5d1bd _http: Fix final doc comment issues
Change-Id: Ie1ed719aca9b1f18240b811271ac952818d04c89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218664
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-10-29 18:02:10 +00:00
Kevin Moore 5811541df6 tools/verify_docs: refactor error cleanup, add _http special-cases
Change-Id: I06e91d1bac5f5a512a3a74f0e2665c1989ecf36f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218663
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-10-29 18:01:20 +00:00
Konstantin Shcheglov 9e5d26a31a Fix cast to Expression when completion in a comment token.
By some reason we started getting many of these recently,
showing in crash log.

Change-Id: I6373e8d4b56a32c7d66cc835f1ff6aefb4cd186c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-29 17:33:19 +00:00
Alexander Markov 6c9a830fda [vm/compiler] Ensure that write barriers are not eliminated across LoadField which can call initializer directly
Write barriers should not be eliminated for a StoreInstanceField
if there is a Dart call between store and object allocation.
This is implemented using Instruction::CanCallDart()
predicate, which is overridden for TemplateDartCall.

However, LoadField instructions for late fields with initializers can
also call initializer function directly without entering runtime.

This change introduces LoadFieldInstr::CanCallDart() to avoid
incorrect write barrier elimination across such LoadField instructions.

TEST=vm/cc/IRTest_WriteBarrierElimination_LoadLateField

Bug: b/204355807
Change-Id: Ibd9fe61e9723f1f4ecc9e4f5cedc3024d9d03c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218583
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-10-29 16:48:13 +00:00
Sam Rawlins 8f756bf96b Add CommentReferableExpression, for expressions which can be used in a CommentReference
* Replace `identifier` field with `expression`, which means deprecating
  `identifier`, redirecting users to `expression`. For now, `expression`
  always returns an Identifier. In a future breaking release, it will
  return other CommentReferableExpressions.
* SimpleIdentifier, PrefixedIdentifier, PropertyAccess,
  ConstructorReference, FunctionReference, and TypeLiteral are all
  CommentReferableExpressions, but support is not implemented yet to
  parse CommentReferences with those contained expressions.

Bug: https://github.com/dart-lang/sdk/issues/47444
Change-Id: I1905afecf3878cd7dca6e275ef0a2ab80500eb4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216320
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2021-10-29 16:38:09 +00:00
Sigurd Meldgaard 3c5e2a0d7b Bump pub to 0035a40f25d027130c0314571da53ffafc6d973b
Changes:
```
> git log --format="%C(auto) %h %s" 78bc50c..0035a40
 https://dart.googlesource.com/pub.git/+/0035a40f Fix echo mode crash on `token add` (#3194)
 https://dart.googlesource.com/pub.git/+/a75a8c17 Don't warn against discontinued transitive dependencies (#3195)
 https://dart.googlesource.com/pub.git/+/cf2ed105 Fix analytics code (#3197)
 https://dart.googlesource.com/pub.git/+/08e13f7b Remove unused golden files (#3189)
 https://dart.googlesource.com/pub.git/+/b6293b80 Fix log message related to `pub global activate`  (#3187)
 https://dart.googlesource.com/pub.git/+/94f6b477 Introducing command-line interface tests (#3161)
 https://dart.googlesource.com/pub.git/+/3ba8134f More details from getExecutableForCommand (#3186)
 https://dart.googlesource.com/pub.git/+/a2dbcfff Shorthand syntax for hosted dependencies (#3133)
 https://dart.googlesource.com/pub.git/+/435e4e3f Shuffle analytics (#3185)

```

Diff: https://dart.googlesource.com/pub.git/+/78bc50c7833451c24e531713362e46fd50621ff0~..0035a40f25d027130c0314571da53ffafc6d973b/
Change-Id: Idfd7c382985d1ad3e3ad87a621dc79d3b74e898e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218620
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-10-29 13:05:39 +00:00
Vyacheslav Egorov eaf7674f6d [vm] Fix TypedClosureCall test in PRODUCT
We don't emit RecordCoverage instruction in PRODUCT mode.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-product-x64-try
Change-Id: I794b4c08362fa7b84417923d80fbd246d5bb36be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218642
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-10-29 11:38:41 +00:00
Vyacheslav Egorov feadec2dc6 [vm] Unskip coverage_closure_call_test in JIT
This test should only be skipped in AOT mode just like other
similar tests.

Create observatory_2 version of the test.

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

TEST=ci

Fixed: 47568
Change-Id: I64285d2347fe4c6cd76062a7a8d401f088082db7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218641
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-10-29 10:53:29 +00:00
Sam Rawlins 6d276f9fd6 analyzer: Fix instantiated type parameter in function reference error
This fixes language/const/instantiated_function_constant_test

Change-Id: I06f42480f8a55de1c6d75b2b5845bcefb769fa78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218540
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-29 05:12:02 +00:00
Ben Konyi a9752ad140 [ Gardening ] Skip coverage_closure_call_test
Causing various timeouts and infra failures.

Related issue: https://github.com/dart-lang/sdk/issues/47568

TEST=N/A

Change-Id: Ifbe6760faf3029a021aee557f676b08c1779c577
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218560
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-10-28 21:00:27 +00:00
Konstantin Shcheglov 132f16b3b0 Implement completion.getSuggestionDetails2
Change-Id: Ic4b39c723d0cf90936a1db3ad3716533e6e8ca79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 20:55:48 +00:00
Konstantin Shcheglov 61e60eefd2 Abort not-yet-imported suggestions on a new completion request.
Change-Id: Id08b7ca328253ea5190038d2204cbfb2015aac01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 20:23:31 +00:00
Johnni Winther 44e35b1daa [cfe] Check for misplaced type arguments on implicit creation expression
Change-Id: Ic3436f2bce0369d0efad9946cbbdae7c6bf334b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-10-28 19:21:39 +00:00
Ryan Macnak 12bf51a466 [vm, gc] Include starting concurrent marking in --verbose_gc output.
Measure sizes in MB instead of kB.

TEST=--verbose_gc
Change-Id: I5d2b45a31d2eb91665c175d8abf016329ce0f07d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217740
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-10-28 18:20:18 +00:00
Konstantin Shcheglov ec1118ead7 Use CompletionBudget.defaultDuration
Change-Id: Ic4da5ac8b5d8dc9911feecdfa4a8ab4e2e4da778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218524
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 18:17:48 +00:00
Ryan Macnak 5f288f4940 [vm] Background compile one function per task.
Instead of the background compiler task waiting forever for functions to show up in its queue, it performs a single compilation and schedules a new task if the queue is not empty.

This means an inactive isolate no longer consumes a thread. It also creates interrupt points and better fits with an embedder-provided task runner abstraction.

TEST=ci
Change-Id: I13960c776590b884fdee278d2f292bb0fa725fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214242
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-10-28 17:53:08 +00:00
Konstantin Shcheglov 294aaab9c1 Use time budget in NotImportedContributor.
Change-Id: Ief0ef8185accd68c7b99132393fa0a4db6be31c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 17:37:18 +00:00
Konstantin Shcheglov e153f412cb Revert RemoveArgumentBulkTest changes.
Initial: https://dart-review.googlesource.com/c/sdk/+/217287

These changes require https://dart-review.googlesource.com/c/sdk/+/217280
which was reverted.

Change-Id: Ibd8b317f117f2d7e4bda694759d7cd10f537e9b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 17:29:48 +00:00
Konstantin Shcheglov 35d8514d01 Make --flutter-repository a required option for Flutter based benchmarks.
We can change FlutterAnalyzeBenchmark because it is not actually
run now, the benchmarking framework calls `flutter analyze` directly.
This class is just FYI.

Flutter completion benchmarks are not used yet, so we can change
them as well.

Change-Id: I1426df572b6c37160076785f9a5a4b742ce36221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 17:26:28 +00:00
Konstantin Shcheglov 2cdaf7cf52 Fix completion tests on Windows.
Change-Id: Ie0dd2e1a2457fa64254c6fadb5308001eaf357dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 17:18:38 +00:00
Ben Konyi 7d3d835bc9 Reland "[ VM / Service ] Add lookupResolvedPackageUri and lookupPackageUri RPCs"
This reverts commit 711fdcc0de.

TEST=uri_mappings_lookup_test.dart

Change-Id: I0a548ef0b5f1f0f6bc23ec72e0fe7dafc244c5d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218520
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-10-28 17:16:49 +00:00
Devon Carew b27c191c2a Add the dart: api doc code sample validation to the CI.
Change-Id: Ib2a97728d35d15e6cda247444a00ca813d88b9d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218325
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-10-28 15:48:38 +00:00
Kevin Moore 632f3428f3 Update dependencies in unpublished packages
TEST=No SDK affect. Just helping our outdated package tracking

Change-Id: I0d392694e9eb926f60667508b55094ffa208db18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218381
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-10-28 15:46:08 +00:00
Konstantin Shcheglov 5135547aad Use Duration for waitForResponses() from plugins.
Change-Id: I5cf1203559f601c0f5458e278a89b1fd83750ee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 15:24:12 +00:00
Konstantin Shcheglov 9243b20dcf Remove TODO for replacementOffset/Length, use them.
Change-Id: I44c6e3f30ad29e3de7ab9a66ae2d18310a6315c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218328
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 15:20:28 +00:00
Danny Tuppeny 810dbd7fb2 [analysis_server] Fix dynamic registrations not occurring when onlyAnalyzeProjectsWithOpenFiles=true
Fixes https://github.com/Dart-Code/Dart-Code/issues/3638.

Change-Id: I2749210a209fb0321f4833cf39c4d5fea55b579b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-28 15:16:08 +00:00
Chloe Stefantsova d62a1e859d Add language tests for "named-arguments-anywhere" experiment
Part of https://github.com/dart-lang/sdk/issues/47451.

Change-Id: I0c865a6a37c6e31e57df037f65c298c449f297bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217013
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-10-28 13:01:38 +00:00
Chloe Stefantsova ed0131bc7c [cfe] Change the order of hoisted initializers insertions
Change-Id: I61db6b57fffc11d62267b8648b4741a74d0a9f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-10-28 12:35:28 +00:00
Vyacheslav Egorov 8896894315 [vm] Record coverage for closure calls
Previously coverage was computed from the state of ICData at various
call-sites in the function. This ties coverage collection with the
implementation of various operations. This CL is the first step towards
decoupling coverage collection from how individual operations are implemented.

We introduce a separate coverage array storing token_pos -> coverage hit
mapping. This array is updated by a separate RecordCoverage IL instruction.

Fixes https://github.com/dart-lang/sdk/issues/47174
Fixes https://github.com/dart-lang/sdk/issues/47530
Fixes https://github.com/dart-lang/sdk/issues/37944

TEST=runtime/observatory/tests/service/coverage_closure_call_test.dart

Change-Id: I986d3462412870372ca6a9d72c050f0563b9b725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218262
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-10-28 11:02:48 +00:00
Michael Thomsen ae7c027f66 Add library doc comment to dart:cli
Needed to fix broken build:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8832225116390642513/+/u/build_api_docs/stdout

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try
Change-Id: I9d1b5a94781de4a4380aebf5ccbabbb0d31a75d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218420
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-10-28 10:23:50 +00:00
Chloe Stefantsova 7fb17818f7 [cfe] Handle argument hoisting in redirecting initializers
Part of https://github.com/dart-lang/sdk/issues/47451.

Change-Id: Ic3564833cf87d5ccfb8b43f589c241104ce6df61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217602
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-10-28 08:41:00 +00:00
Daco Harkes cb29cd3af9 [test/ffi] rename ffinative_test to ffi_test
It runs tests from the pkg/vm/testcases/transformations/ffi, where I'd
like to add ffi, but non-ffinative tests.

TEST=renames a test

Change-Id: I2c4128fd5ded154ab483b05d9002afdbb3dc33a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217642
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-10-28 06:53:39 +00:00