Commit Graph

31566 Commits

Author SHA1 Message Date
Kenzie Schmoll 70bbc663e2 Remove dart:io dep from utils.dart and add conditional imports for File
Change-Id: I92c00dc0a44fffda81aaec13a4598815b4148d32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154283
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2020-07-13 23:19:19 +00:00
Ben Konyi 28cd9ff533 [ package:dds ] Fix issue where StateError could be raised when a
client disconnects from DDS after the VM service has shutdown

Change-Id: I4f6734a125a622ff5042e39e00a1110bbe67d155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154288
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-07-13 23:03:09 +00:00
Nicholas Shahan 7478143e5f [ddc] Inline the sound null safety flag
Now that the sound null safety mode is a compile time flag
instead of a runtime flag there is no need to set the value in
the bootstrapping code before running main(). The sound and weak
versions of the sdk now have it already set.

Add compileTimeFlag() method that will inline the constant value
directly into the generated output.

Change-Id: I5b9243c47cffc421067ac820ef49342b9d0efff9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154100
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-13 22:45:19 +00:00
Konstantin Shcheglov 69d11907ec Support for data attachments to OperationPerformance.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I674f2eaa271d9c2bbf9a82831bfeaff1ca765264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154286
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 22:34:19 +00:00
Konstantin Shcheglov 623b5853ad Instrument getAnalysisOptions() for Cider.
R=keertip@google.com

Change-Id: I349a735c00b4e83827310f55379a768c80a05fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154281
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 20:54:09 +00:00
Konstantin Shcheglov 665fb912b7 Remove deprecated CiderOperationPerformance.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: Id81e775159fbc691604f62d380c17ba8aced2c99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 20:54:00 +00:00
Nicholas Shahan fdf4e364bf [test_runner] Use sound null safety js files
The bootstrapping was still loading the wrong version of the sdk and
pre-compiled packages when running tests for DDC.

Update constant_null_safety_mode_test to test a constant that is
defined within the sdk itself in addition to one defined in the test.

Change-Id: I8938ed92d866cfca0ce42567f03bed5f3dd9f10c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154121
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-13 20:09:28 +00:00
Brian Wilkerson 58676396ad Fix an npe when Declaration._relevanceTags is null
There are several internal and external issues reported because of this
bug.

Change-Id: Ic166c0cf4ba15148e820878c0305249b4e26c2af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-13 17:48:09 +00:00
Danny Tuppeny ba459f96cf Allow dart.lineLength to control formatting for LSP
Noted at https://github.com/Dart-Code/Dart-Code/issues/2286#issuecomment-655762024.

Change-Id: If45bede84a0a4414a16d1809a1aa0f81d18cebfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154008
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-07-13 17:09:59 +00:00
Brian Wilkerson da9697feb9 Fix the update-sdk-constraints fix
The bug was reported on https://github.com/Dart-Code/Dart-Code/issues/2629.

The fix is not ideal, but the best I know how to do quickly. I think
that a better fix would be to not have a `DartChangeBuilder` and to have
`ChangeBuilder` be able to build file builders for both Dart and non-Dart
files. The reason I haven't done that yet is that I want to spend some
time thinking about the best API for that change.

Change-Id: Idbc55e347f724cd1102b6032c2f7239cd9ee7fc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-13 16:18:19 +00:00
Konstantin Shcheglov 388c983495 Add higher level non-API for angular_analyzer_plugin.
Change-Id: I7eb5a3c7e90b9d86c296dafc95b9f9c750c0095a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 15:44:59 +00:00
Sam Rawlins 39f39c04b8 analyzer: move tests for 4 codes to diagnostics/
Change-Id: Ida28ae6ef39314b724932c5ae1a9a3aa4a72a17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154220
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-13 14:55:15 +00:00
Dmitry Stefantsov d6dfbda0d3 [cfe] Complete basic implementation of round-trip text serialization
The future non-basic version is to include the following:

  * adding missing annotations on nodes
  * adding URIs and file offsets to the nodes
  * adding nullability markers to types
  * stylistic changes
  * optimizations
  * better surface syntax
  * better error messages

Change-Id: If2fc51e4932d9043dd1719b766bd23ff4e0fc1ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154001
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-13 14:13:55 +00:00
Johnni Winther 7269b792c1 [cfe] Update message for opt-out packages run with sound null safety
This groups the message for opt-out packages and mentions running
'pub outdated' to looked opted in versions.

Closes #42464

