Commit graph

81948 commits

Author SHA1 Message Date
Konstantin Shcheglov 0c893bfd7f Rename assertTypeName() to assertNamedType().
Change-Id: I959da4662efccdb1d89fbf13eb23220439e6dd34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213980
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 15:00:22 +00:00
Stephen Adams 5c719b3bd3 [dart2js] Simplify message templates
Change-Id: I8e3f33664a3e7944e1b2d6bcf09bebd74c7b826e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214003
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-21 12:45:02 +00:00
Alexander Thomas b3cfd293ad [infra] Allow arm64c on Android configurations
* Fail test.py if an invalid named configuration is used.

Cq-Include-Trybots: luci.dart.try:vm-ffi-android-product-arm64c-try
Change-Id: Ib700511a639ee39fd58441dd6fee8bd6dad8c2e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214040
Reviewed-by: William Hesse <whesse@google.com>
2021-09-21 10:15:29 +00:00
Stephen Adams 0071b38172 [dart2js] dart format --fix in kernel/
Change-Id: Iab8c98930c6add208679074c562f129e797af780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213970
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-21 02:01:08 +00:00
Mayank Patke 35421c5d1a [dart2js] Update MethodTypeInformation to narrow the return type of
_lateReadCheck.

Change-Id: If76a5b34cfd9da9721bfa0d8642b018a4af131dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213901
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-21 01:59:45 +00:00
Stephen Adams 9872fd192e [dart2js] Modernize allocations in js_emitter/
Change-Id: Iecdde5c8940ede24f4ac428a624984a0b2ca4f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213963
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-21 01:05:15 +00:00
Stephen Adams 048dd185c6 [dart2js] Modernize allocations in js_model/
Change-Id: If93776e2f556e8d7adfdbe5e3603f7477e0486f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213902
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-21 00:22:55 +00:00
Nicholas Shahan 85a12eac55 [ddc] Fix missing type variable bounds subtype check
When testing the subtype relation between two generic function types,
uninstantiated type variables can appear as an argument or return type
of one function while a concrete type appears in corresponding
position of the other function. A subtype relation can be established
if the bound of the type variable is a subtype of the concrete type.
For example given a type variable T with bound B and a concrete type
C we can say:

T <: C when T <: B <: C holds.

T <: B is true by the definition of interface subtypes `T extends B`.
This change adds a test for B <: C.

Add a new class used only when it appears we may need to test these
subtype relations. The class is used to plumb the bound information
of type variables further into the subtype check algorithm where it
is now tested.

Add a top level variable to index the total number of type arguments
seen during a subtype check through nested function types.

Change-Id: If6aa13e7b758f7fedcb5dbd8e09d366082198e61
Fixes: https://github.com/dart-lang/sdk/issues/38816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213527
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-09-20 23:29:45 +00:00
Nicholas Shahan e8cd9f0c44 [ddc] Refactor _isInterfaceSubtype
Move the method body out of one giant JS foreign function and into
Dart code with small JS foreign function calls inside.

* Removes the confusion around what it actually means when we use
  Dart String interpolation within the JS function template.
* Highlights the operations that actually need the JS foreign
  function.
* Allows for syntax highlighting and automatic formatting of this
  code.
* Allows for IDE "jump to definition" for class members that were
  previously inside the template.

These changes were developed by diffing the compiled output to
ensure the changes were as minimal and inconsequential as possible.
Intentional diffs include:
* Add a required message argument to `dart.assertFailed()`.
* Add local variables for `varianceType`, `typeArg1`, and
  `typeArg2`.

The only other diff was the loop variable incrementing:
`++i` -> `i = i + 1`

Change-Id: I76a1522fa4950f05748f905e1aec32c8b7dd4670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213526
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-09-20 23:06:55 +00:00
Alexander Aprelev d46f474d79 [dartfuzz] Fix time units in 'Isolate busy' message
Change-Id: I3d14763a2607ef47a51883a2acaf7545e63358ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213964
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-09-20 22:04:15 +00:00
Janice Collins 524a72a28a Update dartdoc version to 3.1.0.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v3.1.0

Change-Id: I7b08ea2ad84b478c62723ecbb4aef788d36f9f35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213962
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 21:49:25 +00:00
Konstantin Shcheglov 064a7cca5f Tweak the type check and remove a cast.
Change-Id: I4524e0a52300854a88bb89067e6c9c604308a118
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213961
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 21:36:29 +00:00
Nicholas Shahan cf7d46097b [ddc] Refactor _isSubtype
Move the method body out of one giant JS foreign function and into
Dart code with small JS foreign function calls inside.

