Commit Graph

30160 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
Devon Carew 9501a15e5b [vm_service] improve doc handling; fix analysis issues; fix test expectation
Change-Id: Ie8f48adb1b52d2e583c168165291ee510294f176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141848
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-31 17:26:30 +00:00
Konstantin Shcheglov e8c4aed700 Remove implementedForMixing from inheritance manager.
Change-Id: I4f698e1210d86e7c3d168e99b69aea0c075cc10e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-31 15:59:55 +00:00
Konstantin Shcheglov ca6b0fd0df Fix for crash in WrapInText when the parameter is not InterfaceType.
There was a crash in the logs.

_TypeError: type 'GenericFunctionTypeElementImpl' is not a subtype of type 'ClassElement'
at WrapInText.compute	(wrap_in_text.dart:26 )
at FixProcessor._addFromProducers.compute	(fix_internal.dart:4506 )
at FixProcessor._addFromProducers	(fix_internal.dart:4520 )
at FixProcessor.compute	(fix_internal.dart:762 )
at DartFixContributor.computeFixes	(fix_internal.dart:82 )


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

Change-Id: I187b3348a212391cc6c64ab2c412653bd2319334
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141820
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-31 15:56:40 +00:00
Jens Johansen f2d27055bf [CFE] Add "annotate lines" option to parser suite
One can for instance run something like out/ReleaseX64/dart \
  --enable-asserts pkg/front_end/test/parser_suite.dart \
  -DupdateExpectations=true -DannotateLines=true

and have expect files look like this:

[...]
      // Line 5: }
      endBlockFunctionBody(1, {, })
    endTopLevelMethod(void, null, })

  // Line 6:
  endTopLevelDeclaration()
endCompilationUnit(2, )

Change-Id: I3d98bbd24117a8f91823e739b5174d87a8c36fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141885
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-31 12:51:00 +00:00
Martin Kustermann 2f3748934c [infra] Update tools/test.py and test matrix for running tests with arm64-qemu
Change-Id: I0dc2cdd98f2c2211f14509655e79798b89085837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141888
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-31 11:06:20 +00:00
Dmitry Stefantsov 2e822ae91b [cfe] Apply the special treatment of FutureOr in GLB for NNBD
For details see:
https://github.com/dart-lang/sdk/issues/37439#issuecomment-519654959

This CL implements the same special treatment of FutureOr to the
NNBD-aware algorithm for computing of GLB.

Change-Id: I6e95b9884738b426dce0152217d79fe0298404bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140658
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-31 09:16:49 +00:00
Jens Johansen 605f9eb030 [CFE] Perform transformPostInference when doing expression compilation
Previously, if using spread features, it would crash (if not before
when trying to serialize), and set literals wouldn't be transformed
away either (which the VM probably requires).

It should fix https://github.com/flutter/flutter/issues/41678

Change-Id: I40361d592e9e7a3fe820c4835aaac893c87d94fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141620
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-31 06:48:19 +00:00
Konstantin Shcheglov fb4b59e043 Deprecate isProxy / isOrInheritsProxy in ClassElement.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ied4011961d4dece33d527888d274893985d85f93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141767
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 23:27:39 +00:00
Konstantin Shcheglov 9864a9532a Set dynamic resolution for super MethodInvocation in invalid context.
Every MethodInvocation should be resolved, even if to dynamic.
Leaving it undersolved caused NPEs later.

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

Change-Id: I43ad2889639684ecaecf3810127213f69765a271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 23:25:49 +00:00
Jaime Wren 11d6bc6055 Comment out the currently incomplete available suggestions work to ensure that the output is accurate for non-available suggestions users
Change-Id: I094392cb81edf5c0c7b11702ba42e5d2c80a1453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141760
Commit-Queue: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 22:08:19 +00:00
Mike Fairhurst 0943e6136d [nnbd_migration] Save line number of details to preserve on reload.
When clicking on a region, store its offset & line in the URL via
`pushState`, so that on reload (after rerun migration or after apply
edit, or just in general) the context isn't lost.

Note that offset is not enough. Basically, every navigable element gets
a class `o$offset`, and if the page is loaded with some offset such
that no element with class `o$offset` exists, it falls back to line
number. And if there were edits mode before the region since reload,
there will only be an element `o$offset` if you are lucky.

Change-Id: Ic5fd83aceb4e8731348e70c039fec2ca2a6ab9e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141465
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-30 21:41:59 +00:00
Jaime Wren 04d4fafbdf Fix the dart help test output by implementing printUsage() in the test command
Bug: https://github.com/dart-lang/sdk/issues/41041
Change-Id: If9c34d9b86ee729797bef9430d0fb92bf9f2bbf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141220
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-30 19:08:18 +00:00
Konstantin Shcheglov c957128c7e Document differences in inheritance tests between CFE and analyzer.
Change-Id: I812a268990f8db844b03f06545804ce60e7164e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141380
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 17:34:08 +00:00
Konstantin Shcheglov 44b6f02985 Revert "Fix the result type of binary expression with the left TypeParameter extends num type."
This reverts commit 35ebf66c6a.

Reason for revert: This change is not supported by the specification.

Original change's description:
> Fix the result type of binary expression with the left TypeParameter extends num type.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Change-Id: I279093c6d155a667b42c47dcd8ca734b874dde57
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141473
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I84e90001d97f95dc729072d4dfa54a9bb53ab002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 16:35:56 +00:00
Johnni Winther 82d4bd1c7e [cfe] Handle member signatures from dill in class hierarchy builder
Closes #41210

Change-Id: I1e38e014c04f140dd37821375a6efbfe73f37562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141545
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-03-30 14:09:31 +00:00
Erik Ernst 56748006a1 [cfe] Add missing .next in endImplicitCreationExpression
Said method seems to break the pattern of similar methods, and the
actual token seems to be wrong. This change seems to fix the issue.

Change-Id: I54fcaa0ce2a846cbe10dfe5edc4e30282c523731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141544
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-30 12:52:51 +00:00
Jens Johansen 7d4d26a013 [CFE] Add api to get language version for uri
Closes #41205

Change-Id: I9e55257341e7c53f4f68f9d636b04f8fd6bffb68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141250
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-30 09:14:25 +00:00
Johnni Winther 6540f603d8 [cfe] Don't include member signature in id testing by default.
This prepares id testing for the unforked sdk where all Object
members add a member signature in the immediate opt-out subclasses
of Object.

Change-Id: Ife443582c4f88b6c8673aa560a700dbb88475c3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141600
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-03-30 08:42:25 +00:00
Johnni Winther 0a9e57419b [kernel] Make verbose qualified names conditional in toStringInternal
Including the library name/uri in types and member names makes these
unreadable in most cases. This changes that default toStringInternal
to omit the library name/uri but supports a verbose mode that includes
the library name/uri for debugging the rare occasions where they matter.

Change-Id: I783e8bd0ac5d2f19c3051e8e7f226b240c8d1bc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141546
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-03-30 08:41:15 +00:00