Commit Graph

63874 Commits

Author SHA1 Message Date
Jaime Wren 03e415a4e8 Update the hover 'containingLibraryName' to not include the 'file:///' prefix.
This is a follow up on a comment in the previous change https://dart-review.googlesource.com/c/sdk/+/103481/.

Change-Id: I0f377d6c7d68d55464a4e111a6a65715a82e0591
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103546
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2019-05-24 21:54:56 +00:00
Konstantin Shcheglov 4979a51a9c Add information about existing imports to completion response.
This adds quite a lot of information though, because we send many
strings.

Before: 20686 characters.
After:  55345 characters.

Theoretically we could do better, and send information about existing
imports only once as well, so when the user continues typing in a
single file, without touching imports, we don't send any new data
about imports (maybe just a confirmation that it is still the same).
But I'm not sure if this is a worthwhile optimization.

Actually, even included suggestion sets have similar property - they
don't change for a given file, unless there are changes to other
libraries which we might want to include.

R=brianwilkerson@google.com

Change-Id: I2f55e2dc85508849146aa39eb279beabaec937c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-24 21:35:06 +00:00
Brian Wilkerson e43d81af5f Folders containing overlayed files should exist even if they do not exist on disk
Change-Id: I511b5075cb10b2594dce9dc33f165b64d9527043
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103565
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-24 20:47:46 +00:00
pq e42d4a1d89 fix missing returns in lambdas
Change-Id: I5005ffc057749468844d47e8e5c195871586bd57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103601
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-05-24 19:24:02 +00:00
Sigmund Cherem baa721ba23 Add an sdk module to the modular_test pipeline
+ and use it in the dart2js modular tests

Change-Id: I66cf29dcea7fb705135049e7a6ea4eb17052f3d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103575
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-24 19:09:12 +00:00
Sigmund Cherem 64ed4bf664 Changes to bazel worker to support modular testing.
This includes:
 * accepting null values like sdk-summary or .packages (which are not used when building kernel for the sdk itself)
 * allow enabling language experiments
 * only exclude-non-sources on the non-incremental code path if that's requested

Change-Id: I08eeb643676f1f1406f0f3030c341d68179d42a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103574
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-05-24 19:09:12 +00:00
Vijay Menon fc6954f084 [dartdevc] self hosting tests
Ensure dartdevc can build itself.  This transitively ensures it can
build the analyzer and front end.

Change-Id: I1c514a498dcc3859d0aa5e8db63856f7833e102f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103463
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-05-24 17:04:25 +00:00
Dan Rubel f4f2c77d4a improve missing body error messages
This builds on the prior CL to improve the error messages
for missing switch statement body, missing finally clause body,
and others.

Change-Id: Ia2def1f3a75d5581356c12aee4705ef21870f749
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103571
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-24 17:03:25 +00:00
Dan Rubel ec1ddcdb83 improve extension message missing body error message
This improves the missing class, mixin, and extension method body
error messages and lays the groundwork for improving other
missing body error messages such as switch statement, finally clause,
and others.

Change-Id: I0a4d1338fe91eee3cfe7d61652e168df1302d212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103570
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-24 17:03:25 +00:00
Devon Carew 9081f28fbb [analyzer] fix a copy paste doc issue and 2 unused imports
Change-Id: I20f4ae5454c2bceafd3b86e279357dee3b321006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103644
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-05-24 16:31:25 +00:00
Paul Berry 3c34c8fa2f Fix type substitution of "star" types.
When performing type substitution, there are three types involved, the
substitution site (`this` in TypeImpl.substitute2), the type we are
replacing (`parameterType` in TypeImpl.substitute2), and the
replacement type (`argumentType` in TypeImpl.substitute2).

Previously, we only handled the nullabilities of `this` and
`argumentType`.  This CL adds support for the possibility that
`parameterType` might have nullability "*".  This happens because
TypeParameterElement.type returns a star type, so for instance when
subsituting `int` for `T` in `List<T>` to form `List<int>`, we are
actually substituting `int` for `T*` in `List<T*>`.

Change-Id: I0a61fdc47ec8aa205dc0c539c49ea7799ed4ac05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103542
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-05-24 15:43:45 +00:00
Vijay Menon 77f2603052 [dartdevc] preliminary nnbd support
For analyzer backend only:
* Implements `x!`
* Uses non-null type info where possible to elide null checks.
* Does not yet reify.