Change-Id: Ib3bc411c5f3523af3672bed8837e953aaa551479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153964
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-13 13:37:55 +00:00
Konstantin Shcheglov eb38d2a03b Add PrefixElement.scope to API.
Change-Id: Ie673f521301d6ddc1b40d86ef7c02544f07e53fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-12 17:11:14 +00:00
Sam Rawlins 8e69e0d810 Analyzer: Move tests for 10 codes to diagnostics/
Change-Id: I331ca61293620d7c5d0b0d3e41387c10a22c6663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154143
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-11 21:50:13 +00:00
Konstantin Shcheglov a9e67d8194 Prepare to publish analyzer_plugin 0.3.0
We need this for https://dart-review.googlesource.com/c/sdk/+/154128

Change-Id: I7ce15ad1a0037e60422f412a0cb9840c29a7e4e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154129
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-11 17:05:43 +00:00
Konstantin Shcheglov 93fa1cf17d Add Scope and LibraryElement.scope to API.
Change-Id: I5cfda9ed6c52fde38252d82ee1bc9c9152b906f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-11 06:20:42 +00:00
Mike Fairhurst 0506475654 [analysis_server] Remove added space.
Change-Id: I7a5c8fdfc318359904b9c4befe07ff0be186b446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154125
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-11 04:17:32 +00:00
Sam Rawlins 6d06476bae Analyzer: Report generators with void return types.
Fixes https://github.com/dart-lang/sdk/issues/32192

This has been illegal for some time. This change updates the analyzer
to match the behavior of CFE.

Also move the relevant tests to diagnostics/

Change-Id: I4539aeb65708e2594c52288a6b4584ba7e5455e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153066
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-11 03:02:42 +00:00
Brian Wilkerson 082a6e03bd Use element kind to boost the relevance of available declarations
This doesn't significantly improve the overall scores, but it does cause
the element kind to be used for available declarations, which means that
constructors are suggested before classes.

Change-Id: I75e7bb13bd867b9209a43c4d737c5079c42eb25a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154080
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-10 20:08:36 +00:00
Mike Fairhurst dfd71a7e3d [analysis_server] Report plugin startup failures to instrumentation
And don't report an issue stopping a plugin that crashed.

Change-Id: Ic079748e578a0a5331165bd60a3ed0e6cf44e3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-07-10 20:04:26 +00:00
Konstantin Shcheglov 707c6404f9 Use not deprecated analysis_options_provider library ins analysis server.
R=brianwilkerson@google.com

Change-Id: I009c28e6e91bec4c4d75fb9452b3794635269b6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 19:13:46 +00:00
Jaime Wren d1a06cf97b Update dartdev to use the format command object from dart_style.
I thought that this landed over a month ago.  This needs to be rolled into the Dart SDK 2.9

New output from dart format --help:

Idiomatically formats Dart source code.

Usage: dart format [options...] <files or directories...>
-h, --help                             Print this usage information.

Common options:
-o, --output                           Where formatted output should be written.

          [json]                       Print code and selection as JSON
          [none]                       Discard.
          [show]                       Print code to terminal.
          [write] (default)            Overwrite formatted files on disc.

    --show                             Which filenames to print.

          [all]                        All visited files and directories.
          [changed] (default)          Only the names of files whose formatting is changed.
          [none]                       No file names or directories.

    --summary                          Summary shown after formatting completes.

          [line] (default)             Single line summary.
          [none]                       No summary.
          [profile]                    Tracks how long it took for format each file.

Non-whitespace fixes (off by default):
    --fix                              Apply all style fixes.
    --fix-doc-comments                 Use triple slash for documentation comments.
    --fix-function-typedefs            Use new syntax for function type typedefs.
    --fix-named-default-separator      Use "=" as the separator before named parameter default values.
    --fix-optional-const               Remove "const" keyword inside constant context.
    --fix-optional-new                 Remove "new" keyword.
    --fix-single-cascade-statements    Remove unnecessary single cascades from expression statements.

Other options:
-l, --line-length                      Wrap lines longer than this.
                                       (defaults to "80")
-i, --indent                           Spaces of leading indentation.
                                       (defaults to "0")
    --set-exit-if-changed              Return exit code 1 if there are any formatting changes.
    --follow-links                     Follow links to files and directories.
                                       If unset, links will be ignored.
    --version                          Show version information.

Options when formatting from stdin:
    --selection                        Selection to preserve formatted as "start:length".
    --stdin-name                       The path name to show when an error occurs.
                                       (defaults to "stdin")

Run "dart help" to see global options.


