Commit graph

55514 commits

Author SHA1 Message Date
Bob Nystrom 162d6c3b0c Turn label negative tests into multitests.
Found two mistakes in the tests:

- label2_negative_test had no labels whatsoever.
- label8_negative_test called an undefined function, doAgain().

Change-Id: I4d17c969a2b1422ff96cf68996225ecaaf5fe829
Reviewed-on: https://dart-review.googlesource.com/52868
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-27 23:14:17 +00:00
Bob Nystrom 881e35ee82 Migrate library_negative_test.
In the process, I discovered multitests can't handle imports to
non-existent libraries. So I fixed that and cleaned up the code.

Change-Id: I9a8557e84f91ba7858bdf98f8732cd0ded55aa1a
Reviewed-on: https://dart-review.googlesource.com/52869
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-27 22:28:27 +00:00
Sigmund Cherem 594aaf57f4 Fix status of isolate test
This test "passes" now that sync-async is enabled by default because the test
completes before it gets a chance to fail.

TBR=sra@google.com

Change-Id: I4e8aaade6b618ab8cd79fbfff354dc99214feb27
Reviewed-on: https://dart-review.googlesource.com/52982
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-27 22:15:57 +00:00
Leaf Petersen 0b8734acb2 Fix some erroneous errors associated with returns in void functions.
Fixes https://github.com/dart-lang/sdk/issues/32443 .

A separate CL with language tests for a super set of the errors covered by this CL is in progress.

Change-Id: I1a0f6a6a347f75b8e332c8bfccf8fbbd32f20efe
Reviewed-on: https://dart-review.googlesource.com/52980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-27 22:08:09 +00:00
Mike Fairhurst f22cdd8def Revert "Change completionTarget.forOffset to accept & wrap dangling AstNodes."
This reverts commit fbfe5691cb.

Reason for revert: Subtle backwards incompatibility, with no obvious win-win fix.

Original change's description:
> Change completionTarget.forOffset to accept & wrap dangling AstNodes.
>
> Deprecate the entryPoint parameter, but still accept it in place of what
> used to be (positionally) compilationUnit.
>
> Detect if we have a compilation unit or not; and in the case we don't,
> add a new protection by asserting that it has no parent (its the root of
> the dangling tree).
>
> Its more of an implementation detail that completion contributors don't
> work well on dangling nodes, so fix it up for clients rather than
> expecting them to do it themselves.
>
> Change-Id: I3e454734e5b515f4e536f7229d541ca8c6aed60c
> Reviewed-on: https://dart-review.googlesource.com/52645
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>

Change-Id: I64a6689f7862fb2d256b348491c79c58ee0fe1a9
Reviewed-on: https://dart-review.googlesource.com/52962
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-04-27 21:23:06 +00:00
Ryan Macnak c354caa80d [vm, fuchsia] Build the VM as a shared library instead of a static library.
Change-Id: I791063fb0e32d56ca04de09486b41e4e98450c92
Reviewed-on: https://dart-review.googlesource.com/34304
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-27 21:14:37 +00:00
Konstantin Shcheglov c17ef848d6 Don't try to add new imports before leading comments of another import.
By doing this we tried to fix keeping "// ignore: xyz" correct.
https://github.com/dart-lang/sdk/issues/32432

Unfortunately this breaks a more often case, when there is a license
comment before the first import directive, and there is no reliable
way to decide if a comment is a license or not.

R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2169
Change-Id: Id5bdf7af48bd0b8748a53f8c5b3eb79ac2d6ae01
Reviewed-on: https://dart-review.googlesource.com/52940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-27 20:59:09 +00:00
Sigmund Cherem 239b2fd090 move changelong entry
TBR=vsm@google.com

Change-Id: I0c50ae409124be8ea27e8533a17d5841dc135d68
Reviewed-on: https://dart-review.googlesource.com/52960
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-27 20:07:55 +00:00
Sigmund Cherem 3c9d0858b0 dart2js: turn on sync-async by default
Closes https://github.com/dart-lang/sdk/issues/32869

