Commit graph

70186 commits

Author SHA1 Message Date
Janice Collins
e402fc4a22 Do not require --enable-asserts for test_assertOnPathOutsidePackage.
There is a handy annotation designed just for this purpose.

Change-Id: I4a1e5e6320f6f3dd940ad43fc698a6ee41e6b44b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134249
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2020-02-04 21:32:28 +00:00
Konstantin Shcheglov
05dcf371e7 Remove 'withNullability' from TypeImpl.toString()
Bug: https://github.com/dart-lang/sdk/issues/40460
Change-Id: Icd967df0252a9fd7ff9941ca7158b7df0190c961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-04 21:19:06 +00:00
Martin Kustermann
e171ff4a6d [vm/concurrency] Speed up isolate communication via normal snapshotting
Do not lock forwarding table during snapshot writing:

This is a follow-up to [0], which made the [WeakTable] used during
snapshot writing per isolate. Since each isolate has it's own table
now, there's not reason to lock it during snapshot writing.

Furthermore we speed up RawObject::InVMIsolateHeap() which was super slow
due to locking "vm-isolate"'s page space and walking all pages.

[0] https://dart-review.googlesource.com/c/sdk/+/114858


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

Change-Id: I783ea6083c199058e76895fcde38dc06af6991d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134299
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-04 20:46:36 +00:00
Régis Crelier
dfce72bbf9 [VM/nnbd] Fix canonicalization of type 'Never' (fixes #40249).
Change-Id: Ib3dc4fc6d31aeadb331fda017fc8b4f1a8ae8221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134382
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-02-04 20:31:56 +00:00
Jaime Wren
270829d7eb Refactor the CompletionMetricsComputer class into three classes: a subclass and two concrete classes, AbstractCompletionMetricsComputer, CompletionCoverageMetrics and RelevanceAnalyzerMetrics.
This change breaks up the lengthy algorithm, and greatly speeds up the Relevance Analyzer tests.

Change-Id: I4273bcabe7399f80aa751c5963a53fa04e1b4d25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-04 19:34:56 +00:00
Robert Nystrom
68e904e444 Migrate language_2/abstract to NNBD.
Change-Id: I265933f36f68df6f8e542a3f85ce0b04e1dfd549
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134205
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-02-04 18:57:26 +00:00
Janice Collins
1d932f7450 Add a 'run' feature to MultiFutureTracker.
This makes a certain idiom using MultiFutureTracker more compact,
namely blocking on the completion of the closure.

Change-Id: I8872ce882da0b20775c416895047cc18abd2801a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134248
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-02-04 18:57:18 +00:00
Martin Kustermann
a5bb8b666a [infa] Respect --sanitizer flag in tools/test.py when running GN
Change-Id: I0c9fdc26983381111021bf1265ef58f31deb8ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134296
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-04 18:45:26 +00:00
Ryan Macnak
7c472c396c [vm] Speed-up the stack overflow check as used by reload stress testing.
Avoid calling Function::ToFullyQualifiedCString when it is not needed.

Change-Id: I7d8ed879bb47e5e06c456bec73e4e00ae0181cd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134241
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-04 18:16:59 +00:00
Konstantin Shcheglov
a1d232a9b4 Issue 40392. Report SWITCH_CASE_COMPLETES_NORMALLY when switch/case completes normally.
Bug: https://github.com/dart-lang/sdk/issues/40392
Change-Id: I15c80d0667be1c783cb21870b9f92ee98a4f3042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134245
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-04 17:46:48 +00:00
Teagan Strickland
bb24f98616 Revert "[vm/aot] Remove object wrapping of bare instructions for AOT snapshots."
This reverts commit 7475c637c3.

Reason for revert: Breakage on simarm_x64 (and thus arm_x64)

Original change's description:
> [vm/aot] Remove object wrapping of bare instructions for AOT snapshots.
> 
> Now, when writing an AOT snapshot in bare instructions mode, only
> the actual instructions in the RawInstructions payload are serialized
> instead of the entire RawInstructions object.
> 
> Since there are no longer RawInstructions objects in these AOT
> snapshots, we also change how Code objects are serialized. Instead
> of just containing a reference to the RawInstructions object, we
> serialize two pieces of information: where the instructions
> payload for this Code object begins and whether there was a single
> entry for the instructions payload. (To save space, the single
> entry bit is serialized as the low order bit of the unchecked
> offset, which was already being serialized).
> 
> While we also need the length of the instructions payload, we
> approximate it for all but the last Code object by subtracting
> the next Code object's payload start from this Code object's
> payload start. For the last Code object, we assume it extends
> to the end of the instructions image.
> 
> Changes on flutter gallery in release mode:
> armv7: instructions size -2.66%, total size -1.68%
> armv8: instructions size -5.81%, total size -3.49%
> 
> Fixes https://github.com/dart-lang/sdk/issues/38451.
> 
> Change-Id: Ia458e8d99bae18f5c3b6e849df2519027f06f574
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131067
> Commit-Queue: Teagan Strickland <sstrickl@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,rmacnak@google.com,sstrickl@google.com

Change-Id: If2c8ca6b0993211b2509b275af7ff11a8fa2baa3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-simarm_x64-try, vm-kernel-precomp-android-release-arm64-try, vm-kernel-precomp-android-release-arm_x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134322
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2020-02-04 17:32:28 +00:00
Teagan Strickland
592e59691b Revert "[gardening] Fix assert failure on (sim)arm_x64 due to 7475c63."
This reverts commit 30e80f0a64.

Reason for revert: Other failures were hiding under the ASSERT failure.

Original change's description:
> [gardening] Fix assert failure on (sim)arm_x64 due to 7475c63.
> 
> Also since we write out a target word for the
> InstructionsSection::instructions_length_ field, make that field a
> uword, not a uint32_t.
> 
> Change-Id: I8032cf49aae9528702778ee3ed717c08cb281e54
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-bare-linux-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134290
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,dacoharkes@google.com,sstrickl@google.com

Change-Id: I694411d9e986062148888aaddedc75673039dfe0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm_x64-try, vm-kernel-precomp-bare-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134321
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2020-02-04 17:30:58 +00:00
Konstantin Shcheglov
8378042f19 Extract test for CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS.
Change-Id: I91641cee4320d4d21d121fc0d9494c090cbe2a76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134246
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-04 17:05:38 +00:00
asiva
0e5a7275d0 [VM/library] Fix signature of waitFor to account for potential null return value.
This should fix the breakage in the NNBD on test standalone/io/issue_32052_test

Change-Id: I58192dffa9a9d7f5c492dd58e7f570fabcb69b86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134243
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-04 16:55:08 +00:00
Liam Appelbe
a793c36c77 [test] Run late field tests in optimised mode
Fix the tests by disabling the optimisation that turns getter calls into
raw gets if the field is late, and by calling recording the null init
store in bytecode mode.

Change-Id: I8f12e3237cd32c890b5cef8d00c32940e937330d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134180
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-04 16:51:38 +00:00
Teagan Strickland
30e80f0a64 [gardening] Fix assert failure on (sim)arm_x64 due to 7475c63.
Also since we write out a target word for the
InstructionsSection::instructions_length_ field, make that field a
uword, not a uint32_t.

Change-Id: I8032cf49aae9528702778ee3ed717c08cb281e54
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-bare-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134290
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-04 16:01:52 +00:00
Robert Nystrom
c5cba24124 Migrate language_2/argument to NNBD.
Change-Id: Ic1963eb1962bc1341a68783e9c44f3e04bfbc43a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134223
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-04 15:07:11 +00:00
Jens Johansen
f0d16c3c31 [CFE] Parser test for class called late and required
Bug: #40288.
Change-Id: I5be3b949c954e071db4ad5418d23f56fdeb711ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134281
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-04 13:45:31 +00:00
Dmitry Stefantsov
500752d51a [cfe] Disallow default List constructor invocations in NNBD
Closes #40086.

Bug: http://dartbug.com/40086
Change-Id: I56606acfc7c0392f2aece930b1285f69a7594e61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134287
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-04 13:21:31 +00:00
Johnni Winther
89967b83f5 [cfe] Update tests to show that inc/dec shorting is supported
Change-Id: I2c74003cf6bc9ca5dde7e982af053d6e9d54714d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134286
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-04 12:39:06 +00:00
Victor Lima
e076e793a7 [vm] Allow unboxed integer fields in AOT
flutter arm-v8:
  gallery instructions size: -0.46%
  gallery total size: -0.35%

  sync_star_generated (Pixel 2): -8.04% (less is better)
  velocity_tracker_bench (Pixel 2): -9.18% (less is better)

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

Change-Id: Ieb7bf426af37f77fd543ebc5314a94224da3aaeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132606
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-04 12:37:21 +00:00
Dmitry Stefantsov
5a8a3ad809 [cfe] Disallow late final fields and const constructors
Closes #40091.

Bug: http://dartbug.com/40091
Change-Id: I9e858ba4de096d230c40c2ff4136b173e46251cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134283
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-04 11:22:11 +00:00
Robert Nystrom
3414b51675 Migrate language_2/assign to NNBD.
Change-Id: I71947bc5726f168fc036a7fece8a3b6b7bf964f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134224
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-04 10:37:43 +00:00
Teagan Strickland
7475c637c3 [vm/aot] Remove object wrapping of bare instructions for AOT snapshots.
Now, when writing an AOT snapshot in bare instructions mode, only
the actual instructions in the RawInstructions payload are serialized
instead of the entire RawInstructions object.

Since there are no longer RawInstructions objects in these AOT
snapshots, we also change how Code objects are serialized. Instead
of just containing a reference to the RawInstructions object, we
serialize two pieces of information: where the instructions
payload for this Code object begins and whether there was a single
entry for the instructions payload. (To save space, the single
entry bit is serialized as the low order bit of the unchecked
offset, which was already being serialized).

While we also need the length of the instructions payload, we
approximate it for all but the last Code object by subtracting
the next Code object's payload start from this Code object's
payload start. For the last Code object, we assume it extends
to the end of the instructions image.

Changes on flutter gallery in release mode:
armv7: instructions size -2.66%, total size -1.68%
armv8: instructions size -5.81%, total size -3.49%

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

Change-Id: Ia458e8d99bae18f5c3b6e849df2519027f06f574
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131067
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-04 10:28:43 +00:00
Robert Nystrom
56ca547c8c Migrate language_2/accessor_conflict to NNBD.
Change-Id: I136befc5fa77bfa2a118f9bd032250abcde2da68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134222
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-04 09:52:03 +00:00
Vyacheslav Egorov
ab56c2f841 [runtime/docs] Add custom lexer for shell sessions in runtime wiki.
This was missing from the previous wiki related commit.

TBR=aam@google.com

Change-Id: Ib68ead3bab2841bb8e02cb93fd71bce7515ff335
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134285
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-02-04 09:16:52 +00:00
Vyacheslav Egorov
857b911f3b [vm/docs] Publish "Introduction to Dart VM" source and build tools.
Change-Id: I30068d6492bd6ec4ce42cc50d4a481960a0197fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133985
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-02-04 09:04:32 +00:00
Jens Johansen
18c281c624 [observatory] Allow to say 'break package:foo/file.dart:42'
This CL updates the parsing of "break" statements in the debug console
in observatory, as well as handling that the same script can be a part
of several libraries.

Before one could get stuff like this:
$ break package:front_end/src/fasta/scope.dart:389
Function 'package:front_end/src/fasta/scope.dart:389' not found
$ break scope.dart:389
Script 'scope.dart' is ambiguous

The first one is fixes by this CL: We now allow package uris and thus
no longer think it's a function. In this case it wouldn't have mattered
though, it would just say it was ambiguous, as the last case.
This is caused by the same script being found twice. By using a set
instead of a list, that's fixed too.

Change-Id: I3931c8f2abc0a3a5a77cff516da8767037196bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133593
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-04 08:57:01 +00:00
Jens Johansen
c6aa3a22a7 [vm] [debugger] Fix for not breaking in library with mixin
In the VM, a single script can belong to several libraries because of
mixins.

Previously, when setting a breakpoint, it found the function to set the
breakpoint in by taking the "scripts library" (script.FindLibrary) and
then tried to find a function in that library that matched.
Sometimes it found the "wrong" library and the breakpoint thus wasn't
set.

This CL changes that so it goes though all libraries, finds all maching
libraries and tries all of them.

This solves the issue at hand, but might not solve all corner-cases.

This added test demonstrates the resolved case where before it would
just say that it couldn't add the breakpoint on line 13.

Change-Id: Ie44b0dfb4ea3e8de767d1867ec432b2aef429b76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133592
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-04 08:43:21 +00:00
Martin Kustermann
83d7048600 [vm/concurrency] Disable isolate groups in AOT mode
This is a preparation for landing the shared heap CL (it will
temporarily regress the isolate spawning time and memory use).

Once the shared heap CL is in, we can make a follow-up change to actually take
advantage of it by sharing the entire program structure (cl in
preparation by aam@). Once that lands we will enable the isolate groups
in AOT and reduce spawning latency by 10x :)

