Commit graph

87848 commits

Author SHA1 Message Date
Johnni Winther
8995807b2b [cfe] Create various matcher in the body builder
This add the Expression-, Binary-, Cast-, NullAssert-, NullCheck-, List-
and RelationalMatcher and creates these during body building. The
IfCaseStatement is added to support propagation of these to the
inference visitor.

Change-Id: Ia9add15e504cb06af711efc1697a00b8e235e1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263128
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-10-21 14:01:02 +00:00
Sam Rawlins
e7c590b137 Make some bool fields in nullability_node non-nullable
Change-Id: If50538f4e4c189d45af0a2c22e7a6a19a29c7f68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265080
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2022-10-21 13:23:57 +00:00
Sergey G. Grekhov
e20d10ea38 [co19] Roll co19_2 to 6dc80bd1ff15d0854eaba0c7e5d606ec0ad6b3db
2022-10-20 sgrekhov22@gmail.com dart-lang/co19#1509. Platform.executableArguments added to the tests that run process (dart-lang/co19#1510)
2022-10-11 sgrekhov22@gmail.com dart-lang/co19#1430. For HashSet don't run tests that checks iteration order (dart-lang/co19#1475)

Change-Id: Ia9e2d215a742cf2d8aef5f936ad30decf961528b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265082
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-10-21 11:29:42 +00:00
Konstantin Shcheglov
6c60f506c8 Resolve RecordPattern(s).
Change-Id: I229efb591cbb2d6cfe77b38155526f881fee7dbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264891
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-21 09:10:27 +00:00
Stephen Adams
b03b9c3712 Redo "[kernel] Create Source.sourceCode as view of the binary bytes"
Retrying now that https://github.com/dart-lang/sdk/issues/50206 is fixed.

Change-Id: I2612e53c845b2e906ab51bfe39db2fe775e10bca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-21 01:11:47 +00:00
Stephen Adams
a4294c354c Benchmark for comparing reading Uint8List vs UnmodifiableUint8ListView
The benchmark reports per-element times for summing the elements of a typed-data List.

----

The VM implementation is quite good but it looks like there is still a little room for improvement since the views are 2x slower than a simple array.

dart compile exe:

TypedDataPoly.mono.array.2(RunTime): 1.9670880036279512 ns.
TypedDataPoly.A_V.array.2(RunTime): 4.392355 ns.
TypedDataPoly.A_V.view.2(RunTime): 5.730097499999999 ns.
TypedDataPoly.A_UV.array.2(RunTime): 4.455393750000001 ns.
TypedDataPoly.A_UV.view.2(RunTime): 5.811122500000001 ns.
TypedDataPoly.A_VUV.array.2(RunTime): 4.386336250000001 ns.
TypedDataPoly.A_VUV.view.2(RunTime): 5.7639675 ns.
TypedDataPoly.A_UVx5.array.2(RunTime): 4.62768 ns.
TypedDataPoly.A_UVx5.view.2(RunTime): 5.7099649999999995 ns.
TypedDataPoly.mega.array.2(RunTime): 5.272632499999999 ns.
TypedDataPoly.mega.mixed.2(RunTime): 5.62861 ns.

TypedDataPoly.mono.array.100(RunTime): 0.6455633088733822 ns.
TypedDataPoly.A_V.array.100(RunTime): 3.1558100965636964 ns.
TypedDataPoly.A_V.view.100(RunTime): 4.476973567105732 ns.
TypedDataPoly.A_UV.array.100(RunTime): 3.149724878714137 ns.
TypedDataPoly.A_UV.view.100(RunTime): 4.500062299750802 ns.
TypedDataPoly.A_VUV.array.100(RunTime): 3.1438380581862146 ns.
TypedDataPoly.A_VUV.view.100(RunTime): 4.499246259421757 ns.
TypedDataPoly.A_UVx5.array.100(RunTime): 3.1570175999999996 ns.
TypedDataPoly.A_UVx5.view.100(RunTime): 4.482889818440727 ns.
TypedDataPoly.mega.array.100(RunTime): 3.649420567570034 ns.
TypedDataPoly.mega.mixed.100(RunTime): 4.068594455581881 ns.


On the other hand, there is a massive performance tax for using UnmodifiableUint8ListView on the web, especially views of views.
https://github.com/dart-lang/sdk/issues/50255 discusses how this might be fixed.

compile js -O3:

TypedDataPoly.mono.array.2(RunTime): 2.209502118308509 ns.
TypedDataPoly.A_V.array.2(RunTime): 2.58625 ns.
TypedDataPoly.A_V.view.2(RunTime): 2.32 ns.
TypedDataPoly.A_UV.array.2(RunTime): 51.633530557495135 ns.
TypedDataPoly.A_UV.view.2(RunTime): 302.4986387561256 ns.
TypedDataPoly.A_VUV.array.2(RunTime): 52.19476512355694 ns.
TypedDataPoly.A_VUV.view.2(RunTime): 302.84394312113756 ns.
TypedDataPoly.A_UVx5.array.2(RunTime): 55.649763488505165 ns.
TypedDataPoly.A_UVx5.view.2(RunTime): 849.458699173131 ns.
TypedDataPoly.mega.array.2(RunTime): 59.75952192382461 ns.
TypedDataPoly.mega.mixed.2(RunTime): 142.7126082991336 ns.

TypedDataPoly.mono.array.100(RunTime): 0.9815000000000002 ns.
TypedDataPoly.A_V.array.100(RunTime): 1.1626947678735444 ns.
TypedDataPoly.A_V.view.100(RunTime): 1.2075 ns.
TypedDataPoly.A_UV.array.100(RunTime): 17.17602868362643 ns.
TypedDataPoly.A_UV.view.100(RunTime): 231.5 ns.
TypedDataPoly.A_VUV.array.100(RunTime): 16.85678073510773 ns.
TypedDataPoly.A_VUV.view.100(RunTime): 229.7 ns.
TypedDataPoly.A_UVx5.array.100(RunTime): 17.01657458563536 ns.
TypedDataPoly.A_UVx5.view.100(RunTime): 697.5524475524476 ns.
TypedDataPoly.mega.array.100(RunTime): 22.770700636942674 ns.
TypedDataPoly.mega.mixed.100(RunTime): 94.4 ns.

Change-Id: If8878efd4c57bbd87effcd1d3f1339bc0cffbd75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264897
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-21 00:53:59 +00:00
Ryan Macnak
84df527eba [vm, gc] Strengthen heap verification to disallow pointers to free list elements and forwarding corspes.
TEST=ci
Change-Id: I9b0f082e1bdf4c037bac3b2359fe8304ee0fda81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265003
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-10-20 23:12:15 +00:00
Ryan Macnak
1959041301 Reapply "[vm, gc] Add separate marking verification."
Fix compressed pointers builds.

TEST=ci
Change-Id: I761b39752991e5113d1d333f1f0004d967445c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265040
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-10-20 22:18:07 +00:00
Alexander Markov
882e3711ff [ffi/tests] Split large auto-generated tests into multiple tests
This change tries to avoid timeouts on debug/ia32 bots by replacing
each auto-generated

  tests/ffi{,_2}/function_structs_by_value_generated{,_leaf}_test.dart

with 3 separate tests.
Also, --optimization-counter-threshold is increased.

Fixes https://github.com/dart-lang/sdk/issues/48627
Issue: https://github.com/dart-lang/sdk/issues/45007

Change-Id: I8a9c72927d05a3da3da35a21e9ffba0f3bda2112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265021
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-20 22:08:53 +00:00
Alexander Aprelev
8c0df46887 [vm] Better implementation of hashCode function.
With this cl hashCode function for integers which used to be identity function becomes `uint128_t hash = value * constant; hash ^= hash >> 64; hash ^= hash >> 32; hash &= 0x3fffffff`. Note that the hashCode has to stay the same across platforms(64-bit/32-bit).

This dramatically improves performance of integer HashSet/HashMap lookups when integers differ in higher bits only(see the issue referenced below).

AOT ARM64 benchmarks:
===
WordSolverIdentity -3.630% (-0.9 noise)
BigInt.parse.0064.bits 15.43% (0.9 noise)
BigInt.parse.4096.bits 40.80% (1.6 noise)
BigInt.parse.0256.bits 42.01% (2.3 noise)
BigInt.parse.1024.bits 50.91% (2.6 noise)
IntegerSetLookup.DefaultHashSet 549916% (14727.6 noise)
IntegerSetLookup.DefaultHashSet 597150% (55520.2 noise)
IntegerSetLookup.HashSet 846924% (78126.7 noise)
IntegerSetLookup.HashSet 791864% (107221.1 noise)
===