* Removes the confusion around what it actually means when we use
  Dart String interpolation within the JS function template.
* Highlights the operations that actually need the JS foreign
  function.
* Allows for syntax highlighting and automatic formatting of this
  code.
* Allows for IDE "jump to definition" for class members that were
  previously inside the template.

These changes were developed by diffing the compiled output to
ensure the changes were as minimal and inconsequential as possible.
The only diffs that appeared beyond the intentional addition of
the `t1Bound` and `t2Bound` local variables were:

* Using the top level variable for a type:
  `dart.nullable(core.Object)` -> `T$.ObjectN()`
* Loop variable incrementing:
  `i++` -> `i = i + 1`

Change-Id: I55fa3fa94b984c67b18a744837843d458231c4d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213525
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-20 21:28:29 +00:00
Stephen Adams a666e5a221 [dart2js] dart format --fix in serialization/
Change-Id: I0e14a6fad41721380fbd406104932c7a8011e4ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213960
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 21:28:26 +00:00
Sam Rawlins f12333dfa0 Resolve more cases of .call; correct many cases of PropertyAccess receivers
Fixes https://github.com/dart-lang/sdk/issues/47211

Much of this change is about decision-making based on the _type_ of the
function in a FunctionReference, or the receiver of that function, in the
case of prefixed identifiers or property access.