Regarding testing: We have already made all our isolate related tests in the
SDK run with/without isolate groups (irrespective of the default), so we
should continue to have test coverage in both modes.

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

Change-Id: Ib7e5101dfe8527948cd9ceed09d50051b04fb874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134280
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-04 07:58:01 +00:00
Dmitry Stefantsov
3183573a79 [cfe] Account for signatures when inserting noSuchMethod forwarders
It is possible for an abstract member to be overridden with another
abstract member with different signature (that has, for example, more
optional parameters).  In such cases, the noSuchMethod forwarders should
be generated for each distinct signature.

Closes #40248.

Bug: http://dartbug.com/40248
Change-Id: I7974415f0ecb78f05d7265ecf9d57cc0d38e6c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132661
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-04 07:58:00 +00:00
Johnni Winther
7c837ce30a [dart2js] Remove all unneeded casts
Some of the implicit casts were need for covariance checks. Now these
can be identified and actively preserved.

Change-Id: Ibfff4f68cc4af7956372adb2f4d846b079f0b508
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134162
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-04 07:01:09 +00:00
Srujan Gaddam
851912cc1d Change nnbd_src files to be null-safe
Translates the forked nnbd_src files to address analyzer issues.

Change-Id: Ida21988bff63a6c5a037b548d0c8b11208317b3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130131
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-04 01:57:39 +00:00
Ben Konyi
8f7d3fca69 [ VM / dart:typed_data ] Change fmaxf/fminf to fmax/fmin for Float64x2.clamp
Fixes https://github.com/dart-lang/sdk/issues/40446

