Commit Graph

71643 Commits

Author SHA1 Message Date
Alexander Markov 6e53ac6e4c [vm/nnbd] Fix supertype check in GenerateSubtype1TestCacheLookup
Before calling Subtype1TestCache stub, there was a quick check if
supertype's class id matches tested class id.
Null extends Object, so supertype of Null matches Object.
However, in NNBD strong mode Null is not assignable to Object.

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

Change-Id: Icc3efaf90992b5083cbe086af81db7504724b855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142085
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-02 01:39:10 +00:00
Anna Gringauze 0e8ee2b668 Do not crash on invalid offsets in ExpressionCompiler
ExpressionCompiler crashes while detecting current scope
if there are any scopes in the library with valid fileOffset
and invalid fileEndOffset.

Make ExpressionCompiler more tolerant to incomplete offset
information by just skipping scopes where fileEndScope is not set.

Fixes: https://github.com/dart-lang/sdk/issues/41241
Change-Id: I357017be1cb641053f23144edd5b74f30a9240ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142080
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2020-04-01 23:16:58 +00:00
Konstantin Shcheglov a373aa7ce1 Convert GenericInferrer tests to non-nullable.
I.e. print types with nullabilities, and use 'none' types in tests.

R=brianwilkerson@google.com

Change-Id: Ia53885ebe7077b0de12e01ac5171711ca8b57e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142086
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 22:36:18 +00:00
Brian Wilkerson b85c68a73c Collect and print information about the worst completion results
Change-Id: I38e1d2a587f80ed4ee0da75f875b94aff922fe3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142064
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-04-01 21:45:48 +00:00
Konstantin Shcheglov 3af491ecd8 Move additional tests and remove GreatestLowerBoundTest.
Change-Id: I463e4dacb5226d417e6ee13b53540c7c6b76cfc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 21:38:48 +00:00
Jaime Wren 0c8158c3cd Fix missing type name completions in constructor declarations.
There are 34 instances of this in the package collection.

Change-Id: I43856f0e840ca3f76285948363868927b669caf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-01 20:58:28 +00:00
Konstantin Shcheglov 191be51124 Extract GenericInferrer and type schema.
Change-Id: Ic306342609911e3e232dbf95f30b60cff94c34be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 20:54:48 +00:00
Ryan Macnak 65e608d115 [infra] Create bot configurations for AOT + sanitizers.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: I1f242515e00b8de934986b1b430cc99e1466b1b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141660
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-04-01 19:34:38 +00:00
Konstantin Shcheglov 43115b0f75 Extract SubtypeHelper.
Change-Id: I6534e68e71108db2dbdca36897694179ec218cb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141902
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-01 18:46:38 +00:00
Martin Kustermann dd2d1fea70 Revert "[vm] Add linker script to hide symbols from standalone embedder executables"
This reverts commit 78435da54b.

Reason for revert: The mac builds failed due to clang not understanding the linker option on Mac. Will also investigate Ryan's question around interaction with profiler.

Original change's description:
> [vm] Add linker script to hide symbols from standalone embedder executables
> 
> This is a safeguard to prevent users from depending on standalone
> executable internal symbols.
> 
> This was already done in g3 in cl/304142297 for b/151696305.
> 
> Change-Id: Ie01fc662eba7f8873530721394821b6c6c85e510
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142023
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,kustermann@google.com

Change-Id: I824fa99658612856df6cecc1533a1ea7ee87c54e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142024
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-04-01 18:27:42 +00:00
Jaime Wren a14d41958e Modify the completion_metrics.dart file to ignore named arguments in dynamic or unknown method calls.
This is a follow up on https://dart-review.googlesource.com/c/sdk/+/140775

Change-Id: Id84271f1bc8559f516c2c4e09c2b66dc10462f3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141915
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-01 18:26:32 +00:00
Sigmund Cherem e26a8109ea [dart2js] Use platform file to enable null safety.
Derive whether legacy and nullable types are emitted based on the
provided sdk libraries and only enable the non-nullable experiment
when building the platform files.

