Commit graph

81922 commits

Author SHA1 Message Date
Alexander Thomas 637fb323d9 [vm] Use UTF-8 to read files in *_layering_check.py
Some files in runtime/ are UTF-8 encoded, e.g.:
runtime/vm/unicode_test.cc

Change-Id: Ie71fd46fb66fe793742dbf8a6645b8402956ab77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-24 09:50:27 +00:00
Alexander Thomas 08ee5989b4 [co19] Roll co19_2 to 13344ad01472df9badfa78fd6aa411f042e13354
2021-09-21 irina.arkhipets@gmail.com Issue dart-lang/co19#1189: Check for JavaScript removed because test is excluded.
2021-09-06 irina.arkhipets@gmail.com Issue dart-lang/co19#1188: test expectation corrected fdor web configurations.
2021-09-06 irina.arkhipets@gmail.com Issue dart-lang/co19#1188: test corrected according to the master changes.
2021-09-06 irina.arkhipets@gmail.com Issue dart-lang/co19#1188: Missing issue tags added, tests corrected according to the master changes.

Change-Id: I78dedc099d5abe83ef0702b2c5f576cfdf97f1c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214400
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-09-24 08:54:35 +00:00
Alexander Thomas eb89f571f7 [co19] Roll co19 to e9f3b0239dedd349084ca1e0b9d2ceacf4b2a1ef
2021-09-23 irina.arkhipets@gmail.com Issue dart-lang/co19#1200: Missing Issue tags added.
2021-09-23 irina.arkhipets@gmail.com Issue dart-lang/co19#1200: Roll failures fixed for LanguageFeatures/Instantiate-to-bound tests.
2021-09-23 sgrekhov@unipro.ru Fixes dart-lang/co19#1201. Add tests that 'late' and 'required' are not reserved words
2021-09-23 sgrekhov@unipro.ru dart-lang/co19#1200. Some of the roll failures fixed
2021-09-22 sgrekhov@unipro.ru Fixes dart-lang/co19#1199. Change the way of checking of constants identity
2021-09-21 irina.arkhipets@gmail.com Issue dart-lang/co19#1189: Check for JavaScript removed because test is excluded.
2021-09-17 sgrekhov@unipro.ru Fixes dart-lang/co19#1198. Add more e<typeArgs> tests instead
2021-09-16 sgrekhov@unipro.ru dart-lang/co19#1198. Remove callable_objects_instantiation_* tests and add e<typeArgs> tests instead
2021-09-16 sgrekhov@unipro.ru Fixes dart-lang/co19#1191. Call method in mixin tests added
2021-09-15 irina.arkhipets@gmail.com Fixes dart-lang/co19#1189: tests corrected according to https://dart-review.googlesource.com/c/sdk/+/212290.
2021-09-15 sgrekhov@unipro.ru dart-lang/co19#1197. Tests for tearing-off forwarding constructors introduced by mixin application added
2021-09-15 sgrekhov@unipro.ru dart-lang/co19#1087. Syntax tests for non-trivial function object computation added

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I0ae1d3a78969339c863c5539557660106ca7622e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214380
Reviewed-by: William Hesse <whesse@google.com>
2021-09-24 08:43:02 +00:00
Sarah Zakarias f7fd4ebcec Add dependency to yaml_edit and bump pub revision
Change-Id: Iaec41d7308c7ebe2a78a3c578b91c56cdad97e12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214280
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-09-24 08:36:24 +00:00
Sam Rawlins 5e0f4c24c5 Move function reference const tests to evaluation_test.dart
This change moves tests out of the older-style test file. In addition:

* additional tests for uninstantiated function tearoff identity.
* additional tests for using a type parameter as a type argument in a
  function tearoff in a const expression.

Change-Id: I6c6a6db13144e02794a62d78337013b4a525549a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214139
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-24 05:39:59 +00:00
Riley Porter e559b80f52 Remove getProperty js_util optimization
Removing usage of the foreign JS function from the js_util
CFE optimizations. Keeps foreign JS calls only injected by
the compilers. There will be no change in generated JavaScript
for dart2js, it was already inlining getProperty calls. There
will be a small change for generated JavaScript for ddc, but
we will work on adding a simple ddc inliner to account for it.