Change-Id: Ic610ecd024a6fc9bab3095ceb049139e21a519f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134242
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-04 01:06:19 +00:00
Ryan Macnak
342535bb88 Mark typed_data/zeroed_allocation_test as slow on reload bots.
Change-Id: I7008ce0b5e68b092067f34e1f7ef6ee32487dc51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134260
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-02-04 00:41:36 +00:00
Nicholas Shahan
3ca719b44c [dartdevc] Enforce omit_local_variable_types lint
Change-Id: I50d9c073ec337d5f05203b30abf289877fdeb08f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134082
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-02-03 23:41:17 +00:00
Nicholas Shahan
703bc0086d [tests] Create null is T tests in legacy and null safe libraries
Change-Id: I2054b6da8b66e7c6de81d9fb18fdc1c264db376c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132420
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-03 23:12:02 +00:00
Paul Berry
b01eb17669 Migration: remove test file containing no tests
Change-Id: Ib15940732ccd9e4f36de12cbe10a2ce631a4a24c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134145
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-03 23:10:21 +00:00
Sam Rawlins
44814d320f Final fix for analyzer windows bots; don't canonicalize
Something is weird with our ResourceProviders and Context.canonicalize.
It causes the following:

newFolder(convertPath("/p3"));
resourceProvider.getResource(convertPath("/p3")) is File; // false
resourceProvider.getResource(
    context.canonicalize(convertPath("/p3"))) is File; // true

