Commit graph

21836 commits

Author SHA1 Message Date
Peter von der Ahé 4e32a356e0 Ignore synthetic elements created by the parser
Change-Id: I558827417c938a22075c5b5357294d27cbd6286a
Reviewed-on: https://dart-review.googlesource.com/76121
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-25 14:15:23 +00:00
Johnni Winther 1652850381 Compute static types during impact computation
This speeds up the computation of static type by avoiding repeated
visits of subtrees. The change also paves the way for improving
static type computation beyond what is specified. For instance by
handling negative type promotions.

Change-Id: Ifa3ea0f9760251f43cbbcc97b684004741a97b11
Reviewed-on: https://dart-review.googlesource.com/76020
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-25 09:58:19 +00:00
Johnni Winther b4341f02db Remove unneeded method rti need
We don't need to mark generic methods (not local functions) as needing
rti if subtypes of Functions need support for .runtimeType.

Unlike local functions, generic methods only have function type when
they are torn off. The tear-off itself doesn't add the need for type
arguments: either the function is instantiated, in which case the
instantiation carries the type arguments, or it is uninstantiated, in
which case the function type is still generic.
Change-Id: I5fc849aad443f49c4b0b26b18d6eccc409e43fb9
Reviewed-on: https://dart-review.googlesource.com/76000
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-25 09:16:41 +00:00
Jens Johansen 570fd5a788 Error on re-export, export and import of libraries with same name.
Fixes #12916.

Change-Id: Icef0f04f1575c8dad5f1cd23a9363f06fa2a2b35
Reviewed-on: https://dart-review.googlesource.com/74161
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-25 09:09:21 +00:00
Johnni Winther 4b312b2b8c Support multiple superclasses in the mixin on clause.
Change-Id: I23c613170be8fdf3c4a7ace560d71161b3e7320f
Reviewed-on: https://dart-review.googlesource.com/75881
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-25 08:26:38 +00:00
Konstantin Shcheglov d34337aa2d Ignore noSuchMethod() for the purpose of searching concrete member implementations.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33553
Change-Id: Ie597cb4d39ba16e4503503b59d1e5179c594bad5
Reviewed-on: https://dart-review.googlesource.com/76200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-25 02:37:03 +00:00
Alexander Markov 53497549ab [vm] Specialize 'new List()' on kernel AST
In VM, 'new List' is equivalent to either 'new _GrowableList' or
'new _List' depending on the number of arguments.
This change does the transformation early (on kernel AST), in order
to have specialized representation in TFA and in bytecode.

Change-Id: I46f0db8cc19efb3a53fdbe971ac26bdd2736fbda
Reviewed-on: https://dart-review.googlesource.com/76283
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-25 00:38:57 +00:00
Alexander Markov afd4cc9d1a [vm/tfa] Infer concrete class of int literals in TFA
Teach TFA that small integer literals, which fit into Smi on all
platforms have a concrete class _Smi.

Change-Id: I4aec5389fc0a83f36077c1f1c0c9a5e59ff4b260
Reviewed-on: https://dart-review.googlesource.com/76302
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-25 00:16:51 +00:00
Alexander Markov a4d48f49e7 [vm/tfa] Infer concrete class of string literals in TFA
Depending on a value of a string literal, it is possible to determine
concrete class at compile time (either _OneByteString or _TwoByteString).

Change-Id: Ied696b328021e9a61f1ad14d02b88681a9ed4fed
Reviewed-on: https://dart-review.googlesource.com/76260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-09-25 00:16:51 +00:00
danrubel 6ce0dc0006 dartfix stub implementation
This simple first step cmdline utility launches and manages an external analysis server process.
Future CLs will add dartfix specific functionality.

Change-Id: Iba32177acd8ca1edd703bad78e55cd1e88edb6bd
Reviewed-on: https://dart-review.googlesource.com/76320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-24 23:17:47 +00:00
Konstantin Shcheglov e4eb2437b8 Look into superclassConstraints while searching for a member in interfaces.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/34564
Change-Id: I11642d89710a89fb347106ff374ff0ea4227310c
Reviewed-on: https://dart-review.googlesource.com/76284
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-24 22:12:14 +00:00
Zach Anderson 95d37b0921 Revert "Implement inheritance/override checks from the spec."
This reverts commit 836a1d7a88.