No hurry on this - starting to look at what's there.  Some notes:
* NNBD doesn't seem to be exposed directly on DartType yet.
* x!.y doesn't seem to parse - need to write (x!).y.
* Can't run existing tests yet - `package:expect`, etc., have NNBD errors.

Change-Id: I58c24c950d00f3a40d789d4a7adf049786977c50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103040
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-05-24 15:04:25 +00:00
Paul Berry 0e5d18f281 Ensure that nullability promotion of the Null type yields Never.
Change-Id: I2232f80bbf5c8a9e51f305a603c06ca2b3ad8aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103573
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-24 14:57:15 +00:00
Paul Berry 5278d4059a Sort non_nullable_test.dart
Change-Id: I356b49fb64daf4245f936d795ccaad5b0588a408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103550
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2019-05-24 14:53:45 +00:00
Kevin Millikin 0fb0185df0 [cfe] Extract field initializer tokens from the token stream
During outline building the token stream was split after every field
initializer needed for top-level type inference.  Since the token
stream is a doubly-linked list it's also necessary to split the token
stream before the field initializer in order to possibly collect the
unnecessary tokens.

Change-Id: Iafac8eee1eb87d43458f66ef08f6398634ded5df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103622
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-05-24 14:18:08 +00:00
Vyacheslav Egorov b53162d82b [build] Link with dl library on linux by default.
Otherwise executables simply does not link because C++ std lib we are
using has dependency on dl (through libunwind).

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

Note: this follows what newer versions of build configs do. See for
example one used in Flutter build root[1]

[1] https://github.com/flutter/buildroot/blob/224ebe0adaaf8463cc505a42c0e5eac870b2896e/build/config/BUILD.gn#L121

Change-Id: I405c820db4363a59230d7ba4f93d760a8cbbabc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103627
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-05-24 14:07:05 +00:00
Kevin Millikin 10692669e3 [cfe] Add flags for new experimental features
Add flags for extension-methods, non-nullable, and triple-shift.

Change-Id: I42d2afbe1b3353a18da8cdfec1fded3ad6694e3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103620
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-05-24 13:54:18 +00:00
Johnni Winther 052272d998 Avoid dependency on file system order in modular_test/loader_test
Change-Id: Ic7d5197c9d914998dcd761c42763d9e9e36ad507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103624
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-05-24 11:52:32 +00:00
Teagan Strickland d7054690ab [vm/compiler] Partially revert "Replace LoadClassId for known cids."
We still need to check for concrete types in
ConstantPropagator::VisitLoadClassId to avoid benchmark regressions.

Change-Id: Ie3a7e3aaa3b261c34760308f3cb1d328ce2d8493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103520
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-05-24 09:56:59 +00:00
Kevin Millikin c20802ce16 [cfe] Introduce a Kernel annotation builder
Introduce an annotation builder that will eventually be used to
compile Dart annotations to Kernel in outlines.

Change-Id: If882ce27b6012001c04257b867b5dcc596a72105
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103621
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-05-24 09:33:59 +00:00
Lasse R.H. Nielsen eca6c8953f Allow async as an identifier everywhere.
Fixes #37063

Bug: http://dartbug.com/37063
Change-Id: I2253c3088fbe33eca1072f2480cf0cf3cc363362
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103524
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2019-05-24 08:21:14 +00:00
Kevin Millikin dbd70dd214 [cfe] Simplify metadata builders
These builders have some unused generality: they have an unnecessary
type parameter and the implementation classes have unused fields.  As
currently used, they could be replaced with an int but the class is
kept in anticipation of adding behavior (compiling annotations).

Change-Id: I068cb483a19b3f7eae846c212cbdbb29ca77973d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103529
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-05-24 07:51:03 +00:00
Johnni Winther 9f9f10ad97 Use cached serialization of source-information
This reduces the size of the serialized codegen data by 20-25%