Change-Id: I18a49abd919672e988296f83c23636b14c29bdeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-10 19:10:07 +00:00
Anna Gringauze 57cf6ebbd5 Enable tests for a fixed issue
https://github.com/dart-lang/sdk/issues/41976

Change-Id: Ia294b421f52a9cccd98198e16fd17d3eff7e9238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153941
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2020-07-10 17:48:09 +00:00
Nicholas Shahan cf57f882ca [ddc] Change ! failure to a throw TypeError
Fixes test failures in language/unsorted/inv_cse_licm_test

Change-Id: If8df024d0128568e1f65463d4a82fa593b5a6a1d
Fixes: https://github.com/dart-lang/sdk/issues/42443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153481
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-10 17:42:55 +00:00
Sam Rawlins 6e687d1d74 analyzer: move tests to 4 new test files in diagnostics/
Change-Id: Ied68dc6a383c7ca0a44dbcd8381f3a94832d44fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153903
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-10 17:24:05 +00:00
Konstantin Shcheglov 90ce990409 Simplify Flutter support to a single instance.
Change-Id: I90813c4e01694510971c4ce9cf96a4a3380a2923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153952
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 17:21:24 +00:00
Sigmund Cherem ca7dd9654f [dart2js] fix crash in program emitter
The emitter creates classes in bulk, and then later connects them together
except for adding stubs for JS-interop is checks. We assumed the class for
JavaScriptObject was previously created and stored stubs eagerly while creating
classes.

We believe this caused a crash with flutter because the class was not yet
defined in that case.

One theory why this wasn't hit as much externally is that we sort classes by
location and process dart:* classes first. Flutter is the first use case where
JS-interop classes can be defined within SDK libraries.

Fixes #42612
Fixes #25517

Change-Id: Icad0a9a16ec0d05481ed60f581a23c9eeb1ed5d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153943
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-10 17:08:54 +00:00
Anna Gringauze 16e607ede5 Set --debugger-module-names to true by default in preparation for removal of the flag
first step for resolving https://github.com/dart-lang/sdk/issues/42104

Change-Id: Ie385e1d014149d67c5223aef698132b67df7ee43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153949
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2020-07-10 16:56:37 +00:00
Konstantin Shcheglov c367b488ee Add InterfaceType.allSupertypes.
R=brianwilkerson@google.com

Change-Id: I9c5058091b1a4473a2535ba792aa6bbfac35793c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153945
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 16:23:07 +00:00
Konstantin Shcheglov b09dd47d38 Enforce prefer_typing_uninitialized_variables lint.
R=brianwilkerson@google.com

Change-Id: Icfe4a24a6e69ab08f4743502ae88f94ab9cd8c8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153951
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 16:19:07 +00:00
Konstantin Shcheglov adb317e5b0 Use InterfaceType.asInstanceOf() in AddDiagnosticPropertyReference.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: Ic40accfcdb645dc0260965efaec1701d3e5548ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153950
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 15:17:32 +00:00
Konstantin Shcheglov 5c1eee9de5 Simplify _InvalidAccessVerifier._hasTypeOrSuperType().
R=brianwilkerson@google.com

Change-Id: I4855170939bf8dc89afdc3dd4d7a91c4819e5667
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153948
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 15:10:27 +00:00
Konstantin Shcheglov e52a8beb6b Report error for generators with return type void.
Bug: https://github.com/dart-lang/sdk/issues/32192
Change-Id: Ib31205207def253dc89802898a899b3555ecc28d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153953
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 15:09:29 +00:00
pq 3d5df93fb1 bulk fix protocol
Change-Id: Id8505d5ad6f0f3d1c5289ab12d4932c6174f72e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-07-10 14:20:07 +00:00
Dmitry Stefantsov 060d948339 [cfe] Add support for classes to round-trip text serialization
Supplementary changes for handling Classes done in this CL are the
following:

  * handling Supertypes
  * handling Constructors
  * handling remaining kinds of Procedure
  * serializing AsyncMarker the same way as flags
  * eliminating the need to wrap flags into IntLiteral

Change-Id: Id69c6e37f093cf80206f4657b649f79c75484775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154000
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-10 12:49:27 +00:00
Alexander Thomas 13fb8c132d Reland "[test] Add paths to chrome and firefox to the environment when present"
This is a reland of 40c79c8ed7

The build recipes now use forward slashes on Windows to pass the path to
the browser executable to test.py.