Previously, there was a rule that only direct references to functions
(top-level, local, and method) could be torn off and type-instantiated.
That rule has been reversed (#1812), so a lot of unraveling has to be
done here.

`e.call<...>` is now legal for _any_ generic function-typed expression
`e`, which certainly may be an expression without a staticElement.
Additionally, `e<...>` is now legal for _any_ generic function-typed
expression `e`.

Because we no longer resolve PropertyAccess piecemeal, we no longer
report UNDEFINED_IDENTIFIER or UNDEFINED_PREFIXED_ELEMENT etc before
deciding to check if a tearoff is being made on a function-typed
element. The unfortunate side-effect here is some redundant
error-reporting. :( I've left TODOs.

Change-Id: I62106332e39d528cbd7cdfa5ec831dc56b394b52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 20:17:35 +00:00
Sam Rawlins 5c83d863ef Delete 3 classes from analyzer's deprecated parser
Change-Id: I8aec6064215969023d23a871e10c1aa22fdc2f7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213848
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 19:16:04 +00:00
Sam Rawlins c260f251a7 Remove redundant imports from compiler
In many files, there is a redundancy in importing

    import 'package:compiler/src/common.dart'
    and
    import 'package:compiler/src/diagnostics/diagnostic_listener.dart'

I chose to remove the latter import.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ia6c871080bf2d7c637694a4fe5cb1b84e540b789
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213851
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 19:14:33 +00:00
Stephen Adams cc73b9001f [dart2js] dart format --fix in inferrer/
Change-Id: I105784a65c1f4c0748bab157522af3bcc2aad066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213862
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 19:06:13 +00:00
Joshua Litt dffb06bca9 [dart2js] Address some feedback in algorithm_state.dart.
Change-Id: I9c96ca7294318d7f28f692791ba5ce9518f18f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212023
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-20 19:03:23 +00:00
Stephen Adams 427af76e0b [dart2js] dart format --fix in js_emitter/
Change-Id: Ib4ba65b922ef687adc355c41b3ae23d337659f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213863
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:40:13 +00:00
Konstantin Shcheglov 45bfa70348 Put the path back into file not found exception.
Its absence causes a dartdoc test failure.

Bug: https://github.com/dart-lang/sdk/issues/47220
Bug: https://buganizer.corp.google.com/issues/200468974
Change-Id: I0fe8af902cd9a11abb0102ce4744c57f1738ab5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 18:39:27 +00:00
pq f1824fb1e7 linter 1.12.0
Change-Id: I1dd5a8b56144ce48d38eea0d1ef64e5f7a983552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-09-20 18:32:11 +00:00
Stephen Adams 552573ac93 [dart2js] dart format --fix on ir/
Change-Id: Iae34547b8ea7840fdd7b6e5c3b95e8ee4ca3e670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213861
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:31:25 +00:00
Stephen Adams 6e3de72138 [dart2js] dart format --fix on js_model/
Change-Id: Id06c441e16c2a0d8df96e9d525ce887f269e4e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213860
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:24:03 +00:00
Stephen Adams d4385e620d [dart2js] Modernize allocations in js_backend/
- Use `{}` syntax for Maps and Sets
- Remove type arguments on right side of initializations with same
  type arguments.
- A few cases of replacing conditional code with `??`/`??=`.

Change-Id: I1b58a109b1f8ea8458f37a2de256ffb3dc9956b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213853
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:23:23 +00:00
Paul Berry b2347f66ce Fix reporting of CompileTimeErrorCode.PRIVATE_SETTER
The error code text is:

    The setter '{0}' is private and can't be accessed outside of the
    library that declares it.

So when instantiating this error we should only provide a single
argument.  Previously we were providing a second argument that was the
name of the type.

Change-Id: I952dec86f079b9e17e071d37895c3b38c715cf4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213826
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-20 17:52:53 +00:00
Paul Berry 3ae5055f75 Translate named placeholders to positional in generation of syntactic_errors.g.dart.
Previously, if a CFE error contained a placeholder (such as
`#string`), that wasn't converted to the equivalent analyzer
placeholder, which meant that analyzer error reporting logic needed to
know whether the error being reported came from the CFE or the
analyzer in order to report the error correctly, otherwise the
placeholder text would just show up verbatim in the analyzer output.

Change-Id: If875de3a1a80048700b0edf458377c5fc87a15d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213281
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 17:51:40 +00:00
Konstantin Shcheglov 4d3f45db2c Issue 47241. Fix FunctionExpressionInvocation of a cascaded getter.
Bug: https://github.com/dart-lang/sdk/issues/47241
Change-Id: I8f6c7e418970f3a696df2561ba3a62cffb8e23a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 17:36:37 +00:00
Sam Rawlins 08bb058e72 Remove redundant import from _js_interop_checks
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I6fa385eddc76397ce4944674bd548a16755f265d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213850
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-09-20 16:58:24 +00:00
Paul Berry 204338d17c Fix reporting of HintCode.INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION
The hint code text is:

    The declaration '{0}' is annotated with 'visibleForOverriding'. As
    '{0}' is not an interface member that could be overriden, the
    annotation is meaningless.

So when instantiating this error we should only provide a single
argument.  Previously we were providing a second argument that was the
name of the annotation; this is unnecessary because the error message
already mentions the annotation name ('visibleForOverriding').

Change-Id: I022af6914668ad6232005237619b3ab9a5d7a589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-20 16:51:51 +00:00
Brian Wilkerson 98d28c08ee Improve the highlight range for non_sized_type_argument
Change-Id: I1c54df8e8f5c167fdb87053cca181cd52ee6f853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213823
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 16:50:21 +00:00
Sam Rawlins d6f0e39f30 Remove redundant import from dev_compiler
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Iab83d15b0f6c5448b75881fcba8c8ea177feab71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213852
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-09-20 16:37:41 +00:00
Brian Wilkerson e061501495 The diagnostic wrong_number_of_type_arguments_function does not have published docs
It was incorrectly marked as having them. Attempting to navigate to docs
opens the correct page but there's no docs to open to so it leaves the
page scrolled to the top.

Change-Id: I862fa215ee59e8aa1200a7e33186e91528b8ef19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-20 15:54:03 +00:00
Sam Rawlins 9f0c408376 Remove redundant imports from front_end
Very often there were two imports of the same URI, one of which also
had a `show` combinator. I opted to remove the other one.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I1263c892f94f0645fda6dee371dfc1fcddcd2344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213846
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 15:33:43 +00:00
Sam Rawlins 8d04e49078 Remove redundant imports
Each of these imports removed is redundant with
'package:kernel/ast.dart'.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ia9bc08b4ffd863572c84fe8a4fa465d2e8e04f7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213845
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 15:25:01 +00:00
Sam Rawlins 51d5c58d6a Remove redundant imports from analyzer
Many of these are a redundancy between
    'package:analyzer/src/generated/source.dart' and
    'package:analyzer/src/generated/source_io.dart'

I chose to remove the latter, for no particular reason.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ic69b09fd502c978cef9e4d3b8a0ef9acd92d5184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 15:22:51 +00:00
Sigurd Meldgaard 38035534a3 Bump pub to 370575258503ca4cb11d6449e82a1c4fd7c2777f
Changes:
```
> git log --format="%C(auto) %h %s" cafadd17ba285dad9ebe6d34c617bc0d70d096b3..370575258503ca4cb11d6449e82a1c4fd7c2777f
 37057525 Do not allow: dart pub token remove --no-all (#3116)
 f9f6a594 Disable echo mode on secret token input (#3121)

```

Change-Id: I238720b4f7aa75bd9e55aabc7c9bea7de678de8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213763
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-09-20 12:18:21 +00:00
Jonas Finnemann Jensen 88f9505102 Roll cli_util
```
$ git log --format="%C(auto) %h %s" 8c504de5deb08fe32ecf51f9662bb37d8c708e57..c2dc871784b59720e6cf5794dee1a20735df3feb
 c2dc871 Introduce applicationConfigHome (#66)
 86e72b5 Revert to 'meta: ^1.3.0'. (#65)
 cfd1836 Update  constraint to '>=1.3.0 <3.0.0'. (#64)
 16e8994 enable recommended lints (#63)
```

Change-Id: I0191d2b2dadafed2e93b354d207d32ef79fa51d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213760
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2021-09-20 10:50:51 +00:00
Jens Johansen e4ddc7801a [CFE] Mark 'dart2js/late_from_dill/main' as SemiFuzzFailure (by design)
Change-Id: Ifa53ce1e43737a39841bf185a1288527556d1644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213771
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-09-20 09:23:53 +00:00
Johnni Winther 3fd4283295 [cfe] Remove exports from internal libraries
Change-Id: Ief854e97f5cd3c8a04137ec6682f8193946abcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213770
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-20 08:28:00 +00:00
Brian Wilkerson d45095c4d7 Improve the highlight range for packed_annotation_alignment
Change-Id: I8b526afaa00c185024c180b849fc0b93cdb16098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213824
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-20 05:18:42 +00:00
Brian Wilkerson 01cf350483 Improve the highlight range for non_positive_array_dimension
Change-Id: Ibd2eabda9adf2489f52fc988c97b5452765cc2a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213822
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-20 05:18:40 +00:00
Stephen Adams 5f7a18b492 [dart2js] dart format --fix in js_backend/
Change-Id: I35f5564601c76ff0c8bb141fa3902484ce8e82bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213842
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 01:53:50 +00:00
Sam Rawlins 4ff0cb2ac3 analyzer: Migrate some tests from constant_test to value_test.
In particular:

* integerDivide tests are well-covered in value_test.
* There was not great coverage for logicalShiftRight, so I improved
  coverage in value_test.
* remainder tests are well-covered in value_test.
* shiftLeft tests are well-covered in value_test.
* shiftRight tests are well-covered in value_test.
* times tests are well-covered in value_test.

Change-Id: I4d9e584119dbd9c05ad5deae783429636a0b9218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-19 21:54:30 +00:00
Konstantin Shcheglov 28738dfad0 Store data objects for File/Folder in MemoryResourceProvider.
And by storing the list of child names in a folder we can implement
Folder.getChildren() more efficiently.

Bug: https://github.com/dart-lang/sdk/issues/47220
Change-Id: I893dffd6ada4095b8580ec5d469142478f57f284
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-19 20:43:01 +00:00
Brian Wilkerson b1d878fc8f Add a fix for avoid_print that makes the invocation conditional on kDebugMode
Change-Id: I922f8f51d40127032573acadcdb76a37c005f48c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213801
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-18 15:42:43 +00:00
Ahmed Ashour a24d875ff6 ChangeBuilder.writeType to handle nullability of Function
Bug: 29050
Change-Id: I2ec8e0a49c626f75ebd1d21adad5d0d63123c54f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-17 22:26:09 +00:00
Anna Gringauze df4671a77a Split expression compiler worker tests
Expression compiler worker tests sometimes reach the timeout limit
on CI machines, split them into two batches.

Closes: https://github.com/dart-lang/sdk/issues/45484
Change-Id: I502de5d768f29be862e593379e3a906ec6c21eb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213734
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-09-17 20:28:41 +00:00
pq a1bafa191c stop needless (re)mapping of globs
See: https://github.com/dart-lang/linter/issues/855

Change-Id: I5b07bf77ae5b17c32561d2ec14dd34347866b4eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213733
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-17 19:41:04 +00:00
Johnni Winther 9a97bb58d5 [cfe,dart2js] Add late from dill dart2js test
This tests how the CFE handles loading dills with the dart2js
late lowering.

The currently fails because the fields have changed type and
assignability, as seen from the CFE perspective.

Change-Id: I2229db29144538f0cf5c2ea88c4453c58032d4b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213768
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-17 19:07:21 +00:00