Change-Id: I85424576d68b72a56c3c924fe704a086000bc926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103534
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-24 07:38:13 +00:00
Johnni Winther 4ff89f880d Move registrations on OutputUnitData to the impact transformer
Change-Id: I8060149b217d3222c7e784aafe9724e5ef6a7bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103530
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-24 07:38:13 +00:00
Johnni Winther 7580e77ef2 Support modular code generation
Change-Id: Id5511296eb0b6acf812bc464d71efa4019f211d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103523
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-24 07:38:13 +00:00
Samir Jindel 225a301637 [vm/ffi] Re-land "[vm/ffi] FFI callbacks on X64."
There are minor fixes for dartkb and windows.
The original revision is in patchset 1.

Change-Id: I9ab6e5fdb33fb4e84ea520c283fe94323616a8ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103129
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-05-24 02:39:13 +00:00
Sigmund Cherem edadc9c881 Add support for caching results of shared modules.
This is important as we will soon add support for compiling the sdk as a
module and we would like to only compile it once when running a suite of
tests.

+ also enable caching in the dart2js pipeline test.

Change-Id: Ic9043f868123164f3ab425ba73f7428416b05fc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103485
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-24 01:27:13 +00:00
Konstantin Shcheglov 8208e872f8 Refactor summary IDL generator.
I need to make changes to 'collectApiSignature' and 'flushInformative'
to support variants, and we have lots of code around already.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I9ba3b61a22b9e9e2c547e97d5c5adaa07443b24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103552
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-24 00:30:49 +00:00
Paul Berry 22c086fbe5 Remove unsafe uses of TypeImpl.withNullability (use TypeSystem instead).
Change-Id: I5df47ca582aa5583055d3700668de992676bc42a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-24 00:21:29 +00:00
Aart Bik aa785d938b [dart/vm] Fix erroneous claim on "temp" Q7
Rationale:
Q7 is a scratch register, it cannot hold input/outputs.

https://github.com/flutter/flutter/issues/32708

Change-Id: I0ad23d2d3e363be14cf83b085b94ce9ff3a22261
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103551
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-05-23 23:50:38 +00:00
Mike Fairhurst 704446d159 Disable implicit casts but keep dynamic casts when NNBD enabled
Change-Id: Ia0a3271c9137bc8c7fa4cdbd469cf93d9453b69c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103405
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-23 23:41:52 +00:00
Alexander Markov 49262365dc [vm] Do expensive kernel metadata verification only once per kernel
In DEBUG mode during AOT compilation MetadataHelper::SetMetadataMappings
may spend considerable time verifying that node offsets are sorted
in kernel metadata. The problem is that there are a lot of MetadataHelpers
created (several per each compiled function).

This change moves verification of kernel metadata mappings to
the kernel loader, so it is performed only once per kernel program.

AOT gen_snapshot time on a small test:
Before: 11.680s
After: 9.041s

Change-Id: I1c0a676b0ed28fc5cfa756ca60159f914190fac0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103486
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-05-23 23:40:22 +00:00
Stephen Adams cc2fac57f3 Remove HBoolify
HBoolify was used in Dart1 unchecked mode.

Change-Id: I1cdbff515fc7446c67fc255bb9599dee79dfd242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103569
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-05-23 22:54:55 +00:00
Dan Rubel dfbc3923e4 add default CompilerContext in analysis server
This should uncover the underlying error occurring in
Fix https://github.com/dart-lang/sdk/issues/37055

Change-Id: I633da211b943e5c4262a2f3d83ef0a2217c5b8a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103562
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-23 22:46:15 +00:00
Dan Rubel 1ffcccd9cc add extension method header parser recovery
Change-Id: Ia7424a467014471c01eb30604a062430de42f84d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-23 21:43:29 +00:00
Martin Kustermann db367542b3 [vm/kernel] Fix uninitialized variables in kernel_translation_helper.h
My recent change in b316210d94 revealed this use of uninitialized variables.

Change-Id: If4d3e55febe468bb6e9e8d7af3dbc4cec1738afa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103533
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-05-23 21:05:56 +00:00
Konstantin Shcheglov c4d691064a Remove unused methods from LinkedUnitContext.
R=brianwilkerson@google.com