The test matrix continues to enable the experiment temporarily
because test_runner currently doesn't support running with the
ReleaseX64NNBD configuration if it is not enabled in test.py

Change-Id: I7322906e928c68acab77087bcba76f06ef4bf983
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141850
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-01 18:19:37 +00:00
Liam Appelbe b25a48f46b [libs/nnbd]: Fix some nullability issues in HTTP libs
Fixes these strong mode tests from standalone/io:
client_socket_add_close_error_test
client_socket_add_close_result_error_test
http_compression_test/*
http_connection_close_test
http_server_early_client_close2_test/*
http_server_response_test/*
raw_server_socket_cancel_test/*

Change-Id: I7029ec85f907ac50425f51e5bfb5937522a7c7c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141904
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-04-01 18:18:27 +00:00
Konstantin Shcheglov cf5620fa9e Use the deep-most packages.
Change-Id: I8c03e67d16a58f48e0ac334c216b21dcf2e532c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 17:42:52 +00:00
Konstantin Shcheglov 0e5b596e0d Extract GreatestLowerBoundHelper and LeastUpperBoundHelper.
Change-Id: I1e10798d2dfe231ab5e6fb87a5eed42e81e43998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141905
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 17:41:42 +00:00
Nicholas Shahan 765ddbe3be [ddc] Prep variance tests for unfork changes
- Apply formatter.
- Use Expect.listEquals() to compare lists. Reverse the order of
  arguments to account for the expected value coming first.

Issue: https://github.com/dart-lang/sdk/issues/40266
Change-Id: I35961729bdc4aad5337361e5df445a11ac03b2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141909
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-01 17:34:47 +00:00
Nicholas Shahan 2750e0e618 [ddc] Test cleanup prep for unfork
Add helper to check for mutual subtypes.

Issue: https://github.com/dart-lang/sdk/issues/40266
Change-Id: Iccd664034f5a4f2adc13d8ba78d356ae3fabc2be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141907
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-01 17:33:37 +00:00
Erik Ernst 0579a9250a [cfe] Pass typeArguments from parser
This is the "next step" mentioned in
https://dart-review.googlesource.com/c/sdk/+/141240.

`List<UnresolvedType> typeArguments` were dropped (and null was passed)
in several cases in `handleSend`, but they are needed in
BodyBuilder.buildConstructorInvocation in the case where the receiver
of the constructor invocation is a type alias.

This CL ensures that the `typeArguments` are passed when needed, and a
named parameter `isTypeArgumentsInForest` is passed in order to preserve
the information about whether or not they have been to the `forest`.

The CL also adjusts tests '{generic_,}usage_type_variable_*' to fit the
decision made in language issue 848 that a type alias cannot be used
for constructor invocations when it (directly or indirectly) denotes
a type variable.

Change-Id: I8d831457e35a7455f8fcfe461a10872c61555748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141543
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-04-01 16:57:15 +00:00
Ryan Macnak 74da2edd3d [vm] More do not allocate when evaluating arguments to StorePointer.
If the first argument is evaluated first, it is an untracked interior pointer that will be used after any GC that occurs while evaluating the second argument.

Bug: https://github.com/dart-lang/sdk/issues/41144
Bug: https://github.com/dart-lang/sdk/issues/41262
Change-Id: I2c835b55a12af8d44ac2eee431e4e24b69030600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141910
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-04-01 16:26:05 +00:00
Martin Kustermann 9b1fc3c830 [vm/compiler] No longer attempt to run AOT pipeline and compile & run in JIT run_vm_tests
I have tried several attempts to make the test continue to work,
including:

    * Running JIT pipeline with the special TD AOT optimization pass
    * Running AOT pipeline, clear deopt ids and run in JIT
    * Change only parts of compiler backend

None of the approaches are working really well, so we'll just not run
the code.

The vm/cc/IRTest_TypedDataAOT_FunctionalGetSet continues to check the
generated IR graph.

Closes https://github.com/dart-lang/sdk/issues/41148

Change-Id: I81c3f7900443eb5a5ed7b9641185b9b9d5c4debb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141245
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-04-01 16:16:06 +00:00
Martin Kustermann 78435da54b [vm] Add linker script to hide symbols from standalone embedder executables
This is a safeguard to prevent users from depending on standalone
executable internal symbols.

This was already done in g3 in cl/304142297 for b/151696305.

Change-Id: Ie01fc662eba7f8873530721394821b6c6c85e510
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142023
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-01 16:11:55 +00:00
Johnni Winther d68f552e70 [analyzer,cfe] Handle (un)assigned state in try-statement
This handles (un)assigned state in try-statement that do not
complete normally. In this case we could create a variable model
for an unreachable state that would be both assigned and unassigned
leading to an assertion failure.

Closes #41284

Change-Id: Id4c7689bc7c614338af3542eb342c964696fca1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141981
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 15:46:15 +00:00
Konstantin Shcheglov 37773d39be Make 'covariant' parameter required in tryMatchSubtypeOf().
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7a30e886c8fe2abdc5402d0d9da283cdd8f32c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141913
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 15:36:45 +00:00
Alexander Markov e378d5f3de [vm/nnbd/aot] Do not devirtualize calls if required parameter is missing
The following test began passing:
dartkp-strong-linux-release-x64:language/nnbd/syntax/required_modifier_dynamic_error_test was fixed (RuntimeError -> Pass)

Change-Id: Id31547734d081f9a5ef4cd1ecf084495eeb3a9d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141763
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-01 15:35:05 +00:00
Erik Ernst b177e44ffa Add mixed inheritance tests
Updates Mar 19, for better precision in tests (that is, catching
more bugs):

Added tests where `r.m(null).isEven` is used
to near-verify that the receiver `r` implements `A<int*>`:
With `A<int>` it's an error to pass `null`, and with `A<int?>`
it is an error to invoke `isEven`.

Added '1_error' test to detect that `r.m(null).isEven` is a
compile-time error in cases where the receiver has a different
member signature for `m`.

Added '3_error' test to detect that it is a compile-time error to assign
'D().a' to a specific type, for many `D`. This helps catching the
situation where the member signature of `a` is legacy: if that were
true then this test will fail because there is no error).

Change-Id: If6abafbadb51dcb04d13876b577d15c74bf47ccc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139817
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-01 13:18:04 +00:00
Jens Johansen 47b57e8995 [CFE] Cache checkInheritanceConflict calculation
When compiling a big internal app with the NNBD SDK there's a big time
regression. This is a first "poor-mans fix" that "fixes" it via caching
which probably is not the best solution, but does the trick.

Without change
==============

Without NNBD platform:

$ out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart --target=dart2js --platform=out/ReleaseX64/dart2js_platform.dill -v bigapp.dart
[...]
0:00:14.238352: Built class hierarchy in 1663ms.
[...]
0:00:55.871356: Wrote component to bigapp.dart.dill in 5690ms.


With NNBD platform:

$ out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart --target=dart2js --platform=out/ReleaseX64NNBD/dart2js_platform.dill -v bigapp.dart
[...]
0:04:41.842548: Built class hierarchy in 268716ms.
[...]
0:05:22.120455: Wrote component to bigapp.dart.dill in 5407ms.

So: Big regression; it takes almost 4.5 minutes to built the class
hierarchy and almost as long extra to compile as a whole.


With change
===========

Without NNBD platform:

$ out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart --target=dart2js --platform=out/ReleaseX64/dart2js_platform.dill -v bigapp.dart
[...]
0:00:15.255893: Built class hierarchy in 2175ms.
[...]
0:00:55.203753: Wrote component to bigapp.dart.dill in 5306ms.

So: Without the NNBD platform there's basically no change.


With NNBD platform:

$ out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart --target=dart2js --platform=out/ReleaseX64NNBD/dart2js_platform.dill -v bigapp.dart
[...]
0:00:15.864901: Built class hierarchy in 2574ms.
[...]
0:00:55.640201: Wrote component to bigapp.dart.dill in 5363ms.

So: With the NNBD platform, the speedup is significant and there's basically no
change between using the NNBD platform or not.
Change-Id: I74993710a34f08f69421b03f2682ff8418af7599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141982
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-01 12:28:34 +00:00
Paul Berry 278a2db4df Add a --preview-port flag to dart migrate.
Change-Id: I526a2e40198960e0e3fb3509ed8a84979f520b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141765
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-01 12:10:04 +00:00
Paul Berry f04053d767 Migration: do not union inferred types in overrides.
Previously, when handling an override such as:

  abstract class A {
    int/*?*/ f();
  }
  class C implements A {
    f() => 0;
  }