Revert "Don't use ClassElementImpl for now in override checking."

This reverts commit 58e44c1400.

Revert "large_class_declaration_test is slow now."

This reverts commit 56f6c52d58.

Revert "Add regression test for issue 34392."

This reverts commit ef7d144bc7.

Revert "Mixin declarations don't have supertype, fix isMoreSpecificThan()."

This reverts commit 95b8a19a20.

Change-Id: Icda9cf9091ef35acc8fd61ac5dc135b3717eba0a
Reviewed-on: https://dart-review.googlesource.com/76301
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-24 21:27:34 +00:00
Konstantin Shcheglov 95b8a19a20 Mixin declarations don't have supertype, fix isMoreSpecificThan().
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/34563
Change-Id: I0edcc887694e895856cb262865b8ec61976bafad
Reviewed-on: https://dart-review.googlesource.com/76281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-24 20:34:28 +00:00
Konstantin Shcheglov 58e44c1400 Don't use ClassElementImpl for now in override checking.
TBR

I'd like to land this for now, but I probably will reintroduce it a
bit later. The problem is that this again the same problem with
handles, and I don't want to make it into internal build as is.

R=brianwilkerson@google.com

Change-Id: I98c37b2c5dadf2d5450a536471fc002fc5b247d2
Reviewed-on: https://dart-review.googlesource.com/76221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-24 18:17:29 +00:00
Alexander Markov 62d154f6a3 [vm/bytecode] Record null-initialized fields in bytecode
If a field is initialized with null (either explicitly or implicitly),
field store can be omitted in bytecode. In such case, bytecode should
still convey the information about this initialization to VM for
field guards to work correctly.

Change-Id: I1fd45b858c3c521b97fa5dbffe0e15b1ea75d92f
Reviewed-on: https://dart-review.googlesource.com/76060
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-09-24 17:56:35 +00:00
Vijay Menon 70cc34df21 Custom format errors and exceptions to show traces
Fixes #34529

Change-Id: If5142a9c11808af50d1b7a04346e53e980cce3e6
Reviewed-on: https://dart-review.googlesource.com/76101
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-09-24 17:41:33 +00:00
Brian Wilkerson 95831136b4 Fix NPE when accessing superclass
Change-Id: I64da591bfa33a5202b7bd15de451be84330cc8bb
Reviewed-on: https://dart-review.googlesource.com/75403
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-24 17:11:23 +00:00
Konstantin Shcheglov 836a1d7a88 Implement inheritance/override checks from the spec.
This CL starts moving checks from strong-mode specific checker,
and old InheritanceManager into an implementation that is based
on the current spec, and avoids old baggage. It also fixes the issue
we were asked to fix for Dart 2.1.

Bug: https://github.com/dart-lang/sdk/issues/34392
Change-Id: Id5a23c5db7704b2b530bb894ae92628a08eaa70f
Reviewed-on: https://dart-review.googlesource.com/76061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-24 16:28:50 +00:00
Mike Fairhurst d07039782a Remove redundant resolution
Change-Id: I4890a1dd86aa0cf87f90ba6427dc59aa0a14f75f
Reviewed-on: https://dart-review.googlesource.com/75992
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-09-24 16:17:00 +00:00
Régis Crelier a2eb050044 [VM interpreter] Update bash script to run a Dart program in interpreted mode.
Change-Id: I5c4d8a74520395527b8062f1db1f1287a96ab30e
Reviewed-on: https://dart-review.googlesource.com/75993
Reviewed-by: Zach Anderson <zra@google.com>
2018-09-24 15:27:07 +00:00
Konstantin Shcheglov 699282b5d3 Rename State class when StatefulWidget is renamed.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2545
Change-Id: I247db781e3b44910c823bb66d5f8773dc0d415cc
Reviewed-on: https://dart-review.googlesource.com/76080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-24 15:02:52 +00:00
Konstantin Shcheglov 2d53894e3f Check that selection offset/length is valid in Extract Local refactoring.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34475
Change-Id: Id2b44494a8464000180a8ca93cfcc770b256f59f
Reviewed-on: https://dart-review.googlesource.com/76063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-24 14:55:33 +00:00
Daniel Hillerström 7ad1e5da99 Perform substitution on type argument/parameter bounds.
Fixes regression #34528. Introduces a new test to mitigate future
regressions.