AOT x64:
===
Havlak -14.25% (-1.7 noise)
DartMicroBench.Int64Div -7.091% (-1.2 noise)
ObjectHash.manual.5 -9.541% (-0.8 noise)
AsyncLiveVars.LiveInt1 4.726% (0.8 noise)
IsolateJson.SendAndExit_Decode1MBx1 9.067% (0.8 noise)
SplayHarderLatency 4.629% (0.9 noise)
TypedDataDuplicate.Float64List.32.loop 35.01% (1.8 noise)
IntegerSetLookup.DefaultHashSet 627996% (124823.6 noise)
IntegerSetLookup.HashSet 1245362% (244705.3 noise)
===

JIT ARM64:
===
IntegerSetLookup.DefaultHashSet_Random 73.80% (1.2 noise)
IntegerSetLookup.DefaultHashSet 344999% (6202.9 noise)
IntegerSetLookup.HashSet 483731% (7845.7 noise)
===

JIT x64:
===
CollectionSieves-Set-removeLoop -6.294% (-0.9 noise)
Utf8Encode.ru.10M 59.11% (0.8 noise)
Utf8Encode.ru.10k 71.62% (0.9 noise)
Utf8Encode.zh.10M 53.93% (0.9 noise)
Utf8Encode.ne.10k 71.34% (0.9 noise)
Utf8Encode.zh.10k 72.52% (0.9 noise)
Utf8Encode.ne.10M 53.17% (0.9 noise)
IntegerSetLookup.HashSet_Random 27.80% (1.1 noise)
String.replaceAll.String.Zero 8.659% (1.2 noise)
IntegerSetLookup.DefaultHashSet_Random 96.20% (1.3 noise)
IntegerSetLookup.HashSet 481037% (18028.8 noise)
IntegerSetLookup.DefaultHashSet 454450% (31501.3 noise)
==

Fixes https://github.com/dart-lang/sdk/issues/48641
TEST=ci