Change-Id: I79b2d02d13adccdfbbd3a78158805244aceff7de
Reviewed-on: https://dart-review.googlesource.com/52061
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 19:48:46 +00:00
Ben Konyi 60f807baa5 [ VM / Hot-Reload ] Updated vm.status with more descriptive issue numbers.
Change-Id: I4d80ad745262aa81645dccccbfc43b874df1c213
Reviewed-on: https://dart-review.googlesource.com/52660
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 18:30:06 +00:00
Konstantin Shcheglov e44bc903e0 Remove UnitLintRule.
R=brianwilkerson@google.com

Change-Id: Ib89333a6afc6a4785eff47ee3433c9e0dc8a5a40
Reviewed-on: https://dart-review.googlesource.com/52883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-27 17:51:26 +00:00
Ryan Macnak 0cc70c4a7c [vm] Support for sharing parts of an app snapshot.
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.

Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.

Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-27 17:42:16 +00:00
Alexander Aprelev cd0c4e4fe1 Kernel service just returns errors. Leaves printing to the VM.
Bug: https://github.com/dart-lang/sdk/issues/32976
Change-Id: I797adc8d6db02441d8ffa0972cd6f1be051efa6a
Reviewed-on: https://dart-review.googlesource.com/52882
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-04-27 17:17:28 +00:00
Paul Berry 010d8144bc Add missing copyright notice
Change-Id: I1283a9536c6ddad3c99e644cd8619e7202cfc5f6
Reviewed-on: https://dart-review.googlesource.com/52880
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-04-27 17:06:09 +00:00
Konstantin Shcheglov 70547d8197 Change linter subscriptions from functions to AstVisitor(s).
The performance I see is similar to using functions.

R=brianwilkerson@google.com

Change-Id: Ib5f675f07b422bd9e6f28df0f9d7ea8b24669f63
Reviewed-on: https://dart-review.googlesource.com/52881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-27 16:51:47 +00:00
danrubel 88a098c71c Improve fasta parser field name recovery
Change-Id: I3a27b765df7543eda56c8ef691d6a3192a2769f1
Reviewed-on: https://dart-review.googlesource.com/52621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-27 11:58:30 +00:00
Jenny Messerly bd76221d58 fix #31489, JS interop to prototype getter in dartdevk
Change-Id: I6a3e1e25e0113bfcc49de19f250c23027ea3a69f
Reviewed-on: https://dart-review.googlesource.com/52865
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-27 00:17:29 +00:00
Stephen Adams ca419a9251 dart2js status refresh
TBR=sigmund@google.com

Change-Id: I5433f177557953c6ab578ec2fc7765b04ef88ac7
Reviewed-on: https://dart-review.googlesource.com/52866
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-26 23:57:49 +00:00
Konstantin Shcheglov da49615c2c Don't filter out references to constructors.
Even if we assign to something that wants a different type, we might
chain some property access on it later on, so it is not nice to don't
suggest anything at all. Instead, we should give higher relevance to
compatible types, but keep all the rest with default relevance, as we
did already for everything other than instance creations.

R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/1107
Change-Id: I86c3c5dded4ad4cbbf28a60c0ae2847f07a3373b
Reviewed-on: https://dart-review.googlesource.com/52863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-04-26 23:43:26 +00:00
Alexander Markov cc968df178 [test] Fix analyzer warning in the recently added test
Change-Id: I808e1b32a8c3b7bcd1da257116c06926d391b987
Reviewed-on: https://dart-review.googlesource.com/52862
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-04-26 22:44:46 +00:00
Brian Wilkerson 1c5d1a56e7 Clean up some hints
Change-Id: I623a4d86912ad0666b75ad519c15c84b24a5b579
Reviewed-on: https://dart-review.googlesource.com/52861
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-26 22:29:06 +00:00
Mike Fairhurst 5a9a479a73 Fix #32966 too little stack overflow context to be useful
Bug: 32966
Change-Id: I500cccd98d702d3938ff6ef1e415c74132e9d007
Reviewed-on: https://dart-review.googlesource.com/52840
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-04-26 22:16:36 +00:00
Alexander Markov 2786b9ff43 [vm/aot] Add detailed error messages and stack traces for null checks
This CL fixes error message in NoSuchMethodError thrown by null checks
and line numbers in corresponding stack traces (in AOT).