Change-Id: Iadcc81a6798a8af397205bf6bb89d0bfbd095432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214306
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-09-24 01:41:48 +00:00
Riley Porter dc4d16fc1b Use Extension Member data instead of desugar api.
Swap to finding the mapping of Procedure to ExtensionMemberDescriptor
data, instead of using the front_end desugar api for extension
member kind, name, and isStatic information.

Change-Id: I4bca55e8f1d3044def420060ddecc75600452a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214305
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-09-24 01:41:48 +00:00
Ben Konyi bd067153d5 [ CLI ] Hide exe and aot-snapshot subcommands from dart compile on IA32
The AOT runtime is not supported on IA32, so generating snapshots and
executables requiring the AOT runtime is not possible on IA32.

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

TEST=pkg/dartdev/test/commands/compile_test.dart

Change-Id: I99e9a16f6a93b3b63b8ed15acc1472f9ca619c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213680
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-09-24 01:21:08 +00:00
Bruno Leroux 2481cf76f5 [ VM / Service ] Fix 'dart:' scripts lookup
Bug: VM service `addBreakpointWithScriptUri` and `addBreakpoint` don't add valid breakpoints for code in `dart:` libraries. See #47204

This PR contains :
- a new test : 'service/break_on_dart_colon_test.dart', that checks several URIs to register breakpoints in `dart:` libs.
- a fix in `Debugger::SetBreakpointAtLineCol` to make it calls `Library::LookupScript'` with the right value for `useResolvedUri` parameter.

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

TEST=runtime/observatory/tests/service/break_on_dart_colon_test.dart

Change-Id: Id3d6722c278e3238202a9d84a0d34612b957035c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213766
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-09-24 01:20:38 +00:00
Konstantin Shcheglov ec29dce8e0 Remove CompilationUnitElementImpl.sourceContent
I hoped to get hints on why we get out of sync with the number
of classes, getters, etc in the AST and the element model. Unfortunately
it don't not help, we might have a unit without any variables, the
corresponding code, but AST has variables.

So, this code does not help, and I want to remove it.

It was also used for Move File refactoring, we would need some different
solution later. For now I revert to the state it was not long ago.

Change-Id: If7468aac33ce000f85e94f96bfa2d2966892e560
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 22:59:09 +00:00
Kevin Moore 6459e73570 telemetry: allow the latest pkg:usage
Change-Id: I2c3d97b5b999e03682e60a6a62947257f597c182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214308
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 21:49:28 +00:00
Paul Berry 5f73b659e8 Extract non-error-code-related members from TodoCode.
This paves the way for code generation of the `TodoCode` class.

Change-Id: I25e113f90194f3f7ac5ab0ae2a17b9836e56b835
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-23 21:16:08 +00:00
Paul Berry 1042903683 Fix some analyzer error codes that have gotten out of sync with their declarations.
Change-Id: Ifa803f6fd86db7aa6f73abf83e85bee1f83ee6b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214074
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 20:20:28 +00:00
Sam Rawlins 032738141e Fix constructor references in assignments
I maintain the choice to _not_ rewrite a PrefixedIdentifier to a
ConstructorReference in the case that it is the left side of an
AssignmentExpression, because doing so requires extra additional
checking during assignment verification, and probably a new error code
saying a constructor cannot be assigned to, similar to the error code
saying that a method cannot be assigned to. This is all feasible, but
I think it is very reasonable, in AstRewrite, to say, "This prefixed
identifier does seem to refer to a constructor, but it's the left
side of an assignment, so I'm not going to confidently do a rewrite;
instead I will leave this alone and let the assignment verification
code handle it."

Bug: b/200948019
Change-Id: I90c6a157c2992d4935acfb593f38518f0388bced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-23 19:38:49 +00:00
Alexander Markov e7ce24744b [vm] Take number of base type parameters into account when checking equivalence of function type parameters
When checking if type parameters are equivalent for subtyping,
check both base and index of the type parameter to avoid matching
type parameters from different levels. For example, consider
the following function types:

  void Function<S>(S val) Function<T>(T val)
  void Function<S>(T val) Function<T>(T val)

Also, when instantiating a signature of a closure, correct
base/index of type parameters even if they are not instantiated.

TEST=language/function_subtype/nested_function_type_test
TEST=language/closure/nested_generic_closure_test

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