Closes #34528.

Change-Id: Iaf0a8f44db2a8b4a8151c391ddb8dff69910fe3a
Reviewed-on: https://dart-review.googlesource.com/75840
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-09-24 14:02:01 +00:00
Peter von der Ahé 309d38f300 Consistency in messages about duplication
Change-Id: I2d29c4f08d55d97453cc44344036c54e70e8a155
Reviewed-on: https://dart-review.googlesource.com/75900
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-24 13:47:17 +00:00
Aske Simon Christensen 8385c36d97 Move all int literal parsing and checking code together.
Report error for negated hex literals > 2^63.

Optimized common case of web int literal exactness check.

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

Change-Id: Ib72b2dbb21e42489ee2d06b17302daf83d560df1
Reviewed-on: https://dart-review.googlesource.com/72802
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-24 11:17:36 +00:00
Jens Johansen baa13a2e6d Introduce option to serialize less in frontend_server
This CL introduces an option - unsafe-package-serialization - where a
caller can select to reuse the serialization of packages. This makes it
unsafe in general, but if never invalidating packages, such as in tests,
it can be used to greatly increase the speed of processing many inputs.

This change - used in flutter - takes the time it takes to run
`flutter test` in `packages/flutter` from ~2 minutes 30 seconds to
~1 minute 15 seconds (on my machine).
A change to how flutter test executes the frontend_server
(to pass the option) is needed for it to take effect though.

Change-Id: Ibe47b43c41286eb08f80c9e7a398e1dc67bf9bc0
Reviewed-on: https://dart-review.googlesource.com/48200
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-09-24 09:59:27 +00:00
Peter von der Ahé fe39691269 Don't use --no-preview-dart-2
Fixes https://github.com/dart-lang/sdk/issues/34548

Change-Id: Ia6b4a3cdc4b6c39e0aa0fb649940b2bd126a619e
Reviewed-on: https://dart-review.googlesource.com/76120
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-24 09:20:01 +00:00
Johnni Winther 0d588bf50c Add --omit-as-casts option
Change-Id: I0e5b122c28aefb6badc95882e95a97bdd4b8edd3
Reviewed-on: https://dart-review.googlesource.com/56801
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-24 07:22:28 +00:00
Stephen Adams 1e5b80918a [dart2js] hashCode stability to improve repeatability
The default Object.hashCode is different on every run, so avoid using it for MemberEntity.hashCode.

Using a consistent (if arbitrary) hashCode appears to fix issue 34527
and also makes the *.js.map files consistent.
We also sort instructions in SsaCodeMotion to make order less sensitive to unrelated changes.

We might still want to impose a canonical ordering for map files, e.g. minified map file entries might be sorted by name.

Change-Id: I94ad6c1e18ac808b92e62e76b48558a7e2fbd7b7
Reviewed-on: https://dart-review.googlesource.com/75982
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-21 23:47:50 +00:00
Paul Berry b540626589 Change DeclarationResolver to extend RecursiveAstVisitor<void>.
No change in functionality; all visit methods already return `null`.

Change-Id: I578fae62522f4b4f79e62e66bed9262cdcf1f33b
Reviewed-on: https://dart-review.googlesource.com/75994
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 22:41:38 +00:00
danrubel 52bec5e34b Update parser to find token on which to report the error
... before checking if the token is an ErrorToken

Also address comments in https://dart-review.googlesource.com/c/sdk/+/75960

Change-Id: Ia0d33e2f7879026d07937c6d709e23c9c14f5c16
Reviewed-on: https://dart-review.googlesource.com/75961
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-21 22:29:15 +00:00
Paul Berry 6a04b3079f Fix test_mixinInference_noMatchingClass_namedMixinApplication_new_syntax
It turns out that with the new mixin syntax, we always check for error
MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE first, and if it is found,
we don't even bother checking for MIXIN_INFERENCE_NO_MATCHING_CLASS
(which I think is reasonable).  So the expectations on this test need
to be changed.