Name of the called function is placed into object pool, and metadata
for null check site is generated in CodeSourceMap.

Size of flutter gallery in release mode:
	  Before	 After
RW	  2165286	 2201642	(+1.68%)
RO	  2122192	 2168224	(+2.17%)
RX	  6871072	 6871072	(+0.00%)
Total	 11163079	11245467	(+0.74%)

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

Change-Id: I5ad1190f2ec9452a669863f7dd114ea5f9092d52
Reviewed-on: https://dart-review.googlesource.com/52703
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-26 20:33:15 +00:00
Mike Fairhurst fbfe5691cb Change completionTarget.forOffset to accept & wrap dangling AstNodes.
Deprecate the entryPoint parameter, but still accept it in place of what
used to be (positionally) compilationUnit.

Detect if we have a compilation unit or not; and in the case we don't,
add a new protection by asserting that it has no parent (its the root of
the dangling tree).

Its more of an implementation detail that completion contributors don't
work well on dangling nodes, so fix it up for clients rather than
expecting them to do it themselves.

Change-Id: I3e454734e5b515f4e536f7229d541ca8c6aed60c
Reviewed-on: https://dart-review.googlesource.com/52645
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-04-26 20:32:27 +00:00
Brian Wilkerson cb15b43c32 Add support for getting parse results synchronously
Change-Id: I2a6c4507fcc6debf3d4ffc3458621100d184619b
Reviewed-on: https://dart-review.googlesource.com/52820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-26 20:24:46 +00:00
Janice Collins e0ddab3c4c Fix bots after preview-dart2 was switched on by default.
Change-Id: I7ddb03e62d0f921b1745e471944d6f850533ea91
Reviewed-on: https://dart-review.googlesource.com/52823
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-26 20:09:56 +00:00
Paul Berry 88099ffcc3 Stop importing front_end into analyzer_plugin.
The symbols we previously needed (SyntheticBeginToken and
SyntheticToken) are now exported from the analyzer as of
dc21d3ce9d.

Change-Id: I5d0901c544fed0983d45c1da1dccfd5659a7777c
Reviewed-on: https://dart-review.googlesource.com/52821
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-04-26 19:12:46 +00:00
Paul Berry 115850ca1d Revert "Clean up the use of deprecated API in the analyzer_plugin package"
This reverts commit 86ba29265a.

The replacement API (int.tryParse) has only just been introduced and
is not yet avaiable to internal Google users.  I plan to un-do the
commit in about a week once the internal SDK has been updated.

Change-Id: Ic9206231861400d42f4814e4a56bde57ba8705a5
Reviewed-on: https://dart-review.googlesource.com/52822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-04-26 18:48:43 +00:00
Alexander Thomas f95df2a26b [dartfmt] Bump dart:style to 1.0.11
* Fix a runtime error when dart_style is itself run in Dart 2.
* Force splitting an empty block as the then body of an if with an else.
* Use the new lowercase Dart 2 constant names.

https://github.com/dart-lang/sdk/issues/32961

Change-Id: I283f28a5e75016528093358a899b7f983ae1445e
Reviewed-on: https://dart-review.googlesource.com/52760
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-04-26 18:26:32 +00:00
Konstantin Shcheglov c97d36c127 Add all concrete AST nodes for lints to subscribe.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: Idb21390d49e5963f28c14db8d3ae27e77287e7c3
Reviewed-on: https://dart-review.googlesource.com/52741
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-26 18:19:21 +00:00
Janice Collins 1afe71c08a Enable preview-dart-2 as default for analyzer.
Based on https://dart-review.googlesource.com/c/sdk/+/52340, but adds
the necessary plumbing through the test system to pass through
negations to strong and preview-dart-2.  Also adds support for those
negations to the analyzer.