Change-Id: I6f75a4ee70435f42afeb772e7ecc680ab75a7520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214136
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-23 18:47:58 +00:00
Konstantin Shcheglov 6207d1da35 Revert "Stop using available suggestions for already imported libraries"
This reverts commit 3cc518b3cc.
Initial CL: https://dart-review.googlesource.com/c/sdk/+/201021

Bug: https://github.com/flutter/flutter-intellij/issues/5761
Change-Id: I62e57deef819f78f1d08934ad924585eaa52223b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214225
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 18:39:07 +00:00
Konstantin Shcheglov 57e71e33c5 Fix RemoveUnusedField when some SourceRange(s) being removed are fully covered.
Change-Id: I7ae8b9286c473a368def9c9db22b2f2b828c7b81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 16:34:03 +00:00
Alexander Thomas 19b7a3e2b5 [infra] Use dart-lang/co19 issue links in co19 rolls
* Add dart-lang/co19 in front of #123 issue references.
* Update the co19_2 script to match the co19 script.
* Track main from the roll branches.
* Add a comment between the two co19 hashes to prevent merge conflicts.

Fixes: b/200911019
Change-Id: I2806ac7e9cd5ff3d24cac0e50a1d094163b35d7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214046
Reviewed-by: William Hesse <whesse@google.com>
2021-09-23 15:51:06 +00:00
Lasse R.H. Nielsen 651d6e076b Add null-unsoundness check to print's object.toString() result.
This makes it an *earlier* error if a `toString` method returns `null`
when passed to `print`, possibly a new error if the underlying platform's
print implementation let `null` through.
Returning `null` is something `toString` was never supposed to do,
and with null safety, it's enforced by the type system,
so only pre-null-safety legacy code can actually return `null`.

Makes the error message from `NotNullableError` not assume a parameter,
so it can be used in more places.

Bug: https://github.com/dart-lang/sdk/issues/47196
Change-Id: I7f10156330994d31e44384fa952dd88385e2628d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214043
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-09-23 15:36:23 +00:00
Chloe Stefantsova 65184a9ff4 [cfe] Don't serialize an empty show/hide clause
TEST=existing

