Commit Graph

2026 Commits

Author SHA1 Message Date
Konstantin Shcheglov 4e8e1e2e04 Improve search for constructors and import elements.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1778363003 .
2016-03-10 14:57:42 -08:00
Konstantin Shcheglov 5271cd3259 Fix for indexing synthetic elements.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1779233002 .
2016-03-10 10:57:08 -08:00
Brian Wilkerson f42380ccbb Improve the error message when there is an infinite loop in tasks
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1783853002 .
2016-03-10 09:04:26 -08:00
Brian Wilkerson 1a455bcb9d Move element handles out of generated
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1780883002 .
2016-03-10 07:40:33 -08:00
danrubel d26d023ce7 update tests for execution on windows
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1774623006 .
2016-03-09 22:33:35 -05:00
Brian Wilkerson ef1c632679 Clean up some warnings (issue 25964)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1778663006 .
2016-03-09 17:32:49 -08:00
danrubel 14983f0a26 extract resource path test utils
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1777913003 .
2016-03-09 16:26:14 -05:00
Konstantin Shcheglov 5a927c7373 Add hacks into build_sdk_summaries to workaround bugs in build tools.
Paul thinks that there is a bug in gyp or make, and we should generate
only one output. So, we generate the whole bundle with all summaries
and index information. And then we have separate actions that take
this bundle and extract one output each - spec.sum and strong.sum files.

R=paulberry@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/1775973003 .
2016-03-09 11:37:17 -08:00
Bob Nystrom 8defa5f77c Split resolver_test.dart into smaller files.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1782463002 .
2016-03-09 10:42:09 -08:00
pq 402f27e26d Fix enableConditionalDirectives option handling.
Net-net: we weren't copying this value over when copying context options.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1774213003 .
2016-03-09 10:01:28 -08:00
Bob Nystrom 528f6c01a7 Clean up some copy/paste in a test.
Almost all of these tests had the same few steps, so I pulled that out
into a helper function and used that.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1780623002 .
2016-03-08 17:40:46 -08:00
Konstantin Shcheglov 3af20476d1 Add AnalysisContext.onResultInvalidated(descriptor).
This method will be used to remove index entries corresponding to
invalidated resolved units.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1776023002 .
2016-03-08 12:55:06 -08:00
Konstantin Shcheglov 15bfead120 Sort strings in the index.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1774253002 .
2016-03-08 12:45:29 -08:00
Bob Nystrom cb7aa02116 Type check for-in statements.
This does nominal checking on the iterable expression used in a for-in
statement:

1. It must implement Iterable.
2. The type argument to Iterable must be assignable to the variable's
   type.

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

Review URL: https://codereview.chromium.org/1771153002 .
2016-03-08 11:25:49 -08:00
Brian Wilkerson d8786ac278 Change when enum constant elements are created to fix bug in re-creating ASTs from existing element models
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1771243002 .
2016-03-08 08:45:44 -08:00
pq 24ac0d4e2d Fix cycle in override check.
BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1769253002 .
2016-03-07 14:09:58 -08:00
pq 4528052e98 Validation of @mustCallSuper overrides.
Carried over and refined from https://codereview.chromium.org/1767843002/.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1773803002 .
2016-03-07 13:37:35 -08:00
Konstantin Shcheglov f2111c2497 Search for direct and indirect subclasses.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1770083002 .
2016-03-07 11:30:44 -08:00
Brian Wilkerson 687119c56d Prepare to publish a new alpha version for DDC
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1768303002 .
2016-03-07 11:01:25 -08:00
Konstantin Shcheglov 5f62cca534 Record IS_ANCESTOR_OF relations.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1772823002 .
2016-03-07 11:00:49 -08:00
Leaf Petersen 6a9af860d0 Fix method inference crasher.
During class member inference, only instantiate the type formals of
an overridden method when there are type formals to instantiate.

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1763013003 .
2016-03-07 10:49:57 -08:00
Brian Wilkerson 508492d048 Fixes to associating existing elements with an AST
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1768713002 .
2016-03-07 10:36:36 -08:00
Florian Loitsch dd326beee1 Move more messages.
Migrates some of the 'undefined' messages to the shared file.

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

Review URL: https://codereview.chromium.org/1750143005 .
2016-03-07 16:39:12 +01:00
Florian Loitsch 65b4256b9e Support multiple categories per message.
Also move more messages to use this feature.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1763373002 .
2016-03-07 16:37:57 +01:00
Konstantin Shcheglov ec906bf12b Implement search for local elements.
We don't use Index for them, instead of visit coresponding AST subtrees
and add SearchMatch(es).

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1760243004 .
2016-03-05 07:50:11 -08:00
Konstantin Shcheglov 822fa6c912 Update codeOffset/codeLength during incremental resolution.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1768613002 .
2016-03-04 11:36:35 -08:00
Konstantin Shcheglov 40ebbcfb7c Don't index constructor element reference second time.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1761073004 .
2016-03-04 10:43:18 -08:00
John Messerly 764a067813 Fixes list/map literal to not infer bottom
R=leafp@google.com

Review URL: https://codereview.chromium.org/1759363002 .
2016-03-04 09:43:13 -08:00
Konstantin Shcheglov 9c79752839 Resynthesize codeOffset/codeLength properties.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1762193002 .
2016-03-04 09:26:31 -08:00
Paul Berry c46f593b33 Add support for ConstructorElementImpl.isCycleFree to summaries.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1762663002 .
2016-03-03 11:00:27 -08:00
pq 5f6b0eb6d4 Disable annotate_overrides pending bulk editor.
Until we can apply a bulk edit, the ~1800 occurences of this hint are too noisy.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1765543002 .
2016-03-03 09:56:32 -08:00
Konstantin Shcheglov 80531d974d Make SearchMatch usable for the new index - remove the element field.
The 'element' is still accessible, but as a computed property.

