Commit graph

86996 commits

Author SHA1 Message Date
Mark Zhou 3fd0d96e72 [dart2js] Avoid double-counting used class sizes
Change-Id: I9656f648fabc935868b9b38b074d866d431c5bc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256963
Commit-Queue: Mark Zhou <markzipan@google.com>
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-08-30 22:43:59 +00:00
Brian Wilkerson a76d26545b Add const keyword in record literals to informative data
I'm not sure how to test for this, but I'm guessing that we can't easily
test it until the parser is updated to parse the `const` token.

Change-Id: Iab1e2f7fd1965ebb2c29b1ef88869633a6a1b117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 22:05:18 +00:00
DEPS Autoroller 1b64a514bd Roll Dart Protobuf Support from 19c4eb63e05e to 53a1448f6da7 (1 revision)
https://dart.googlesource.com/protobuf/+log/19c4eb63e05e..53a1448f6da7

2022-08-26 omersa@google.com Remove an old TODO, minor refactoring (#744)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-protobuf-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 Protobuf Support: https://github.com/dart-lang/protobuf/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: I77a29613248c69fbe743eb2ec2c1b9d2196d39c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256401
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-08-30 21:01:48 +00:00
Ahmed Ashour 17e0f87252 [analyser] add MISSING_DEFAULT_VALUE_FOR_PARAMETER_POSITIONAL
Fixes #49816

Change-Id: I48f3c21fcf552e21da70cf12adf3671c3f490695
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 20:55:38 +00:00
DEPS Autoroller f7405d3eb6 Roll Dart Documentation Generator from 14581efa5b7a to 0fc363d60810 (3 revisions)
https://dart.googlesource.com/dartdoc/+log/14581efa5b7a..0fc363d60810

2022-08-30 parlough@gmail.com Remove Material Icons and replace usages of it with Material Symbols (#3135)
2022-08-30 parlough@gmail.com Make theme toggle not selectable and have pointer on hover (#3136)
2022-08-29 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.1.20 to 2.1.21 (#3134)

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: I7927cc9d20ae77032ef7ab3db02270c27fcd2f59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256784
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-08-30 20:07:28 +00:00
Danny Tuppeny 11a5228e2f [analysis_server] Extract declarations search for compilation units
+ review tweaks

Change-Id: I7675cc70d12b923738194e475e2d24267da21237
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256827
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 19:49:18 +00:00
Kevin Moore e11c172432 Fix library entries for 2.18 and 2.19
Correct ordering
Fixed header level

Change-Id: I117ff01793c36e389ecf8ff101f2f82ff0ef5bc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256801
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-08-30 19:16:28 +00:00
Konstantin Shcheglov 9f7c26fe03 Issue 49842. Resolve 'call' simple identifier.
Bug: https://github.com/dart-lang/sdk/issues/49842
Change-Id: Iccad2e6205915cc33fbc8a5d45e79d01c6ec8359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-30 19:07:54 +00:00
Brian Wilkerson 711ec5e387 Record the const keyword for record literals
Change-Id: I0e85efa2634488a4c4f0529daf3a0e10a1ca06a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256922
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 19:00:02 +00:00
Ahmed Ashour 8a551b92c7 [analysis_server] Fix AddSuperConstructorInvocation with named parameters
Fixes #49514

Change-Id: I8eb0095a7fbf770e5e2bda3ba3ec78af40b03afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256842
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 18:59:52 +00:00
Derek Xu b8d4e24338 [VM - Runtime] Return nullptr when allocating a FinalizablePersistentHandle fails
This CL adds checks to ensure that the tracked total size of externally
allocated objects never exceeds the amount of memory on the system. When
the limit is exceeded, then FinalizablePersistentHandle::New() will
return nullptr.

Resolves https://github.com/dart-lang/sdk/issues/49332

TEST=ci

Change-Id: Ib6cc92325b1d5efcb2965098fa45cfecc90995e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256201
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-08-30 18:51:59 +00:00
Ahmed Ashour 0f5d9b080c [analysis_server] don't write if_null for NullLiteral
Fixes #49812

Change-Id: I507ceb3c722f0efdeb02c79a72d31ccf60314495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 18:51:48 +00:00
Ahmed Ashour 991615470f [analysis_server] Add quick fix for combinators_ordering
Fixes #49450

Change-Id: I60f8d703002d94152d31fc4ad192fdab9271ffb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-08-30 18:38:58 +00:00
Ahmed Ashour c8f74cfb7d [analysis_server] fix UseCurlyBraces with comments
Fixes #49539

Change-Id: Iebdfcca17e26389270ce7fc545a9a74b363345d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 18:27:18 +00:00
Danny Tuppeny bd867e630c [analysis_server] Use part's CompilationUnit for path/LineInfo when searching declarations
Fixes https://github.com/Dart-Code/Dart-Code/issues/4129.

Change-Id: I4dbfb0e5837b649cb85458c3c0d2cd067cbcc511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256826
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 17:39:58 +00:00
Konstantin Shcheglov 42ba276bbe Tests for one positional field in record type annotation and literal.
Change-Id: I05cd1b31427e410682465dc06673fce93029c895
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-08-30 17:07:58 +00:00
Ivan Inozemtsev 56df821636 Revert "[deps] rev package:markdown"
This reverts commit 878124b915.

Reason for revert: b/236358256

Original change's description:
> [deps] rev package:markdown
>
> Change-Id: I8f08591fdf2cfc65a9f891b885774ee574bf682b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256644
> Reviewed-by: Kevin Moore <kevmoo@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

TBR=kevmoo@google.com,devoncarew@google.com

Change-Id: I04c1622ab77c13d5bfd4191aa500b73807dd0909
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256823
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2022-08-30 15:55:40 +00:00
Kallen Tu e0884c91f1 Eliminate dynamic call of .createElement in html_dart2js.
Change-Id: I76ab0063eee4213f20483172c16f86e651536945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256740
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-08-30 15:48:40 +00:00
Konstantin Shcheglov 8e4dc26b2a Issue 49842. Resolve call() invocation without a receiver.
Bug: https://github.com/dart-lang/sdk/issues/49842
Change-Id: I44a274da4ca209b34710d6bfc3ae3d18ee62058c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256704
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 15:47:38 +00:00
Sam Rawlins 36affd7014 Analyzer changelog entries for 2.17, 2.18, 2.19
Diagnostic codes which are not in a link do not have a diagnostics page.

Change-Id: Ifedf15e8c956e91a9c498c2496ab9fa3e65844a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-08-30 14:14:18 +00:00
Sam Rawlins 34ef0cf762 Mark some enum diagnostics as needing fix
Work towards: https://github.com/dart-lang/sdk/issues/49446

Change-Id: I5295a1b4bba83026672fa87d56a59e0818dd7e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256800
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 14:05:29 +00:00
Gary Roumanis 75f4e3cfdf [Frontend Server] Handle Nullable Options
Closes https://github.com/dart-lang/sdk/pull/49828

GitOrigin-RevId: 4b77259cfc2e5d640fa0f1111482c918a7af67c3
Change-Id: I2a895a6914d5c3b317d635f5d3f6437220d6650b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256430
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Gary Roumanis <grouma@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-08-30 13:58:47 +00:00
Jens Johansen cec94a1446 [parser] Empty record types, record types with 1 element
This should bring parsing of record types up-to-date with v1.6 of
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md

Also fixes https://github.com/dart-lang/sdk/issues/49826

Change-Id: I3737a72ddee49a957bd55f86cc200fb77f23e2a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-08-30 11:04:10 +00:00
Jens Johansen a4352d09e1 [parser] Record literals can be const and one-element only
This should bring parsing of record literals up-to-date with v1.6 of
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md

Change-Id: If39bb1834137da55ef8bd1923106bbc614ea319b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256461
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-08-30 10:54:08 +00:00
Lasse R.H. Nielsen 3688a4723c Fix bug in Completer.complete.
When given a completed `_Future`, it would complete its own future synchronously.

Fixes #48493.

Bug: https://github.com/dart-lang/sdk/issues/48493
Change-Id: Ic4a68389b5a009ef52b3875bf03a3bafb493f79a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234981
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-30 10:52:27 +00:00
Lasse R.H. Nielsen 9292afa710 Make addStream events be delivered synchronously.
The asynchronous stream controllers were forwarding stream events
from an `addStream` stream through the same path as user-added event,
which added an extra asynchronous delay that is unnecessary for forwarding existing events.

Change-Id: I8edd1936d0d155d051d3cb8f7f82c577334d5f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256560
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-30 08:22:27 +00:00
Aske Simon Christensen 3f66deda68 [dart2wasm] Fix update of per-iteration closure context in for loops
Change-Id: If124d70e4db679376359deaab5e8b2dd6426453b
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256501
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-08-30 06:46:57 +00:00
Kevin Moore 460075336b pkg:compiler - enable and fix use_super_parameters lint
Change-Id: I2d8ae1db222fc70729fda9eeb62296285de9da33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256760
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-08-29 22:56:27 +00:00
Kevin Moore 677cb7fb3e Eliminate more dynamic invocations in pkg/compiler
Change-Id: Ic1d3b118ccb80ea41197c464348f98f962b1ae67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256741
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-08-29 22:51:46 +00:00
Konstantin Shcheglov 999146d1eb Tests for 'contextType' in RecordLiteral fields.
Change-Id: I1fd2f31c96658bf820097a19ec6a17e416af8908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-29 21:58:16 +00:00
Konstantin Shcheglov b99441e749 Issue 49844. Fix reporting DEPRECATED_EXPORT_USE when a library cycle.
Bug: https://github.com/dart-lang/sdk/issues/49844
Change-Id: I67f4dda42d92932566162d4a70c1b5021ff2a683
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-29 21:27:36 +00:00
Alexander Aprelev 6abb6e5110 [io/http] Validate method name passed to HttpClient.open/openUrl.
There should be no control characters or delimiters in method name
provided to open/openUrl methods.

Fixes https://github.com/dart-lang/sdk/issues/45744
TEST=http_open_method_validate_test

Change-Id: I0db98f2376c980a054420fb447d4f7ef9321f1a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256429
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-08-29 21:12:27 +00:00
Mark Zhou 18e4b40dcc [dart2js] Moving dart2js_info coverage helper classes into /lib
Also updates the logic for resolving Angular Info items

Change-Id: Idb5fe1c00db04adc6dcbcf508b01bbf3f8055c2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256603
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-08-29 21:10:00 +00:00
Paul Berry 3095c4542c Shared type analysis: check refutability and report static types.
This change adds logic to compute whether a pattern is refutable or
irrefutable, and reports the error `` if a refutable pattern is used
in an irrefutable context.

Additionally, the methods `handleConstOrLiteralPattern` and
`handleVariablePattern` are adjusted so that they report the static
type of the matcher back to the client.

A lot of internal type analysis logic previously referred to the
static type of a pattern as its "inferred type"; this nomenclature is
corrected to match the spec.

Change-Id: Icaa1118d1da41b28bea2b4f14c47578dacd85807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256641
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-29 21:04:25 +00:00
Joshua Litt 9ed6ac86e2 [dart2wasm] More robust library lookup.
Change-Id: I3320b4e421961a68bf6e6c8fbe1f63bdc4e92064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256218
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-08-29 21:01:56 +00:00
Ryan Macnak 0f96506a45 [vm] Clarify that the Dart_MessageNotifyCallback mechanism notifies once per message.
TEST=docs only
Change-Id: I40561595ecc8075f2f50b7c3dcc32f081d8ac85b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256649
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-08-29 20:32:35 +00:00
Kallen Tu 2bb03e4344 Eliminate .style and ._initKeyboardEvent from html_dart2js.
Change-Id: I16ea832e8eff2b2aea02fb73e1cf7ee9702923af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256581
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-08-29 20:06:45 +00:00
Kallen Tu bcb9fd28fb Eliminate [] dynamic call in io_resource_info.
Change-Id: I80a30d8c31ecc41f2ebf6f7fc8ac6dd41225ea4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256600
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-08-29 18:53:15 +00:00
Ahmed Ashour 23507bf6ab [analysis_server] add a quick fix for AMBIGUOUS_EXTENSION_MEMBER_ACCESS
Fixes #49489

Change-Id: I49b34dd267a2b3b9e6639c3857de546d9f9995d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-29 18:19:00 +00:00
Konstantin Shcheglov a47a75d35c Resolve SimpleIdentifier(s) that reference RecordType fields.
Change-Id: I735a32d1d4f83cca12dec3ac0c811d75644fd16d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256601
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-29 17:48:31 +00:00
Anna Gringauze 6c548cedc2 Make module names and uris match source map relative paths
- Make previous behavior non-conditional
  (already default and flag uses are removed)

- Use relative  paths instead of package uris as module names
  under --debugging-module-names flag, false by default.
  (used as server paths in the browser, need to match relative
   paths in source maps)

- Pass packageConfig to Javascript bundle API

- Add tests

Closes: https://github.com/dart-lang/sdk/issues/49667
Change-Id: I57c2e2629ba5dd756cce9a8ec6ae891fb092e1d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255826
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-08-29 17:41:36 +00:00
Devon Carew bd89be9efa [deps] rev dartdoc, http, matcher, protobuf
Change-Id: I16b4cef0d6d3a337cf7c5a20b8c648e0f6d3cc55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256645
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-08-29 17:40:25 +00:00
Brian Quinlan 8c49f519ce Generate an error when starting Processes on iOS
Bug: https://github.com/dart-lang/sdk/issues/49650
Change-Id: I4fc6ab5fc964eabe45851e7a72abf0db92e2b2f2
TEST=manual :-(
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254981
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-08-29 17:14:36 +00:00
Devon Carew 878124b915 [deps] rev package:markdown
Change-Id: I8f08591fdf2cfc65a9f891b885774ee574bf682b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256644
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-08-29 17:13:55 +00:00
Paul Berry e6caafcc3a Shared type analysis: Make switch vars non-final.
It's been decided that variables declared in switch cases should be
non-final, so we need to adjust the shared type analysis logic
accordingly.  See https://github.com/dart-lang/language/issues/2416.

Bug: https://github.com/dart-lang/language/issues/2416
Change-Id: Ie5e64ffebbd4ffa85e0d4477a3566844050f37af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256640
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-29 12:58:35 +00:00
Johnni Winther bbdb9e4360 [cfe] Handle erroneous super parameters
This correctly registers inferred super parameter types on the type
builder in face of erroneous case, thereby ensuring that dependent
type builders are notified.

Closes #49357

Change-Id: I2d153e9d41ada99808d0c9cba2601ccc15284379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256663
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-08-29 10:59:25 +00:00
Chloe Stefantsova d4a8100908 [cfe] Implement subtype relationship for record types
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I736a4e4f4ba09a80dda1409a1c6640a64ab560f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256480
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-08-29 10:05:35 +00:00
Jens Johansen e811801f0e [CFE] Fix weekly bot #106
Weekly bot fails because of fuzz crashes on macros/scope_access which
crashes with this error:

weak suite stdout> Crashed with 'Bad state: Found 3 entries for file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/testcases/macros/scope_access.dart::Class
weak suite stdout> ' when fuzz compiling.
weak suite stdout>
weak suite stdout> #0      ClosedWorldClassHierarchy.sanityChecks (package:kernel/class_hierarchy.dart:1046:21)
weak suite stdout> #1      ClosedWorldClassHierarchy.applyTreeChanges (package:kernel/class_hierarchy.dart:980:12)
weak suite stdout> #2      IncrementalCompiler._computeTransitiveClosure (package:front_end/src/fasta/incremental_compiler.dart:1759:15)
weak suite stdout> #3      IncrementalCompiler._calculateOutputLibrariesAndIssueLibraryProblems (package:front_end/src/fasta/incremental_compiler.dart:724:25)
weak suite stdout> #4      IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:469:11)


As this area is in flux I've just marked them as crashing.

Change-Id: Ifb30d931c9097c04d227833722ff956619ea7b86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-08-29 09:28:05 +00:00
Paul Berry bd2d261bc6 Shared type analysis: add support for when clauses and fix label support.
Support for `when` clauses requires flow analysis integration, so that
`when` clauses can promote variables, e.g.:

    f(int x, String? y) {
      switch (x) {
        case 0 when y != null:
          // y is known to be non-null here
      }
    }

Support for labels in switch statements had a small flaw: we weren't
reporting an error in the case where a label shared a case body with a
pattern that tried to bind a variable, e.g.:

    f(int x) {
      switch (x) {

        L: // Error: does not mind the variable `y`
        case var y:
          ...
      }
    }
Change-Id: I0b2bb4721a6b3a8f7898df682b24b75ddb6e44ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256605
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-29 03:27:53 +00:00
Paul Berry ac86c134e9 Prototype shared type analysis for switches and variable patterns.
This change introduces the TypeAnalyzer methods
analyzeConstOrLiteralPattern, analyzeExpression,
analyzeInitializedVariableDeclaration, analyzeSwitchExpression,
analyzeSwitchStatement, analyzeUninitializedVariableDeclaration, and
analyzeVariablePattern.  These are sufficient to analyze legacy switch
statements and legacy variable declarations, as well as switch
statements and switch expressions involving either constants or
variable patterns.

Although the code is not used in the analyzer or front end yet, it is
unit tested in isolation, and it's integrated into the existing flow
analysis unit tests.

A few minor tweaks had to be made to flow analysis to support this new
functionality.  There should be no visible effect to existing analyzer
or front end behavior.

Change-Id: Ie8ec31ca92d5f2f7a7f6f6a20ca1baba3c6b28f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256604
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-08-29 03:03:53 +00:00