Change-Id: Id982e4aa30cd1d6a63f93c73917a8b921ad464a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-10-20 20:31:20 +00:00
Devon Carew
9f32d19a42 [deps] rev bazel_worker, html, markdown, source_maps, webdev
bazel_worker (75a947f..03717ca):
  03717ca  2022-10-19  Parker Lougheed  Fix changelog mention of required SDK version (#64)

html (0740fc7..0bf6019):
  0bf6019  2022-10-19  Devon Carew  rev the package version in preparation for publishing (#190)

markdown (d72ae07..93d0eee):
  93d0eee  2022-10-14  Kevin Moore  Misc package cleanup, mostly lints (#468)
  16781b6  2022-10-14  Kevin Moore  CI: update actions, add dependabot (#469)

source_maps (c7e8963..b031e2c):
  b031e2c  2022-10-19  Devon Carew  Update README.md (#69)

webdev (5343edb..a02f073):
  a02f073  2022-10-19  Daco Harkes  Support `--source` in `FrontendServerClient` (#1760)

Change-Id: I16a0c8b2d6457874e3848a58f1e4fd1650a8d894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265002
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-10-20 20:24:05 +00:00
Ahmed Ashour
470f394424 [analysis_server] don't remove empty statement when in dead code
Bug #50188

Change-Id: I19abc92900f6c939778e240e3df2d17ae4068967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-20 19:21:37 +00:00
Devon Carew
de55cba4d0 [pkg/analysis_server_client] refactor member sort test
This refactors the member sort test so that this package does not depend on unpublished packages
(analysis_server, ...). This makes it possible to publish this package without having to have
local (non-git) modifications.

Change-Id: I52bdaa459c2e219f38ac930468647b4d7c4165e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-10-20 18:44:15 +00:00
Alexander Markov
6a615410a0 Revert "[vm, gc] Add separate marking verification."
This reverts commit a9915dd268.

Reason for revert: build failures on android bots

Original change's description:
> [vm, gc] Add separate marking verification.
>
> This is separate from the other heap verification flags because they cause the scavenger to wait for the old-gen GC to finish, which can mask bugs in failing to apply the incremental barrier.
>
> TEST=ci
> Change-Id: Idec5087f316e6d7be9dd27c56ed636ee00d638d4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264883
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ia104ca00f9e83608699c9ceac83e476da50a11b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265005
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-10-20 18:32:17 +00:00
Joshua Litt
be1ae6a91b [dart2wasm] Implement simd types naively.
Change-Id: If1114351ead04cefe950f477b11e236f2fc6d614
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264886
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-10-20 17:56:25 +00:00
Ryan Macnak
a9915dd268 [vm, gc] Add separate marking verification.
This is separate from the other heap verification flags because they cause the scavenger to wait for the old-gen GC to finish, which can mask bugs in failing to apply the incremental barrier.

TEST=ci
Change-Id: Idec5087f316e6d7be9dd27c56ed636ee00d638d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264883
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-10-20 17:23:08 +00:00
Lukas Klingsbo
6e4e12922a DateTime copyWith extension
This change has been discussed for 8+ years and it would of course be preferred
to be added as an instance method, but since that is a breaking change I added it as an extension as discussed here:
https://github.com/dart-lang/sdk/issues/24644#issuecomment-1241695835

Change-Id: Iebb9f300e449920ae8891abac88f30b271321661
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258541
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-10-20 10:50:25 +00:00
Daco Harkes
bf420ae138 [vm/ffi] Update DynamicLibrary.process() documentation
https://dart-review.googlesource.com/c/sdk/+/260760 added support for
Windows to `DynamicLibrary.process()` but forgot to update the dartdoc
comment.

Change-Id: Ic8533e4d1bb23009753bcdef446e2cfe49dea0f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264940
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-10-20 10:32:44 +00:00
Lasse R.H. Nielsen
61741732f4 Avoid treating any / in a URI path as "non-simple".
Bug disabled optimization for a lot of URIs.

Bug: http://dartbug.com/50239
Change-Id: I783ce9ff2c73e82f765463425cb038e1e3ee46ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264862
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-10-20 08:43:41 +00:00
Sigmund Cherem
3719dbf671 [dart2js] cleanup after fix.
Now that type parameters can occur nested within type literals there
is no reason to special-case type parameters. Now that we don't
consider type literals to be always constant, it is safe to remove
this extra check and handle type parameters the same as a generic
type literal containing a type parameter.

Change-Id: I887d162e20fd29f3285d73149927e51e1f1d1753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264894
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-10-19 23:18:54 +00:00
Sigmund Cherem
0f16027f86 [dart2js] Fix for deferred loading bug.
Long ago Dart didn't support generic type literals and the deferred
loading algorithm assumed that in the ConstantCollector visitor. Now that Dart supports them, we need to ignore them if they get encountered.

Fixes #49851

Change-Id: I637f70a74bbe5ca8fc76c2f8ff79e97eeac19182
Fixed: 49851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264884
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-10-19 21:50:07 +00:00
Konstantin Shcheglov
76c8886ff5 Use NnbdMode.Strong for frontend_server/ binary protocol.
Bug: https://github.com/dart-lang/sdk/issues/50100
Change-Id: Ibbacffd90c49d1446df4a59fd718b53017dda0f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262441
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-10-19 21:40:13 +00:00
Devon Carew
83f292e0d6 [deps] revert the recent package:markdown roll
Change-Id: I1b8b806b975b259a8489e5637548c1ab6b0ce347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264889
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-10-19 21:23:25 +00:00
Konstantin Shcheglov
4461156b2e Add a few more tests for extractor pattern resolution.
Change-Id: Ic0cb05ae0bbc958e0136f4c6abac9e72327c4f75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264888
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-19 20:43:47 +00:00
Devon Carew
93d2077a7d [pkg/analysis_server_client] rev version in preparation for publishing
Change-Id: I60f9485bf0dd76123bb42214ece4030e0a8fd5c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264882
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 20:00:07 +00:00
Danny Tuppeny
1b38b7bb7b [analysis_server] Move TestCode from analysis_server to analyzer
Change-Id: I81333240d7693b66416ce6bb308f980b264a2238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 19:58:47 +00:00
Paul Berry
5349d8c602 Migration: account for generic bounds when determining whether null checks are necessary.
Previously, if a variable with a generic type was null-checked, and
the migration engine did not add a question mark to the type of the
variable itself, e.g.:

    f<T extends Object?>(T x) {
      if (x == null) { ... }
    }

Then the migration tool would erroneously consider the null check
unnecessary.  It failed to account for the fact that the bound on the
generic type might be nullable.

This change fixes the tool so that it now properly accounts for the
bound on the generic type variable.

Bug: https://b.corp.google.com/issues/247496662
Change-Id: I2b131e75b7e3fc5db0b668f1064340d404442c82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264501
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-10-19 19:44:20 +00:00
Sigmund Cherem
b8b81d4d19 [dart2js] migrate js_world_builder
Change-Id: I794a773e49f267d187af3ea76a596007a40224d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264343
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-10-19 19:39:03 +00:00
Sigmund Cherem
da689b6531 [dart2js] migrate universe/codegen_world_builder
Change-Id: Ia85fdc3b9b018475be29ab96e0e9928ba1b9a153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264342
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-19 19:39:03 +00:00
Sigmund Cherem
71ff066c1e [dart2js] Migrate js_world.dart.
This also fixes a couple nullability signatures in world.dart and class_set.dart

Change-Id: I11b383c312a2320ae4ea7bac36c46c3f80fb7e0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264341
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-19 19:39:03 +00:00
Sigmund Cherem
4990d73002 [dart2js] Migrate kernel strategy
Change-Id: Ib8b251bc69e42c414e6519595af75c10187abbef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264340
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-10-19 19:39:03 +00:00
Devon Carew
030c24af8d [deps] rev bazel_worker, collection, markdown, pub_semver, source_map_stack_trace, source_maps, see, stack_trace, test, webdev
bazel_worker (9710de6..75a947f):
  75a947f  2022-10-18  Nate Bosch  Prepare to publish (#63)

collection (ca45fc4..efd709f):
  efd709f  2022-10-18  Kevin Moore  Fix doc comment references among other new lints (#253)

markdown (d72ae07..93d0eee):
  93d0eee  2022-10-14  Kevin Moore  Misc package cleanup, mostly lints (#468)
  16781b6  2022-10-14  Kevin Moore  CI: update actions, add dependabot (#469)

pub_semver (7671359..28159b8):
  28159b8  2022-10-14  Devon Carew  prep for publishing (#73)

source_map_stack_trace (72dbf21..8d8078f):
  8d8078f  2022-10-18  Devon Carew  update ci; prep for publishing (#30)

source_maps (e93565b..c7e8963):
  c7e8963  2022-10-18  Devon Carew  adjust the min sdk we test against (#68)
  4f0b1e2  2022-10-18  Devon Carew  update ci; prep for publishing (#67)

sse (00084c4..283568d):
  283568d  2022-10-14  Devon Carew  update ci; prep for publishing (#64)

stack_trace (9697e4c..dce0013):
  dce0013  2022-10-18  Kevin Moore  fix changelog link

test (58beb14..f704d5a):
  f704d5af  2022-10-17  godofredoc  Add scorecard badge to test repo. (#1774)

webdev (69aac60..5343edb):
  5343edb  2022-10-17  Elliott Brooks (she/her)  Migrate more files to null-safety (#1758)
  ce498c2  2022-10-14  Elliott Brooks (she/her)  Migrate `configuration.dart` and `shared.dart` to null-safety  (#1757)

Change-Id: I8859b1abc22f630c2136a69b0ad5a836691b9dbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264881
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-10-19 19:36:17 +00:00
Tom Robinson
005a0a807e Do not try to handle non ZX_PKT_TYPE_SIGNAL_ONE incorrectly
Closes https://github.com/dart-lang/sdk/pull/50240
TEST=building for fuchsia and testing on Nest Hub device.

GitOrigin-RevId: 28a6d9d8654f81cdf86161b1fc884b289a035392
Change-Id: Ie84d7943ea0d874fe4e5b421ddf47b8f0a884628
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264640
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-19 19:03:28 +00:00
Danny Tuppeny
eea14037e0 [analysis_server] Add support for range marker shorthand in TestCode
Change-Id: I70efc2fd32de128351aa9fd8c10555dbd1391da4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 18:13:57 +00:00
Konstantin Shcheglov
eea6fb106d Look for BUILD.gn files to identify ContextRoot(s) with GnWorkspace.
This rehabilitates language server support for Fuchsia.

This makes GnWorkspace more like PubWorkspace, not like BlazeWorkspace. The workspace is the location of `BUILD.gn` file (and is identical to the package, although I did not change this in this CL). And there must be also `.jiri_root` somewhere above it.

We don't look for `pubspec.yaml` files to decide that we have a new `ContextRoot`, instead we rely on `.dart_tool/package_config.json` created by `Pub` from `pubspec.yaml`. For GN, I had to specialize it to look for `BUILD.gn` files.

With this change `BUILD.gn` takes preference over any other signal, so we don't care if there are `pubspec.yaml` files.

Fixed: fuchsia:109640
Change-Id: I2277336bd377abb9d8c8c33529183e21b2f51c4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-19 17:57:50 +00:00
Devon Carew
2dc6b5dd55 [pkg/js] update package:js changelog; prep for publishing
Change-Id: I9a9bdb94f9aeed1364f4905a4734fc7b2512c81d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264262
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-10-19 17:51:32 +00:00
Alexander Markov
671717b578 [vm/aot] Support dynamic record field access in TFA
TEST=language/records/simple/dynamic_field_access_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I811db5c649988cbadf7ab29e5c4c70366f55e86b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262845
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-19 17:49:47 +00:00
Konstantin Shcheglov
d923f69436 Resolve WhenClause in SwitchStatement cases.
Change-Id: I836d0bec357597490ad7302e90ff9e4740547810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-19 17:27:38 +00:00
Derek Xu
35d6ecbcd6 [VM/Service] Fixed capitalization of "string" in service.md
TEST=N/A

Change-Id: Ibd73aa116c243142fe19f1cfe1ad3823c1ec27b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264781
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2022-10-19 16:40:38 +00:00
Danny Tuppeny
5b1ca7eef1 [analysis_server] Remove string_scanner dependency from TestCode
Change-Id: Ia31efb8b5fede64d91ed1669219d11014afe25c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 16:28:25 +00:00
Ryan Macnak
c55a2886c4 [vm] Do not issue breakpoint resolved events without an isolate.
TEST=none
Bug: https://github.com/flutter/flutter/issues/113540
Change-Id: Ia176a304bd953678f99a06a84b7eec33be59a2a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264800
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-10-19 16:12:28 +00:00
Paul Berry
d9a5551af9 Front end logic for field promotion.
This is the common front end implementation of the new field promotion
feature (https://github.com/dart-lang/language/issues/2020).

There is no behavioral change yet unless the user activates field
promotion by enabling the experiment flag `inference-update-2`.

Change-Id: I0d1e0893af862c3af8a0ef4ea10e803606d48d7e
Bug: https://github.com/dart-lang/language/issues/2020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260451
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-10-19 14:53:51 +00:00
Danny Tuppeny
f350c474e7 [analysis_server] Fix Windows test failures
Change-Id: I1f19b4a775c8bad217f88b9b3d272fed334f0dc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264843
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 14:50:56 +00:00
Alexander Thomas
8f33c7a47c [test] Remove obsolete sample_extension status file entries
The sample_extension has been deleted a while ago.

Bug: https://github.com/dart-lang/sdk/issues/45451
Change-Id: I69400018345d47f3b078d563246f36412eb3472b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264840
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-10-19 13:57:59 +00:00
Martin Kustermann
4666dac4b2 [gardening] Fix vm/cc/Service_PersistentHandles test
This test started failing after clang roll in commit
0e2d2e3c93

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

TEST=Fixes vm/cc/Service_PersistentHandles

Change-Id: Ia8bf637caf452229f9a1b750229a829f856c9c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264861
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-10-19 13:24:56 +00:00
Alexander Thomas
0b26f4816b [testing] Remove --compiler=none from test.py
* Use dartk as the default compiler for runtime=vm.
* Status file entries for checking for the `none` compiler now either
  use dartk or are deleted.

Tested: Standard CQ and local testing.
Fixes: https://github.com/dart-lang/sdk/issues/50241
Change-Id: I7a08d3e491ae1c82a0348fb66ea7b557398f97e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264682
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-10-19 08:09:58 +00:00
Sigmund Cherem
9846309cf0 [ddc] use snapshot when running worker test.
The snapshot is already available in the build directory, this makes the
test save up 11 times all the parse and warmup costs of loading the
compiler in the VM.

In aggregate, this made the test run in 5 seconds instead of 2 and half
minutes on my local desktop.

Change-Id: Ic0f1ef030b06467999fd0178b599de697f8ccc94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264730
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-10-19 01:27:41 +00:00
Konstantin Shcheglov
f14aba03e7 Use shared analyzeIfStatement()
Change-Id: I9271fb21538faeacc0625e8c48f7add860f86e60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264726
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2022-10-19 00:40:47 +00:00
DEPS Autoroller
b1062f13c3 Roll Dart Documentation Generator from 5b3feb67f7db to 3cd12f981c58 (1 revision)
https://dart.googlesource.com/dartdoc/+log/5b3feb67f7db..3cd12f981c58

2022-10-18 srawlins@google.com Simplify Accessor.overriddenElement (#3220)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I95b8bf87bb92d369f1b31296663b59ff58e15861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264761
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-10-18 23:29:01 +00:00
Konstantin Shcheglov
f42bb9dffc Support for replacing WhenClauseImpl.expression
Change-Id: I0e19b5bdbc32b77ccb29bb40ffd8191c04ffa208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264728
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-18 22:39:49 +00:00