we would create a union edge between the implicit return type of C.f
and the explicit return type of A.f.  This was a problem because
nullability information can propagate bidirectionally through union
edges, so it could result in types unnecessarily becoming nullable,
e.g.:

  abstract class A {
    int/*?*/ f();
  }
  abstract class B {
    int f(); // Should not need to be made nullable
  }
  class C implements A, B {
    f() => 0;
  }

This CL fixes the problem by just making ordinary unidirectional edges
for overrides involving inferred types.

Change-Id: I63a5f1f640b5543fcf39304087592e984aa66694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141853
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-04-01 12:07:44 +00:00
Martin Kustermann d6a096cb03 [vm/compiler] Move runtime call of InitInstanceField out into a Stub
If the runtime causes a deoptimization of the frame it expects
the deopt environment to reflect the stack of unoptimized code (without
additional pushed objects).

Issue https://github.com/dart-lang/sdk/issues/40753

Change-Id: I6c7bebc53ce82f5d18cf94e1c95ddebd943efa8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141980
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-04-01 10:03:04 +00:00
Jonas Termansen eea9717938 [infra] Instruct people to contact dart-engprod.
Change-Id: Ie1f5a6e887ad527bfaf2f69bc210e05b4686f621
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141883
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-04-01 08:55:31 +00:00
Jaime Wren 414f6625f8 Remove TODO and comments with regard to running packages in the dart run * command
If/ when we decide to support it, we can modify the description and implement it