Change-Id: Ie63444c4dbeaa45b38fd195e554780f14fed878e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213767
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-23 14:01:54 +00:00
Jens Johansen 1197e15a7e [CFE] Enable avoid_void_async lint
This CL enables the avoid_void_async lint in the CFE, makes the needed
changes and adds the missing `await` (because the lint
`unawaited_futures` doesn't react to void async methods).

Change-Id: Iffc1f173badd3c2d48356ee02e81a9aed492ce5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213481
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-23 11:58:18 +00:00
Johnni Winther 2fa89236d7 [cfe] Handle potentially constant types in instantiations
Part of https://github.com/dart-lang/sdk/issues/46232

Closes #47154

Change-Id: I71fe16d26facf29bdae1b98971c4ccfe18f95e80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213772
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-23 09:04:12 +00:00
Erik Ernst 93d2f90383 Add test about type parameter as constant
Change-Id: If9ecc60b835944897366e716ed90896dbecc3f87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213769
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-09-23 07:46:24 +00:00
Konstantin Shcheglov aad3389eb0 Implement LintDriver using AnalysisContextCollection.
This change requires a change to linter to be rolled.
https://github.com/dart-lang/linter/pull/2949

Change-Id: Ib49438e0dcd6145d79f2914fef30af5e3009e14f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213290
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 06:45:03 +00:00
Konstantin Shcheglov b553298024 Deprecated TypeName, use NamedType instead.
Change-Id: Ic7c2bef44277db3d4b3de495fbf9fbadf15f3db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-23 06:08:34 +00:00
Nicholas Shahan 6c4593929f Reland "[ddc] Add web library environment variables"
This is a reland of fb36bba5f2 with
a fix to the ordering to ensure all the expectations run.

Original change's description:
> [ddc] Add web library environment variables
>
> Ensure frontend server builds for the `DevCompilerTarget` add the
> environment variables needed for `bool.fromEnvironment()` calls for
> conditional imports.
>
> Change-Id: Ifd372c1cf385fc843534d85af1ac9ae75a6285b8
> Fixes: https://github.com/dart-lang/sdk/issues/47207
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213802
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: Id88aeaf0ddc783936d413c06099df031bc7cb0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214224
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-22 23:47:40 +00:00
Paul Berry 68aac9d9ec Fix uniqueName for analyzer error codes.
Previously, we had an inconsistent convention for whether the class
name should be included when supplying an optional `uniqueName`
parameter to an error constructor.  (Some error class constructors
added it automatically, others didn't).  And we didn't always follow
the convention properly, so some errors were missing the class name
from their `uniqueName` property.

This change adopts the consistent convention that we never include the
class name when supplying an optional `uniquename` parameter to an
error constructor; it is always added in automatically by the
constructor.

Change-Id: Iff7a213b9fe05b1539c22bdbf935c6e54d49f3e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-22 22:55:00 +00:00
asiva b7de66efd3 [Runtime/VM - Enable SUPPORT_TIMELINE even in product mode for Android
Please see https://github.com/dart-lang/sdk/issues/47264

The Flutter team would like to turn this on in product mode for being
able to systrace release applications.
This change could have potential size and performance regressions and
will be monitored as it rolls into Flutter. If the impact is not within
acceptable ranges it can be rolled back.

TEST=ci

Change-Id: Iad6f9b831eaf60d15f03e368702fb25bc9ebc76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214241
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-09-22 22:35:32 +00:00
Riley Porter 9013986b3b Skip extension tests that use eval on CSP build
Change-Id: Ia4ab60156cca5dacbcf998c2dbefb19bf9eaa847
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214240
Commit-Queue: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-09-22 22:33:52 +00:00
Nicholas Shahan d0e013b49a Revert "[ddc] Add web library environment variables"
This reverts commit fb36bba5f2.

Reason for revert: New test fails on windows configurations.

Original change's description:
> [ddc] Add web library environment variables
>
> Ensure frontend server builds for the `DevCompilerTarget` add the
> environment variables needed for `bool.fromEnvironment()` calls for
> conditional imports.
>
> Change-Id: Ifd372c1cf385fc843534d85af1ac9ae75a6285b8
> Fixes: https://github.com/dart-lang/sdk/issues/47207
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213802
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,nshahan@google.com,annagrin@google.com

Change-Id: Iedfc4c1a5b24b515646d4f1b486bcb2f19bb7783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214222
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-22 21:33:26 +00:00
Konstantin Shcheglov e1b5db7478 Deprecate getters that return TypeName, replace with returning NamedType.
Change-Id: I13764db3da27d5eabe972aab32cdf587a7de53e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-22 21:01:58 +00:00
Kevin Moore 4d82adb91f dart:html: use Object.hash
Drop custom hash class

Related to https://github.com/dart-lang/sdk/issues/27698

Change-Id: I7f5fb3a642e5ae461a00ed1b5d307adb4ef448df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214181
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-22 20:47:17 +00:00
Nicholas Shahan fb36bba5f2 [ddc] Add web library environment variables
Ensure frontend server builds for the `DevCompilerTarget` add the
environment variables needed for `bool.fromEnvironment()` calls for
conditional imports.

Change-Id: Ifd372c1cf385fc843534d85af1ac9ae75a6285b8
Fixes: https://github.com/dart-lang/sdk/issues/47207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213802
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-22 20:39:44 +00:00
Stephen Adams 2ad84a22c8 [dart2js] dart format --fix on remaining lib/src/ files
Change-Id: I09b77a6ba8ed590b3b53ed328c9fc8def444b729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214001
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-22 20:39:14 +00:00
Kevin Moore 1809cb757f analysis_server_client: remove unused JenkinsSmiHash class
Towards https://github.com/dart-lang/sdk/issues/27698

Change-Id: I403a3e7fdc232debd0a527a8cc69692596516653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214221
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 20:20:24 +00:00
Riley Porter a0d9d35b80 Add external extension methods.
CFE transformation to add a function body for external
extension methods. Routes to `js_util.callMethod` with the
arguments in a ListLiteral to then be further optimized to
the `callMethodUnchecked` version if possible.

Change-Id: Iccdda7b8c16c19b37e20b7cbceb8c32498e64d3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213721
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-22 19:52:10 +00:00
Sam Rawlins 1379c867a4 Check type parameters in const function tearoff
Fixes https://github.com/dart-lang/sdk/issues/47213

Change-Id: I6c1c7e386e64b877e1ea7d312335d924488f2306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214134
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 19:36:04 +00:00
Stephen Adams f1e6092dd8 [dart2js] More shared_messages.dart cleanup
- Remove references to deleted file.
- Remove message that is unreachable in kernel.

Change-Id: I5fe772a3a6fbd00b31d085f10c47d63778a64217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214071
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-22 19:20:54 +00:00
Konstantin Shcheglov 1c125b4868 Deprecate AstVisitor.visitTypeName(), add visitNamedType().
Change-Id: I736a568068c2acfdc7074bb16b11fd38b656a13a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214135
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 19:15:54 +00:00
Kevin Moore cb7c932f7b analyzer: use Object.hash functions, deprecate JenkinsSmiHash
Also bump min SDK for pkg:analyzer

Towards https://github.com/dart-lang/sdk/issues/27698

Change-Id: Ic32c839c02f18afd99fdb98eb382540aae7da88a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214126
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 19:11:24 +00:00
Konstantin Shcheglov 31922b8c57 Fix an invalid null check in InlineMethodRefactoring.
Saw it failing in the crash log.

Change-Id: I6cf715aeb6f41e405af58a00b69b8742fd7c5ed0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 17:53:10 +00:00
Ryan Macnak 9854a04210 [vm] Remove dead Thread::pending_functions_.
Cf. c9f5c3a79e.

TEST=build
Change-Id: I9edff8afaf277b03c4dfdcdbea9ba244dde577ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213740
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-22 17:16:36 +00:00
Ryan Macnak 306718fe1e [vm, compiler] Fix FFI callbacks on ARM64C.
HEAP_BITS must be initialized before any variant of LoadCompressed is used.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/47259
Change-Id: I01ebb4e6c2eee1e61e15c1d8cc2913d0db27c2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214124
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-09-22 17:11:36 +00:00
Mayank Patke d992af7e9c [dart2js] Preserve "signatures" when lowering late variables.
When we lower an uninitialized static field to a cell, we gives the cell
a mangled name and create a getter/setter pair with the original field
name. The getter/setter simply call the appropriate members on the cell.

This means that other libraries, even ones that haven't been transformed
(e.g. during modular compilation) will still interoperate correctly,
since the transformed library still has the same external signature.

Change-Id: I88edcb71fa5cb910869b4266628a029ad358b77e
Fixes: https://github.com/dart-lang/sdk/issues/45854
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214064
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-22 16:55:26 +00:00
Konstantin Shcheglov 31a04e775d Remove the path from the file read exception message.
Change-Id: Ic43ce2132344fd64bdff31fd1105796cb6204847
Bug: https://buganizer.corp.google.com/issues/200468974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 16:53:07 +00:00
Konstantin Shcheglov dfd7d7b37a Deprecate NodeList<TypeName> getters and replace with NodeList<NamedType>.
Change-Id: I6a772a7bca75e9c2ab4b3612d51c04ea6114ed6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214130
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-22 16:25:56 +00:00
Johnni Winther 6c4b75237a [kernel] Rename isFieldFormal to isInitializingFormal
+ update ast-to-text, including previous renames of covariant

TEST=existing

Change-Id: Ia29847cba791096ccd9c6c383a1b633a6150cd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214042
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-09-22 15:56:07 +00:00
Paul Berry df6bb1f786 Fix duplicate test case.
It's clear from the comments that the first case was meant to test the
variable `v` (which has type `Object?`), and the second was meant to
test the variable `d` (which has type `dynamic`), but they
accidentally were both referring to `v`.

Change-Id: I1c36350689d20fa8d86c7d1c66918307f5fe2253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214132
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-22 15:47:26 +00:00
Konstantin Shcheglov fdf5014697 Get the language version of BazelWorkspace from the dart/build_defs/bzl/language.bzl
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/398141496/OCL:398141496:BASE:398160873:1632289516597:2c6df414/targets

Change-Id: Ibe12b4d0709cd38be0307a6c211962dca7a69de6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214075
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-22 15:17:47 +00:00
Konstantin Shcheglov 34f1bddb88 Replace TypeName with NamedType in AstTestFactory.
Change-Id: I9920d1a3394c179a066f8a8ab339284e682175ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214129
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 15:01:59 +00:00