Original change's description:
> [test] Add paths to chrome and firefox to the environment when present
>
> This adds a CHROME_PATH or FIREFOX_PATH environment variable to the
> test's evnironment which contains a path to the browser's executable.
> This is only set if the --chrome or --firefox argument was passed to
> test.py.
>
> https://github.com/dart-lang/sdk/issues/42417
>
> Change-Id: I711de6ab91b8ffbbe72c7fb1530b68c4189a4b8a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153209
> Commit-Queue: Alexander Thomas <athom@google.com>
> Reviewed-by: William Hesse <whesse@google.com>

Change-Id: Ib61b8c6424fa7bce525d76d8b94756a215d28c1e
Cq-Include-Trybots: dart/try:dart2js-strong-win-x64-chrome-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153980
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-07-10 12:35:57 +00:00
Dmitry Stefantsov 99b693ba88 [cfe] Add support for constructor initializers to text serialization
Change-Id: I1a311978460bee2f554a3bddbaf329698d1d33c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153779
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-10 08:32:58 +00:00
Dmitry Stefantsov 145d4585e7 [cfe] Add support for Fields to round-trip text serialization
The flags on the fields are serialized as lists of flag names,
allowing for any combination of the flags in any order.  Similar
technique is used in this CL to serialize the flags on Procedures and
VariableDeclarations.  This is in the contrast with the previous
approach for those nodes, when the flags were the part of the
serialized name of the node (such as "static-method" for static
Procedures or "final" for final VariableDeclarations).

Change-Id: I02eb5ac92f6273542f08f269aee8e6519d3085e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153766
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-10 07:23:08 +00:00
Dmitry Stefantsov f75a982361 [cfe] Complete support for statements in text serialization.
This CL adds round-trip serialization support for FunctionDeclarations
and the remining kinds of VariableDeclarations, completing the support
for statements.  Additionally, the CL fixes a variable scope issue in
Catch clauses, namely that the exception and the stack trace variables
should be visible in the body.

Change-Id: I3843d491b85a65c4953d6fc10a59ecbde5017029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153611
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-10 07:23:08 +00:00
Johnni Winther 27446b463e [cfe] Update test expectation for language/unsorted/flatten_test/12
+ use the inferred return type in error reporting when no return type is
declared. This turned up in this particular case where we report an
error between the returned value and the inferred return type.

Closes #42546

Change-Id: I48da24047f2e92ca91a514dfcb43c2ba6f65ee46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153610
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-10 07:01:18 +00:00
Stephen Adams cf7a63afe6 [dart2js] inlining heuristics for generative constructor factory
Account for the size of the a generative constructor factory.

The factory evaluates all the initializers up the inheritance/mixin chain,
allocates the object, and then calls all the constructors down the
inheritance chain. All this is missed by the old code looking at the
immediate constructor body, sometimes causing extremely large
constructors to be inlined.

Change-Id: I8803b0f4b4155dec0f7878fd5527c1dd507b9c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153560
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-07-10 01:40:08 +00:00
Paul Berry 9f8aaf65c7 Issue an error if a prefix in a type name is shadowed by a local variable.
See #42620.

Change-Id: Ifd18c939082935390df0c2aa0bd724cf6f76c27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153705
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 23:09:18 +00:00
Konstantin Shcheglov 0a5e69ae6f Fix for no inputs in build mode.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/160854685
Change-Id: I9dd7f6e6c8293432c39d2d0cdd28bcd06880bf8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 22:14:48 +00:00
Konstantin Shcheglov dfdc7e45c5 Report PRIVATE_SETTER.
Change-Id: I823582328b4b9cc63ac734e9ea1c9354175a6e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 21:51:50 +00:00
Jacob MacDonald e780b31f73 prep package:js for null safety release
Change-Id: Ie4ce3d83d4dfc60ff5728152e9b391a84c50e6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153824
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-07-09 19:29:03 +00:00
Konstantin Shcheglov 39c94735a3 Report MIXINS_SUPER_CLASS.
Bug: https://github.com/dart-lang/sdk/issues/42256
Change-Id: I49c70d5a172062fed4d8663d95701ba855effda6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 19:05:52 +00:00
Christian Altamirano 4f66bb07e2 [dart2js] Added a powerset flag for new experiment
This experiment will use a powerset abstract value domain in the inferrer


Change-Id: I216ff9c24d1e7292688426ae7bcb52b15aa2714e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153720
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Christian Altamirano <coam@google.com>
2020-07-09 18:01:02 +00:00
Brian Wilkerson 73e9554779 Update meta to correspond to the published 1.2.2
Change-Id: I9dcbd9237d25948eb62e3ba68403436c64c70845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153822
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-07-09 17:38:32 +00:00