Change-Id: Iafbfb6ad1bfc912a6850faf063778879dc97fe62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134143
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-02-03 23:03:56 +00:00
Konstantin Shcheglov
239a278b84 Remove TypeSystem.isOverrideSubtypeOf()
It is replaced with CorrectOverrideHelper.

Change-Id: Iab8162b9ffbca02000587ece1215717346b0a3a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134203
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-03 23:02:16 +00:00
Konstantin Shcheglov
49e2ed34a2 Issue 40304. Use runtime type equality for checking overrides.
Bug: https://github.com/dart-lang/sdk/issues/40304
Bug: https://github.com/dart-lang/sdk/issues/40279
Change-Id: I55a27335cfa923297ee580de6e79df15de004879
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-03 22:52:46 +00:00
Jaime Wren
e5d5434715 Standard output improvement from metrics_util.dart to print "<no counts>" if the counter has no counts.
Change-Id: I3d01f539670bb8d57f6b04b16cc4f92aaa2aa1c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-03 22:50:07 +00:00
Ben Konyi
30f25ba735 [ VM / typed_data ] Fixed inconsistent results for -Float32x4.zero().clamp and -Float64x2.zero().clamp
The fuzzer found an issue where clamping negative zero would result in
conflicting answers depending on whether or not the clamp operation had
been optimized in JIT mode.