Change-Id: I5acc7ab0381ac8912b3d4ba6bec89d7554aea43b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103547
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-23 20:42:20 +00:00
Konstantin Shcheglov 5822645e66 Support for 'Wrap with Xyz' for expressions in ExpressionFunctionBody.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/3500
Change-Id: I9e14d6cd1a79070fd489740a881199707be83e90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-23 20:00:26 +00:00
Konstantin Shcheglov 4b7c05f2ce Remove LinkedNodeVariablesDeclaration.
We don't need it anymore - we can go up the AST hierarchy to the
enclosing TopLevelVariableDeclaration.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iadc9985bb5bcaa465c3505794ceac51e7b06a930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103564
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-05-23 19:39:00 +00:00
Liam Appelbe 6e1f628f19 Outline the StackZone's Zone
Bug: https://github.com/dart-lang/sdk/issues/36100
Change-Id: I17cdf438c19fcc66ceb09c23348654eb752dd3cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103560
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-05-23 19:10:46 +00:00
Jaime Wren cd2188f2f5 DAS change in hover behavior- the containingLibraryName now returns the URI of the containing library instead of the (possibly non-existent) library name
Change-Id: Ief2a7615b92ca635c696d48f907677bae538577b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103481
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-23 19:06:19 +00:00
Danny Tuppeny 4fc86d726f Fix some lints in LSP tests
Change-Id: Iff7e69d5d452a7bd405b727ab4966e1d71a89bda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103531
Auto-Submit: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-23 17:54:03 +00:00
Ryan Macnak d4e2d78a94 [vm] Partially disable 5393ce7d35.
Avoid flakily failures setting the thread signal mask.

Bug: https://github.com/dart-lang/sdk/issues/36908
Change-Id: I3d66214189f3276365b4c1cc333847cb4f65c94f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103400
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-05-23 17:42:37 +00:00
Daco Harkes 338b74a52c [vm/ffi] Align stack frame when entering and exiting safe point
Closes: https://github.com/dart-lang/sdk/issues/36993

Change-Id: Idc3b2f26142a5c1a358ebf5f71cd226978181b73
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try, vm-kernel-win-debug-x64-try, vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103136
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-05-23 17:31:57 +00:00
Paul Berry 7bbd8ea29d Introduce a representation of the type Never?.
This type is equivalent to the existing type `Null`, but we need it
anyway because `Null` can only be accessed via the type provider, and
there are circumstances where we need to create this type and don't
have access to the type provider.

It also may prove beneficial to be able to distinguish between `Null`
and `Never?` in diagnostic messages.

Change-Id: I6118e87c8c4736a508a3f366f2762a96198db7ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-23 17:15:21 +00:00
Brian Wilkerson 28f701982b Add diagnostic location info to more tests
Change-Id: Id5d0e617a55abc2e1ed3d0bac7ae56544aa348e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103543
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-05-23 16:18:50 +00:00
Jonas Finnemann Jensen 70a0c86a4a Update pub client reference
Rename old "Pub client" headline for consistency with older entries


Add headline for linter in CHANGELOG.md

Change-Id: I118127a6aab564f5d498441f30957e8851e69d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103527
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
2019-05-23 14:57:25 +00:00
Stevie Strickland cbd4391747 [vm/compiler] Forward the ByteData constructor length argument.
In addition, if a _ByteDataView came from a use of the ByteData
constructor, its offset is always 0.

Also add appropriate canonicalization for the following instructions for
typed data views coming from a known factory call:

* LoadField getting type arguments
* GuardFieldLength

This closes https://github.com/dart-lang/sdk/issues/36570.

Change-Id: I1c045edb2d928c3bb3340d9d12009c2afa66febb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102362
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2019-05-23 13:19:46 +00:00
Brian Wilkerson 1993669102 Clean up examples in analyzer docs that were using deprecated APIs and add a test to catch future breakages
Change-Id: I74bdb4c7474d130ae87e7cdc5991d7fadc79e453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103465
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-23 13:15:36 +00:00
Alexander Thomas 14b1d2feb8 [infra] Make deflaking optional in test.dart
This adds a "--deflake" flag to test.dart. Deflaking will only run if
that flag is set.

Deflaking is time consuming and delays the information that users want
to see when most of the time they know that the result is not caused by
flakiness.

A typical session may look like this:
* Run test.dart with a broad test selector without deflaking.
* Re-run test.dart with a narrow test selector for suspected flakes with
  "--deflake". This second step is optional.

Additionally, a new "--report-flakes" flag is added that can be
used to report test failures for tests known to be flaky.

Change-Id: I543d0b40c32065eb0a50338c55e7050b7887abce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102381
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-05-23 12:56:06 +00:00