Change-Id: Ia222227017397aa817ac55c4dfed6e4647c05556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141854
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-04-01 08:35:41 +00:00
Jens Johansen 43079207d4 [parser] Parse a!?[0]
Fixes #41177.

Change-Id: I135f0b7aedbcb320ab0d1a1806b2ad3bedcda307
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141886
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-01 07:33:01 +00:00
Alexander Markov 0f89df0c00 [tests/nnbd] Fork language/bool tests for weak and strong mode
Migrated language/bool tests expect TypeError when null value is used
in a condition (which is still possible if static type of condition is
dynamic). This is right in NNBD strong mode, as implicit cast of null
to bool will fail with TypeError. However, in NNBD weak mode implicit
cast passes, and then AssertionError is thrown as before.
Before migration language_2/bool tests expected AssertionError.

This change forks the tests to behave differently in weak and strong
modes.

Change-Id: Iaba9e606bafe5740a998a60a74a6b54e38cac86b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141800
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-01 00:35:37 +00:00
Robert Nystrom 16ee4ac3ba Correctly handle multiple experiment arguments in the test runner.
Change-Id: I28502a6f97a009b6fe35d15e58f9302ac935049d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141922
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-04-01 00:07:27 +00:00
Riley Porter b9d35ded2e [tests] Clean up List constructor usage and unused multi-test
Split out int64 lines of multi-test for
corelib/iterable_return_type_test and added status to skip the
int64 test on the web compilers.

Change-Id: I1e56299973956932c5b16b1ceeeb2b8f00457bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141802
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2020-04-01 00:03:46 +00:00
Ben Konyi 99a5117411 [ VM / DartDev ] Fixed issue where trying to find the directory of the Dart executable would fail if we encountered a relative symlink while trying to determine the absolute path.
Change-Id: I6ee87ad623ca1e8335a96a8480e9243da9720ced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-03-31 22:39:00 +00:00
Paul Berry 021fa0fbd4 Migration: warn if the input code has unresolved imports.
The most likely cause is that the user has forgotten to run "pub get",
so we suggest that as a possible fix.