Change-Id: I9793ff28bb593d25bbb0a2ed8736b5b53e0a62d8
Reviewed-on: https://dart-review.googlesource.com/52461
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-26 17:01:12 +00:00
Alexander Markov 45e390003f [kernel] Report error for dangling node reference in metadata
Currently, kernel metadata does not support references to nodes which
are not reachable from root Component. This CL adds an error if such
reference exists, instead of silently writing zero offset.

Change-Id: I6de886296bea66bd732f379cc99e0e3693ea79af
Reviewed-on: https://dart-review.googlesource.com/52527
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-04-26 16:33:00 +00:00
Kevin Millikin c1c90358a2 Record a missing file offset
`this` in argument lists was missing a file offset.

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

Change-Id: Ic5f18f5de91e73f56371f384709f0b1af330a4e6
Reviewed-on: https://dart-review.googlesource.com/52641
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-04-26 14:47:15 +00:00
Erik Corry 16be5d1e33 [VM] Fix missing update of off-heap class sizes
This fixes a test failure on SIMDBC64.

R=kustermann@google.com

Change-Id: I9f0633daea2acac96044b3145e595f28d778b9de
Reviewed-on: https://dart-review.googlesource.com/52780
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-26 11:19:37 +00:00
Erik Corry c8ad75d44a [VM] Make classes movable in sliding compactor
Store class sizes off heap so we can determine the size
of their instances even while the classes are moving.

R=rmacnak@google.com

Change-Id: I7b935114f76eb8b6aaa57d65e5b7cc0070afa75f
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/52104
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-26 09:38:25 +00:00
Johnni Winther c59b390806 Update status
These started failing at 8aa36b75c5

Change-Id: I3b53ac2169e890c8695f217f26d2596e32f061d7
Reviewed-on: https://dart-review.googlesource.com/52761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-04-26 08:41:39 +00:00
Johnni Winther 93511d523c Track RTI for noSuchMethod
Change-Id: I1fd66c48061556f8950bad471744eab4e2f40eb7
Reviewed-on: https://dart-review.googlesource.com/52560
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-26 08:07:02 +00:00
Jenny Messerly f6db874416 fix some dartdevk behavior to match dartdevc in more cases
Most notably this fixes mixins, but a few others issues were discovered
as well. Fixes #32428.

This gets dartdevk closer to producing a valid Dart SDK file

Change-Id: I2973baef279d6b71ed29b97bec758b2d3209c275
Reviewed-on: https://dart-review.googlesource.com/51760
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-26 01:13:52 +00:00
Vyacheslav Egorov c0015fe23f [gardening] Skip tests that are meaningless in AOT configuration.
Deferred libraries are loaded eagerly by VM compiler.

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

Change-Id: I2dc0615be563f38bd4b859a89e9630de2ee84850
Reviewed-on: https://dart-review.googlesource.com/52424
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-04-26 00:46:42 +00:00
Kevin Moore 9f7a247c33 Remove dangling pubspec.lock from pkg/dev_compiler/test/
Change-Id: I560adb1d3941bb3110c3d03782615c104b734713
Reviewed-on: https://dart-review.googlesource.com/52702
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-04-26 00:46:32 +00:00
Sigmund Cherem 004ee9cd12 Fix how we use Comparable.compare, so we have a function with the appropriate type in JSArray.sort
This is the same fix that was done here: https://github.com/dart-lang/sdk/blob/master/sdk/lib/collection/list.dart#L349