In many cases we don't need to know the containing element, and need
only the unit source, or the LibraryElement. So, by computing it on
demand we may save some time and make SearchMatch usable with the
new index - where we don't know the Element.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1764553002 .
2016-03-03 08:40:57 -08:00
Konstantin Shcheglov 3fe1282f75 Don't use List caches for lists of primitive values.
Caching is useful for lists of objects, but lists of primitive values
it is wasteful to create copies when we can read directly from the
underlaying buffer.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1760523008 .
2016-03-03 08:04:52 -08:00
Kevin Moore 9f74470493 readme and pubspec tweaks
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1755913005 .
2016-03-02 17:10:50 -08:00
Kevin Moore 0ed4df8155 import cleanup
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1759483004 .
2016-03-02 17:10:01 -08:00
Leaf Petersen 7d2976c7d5 Add instantiate method on ParameterizedType and InterfaceType,
and deprecate the old substitute4 in favor of instantiate.

BUG=
R=brianwilkerson@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org/1758913002 .
2016-03-02 15:06:38 -08:00
Leaf Petersen ce806bf307 Instantiate interface types to bounds.
Refactors some common code into TypeSystem, and makes strong mode
interface types instantiate to bounds when no type arguments are
passed.

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

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1756673002 .
2016-03-02 13:18:15 -08:00
Paul Berry 457df30acf Fix handling of task model circularities.
When a circularity is found during task model evaluation, we need to
continue evaluating task inputs (skipping the inputs that contribute
to the circularity) in order to find the largest possible strongly
connected component that contributes to the circularity.  Previously,
the skipping logic was implemented by comparing WorkItem.target and
WorkItem.spawningResult.  However, since WorkItems are equality
compared using WorkItem.target and WorkItem.descriptor, it was
possible that a WorkItem might not have been skipped when it should
be.

This CL updates the skipping logic so that it uses WorkItem.target and
WorkItem.descriptor to decide which WorkItems to skip.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1748933005 .
2016-03-02 12:27:32 -08:00
Paul Berry f24c3609f0 Bump analyzer version in preparation for publishing an alpha release.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1753353002 .
2016-03-02 10:37:29 -08:00
Brian Wilkerson 06774c315f Remove invalid URI in an attempt to fix a windows bug.
Review URL: https://codereview.chromium.org/1750773002 .
2016-03-02 08:31:21 -08:00
Konstantin Shcheglov 089e1ba737 Add codeOffset/codeLength properties to ElementImpl.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1753963003 .
2016-03-01 21:04:17 -08:00
John Messerly 02f888711c fix ResolutionCopier to copy staticInvokeType/propagatedInvokeType
(these will be needed for DDC generic methods)

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1754873002 .
2016-03-01 17:30:09 -08:00
John Messerly 1226c387b7 fix ResolutionCopier.visitAdjacentStrings
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1749423002 .
2016-03-01 17:28:16 -08:00
pq 9ea17184ad Add @overrides to (a lot of) analyzer.
This gets us roughly half+ way there.  We should defintely consider automating this to speed up the rest.  (Even with the quick-fix it's VERY tedious and slow going.)

Once we've done this in bulk, I'd like to add the  `annotate_overrides` lint to analyzer and server `.analysis_options`.

BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1749143003 .
2016-03-01 16:33:20 -08:00
Paul Berry ff6a744f38 Implement forwards compatibility for summary enums.
If an attempt is made to read an unrecognized enum value, then rather
than crashing, we will read the default (first) value of the enum type.

This facilitates forwards compatibility by ensuring that if a new enum
value is added in the future, older code will still be able to read the
resulting summary files without crashing.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1747413002 .
2016-03-01 13:28:10 -08:00
Paul Berry 9a983bcbda Add the ability to deprecate Flatbuffer fields.
If an IDL field is marked as `@deprecated`, no setter will be
generated for it, and the getter generated for it will throw an
UnimplementedError.  This is similar to the behavior of standard
Flatbuffer tools (which generate neither setters nor getters for
deprecated fields) except that we have to generate a getter in order
to avoid warnings.

Once we have begun using summaries in the wild, we will need to make
use of this feature in order to avoid changing Id numbers and breaking
backwards compatibility.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1753883002 .
2016-03-01 13:25:02 -08:00
Paul Berry 92176ad482 Add major and minor version numbers to summary files.
Note: my expectation is that we won't start bumping the version
numbers until summaries begin being used in the wild.  While summary
support remains experimental, the version number will remain at 1.0.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1754793002 .
2016-03-01 12:21:40 -08:00
Paul Berry 5772408ed0 Clear static ElementFactory state at the start of all resolver tests.
This prevents the ElementFactory's ClassElement for `Object` (which it
stores statically) from getting accidentally shared between separate
unit tests in a single test run, which could cause state to leak
between the tests.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1752023002 .
2016-03-01 11:26:39 -08:00
Konstantin Shcheglov 7d0fbd1b11 Separate 'isQualified' flags as List<bool>.
It turned out that for used names we don't need any flags because we
want to store only qualified unresolved (potential) class member
usages. So, no flags for used names at all, at least for now.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1750163003 .
2016-03-01 11:06:40 -08:00
Brian Wilkerson 76d22fe363 Move DelegatingAstVisitor into the public API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1747093002 .
2016-03-01 07:57:01 -08:00