Fixes #40824.

Change-Id: I9c627017af08f9a851cadb46be8d9bf90a64ce78
Bug: https://github.com/dart-lang/sdk/issues/40824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141823
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Paul Berry 322280e6a8 Sort declarations in pkg/dartdev/test/commands/migrate_test.dart
Change-Id: I1edd2837d6e3040acf288641a4dc5a5ff4026aac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141851
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Paul Berry 70cfb6e884 Sort declarations in pkg/dartfix/lib/src/migrate/migrate.dart
Change-Id: Ia582a47cc8702852cd82d34fbf1a81221133c962
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141849
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Paul Berry 4ffb95d631 Migration: add support for /*late*/ hints.
Fixes #41230.

Change-Id: I99b6ad67ebccbc972f72099818a8168003537fa5
Bug: https://github.com/dart-lang/sdk/issues/41230
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141842
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Paul Berry 1f794f000e Migration: do not propagate exact nullability in violation of a /*!*/ hint.
Fixes #41228.

Bug: https://github.com/dart-lang/sdk/issues/41228
Change-Id: I9c7e7554cee08d9f8f2241ff627bab7cbb16f4da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141801
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Paul Berry b7130b0bf7 Migration: improve preview tool display when ! is added due to an explicit hint.
Change-Id: Ie9b2a6cabaf02c46da2e8b8ac1bffa0e699acc64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141741
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-31 22:04:46 +00:00
Stephen Adams a7c5a791ef [dart2js] Avoid null check in rti
This removes 6 code quality regressions in the generated code for rti.

Change-Id: I832b1bba35e341a1c7dde32d1d9c907c2a189299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141903
Auto-Submit: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-31 21:01:46 +00:00
Kevin Moore 9f9d7ce994 Bump pub revision
git log --pretty=oneline
978cc9c4be7d8978348e56d4ae82be8257a59579 Normalize command names when invoked via alias (#2425)

Change-Id: I134e981402ece9632c786655c85401afb5b17551
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141900
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2020-03-31 20:49:37 +00:00
Jaime Wren 7dac294cb3 Minor cleanup in pub.dart, pub command in dartdev
Change-Id: I38c915502e8ff98fc13fba737913c61e0940cdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141901
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-31 19:49:16 +00:00
Mike Fairhurst 5999b6bad5 Reland "[analyzer] Remove deprecated language version API"
This is a reland of 65a377b967

Original change's description:
> [analyzer] Remove deprecated language version API
> 
> Change-Id: I10122c8860b7b4c7dfcea1d6f8829ad6be439e7e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141300
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I1c5180fcc40b14b4bcc209e0b6b9bc053814047d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141720
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-03-31 18:41:50 +00:00
Robert Nystrom 2eed35d650 Migrate language_2/class to NNBD.
Change-Id: I5f9aa5799cf88a320675debb919011f8a19b6faa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141742
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-31 18:16:55 +00:00
Liam Appelbe 57de801b70 [nnbd/test] Fix some strong mode tests.
error_stack_trace2_test: As part of the late field spec, we no longer
have a special error for cyclic statics, so they just end up with stack
overflow errors, which don't have a stack trace.

list_..._test: Modify ListMixin<T> in NNBD libs so that addAll,
replaceRange, and insertAll work for non-nullable T.

Change-Id: I0f3f0c30f1aa45ea148eb5cdc954f024b7ba4777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141252
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-03-31 18:14:45 +00:00
Martin Kustermann fcebbd3972 [infra] Update tools/test.py to not try to pass -m64 to aarch64 assembler in simarm64 mode
The arm64 compiler doesn't accept a -m64 argument.

Change-Id: I24dcd48862beff4becfd3627a43f4261b6ff2133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141894
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-03-31 18:08:50 +00:00
Robert Nystrom 80ff59ed27 Migrate language_2/cascade to NNBD.
Change-Id: I2b3a52b6df08bf31c4fc0cfe0512ccf65bd0506b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141701
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-31 18:06:40 +00:00