Change-Id: I2a33ce60a928af63f4fc83b4e3a8309a2660b441
Reviewed-on: https://dart-review.googlesource.com/75990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 20:52:49 +00:00
Paul Berry 484405b1c8 Fix missing_return hint in _getInferredMixinType
Change-Id: Ie9aa833727f40a38bd6a69e027c2bbaf8d6dec72
Reviewed-on: https://dart-review.googlesource.com/75988
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 20:33:59 +00:00
Konstantin Shcheglov 1357778286 Issue 34546. Get ClassElementImpl a way that support element handles.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34546
Change-Id: Ib14afd83db49cbcd3b9a5d6832689dec9dfd5c57
Reviewed-on: https://dart-review.googlesource.com/75986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-21 20:14:09 +00:00
Paul Berry e22dd19b13 Create a base class for compile-time error code test cases.
This avoids the need to override tests in
CompileTimeErrorCodeTest_Driver to indicate that they pass.

Change-Id: Ieedb75c5d23edb3214b8d2cdb00a138201e3e3a7
Reviewed-on: https://dart-review.googlesource.com/75985
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 19:48:21 +00:00
danrubel 7cd25705ab Fix parsing label between 2 switch cases
Fix https://github.com/dart-lang/sdk/issues/34453

Change-Id: Ib2280c4482b6530dab3947a0dfd87490bd379034
Reviewed-on: https://dart-review.googlesource.com/75960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-21 19:36:40 +00:00
Paul Berry e9ff597673 Optimize gatherMixinSupertypeConstraints for new mixin syntax.
Since this method is only used to find supertype constraints that are
relevant for mixin inference, it can save its caller from doing extra
work by filtering out mixins that don't take type parameters.
Previously, we were doing that when supporting the old "--supermixin"
feature, but not when using the new mixin syntax.

The method has been renamed to
gatherMixinSupertypeConstraintsForInference so that it's less
surprising that it doesn't return *all* supertype constraints.

Change-Id: I33c5cf20bb4955a19ef0f7dc2425fefc26cf4d39
Reviewed-on: https://dart-review.googlesource.com/75983
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 18:53:03 +00:00
Paul Berry 5cf0d9e844 Replicate existing analyzer supermixin tests using new "mixin" syntax.
A few test cases fail.  I'll investigate them and follow up with fixes.

Change-Id: I934e82a2ecec68f72ed46fb698b065186ef38aad
Reviewed-on: https://dart-review.googlesource.com/75980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 18:34:42 +00:00
Alexander Markov 19e2040f35 [vm] Cleanup the ability to specify entry points via JSON and text files
Entry points files (both JSON and text) are replaced with
@pragma("vm:entry-point") annotations.

This change removes obsolete:
* --embedder_entry_points_manifest option in gen_snapshot;
* --entry-points option in gen_kernel and frontend_server;
* --print_precompiler_entry_points VM option;
* 'entry_points' argument in Dart_Precompile() API.

Change-Id: I503f50f51df27e8e9635388c013058686b3b6ff1
Reviewed-on: https://dart-review.googlesource.com/75793
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-09-21 16:51:48 +00:00
Paul Berry ead158ab5d Fix gatherMixinSupertypeConstraints to handle named mixin applications.
In a named mixin application, the superclass doesn't include the last
type appearing in the "with" clause, so that class isn't considered a
superclass constraint.

Fixes some test cases broken by 46e5954b0a.

Change-Id: I2e824d38017fe2c7eaa23e8f185cea07fe2222b7
Reviewed-on: https://dart-review.googlesource.com/75940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 16:37:55 +00:00
Paul Berry 46e5954b0a Turn on and fix mixin type inference checks when not in "supermixin" mode.
Now that we have an explicit syntax for mixins that is available all
the time, we have to do mixin inference error checking all the time,
not just when the "--supermixin" flag is supplied.

This required fixing several minor bugs:

- ErrorVerifier._checkForMixinSuperInvokedMembers did not properly
  handle a mixinElement argument that was a ClassElementHandle.