Change-Id: I6013dc96c67b487b0e96118028ef920a84f371b5
Reviewed-on: https://dart-review.googlesource.com/52701
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-26 00:32:02 +00:00
Jenny Messerly 30b53ceaab fix #30852, cyclic init errors in some cases in dartdevc
Change-Id: Iae73dcf7b3ad9b547d8dc278210310699673a9ab
Reviewed-on: https://dart-review.googlesource.com/52282
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-26 00:22:19 +00:00
Nate Bosch 94f45c8876 Bring in the latest pub
Bug: 32593
Change-Id: I4a8ce82591249968cfb00e9c57ddf75afb760d14
Reviewed-on: https://dart-review.googlesource.com/52700
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-04-26 00:01:35 +00:00
Vyacheslav Egorov 328163bba9 [kernel] CloneVisitor should preserve isDefault on switch cases.
Fixes https://github.com/dart-lang/sdk/issues/32971

Change-Id: I16bf688080ee60853f5de449ead3e7feaec37fc2
Reviewed-on: https://dart-review.googlesource.com/52602
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-25 23:53:22 +00:00
Vyacheslav Egorov 613c6d066c [vm][windows] Implement VirtualMemory::FreeSubSegment
Fixes #27505

This relands fc775b3e9b with a fix to

VirtualMemory::~VirtualMemory: on Windows the only way to release
virtual address mapping is to invoke VirtualFree(..., MEM_RELEASE) with the
original base pointer returned by VirtualAlloc - that is why we need to call
VirtualFree is size of the reservation is 0: the whole reservation might have
been decommitted by VirtualFree(MEM_DECOMMIT) but it is still present.
Change-Id: I7d1d444693c523b327d44266d5fe70f7a5d8f803
Reviewed-on: https://dart-review.googlesource.com/52642
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-04-25 23:39:52 +00:00
Jenny Messerly 7c6594c0bd fix #32302, friendlier Type.toString() in dartdevc
Change-Id: I650634d17aad8d6b7e154874578eb88cf87fd994
Reviewed-on: https://dart-review.googlesource.com/52081
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-25 23:16:56 +00:00
Alexander Markov e7848a8cda [vm/kernel] Avoid dangling references to DartTypes from constant pool
While generating bytecode, avoid flattening of type arguments used for
instance allocations (and thus avoid creating new types when substituting
type parameters). This is a workaround to limitation of kernel metadata
which is unable to serialize references to nodes (such as DartType)
not reachable from root Component.

Change-Id: I52c5e21873d0159d389895dc570a9e7283f2a6ff
Reviewed-on: https://dart-review.googlesource.com/52643
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-04-25 21:36:31 +00:00
Kevin Millikin d47203a71b Fix a crash in type inference
It's not generally safe to continue to use the Shadow nodes after they
have had their type inferred, because they give a false picture of the
tree.  In this case it led to an assertion failure.

Move the assert to a place in the code where it is true.  Use the
correct subexpression for subsequent check insertion.  Clear the
parent pointer when Kernel nodes are removed from the tree to try to
catch problems like this.

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

Change-Id: I775747d7a6a5240d63881c8563c83cc84628e3d7
Reviewed-on: https://dart-review.googlesource.com/52525
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-25 21:36:25 +00:00
Konstantin Shcheglov 1030189d56 Add NodeLintRule and UnitLintRule that replace AstVisitor in lints.
This makes the Flutter repo analysis about 6% faster.

Before: 56.9 57.4 56.9 57.3 56.5 56.9 56.6
After:  53.5 53.0 53.8 54.3 53.5 53.0 53.0

To see the different better, I ran lints 100 and 10 times for each file.
Before: 628 621 109 107 109
After:  338 333  77  75  76

To get these numbers we will need to make corresponding changes to lints,
to implement these interfaces, so that they are used instead or the
current visitors. I have these changes locally, but we would need to
publish analyzer first.

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

Change-Id: I8b4efe05f815082fe39c33c303bb92b7dac19f65
Reviewed-on: https://dart-review.googlesource.com/52644
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-25 21:22:42 +00:00
Brian Wilkerson 9e9b50d19d Improve error messages for annotations involving undefined names (issue 27788)
Change-Id: Iccfcb73b7671f50353b57a81817dec013b997a53
Reviewed-on: https://dart-review.googlesource.com/52640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-25 17:48:49 +00:00