The MINPS and MAXPS instructions will always return the second operand
if the values being compared are -0 and 0, which is the opposite of what
the C implementation of clamp was doing.

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

Change-Id: I3afb725bd0c8643758dbe753d863ba93c86ad747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134093
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-03 21:59:48 +00:00
Konstantin Shcheglov
a0ca3e720e Update dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt after analyzer change.
TBR

Change-Id: I8da2f14102973dd738a19d4e0c13687f10767486
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134202
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-03 21:42:11 +00:00
Jaime Wren
78fe10c3be Completion metrics change- add missing documentation in the relevance_analyzers.dart file, as well as adding DartCompletionRequest as an input to the analyzers
Change-Id: I31c2523252f2574f092b44ec8b67d346804ac856
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134220
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-03 20:50:26 +00:00
Konstantin Shcheglov
1fff623c19 Use TypeSystemImpl instead of TypeProvider in DartObjectImpl.
We need to be able to use TypeSystemImpl in DartObjectImpl.== to
call runtimeTypesEqual() instead of DartType.==

Change-Id: I2021a0d86a7c304072fd8fee2d1a7e6e979100a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134146
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-03 20:38:46 +00:00
Konstantin Shcheglov
a165b62561 Use CorrectOverrideHelper in InheritanceManager3.
Change-Id: I3ceee509d8e78b7f35cb4bb596beeee0d2d9aeb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-03 20:34:26 +00:00
Alexander Markov
e1e2604ff1 [vm/nnbd] Use NNBD flags from AsExpression, IsExpression
This is the VM-specific follow-up to
https://dart-review.googlesource.com/c/sdk/+/133100

Change-Id: Iaa8728d2e0afebf421f9c65c3b3a48b286af5970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134200
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-03 20:20:26 +00:00
Paul Berry
a97c23b939 Migration: plumb ElementTypeProvider through FlowAnalysisVisitor.
This ensures that when type promotion happens while running the fix
builder, the promoted types are the correct post-migration types.

Change-Id: I15fe2cd8a6399527ded782dbbf252f9aeb530827
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134083
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-02-03 19:59:38 +00:00
Paul Berry
e989e90346 Migration: avoid ambiguities when adding a cast after a function expression.
When adding a cast to a function expression like `() => null`, we need
to add parentheses, so that we produce `(() => null) as Type`, rather
than `() => null as Type`, which makes the cast appear to apply to the
function body expression.

Change-Id: Ib5ae93df5b840a832c10941e47fa092a4f764eea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134044
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-02-03 19:59:38 +00:00