- ErrorVerifier._checkMixinInference wasn't using the actual
  substituted mixin types, causing errors to be wrongly reported when
  a class declaration had multiple inferred mixins (this was the root
  cause of #34404).

- Type names in "with" clauses in the resolved AST weren't properly
  reflecting the mixin type arguments that had been inferred.

Fixes #34404.

Change-Id: Ia773233c66f8d9ab778f207689c73922e9e3a880
Reviewed-on: https://dart-review.googlesource.com/75792
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-21 01:06:25 +00:00
Jenny Messerly 64b6d713e3 [dartdevc] enable super mixin support in Kernel backend
Change-Id: If2a1c4ec8328080a890e7f22b657b19af4fe53ae
Reviewed-on: https://dart-review.googlesource.com/75791
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-20 23:59:18 +00:00
Mike Fairhurst 0ec9945885 Fix #33629 boolean negation of void
Bug: 33629
Change-Id: Ieabd07cd7155b60466bf6873ba8252c9b5cb8d70
Reviewed-on: https://dart-review.googlesource.com/75784
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-09-20 23:58:48 +00:00
Jaime Wren 0b5a7c847d Add support for intermittent filesystems to the analysis server, this PR is a synced version of Devons PR https://dart-review.googlesource.com/c/sdk/+/72980, without the DAS protocol change.
Change-Id: I6ad1d423c2616ae31fc3f5954782d05e3d8adbda
Reviewed-on: https://dart-review.googlesource.com/73689
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-09-20 22:54:59 +00:00
Jaime Wren 9f5aecb22b Introduce a new flag to the Dart Analysis Server: --ux-experiment-1 which changes analysis roots to the be the current set of priority files.
Change-Id: I3a2aaec08b6529c6cbd23d8d16b4b9ca8dd4da59
Reviewed-on: https://dart-review.googlesource.com/75402
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2018-09-20 20:35:43 +00:00
Paul Berry 9f72b09f0f Convert resolver.dart to triple-slash comment style.
Change-Id: I246fd1696da4b49cd97f4181aee57c16deda7907
Reviewed-on: https://dart-review.googlesource.com/75782
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-20 19:46:39 +00:00
Konstantin Shcheglov ee0a6033bf Fix checks for absence of concrete implementations of super-invoked members.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34113
Change-Id: Iad8ce7f2b7787a5c9640df617d99129032f8eee4
Reviewed-on: https://dart-review.googlesource.com/75783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-20 19:46:10 +00:00
Konstantin Shcheglov 3a5b748521 Optimize index data structure for search by supertype id.
So, instead of iterating over all subtypes and checking their supertypes
in string lists, we encode the supertype string id into int once, and
search for it in the denormalized supertype list.

This helps for files with really many classes and subtypes, such as
element.dart and as.dart (both interfaces, not implementations).

Before:
1537403233979 <= Computed implemented in 803 ms.
1537403239426 <= Computed implemented in 2518 ms.
1537403241893 <= Computed implemented in 811 ms.
1537403247675 <= Computed implemented in 2523 ms.
1537403249835 <= Computed implemented in 802 ms.
1537403255796 <= Computed implemented in 2478 ms.
1537403258396 <= Computed implemented in 809 ms.
1537403264560 <= Computed implemented in 2526 ms.
1537403267010 <= Computed implemented in 814 ms.
1537403274513 <= Computed implemented in 2491 ms.

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

After:
1537415241048 <= Computed implemented in 421 ms.
1537415244042 <= Computed implemented in 873 ms.
1537415246189 <= Computed implemented in 402 ms.
1537415249342 <= Computed implemented in 853 ms.
1537415251478 <= Computed implemented in 420 ms.
1537415254756 <= Computed implemented in 877 ms.
1537415257278 <= Computed implemented in 492 ms.
1537415260514 <= Computed implemented in 864 ms.
1537415262864 <= Computed implemented in 421 ms.
1537415266170 <= Computed implemented in 888 ms.
Change-Id: I00e3b8d11ecc7da93816bc5575b7b79b91535d50
Reviewed-on: https://dart-review.googlesource.com/75631
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-20 19:15:07 +00:00
danrubel af2fd419fb Update more analyzer error codes to be generated from messages.yaml
Change-Id: I1d8a0db791309ac3551fc1079f91807e6e98dcb2
Reviewed-on: https://dart-review.googlesource.com/75603
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-20 18:10:04 +00:00
Dan Rubel 05ba85399f Cleanup fasta parser rewriter insert token methods
Change-Id: Ic776cae52cbfae4c1892884a6d9e179147c5396e
Reviewed-on: https://dart-review.googlesource.com/75760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-20 17:00:41 +00:00