Commit graph

88731 commits

Author SHA1 Message Date
asiva e70e2bc1b7 [Dart 3.0 alpha] Fix some test issues (legacy mode argument not passed in)
TEST=ci

Change-Id: Iebb31a509b99837e41cf3823ca366c1560777af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273920
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-12-06 19:34:47 +00:00
asiva 606a64a743 [3.0 alpha][VM/Runtime] - Flip flag to make strong null safety the default.
- Flip flag to make strong null safety the default
- Remove code that auto detects null safety mode from source files,
  it is necessary to specify --no-strong-null-safety to opt out.
- Retains sniffing of AOT/JIT snapshots and kernel files to determine
  null safety mode, the opt out has to be done when generating these
  file.

TEST=ci

Change-Id: If2c9608eedb7c46d9c3cd85e261ee9640e0d28eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261140
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-12-06 04:04:23 +00:00
Alexander Thomas 7e0d92d69d [3.0 alpha] Bump version to 3.0.0
Tested: Standard CQ.
Bug: https://github.com/dart-lang/sdk/issues/49529
Change-Id: I329b9940db7309c7e48f17eecd7a66d5b853a484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271922
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-06 02:40:36 +00:00
Devon Carew 3a1d7c7d74 [deps] rev dartdoc, http, sync_http, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (dc502d0..4d7dc93):
  4d7dc93b  2022-12-05  dependabot[bot]  Bump github/codeql-action from 2.1.31 to 2.1.35 (#3263)
  bcf8b6e8  2022-12-05  Parker Lougheed  Weight enums the same as classes for searching (#3260)
  7d95578b  2022-12-04  Parker Lougheed  Update template descriptions (#3258)
  d558f043  2022-12-04  Parker Lougheed  Fix error when using base element href (#3256)
  c3663762  2022-12-04  Parker Lougheed  Add unnecessary override ignore to fix build (#3257)

http (976bd56..46a7708):
  46a7708  2022-12-02  Brian Quinlan  Remove binary artifact (#833)

sync_http (f5c1f18..8622614):
  8622614  2022-12-02  Kevin Moore  blast_repo fixes (#32)

test (f3d80a6..4dceb87):
  4dceb87c  2022-12-01  Nate Bosch  Ignore some usage of dperecated errors (#1807)

webdev (91b8a19..e39506e):
  e39506e  2022-12-05  Anna Gringauze  Pre-warm expression compiler to speed up Flutter Inspector page loading. (#1786)
  9b19b3b  2022-12-02  Elliott Brooks (she/her)  Can save storage objects in both `session` and `local` storage (#1807)
  e75c45e  2022-12-02  Elliott Brooks (she/her)  Injected client adds `isFlutterApp` to global window object (#1806)
  ba5e3ec  2022-12-01  Elliott Brooks (she/her)  `DebugSession` listens to events instead of just sending events (#1804)

Change-Id: I881d02e966b763879df72b29653a9f241b71eb3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273826
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-12-05 23:18:40 +00:00
Kallen Tu 7e4d4bfef6 [corelib] _RawSecureSocket implements _RawSocketBase to avoid dynamic call in _Socket
Change-Id: Iaca38bcc5df51636016b2833c10f1bb7200ce708
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273021
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-12-05 23:05:54 +00:00
Danny Tuppeny c24f36d470 [analysis_server] Use public (non-src) URIs for Flutter snippet imports
Fixes https://github.com/dart-lang/sdk/issues/49081.

Change-Id: I0734b4f45c72d70f7b32640bed6b6ec2e8130c01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 22:32:19 +00:00
Nate Biggs badf1c5a0e [dart2js] Use new call target calculation in DynamicCallSiteTypeInformation.
Change-Id: I7077df4e718cc8836aa00aa7fc37249f8c735140
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267140
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-12-05 20:22:25 +00:00
Nate Biggs efe18b5c4a [dart2js] Add inferrer engine changes for type graph call linearization.
Change-Id: I23c1f12f4b619be9f4409b23f83cf54cd0fcc301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267062
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-12-05 20:22:25 +00:00
Nate Biggs 6173ba5dab [dart2js] Add findRootsOfTargets to abstract domain.
Change-Id: Ib5035537f242a0b518a47d53c5d4e20b8bbb71fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266880
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-12-05 20:22:25 +00:00
Anna Gringauze 3bb1323b92 Reland "Cache expression compilers in incremental DDC mode"
- Fix ddc null dereference while generating symbols with mixins
- Fix incremental compiler failure on non-SCC components
- Reworked expression compiler worker tests for effiiciency
- Create module configuration in tests only once
- Add test case of compiling expression in an non-SCC module
- Add test case of compiling expression in an SCC module

This is a reland of commit e6f779bcdd

Original change's description:
> Cache expression compilers in incremental DDC mode
>
> - cache expression compilers in expression compiler worker
>   to improve performance of exression compilation.
> - pass module format in expression compiler worker
>   (the ddc format tests were not running!)
> - fix an issue where the same library was imported twice
>   in module_builder.dart
> - add verbose mode timeline logging to ProgramCompiler.
> - update tests.
>
> Closes: https://github.com/dart-lang/sdk/issues/49944
> Change-Id: Ie7408dcd42e757b1eb5e7f5ccbc1b078b6417011
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268361
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>
> Commit-Queue: Anna Gringauze <annagrin@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>

Change-Id: I80546773d957f37ec5b2353ea060b50f3fba0aa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271801
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2022-12-05 18:39:17 +00:00
Ryan Macnak d9dd8300ca [vm, gc] Fix rare failure to update target of FinalizerBase or WeakReference.
At the end of a scavenge, ObjectPtr::IsRawNull was used on what is either a pointer into old-space or a pointer into from-space. If a pointer into from-space, the header may be a forwarding pointer. When IsRawNull interprets this is an object header, the bits in the ClassIdTag position will sometimes happen to equal kNullCid, causing the pointer to be incorrectly interpreted as null instead of a forwarding pointer and thus leaving behind a dangling pointer into from-space.

This separate null check can simply be removed because null is always an old-space object.

TEST=splay_{weak/c_finalizer/dart_finalizer}_test
Bug: https://github.com/dart-lang/sdk/issues/50578
Bug: https://github.com/dart-lang/sdk/issues/50612
Change-Id: Ifc7dc19c36703222a9302a8dbb68982fdbbc91fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273560
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-05 18:08:46 +00:00
Brian Wilkerson 7953da5cf1 Fix the windows bot
Change-Id: I4d71fd70b2f0b4a4a3af3446f56fbd9b79fd0954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 18:00:16 +00:00
Ben Konyi 3850a595b9 [ VM ] Ensure heap sampling profiler is initialized on newly spawned threads
Also fixes some incorrect TLAB boundary calculations

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

TEST=DartAPI_HeapSampling looped under full system load for 30 minutes

Change-Id: I6e56cc659b58f9b246d20dc5b649fc367af9c672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273500
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-12-05 17:41:08 +00:00
Ahmed Ashour bea7045517 [analyzer] add failing test case
Bug #50496

Change-Id: Iaa6007af1b9dbbf7bac3f2ad835dece3eb64b189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271520
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 17:37:43 +00:00
Devon Carew 4b4b3645b8 [dartdev] uncomment the dependencies: section in the create templates
Change-Id: I7ad57d3a2fd357b368e8d2210a6dfef0fe2ed4a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273543
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-12-05 17:34:03 +00:00
Paul Berry c02a050721 Add handleMergedStatementCase.isTerminating boolean.
This can be used by the front end to detect when to add synthetic
break statements to switches involving patterns.

Bug: https://github.com/dart-lang/sdk/issues/50624
Change-Id: I783b0920b8dc6ccbc7af8062fba7bfdeaa9dd9cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273800
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-05 17:10:50 +00:00
Paul Berry 55902d3702 Fix ToSourceVisitor.visitSwitchExpressionCase.
In
b2889872c3,
the switch expression syntax was changed so that it no longer uses the
`case` keyword.

Change-Id: I97c10b3462b5849e1baf386df81a656d5ac25c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273623
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 16:53:35 +00:00
Paul Berry e7832eba4c Update AstComparator.visitPatternVariableDeclaration to account for metadata.
Change-Id: Icd875b10088cef17b4a3351591e29b1275900a50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273622
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 16:52:26 +00:00
Paul Berry 05ee431fb4 Capture metadata in for-in loops with patterns.
Change-Id: I90607774cfd5ae34b91af36538eb77b7ce0b6a0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-05 15:44:18 +00:00
Sigurd Meldgaard a890972aee Filter '#' characters from log in tool/manage_deps.dart
Change-Id: Icac7b594a942787477beda2979eb0e427d8dcece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273780
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-12-05 15:10:30 +00:00
Jens Johansen 93ef21b00b [vm] Add examples to heapsnapshot tool
Change-Id: I2b3735341146e532a747e302050e3983ee8f7e1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-12-05 15:02:27 +00:00
Paul Berry 7a3aa5c7f5 CFE parser test cases for metadata in for-in loops with patterns.
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I336b391c9102e4e6dd3eabce1051763e3bc797d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273621
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-05 14:56:41 +00:00
Jens Johansen b0ca324b08 [VM] Fix crash on >num filter in heapsnapshot tool
Change-Id: I873d98452e88d2b55b485cc14daa1823af2ba0f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273741
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-12-05 14:49:50 +00:00
Johnni Winther a392d30e1d [cfe] Handle direct access to instance methods and getters in views
Change-Id: I63fbdf31b225ea503f35b85601b8f9718431d6cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273380
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-12-05 10:13:22 +00:00
Erik Ernst ac68a593d4 New test, testing the behavior under scrutiny in SDK issue 49396
Change-Id: I1ebb2ea12f4d01c4077fca6fc380353f821bc68a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267422
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-12-05 09:40:08 +00:00
Sergey G. Grekhov c0330b6444 [co19] Roll co19 to 9cfd817af42a5b3f934829aa1a82b5f27463130f
2022-12-01 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] More test cases added to variable and wildcards tests (dart-lang/co19#1551)
2022-12-01 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Constant pattern tests update according to the new spec (dart-lang/co19#1566)
2022-12-01 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Parenthesized pattern tests added (dart-lang/co19#1548)

Change-Id: I2458848da6ba816368c6d5b9bfe8d7fa6467dfcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273360
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-12-05 08:41:02 +00:00
Jens Johansen b812517fac [analyzer] Don't ask for subtypes for the same elements several times when searching for references
When asking for all references of a member it starts by finding all
supertypes for the class, then for each supertype (including itself)
(that has a member with the same name as the one we're querying for)
it searches for all subtypes.

We recall that when getting all subtypes, it really gets all direct
subtypes, then for each of those, their direct subtypes etc.
Naturally, then, with getting all subtypes for all supertypes we
will often ask for all direct subtypes of the same class several times.

In fact, it's O(n^2):

As an example, if asking for references to `foo` on this
(in a file in analyzer, with 8 workspaces):
```
class X0 { void foo() { print('hello'); } }
class X1 extends X0 { void foo() { print('hello'); } }
class X2 extends X1 { void foo() { print('hello'); } }
[...]
class X149 extends X148 { void foo() { print('hello'); } }
```
we ask for subtypes 90600 (150 classes * 151 / 2 * 8 workspaces) times.

This CL stops that from happening and in the example from above we
"only" asks for subtypes 1200 (150 classes * 8 workspaces) times.

For the `newFile` from `AbstractSingleUnitTest` example, for instance,
we go from 28,264 asks to 17,432 asks (a ~38% reduction).

Non-first runtimes when asking for references:

Before:
0:00:03.074853
0:00:03.021881
0:00:03.034707
0:00:03.115596
0:00:03.032574

After:
0:00:02.223978
0:00:02.149937
0:00:02.150236
0:00:02.104704
0:00:02.175859

Difference at 95.0% confidence
        -0.894979 +/- 0.060283
        -29.2867% +/- 1.97266%
        (Student's t, pooled s = 0.0413338)

Change-Id: Id792a595e74de01c7186ab1263c38728f051f603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272623
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 08:03:24 +00:00
Nicholas Shahan a464fc354b [ddc] Support more complicated subtype checks
Generate type hierarchy rules for all interface types used in a
module. These rules are utilized by the `isSubtype()` to determine
interface subtypes.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I63f64075d4947f234eca5e730ad15588e60b9e1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266542
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-03 00:37:41 +00:00
Nicholas Shahan bf548e788a [ddc] Clarify class vs type references for records
Preparation for separating type representation from classes.

Use `JS_CLASS_REF(_RecordImpl)` to inline a reference to the class
in JavaScript (not the type representation).

Use a standard Dart `is _RecordImpl` type test and let the compiler
produce the correct type test code.

Change-Id: I160312d61137ad0c6b2aa30b8aeba4acbe848df9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273523
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-03 00:26:58 +00:00
Paul Berry eb827958a4 Remove support for & and | in patterns.
Logical-and and logical-or patterns must now use `&&` and `||`,
respectively.

Change-Id: I87774016da46a21c90a50581e7ed843160159c80
Bug: https://github.com/dart-lang/language/issues/2501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272743
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 23:53:40 +00:00
Brian Wilkerson 6346e7fcd1 Update imports in files other than the source and destination when moving declarations
Change-Id: I3675bddc9479744a4642bdbb66b8de013f0f01df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273524
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-02 23:22:16 +00:00
Konstantin Shcheglov 95a390cfd9 Don't report CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE when patterns is enabled.
Change-Id: I780ab9a9c82e115d254c61311ac8015f46db12aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 22:57:21 +00:00
Konstantin Shcheglov 48d0d95edb Report CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION
Change-Id: Idb6d0963515457e1748362dbda1441d5820a040a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 22:56:57 +00:00
Alexander Aprelev 4275d595b6 [vm/regexp] Copy, rather than share RegExp objects between isolates.
RegExp code objects keep backtracking and registers stacks in object pools, can't be shared between isolates.

BUG=https://github.com/dart-lang/sdk/issues/50082
TEST=one_regexp_many_workers

Change-Id: Ic7db8d7a75a0951178b2f4800f96224d52506545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-12-02 22:45:21 +00:00
Kallen Tu 6c9873bf42 [cfe] Report error when using a class as a mixin when sealed-class is enabled.
From the changes in dart-lang/language#2674 that specify from a certain language version, we would like classes to not be used as mixins unless specified as a 'mixin class'.

Currently, this behaviour is under the sealed-class flag. May be subject to change as the other modifiers are added, but I'd at least like to make sure this works for sealed classes.

Change-Id: I5754b383327dde06d49175fe2d05c8ba7462145f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273082
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-12-02 22:31:58 +00:00
Konstantin Shcheglov 70b994e54f Test rest element with subpattern in map pattern.
Change-Id: I348ce8bfb6b32b3fcd1a63427d0a82a33dfa2c1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 21:50:50 +00:00
Nate Bosch b64f84d695 Mention late errors in Future.timeout doc
Add an example where the source future results in an error that is ignored, with
only the `TimeoutException` surfacing in a catch block.

Move some comments to the same line as the `print` call to match other
lines in the example code. Use doc comment syntax on functions in the
example code.

Change-Id: I5d3146ebe8f7edce303d76ff36822ced9b831c95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272960
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-12-02 20:05:26 +00:00
Joshua Litt b493cdfc1b [dart2wasm] Add runner script to streamline running wasm in d8.
Change-Id: I0f891d28419d0df55f94e0229ff33e87b791e7d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273280
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-12-02 19:55:16 +00:00
Devon Carew 72c5a1a900 [deps] rev collection, fixnum, http, protobuf, sse, stack_trace, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

collection (efd709f..caf6802):
  caf6802  2022-11-28  Nate Bosch  Tweak docs for split extensions (#256)

fixnum (bca3816..62916f2):
  62916f2  2022-11-24  Lasse R.H. Nielsen  Split into separate libraries instead of using parts. (#97)
  14d4827  2022-11-23  Lasse R.H. Nielsen  Add `tryParse` methods. (#96)

http (047d6ed..976bd56):
  976bd56  2022-11-28  Kevin Moore  Use latest mono_repo (#832)

protobuf (c181573..4f3e328):
  4f3e328  2022-11-30  Devon Carew  Emit imports in sorted order (#778)
  3cc088e  2022-11-28  Kevin Moore  Latest mono_repo (#779)

sse (8d018dd..d396145):
  d396145  2022-11-29  Elliott Brooks (she/her)  Fix Fetch credentials (#69)

stack_trace (dce0013..cf3562e):
  cf3562e  2022-12-01  Devon Carew  blast_repo fixes (#123)

test (b25dac9..f3d80a6):
  f3d80a68  2022-11-29  Nate Bosch  Fix missing label and reason after isNotNull (#1797)
  5b1f0075  2022-11-29  Nate Bosch  Use double quotes for test names on windows (#1802)
  986045c4  2022-11-29  Nate Bosch  Temporarily pin to ubuntu 20.04 (#1800)

webdev (637b406..91b8a19):
  91b8a19  2022-12-01  Elliott Brooks (she/her)  Fix global variable `isInternalBuild` in injected client (#1805)
  7d0810a  2022-11-30  Elliott Brooks (she/her)  Updates the `fixture` package `pubspecs` so it is clear what shouldn't be migrated to null-safety
(#1803)
  acd3f9f  2022-11-30  Elliott Brooks (she/her)  Can debug with the MV3 Dart Debug Extension (#1802)
  1258510  2022-11-29  Elliott Brooks (she/her)  Detect whether the Debug Extension was built for dev or release (#1800)
  b4a23c6  2022-11-29  Elliott Brooks (she/her)  Fix Fetch API implementation (#1801)
  67133df  2022-11-29  Elliott Brooks (she/her)  Pull out debug logging into one file (#1799)
  a395c68  2022-11-28  Elliott Brooks (she/her)  Handle detecting Dart app when tab changes (#1796)
  4fb4328  2022-11-28  Elliott Brooks (she/her)  Authenticate the user when they click on the Dart Debug Extension icon (#1795)

Change-Id: I7beeeb43de4ba514817836ffd4ff6a62b801f2dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273282
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 19:02:54 +00:00
Ryan Macnak ed2899ea4a [vm] Don't unroll initialization code based on macro lists.
-30k (-0.07%) out/ReleaseX64/exe.stripped/dart
-29k (-0.25%) out/ReleaseX64/exe.stripped/dart_precompiled_runtime

TEST=ci
Change-Id: I7c05705ada10dcaa388d9c8a8abd4edd9495cdc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273009
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-02 18:45:03 +00:00
Ömer Sinan Ağacan a1a942f960 [kernel] Remove references to DispatchCategory
DispatchCategory was removed in 74cf86cb.

Change-Id: Id5fa7710d7cd68d6004360bee90ac342c5f90583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273400
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-02 18:19:36 +00:00
Ryan Macnak 393451a37a [test_runner] Extend the --rr option to include run_vm_tests and gen_snapshot.
Change-Id: I3e1a950e9fb9d25bbade60c9fe3577e5dbcd6f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272862
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-02 18:16:12 +00:00
Brian Wilkerson edb66fe3bb Capture the prefix for references in the search index, take 2
Change-Id: I600dd7c064ce9779251d043305becd4a8203bbc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271802
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 18:00:59 +00:00
Konstantin Shcheglov 46bffdabb1 Test logical-and in variable declaration, report REFUTABLE_PATTERN_IN_IRREFUTABLE_CONTEXT.
Change-Id: I7fcffea3b591fbe3a181a8bb8a8a461d18ec3d64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273340
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-02 17:53:19 +00:00
Konstantin Shcheglov cdf5aa216e Fix rewrite tests after issue 50591 fixed.
Change-Id: Ic730d69ea5f6f309aa27e785b52d5f42d1186041
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-02 17:52:56 +00:00
Sam Rawlins 987c7503d1 Move DAS tutorial dir, and add light mode icons
The tutorial doc was mistakenly _not_ in the doc/ directory.

The icons show up as way too big, so I use inline HTML to specify
their width, so that they look good inline.

I add light mode icons, and use GitHub (and dartdoc)'s support for
switching between light mode and dark mode images.
https://www.stefanjudis.com/notes/how-to-define-dark-light-mode-images-in-github-markdown/

Change-Id: I1a368bfc6628adf941ba5e7a752317f9757d2538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273460
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-02 17:16:08 +00:00
Ryan Macnak 16149782ef [test] Make less memory be gated by finalization in splay_dart_finalizer_test.dart.
When the heap limit is reached, directly unreachable objects are reclaimed but objects that will be unreachable after a finalization are not, and there needs to be enough headroom between opportunities for finalizers to run (returning to the event loop).

So only do the finalization thing with the upper, high-mutation part of the splay tree and remove it from the lower, write-once part. The high-mutation part is what's more interesting for GC stress testing.

Bug: https://github.com/dart-lang/sdk/issues/50597
Change-Id: Id02b38b0ac1e9bb640954ef1b686ce3eef8370af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273300
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-02 17:04:38 +00:00
Paul Berry e9a1248fc2 Add parser support for patterns in for-in statements and collection elements.
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I9eda03c1501cf3164cfb09cf9084576a5d1141cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273122
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-02 15:22:38 +00:00
Jens Johansen ff87b5ea8e [CFE] Replace 'first' with 'roots'
Before we could get into a situation where we didn't produce the entire
class hierarchy when we loaded from dill even though we set up the
entry points correctly.
This might not be perfect, but seems better.

Change-Id: Ifc56930da7ccad52e96ae32d6a8ab509421b37b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-12-02 15:18:27 +00:00
Paul Berry c381425bd3 Parser: additional fixes to mayParseFunctionExpressions for patterns.
Expressions can also occur in patterns, either after an equality or
relational operator (e.g. `== e`), or after `const` (though what's
allowed after `const` is heavily restricted).  We need to make sure
that the expression parser doesn't greedily treat `=>` as introducing
a function expression when parsing these constructs inside a switch
expression.

But it's ok to allow function expressions inside list patterns, map
patterns, parenthesized patterns, and in the argument part of object
patterns.  (These will be rejected by a later stage of analysis
because expressions inside of patterns must be const, and a function
expression can't be const.  But the parser should still accept them so
that we can give useful error messages).

Fixes #50591.

Bug: https://github.com/dart-lang/sdk/issues/50591
Change-Id: I828555782f5bc8cb8aae8a3948849b7a75bdec57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273286
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-02 15:04:09 +00:00