1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 12:06:26 +00:00
Commit Graph

87362 Commits

Author SHA1 Message Date
Johnni Winther
d43aa20afa [cfe] Support current uri for crashes during top level inference
+ avoid printing the stack trace twice on crash

Change-Id: Iac220117b77c30bc03212b2727efe88036819357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260700
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-09-23 08:32:49 +00:00
Sam Rawlins
51114fca8a Unnamed libraries
Fixes https://github.com/dart-lang/language/issues/1073

Spec: https://github.com/dart-lang/language/blob/master/accepted/future-releases/unnamed-libraries/feature-specification.md

This work allows library directives without a name. Every single one would look like this:

```
library;
```

:) it was a little anti-climactic implementing a non-feature like this, but there it is.

The affordance for a library directive without a name is guarded by an experiment flag, `--unnamed-libraries`.

Change-Id: I8612238359e88d6082f7e89d0d0fc624fdb45273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257490
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-09-23 05:37:39 +00:00
DEPS Autoroller
948eb70c02 Roll Dart Documentation Generator from d4c344d41ee3 to c22e5e77de29 (2 revisions)
https://dart.googlesource.com/dartdoc/+log/d4c344d41ee3..c22e5e77de29

2022-09-23 parlough@gmail.com Fix slash focusing search (#3183)
2022-09-22 andre.lipke@gmail.com Add GitHub light/dark mode image syntax (#3182)

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: Ie7984593db0611b219e32734fa4aceacdd42d150
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260781
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-09-23 04:46:18 +00:00
Sigmund Cherem
8bff8336a4 [dart2js] migrate source_file_provider
This reapplies f740b500e2

The change is not that different from the original, except that a
few changes have landed in between to address the failure
encountered by the SDK roll last time. Namely, the map lookup on
`resolvedUri` is normalized, so that the lookup will always match
how the store operation is done, and hence will succeed when copying
cache entries between resolvedUri and uri (see also
https://dart-review.googlesource.com/c/sdk/+/250440).


Change-Id: Ic3ad778a3e9ea465b515de9800f296c71683970c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260081
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-23 01:41:18 +00:00
Nicholas Shahan
76a4d351b8 [ddc] Add non-null assertions when setting fields
!!! NOTE to Google3 rollers:
If this change causes test failures in google3 you can temporarily
set `null_safety_asserts = False` on the failing
`dart_browser_binary` targets until we can fix the mistyped code.
That should allow the test to pass with this change.

Of course feel free to revert this change again if the number of
failures is too high.

Re-land previously reverted change:
https://dart-review.googlesource.com/c/sdk/+/258780

Adds additional tests and more checks to ensure assertions are only
added in libraries that have been migrated to null safety.

Issue: https://github.com/dart-lang/sdk/issues/49918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Change-Id: Idcab0fe49a8dd98cdd73192eabae4439aebe2013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260070
2022-09-23 01:22:11 +00:00
Sigmund Cherem
2f1a6c9993 [dart2js] migrate js_backend/field_analysis.dart
Change-Id: Id554181edeca0e144e49ab747f764193a23a96cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260303
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
2511f38bb1 [dart2js] migrate phase/modular_analysis.dart
Change-Id: I788e3952352fdd8c8d6bdce14ac57c437e583f2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260302
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
5fbd406929 [dart2js] migrate kernel/native_basic_data.dart and kernel/no_such_method_resolver.dart
Change-Id: Idb789679871b0702b02cfc840456702708970f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260301
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
9d8ea01862 [dart2js] migrate ir/modular.dart
Change-Id: Ica0332ccd9aebfa32ded6a4c17dd49f9573633b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260300
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
bba48857a6 [dart2js] migrate kernel/element_map.dart
Change-Id: I64d3cfa518ec4226c8008c3e9cab3d2f631e8934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260286
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
8b49851cb8 [dart2js] migrate kernel/element_map_impl to null safety
Change-Id: I34ca5b75240944d39dc88d5031fdac195563b67d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260285
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
01f3d27c1e [dart2js] prepare element_map_impl for migration
Change-Id: I7faec717a427638fc04194fac2c0c63f21f1d07c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260284
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-23 00:28:58 +00:00
Sigmund Cherem
0ee953d7c2 [dart2js] migrate kernel/env.dart to null safety
Change-Id: I0913b133a39f72d29b5332ae38ad7a7a5dba48af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260078
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-23 00:28:58 +00:00
Paul Berry
8da75ede06 Shared type analysis: simplify handling of patterns.
Patterns may need to be visited twice during analysis: once to
determine a type schema, and a second type to resolve the pattern
match.  Previously, the shared TypeAnalyzer had just a single
`dispatchPattern` method, so it had to create temporary objects to
record the structure of the patterns between the two visits.  Now,
there are two dispatch methods: `dispatchPatternSchema` and
`dispatchPattern`.  This avoids the creation of a bunch of temporary
objects and makes the design much simpler.

(Based on an idea from Brian Wilkerson)

Change-Id: If10b6b7fb578594c3f660baa55d7e28123652638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-09-22 22:41:32 +00:00
Alexander Markov
1139ed3373 [vm] Record toString()
TEST=language/records/simple/to_string_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I7e55a2486b1d964b24a287ffcf87c40c20f9cfe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260480
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-22 21:49:08 +00:00
Paul Berry
b0ea39bfa1 Bump AnalysisDriver.DATA_VERSION after adding patterns experiment flag
This version bump was intended to happen as part of
https://dart-review.googlesource.com/c/sdk/+/260500, but it looks like
it got lost in the rebase between patchsets 3 and 4.

Change-Id: I382da03694e60809e137b676c8c99ce5019ff198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260740
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 21:40:09 +00:00
Alexander Markov
ed593585cc [vm] Record operator== and hashCode
TEST=language/records/simple/equals_and_hashcode_test
TEST=co19/LanguageFeatures/Records/equality_*

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I63842f980389d63650d00638f1cb1501db88b025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260442
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-22 21:24:58 +00:00
Paul Berry
4f87eacc5e Add an experiment flag for patterns.
Change-Id: I175e4680a0949e52ae05f46c2051c701b55a99cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-09-22 19:56:38 +00:00
DEPS Autoroller
8aded3449e Roll Dart Documentation Generator from e9b16fcbfd17 to d4c344d41ee3 (1 revision)
https://dart.googlesource.com/dartdoc/+log/e9b16fcbfd17..d4c344d41ee3

2022-09-22 srawlins@google.com Overhaul search results style (#3181)

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: I57193eb495e10f003d73ac0dfcb7930972bdede3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260720
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-09-22 19:52:09 +00:00
Alexander Markov
241e70669b [vm] Fixes for gcc build
This change fixes the following build errors when building Dart VM with
gcc:

../../runtime/vm/compiler/assembler/assembler_arm64.h: In member function ‘uint32_t dart::compiler::Address::encoding(dart::compiler::OperandSize) const’:
../../runtime/vm/compiler/assembler/assembler_arm64.h:355:3: error: control reaches end of non-void function [-Werror=return-type]
  355 |   }

../../runtime/vm/compiler/assembler/assembler_arm64.cc: In member function ‘void dart::compiler::Assembler::PopNativeCalleeSavedRegisters()’:
../../runtime/vm/compiler/assembler/assembler_arm64.cc:2380:52: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
 2380 |   bool pop_single = (kAbiPreservedFpuRegCount & 1) == 1;
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~
../../runtime/vm/compiler/assembler/assembler_arm64.cc:2400:47: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
 2400 |   pop_single = (kAbiPreservedCpuRegCount & 1) == 1;
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~

TEST=ci

Change-Id: Ib44790dbe99288f569a26e4df28f61ef2aa40ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-09-22 19:33:19 +00:00
Sam Rawlins
c1e43135ad Add a Queue stub in mock_sdk for use in linter
This is needed in order to test
https://github.com/dart-lang/linter/pull/3692

Bug: https://github.com/dart-lang/linter/pull/3692
Change-Id: I8be22ca319647fba0e6ff9a462571bd972e383c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260501
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-22 18:39:28 +00:00
Danny Tuppeny
3e9a99df6a [analysis_server] Handle prefixed Flutter widget creation expressions for assists
Fixes https://github.com/Dart-Code/Dart-Code/issues/4169.

Change-Id: I3b462c69520593cbb9db2dc30ae19b8c93deed20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-22 18:28:28 +00:00
Joshua Litt
eb17780ef1 [dart2wasm] Fix dartify check for WasmGC struct.
Change-Id: I86a31a542ddd5b8a85249b80d9ad9235561b3ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260000
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-22 17:40:38 +00:00
Paul Berry
b8eede8c9f Flow analysis: make propertyGet's wholeExpression argument nullable.
This is needed for CFE integration of field type promotion, since it
allows the CFE to call propertyGet in circumstances where there's no
expression corresponding to the property get, such as during an
invocation of a field that's been parsed as a method call.

Change-Id: I1856705c080315e87e283af217be331021ef8aee
Bug: https://github.com/dart-lang/language/issues/2020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260452
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 17:30:29 +00:00
asiva
24b6b94637 Migrate tests to not use the mockito package for testing.
Change-Id: Id927ef41e528d5c11776ab66b29e1e9670a528af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260001
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-09-22 16:54:49 +00:00
Danny Tuppeny
4e63cd37eb [analysis_server] Migrate remaining FoldingRegion tests to use TestCode.parse()
+ split large annotations test up

Change-Id: I5071f4310ea3bf784e40ae1bcd1f9e497551e912
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-22 16:33:18 +00:00
Danny Tuppeny
64a2e5c114 [analysis_server] Add a new mechanism for marking up test code with regions/positions
Change-Id: I45ca24d2360f7201a563145a19c5291f83b9465c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259424
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 16:33:18 +00:00
Konstantin Shcheglov
79f407c45c Use 'new' as the reference name for unnamed constructors.
Change-Id: I50ea1f373de8fd57aa1cd44772a8b31f73862c43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260449
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 16:09:28 +00:00
William Hesse
51b6dba707 [infra] Handle shutdown failures in webdriver browser controllers
Change-Id: I4c3b457e9167e08afef2e3f4aff92d2b3011a02f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260541
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-09-22 15:23:37 +00:00
Paul Berry
043f18f843 Flow analysis: use a callback to check if a property is promotable.
Previously we expected the client to provide a set of promotable
fields, which worked well for testing.  But using a callback gives the
client more flexibility (e.g. it would allow field promotability to be
computed on demand based on other data).

Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: I40683a4c19a17147e86f0faa1339aa025da35229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256962
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-09-22 13:09:07 +00:00
Paul Berry
872e4c5696 Migration: properly handle accesses to getters in mixins.
Bug: https://b.corp.google.com/issues/246998513
Change-Id: I8ca1fe87f256dbf4f31fca9bd3f555d1def4bb3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260446
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-09-22 12:26:17 +00:00
Chloe Stefantsova
78dd98a8f4 [cfe] Add tests for NORM on records
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I7a72eeb14000823067736c8c010a83481677d9b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260521
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-09-22 10:11:38 +00:00
Ömer Sinan Ağacan
2c612c19f0 259546: Roll Dart Protobuf Support from cd0ff30759d8 to 1d175bef6043
Re-submitting 259546 with updated golden tests.

https://dart.googlesource.com/protobuf/+log/cd0ff30759d8..1d175bef6043

2022-09-16 omersa@google.com Fix $_getMap return value when mutability when message is read-only (#754)
2022-09-16 omersa@google.com Eliminate more type casts when targeting JS (#732)
2022-09-15 omersa@google.com Make subBuilder args of BuilderInfo message methods required (#753)

Change-Id: I0447b0ba277251e49dc373941599039e0e041019
Tested: CL updates test golden expectations
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259740
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-09-22 09:48:37 +00:00
Alexander Aprelev
92638bf5d3 [docs] Update Isolate.spawn doc to remove top-level function/static method restriction.
The restriction was lifted in 5f9ec9f52a.

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

TESt=ci

Change-Id: I5a6c063fe558d4dd305ec4c78bf998f4f3750c89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260403
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-09-22 07:45:41 +00:00
Joshua Litt
fea406591e [dart2wasm] Fix for tearoffs in allowInterop.
Change-Id: Ic753bb22af345e4825f2a142fa262504a562e7c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260283
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-22 03:04:17 +00:00
Konstantin Shcheglov
e03170035a Deprecate 'get name2', use 'get name' instead.
Change-Id: Iee8ef5fb6700d96c857a22a99dc61dac3da88572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 02:22:47 +00:00
Konstantin Shcheglov
c86158bf81 Use textual dumps in SuperFormalParameterTest.
Verify that the declared element of SuperFormalParameter is in the
list of ParameterElement(s) for all dumps, not only in some tests.

Change-Id: I45e92a1a7ff71c6768bb3559423604543d932741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260447
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 01:25:46 +00:00
Nate Biggs
182742a61c [dart2js] Migrate masks.dart (and associated part files) to null safety
The changes between inferrer/ and inferrer_experimental/ are identical. The changes were made in one and then the files were re-copied into the other.

Change-Id: I2bb9d54ee39e8b9acba55e5e4c83392e5ab59586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260320
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-09-22 00:29:47 +00:00
Nate Biggs
48b2cb6ea2 [dart2js] Prep for masks.dart null safety migration.
The changes between inferrer/ and inferrer_experimental/ are identical. The changes were made in one and then the files were re-copied into the other.

Change-Id: I5efd388913a2bdab9d6da028c0b753ba7264f3c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260246
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-09-21 23:37:46 +00:00
Paul Berry
3fdc3c2588 Integrate shared type analysis of switch statements with analyzer.
This change replaces ResolverVisitor.visitSwitchStatement
with a call to the new shared type analyzer, and implements the
necessary callbacks to allow analysis to work end-to-end.

Additionally, it changes the convention context types in resolver
methods so that UnknownInferredType is now consistently used to
represent the unknown type (`?`).  Previously `null` was sometimes
used instead.

Change-Id: Idb81a7dc888dfbf460c78b93a99367c0c9263610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-21 23:00:20 +00:00
Konstantin Shcheglov
18a73f7591 Support for resolving RecordType fields through type parameters bound with it.
Bug: https://github.com/dart-lang/sdk/issues/50006
Change-Id: I8b9fcff2c7bb560a764a336c8dceccbfdd06cdaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-21 21:17:46 +00:00
Konstantin Shcheglov
58c07f8d61 Remove assertElement2() for staticParameterElement from MetadataResolutionTest.
We already include this information into textual dumps.

Change-Id: I2c5bc62a758a7907d48851ede92099fffb95989b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260445
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-21 21:08:13 +00:00
Konstantin Shcheglov
f9d6f010b5 Remove unused AST / token extensions for check().
We switched to using textual dumps instead.

Change-Id: Ic8655547a26c927c647c80176fdc5b563b893cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260444
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-21 21:08:08 +00:00
Devon Carew
c63c74ec83 Bump markdown to 87e4c689342d5bbaa84ba2999abf0bff503979be
Changes:
```
> git log --format="%C(auto) %h %s" 32a9450..87e4c68
 https://dart.googlesource.com/markdown.git/+/87e4c68 Bump to 6.0.1 (#462)
 https://dart.googlesource.com/markdown.git/+/37305cf Add deprecated accessors for indicatorForUncheckedCheckBox and indicatorForCheckedCheckBox (#459)
 https://dart.googlesource.com/markdown.git/+/2e5e347 lint cleanup (#456)
 https://dart.googlesource.com/markdown.git/+/a0b5a05 example: small tweak to example – add Dart code (#455)
 https://dart.googlesource.com/markdown.git/+/de32a69 visitText to use textContent getter so subclassing Text class works correctly. (#431)
 https://dart.googlesource.com/markdown.git/+/8247955 Rewrite checkbox(task list) extension (#450)
 https://dart.googlesource.com/markdown.git/+/a602760 Fix crash with mixed checkbox lists (#449)

```

Diff: https://dart.googlesource.com/markdown.git/+/32a94505ded3863b82310b86344a003a19c00341~..87e4c689342d5bbaa84ba2999abf0bff503979be/
Change-Id: I92cf05fe6057e1b3eda8da09fc4eac4f67dd47ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260441
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-09-21 20:55:36 +00:00
Nate Biggs
76169b54a8 [dart2js] Migrate interceptor_data.dart to null safety.
Change-Id: I0c3f767cad1ae372d116a13b408affb967a56f2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260245
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
2022-09-21 19:56:01 +00:00
Nate Biggs
3a7e7430dc [dart2js] Prep interceptor_data.dart for migration.
Change-Id: If3db12dd0fb02c09906503150525d2381c65f2ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260244
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
2022-09-21 19:56:01 +00:00
Alexander Aprelev
46bc947e75 [gardening] Fix gen_snapshot crash on msvc.
Revert change to StringRAII which used to take reference, but was changed to take pointer in 2ead86ab9d

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

Change-Id: I8d8b18e6e9ae3cd07427ee1b37df404d11dcb26e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260402
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2022-09-21 18:16:56 +00:00
Ryan Macnak
1bbb01211d [vm] Fix -Werror=use-after-free in isolate shutdown.
TEST=gcc 12
Change-Id: Ia4aba7b35ee12677799a9aa289a250ae7035ba6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259140
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-21 17:52:01 +00:00
Konstantin Shcheglov
a0b9951a3e Support for RecordLiteral as potentially constants.
Bug: https://github.com/dart-lang/sdk/issues/50000
Change-Id: I73e3367dc6d56472f34765b108b12f0f10c02975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-21 17:51:58 +00:00
Ryan Macnak
68951ae5a1 [infra] Define NNBD versions of the RISC-V builders.
Change-Id: I7cb158d2e30e999564c11454783082837c7e5984
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259901
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-21 17:23:36 +00:00