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
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
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
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
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
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
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
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
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
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
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
Konstantin Shcheglov
4ca8d2d4a8
Support for boolean lists in FlatBuffer.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1747663002 .
2016-02-29 18:08:43 -08:00
Konstantin Shcheglov
93e9a3c9a1
Record only qualified unresolved name usages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1755433002 .
2016-02-29 17:46:47 -08:00
Brian Slesinsky
09a7387740
Clear stale elements in an unresolved TypeName
...
BUG=https://github.com/dart-lang/sdk/issues/25855
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1745413002 .
2016-02-29 17:16:28 -08:00
Konstantin Shcheglov
3a401c3d59
Follow ClassTypeAlias constructor redirections.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1746963002 .
2016-02-29 14:13:30 -08:00
Konstantin Shcheglov
2d94021a68
Record names references in index.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1753433002 .
2016-02-29 13:16:59 -08:00
Konstantin Shcheglov
db2fd1ef1e
Rename some index fields and use single 'UnitIndex.unit' field.
...
The added prefix 'usedElement' groups fields in UnitIndex.
In a next CL I will add also 'usedName' field set for indexing used
names, resolved and unresolved.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1746113002 .
2016-02-29 10:50:19 -08:00
Brian Slesinsky
44301b8001
Clear the element for imports and exports when the target doesn't exist.
...
This fixes a bug where the unused import hint doesn't go away after
removing the file being imported.
(Also, I suspect it fixes a memory leak.)
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1743523003 .
2016-02-29 10:06:10 -08:00
Konstantin Shcheglov
2fa0d483ec
Index defined top-level and class member names.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1743963002 .
2016-02-29 08:43:13 -08:00
Brian Wilkerson
0185ca70fd
Fix bug when @protected is not on a class member (issue 25882)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1749753002 .
2016-02-29 08:40:37 -08:00
Florian Loitsch
e17f2b98cf
Support conditional directives in the options file.
...
BUG= http://dartbug.com/24579
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1744773002 .
2016-02-29 14:37:54 +01:00
Brian Slesinsky
41ce555c2e
Update SOURCE_KIND when a missing source file appears
...
If the source kind isn't updated, we get a bogus error:
The imported library ... must not have a part-of directive.
This error is calculated in BuildDirectiveElementsTask.
based on SOURCE_KIND.
SOURCE_KIND is based on whether MODIFICATION_DATE is -1,
so make sure we invalidate MODIFICATION_DATE.
Also, fix an issue where _sourceChanged would have
no effect if incremental resolution isn't run, because
the content has already been updated and is therefore
equal.
Also, remove unused RelativeFileUriResolver and
clarify comments around missing Source handling.
BUG=https://github.com/dart-lang/sdk/issues/25808
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1737693004 .
2016-02-26 18:07:57 -08:00
Paul Berry
d97c36b8df
Properly resynthesize ClassElementImpl.hasBeenInferred.
...
In strong mode, this is set on all classes. So there is no need to add
any data to the summary format.
Also found and fixed a bug causing a few resynthesis tests to fail to
set the "strongMode" option properly.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1737903005 .
2016-02-26 14:25:28 -08:00
Konstantin Shcheglov
88beb0d8ab
Use separate relation kinds for qualified usages.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1738213003 .
2016-02-26 14:11:54 -08:00
Paul Berry
5b78ff96b3
Expose LibraryElementImpl.libraryCycle through LibraryElement.
...
This ensures that `libraryCycle` will work properly when accessing an
element model resynthesized from summaries.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1744633002 .
2016-02-26 14:03:24 -08:00
Konstantin Shcheglov
9eb23db55e
Test for duplicate referenced in index and clean up super types.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1738283002 .
2016-02-26 13:28:30 -08:00
Konstantin Shcheglov
c106ad4033
Add tests for indexing.
...
No tests yet for multi-level constructor redirection and
qualified/unqualified references.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1733843007 .
2016-02-26 11:18:59 -08:00
pq
51188b6601
Prettify ignore syntax ( #25685 ).
...
Prettifies ignore syntax (`//# ignore:` => `//ignore:`).
More context: https://github.com/dart-lang/sdk/issues/25685
BUG=
R=brianwilkerson@google.com , ianh@google.com
Review URL: https://codereview.chromium.org/1738203002 .
2016-02-26 10:21:03 -08:00
Paul Berry
293267db28
Propertly summarize LUB function types.
...
When a function type arises out of a LUB (least upper bound)
computation, it pionts to a synthetic FunctionElement that is not
connected to the element model, so we can't summarize it by simply
storing a reference to the FunctionElement. We have to store the
FunctionElement's return type and type parameters.
This required reworking _CompilationUnitSerializer's mechanism for
tracking whether it is creating linked or unlinked references;
previously it kept track by passing a boolean around. Now it uses a
bool field, which should be much less error prone.
Fixes generation of strong mode SDK summary (previously it failed with
an assertion error when in checked mode).
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1740923002 .
2016-02-26 08:28:21 -08:00
Konstantin Shcheglov
a09461a010
Initial package indexing implementation.
...
More tests will be added in following CLs.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1735243003 .
2016-02-26 08:24:05 -08:00
Brian Slesinsky
b9e0319763
Move errors for bad imports and exports to the directive
...
This is to ensure that error.source matches the source of
the ChangeNotice it appears in and the analysis server will
report the error together with other errors for the same file.
(Moving the error seems easier than figuring out how to put it
on a different Source, and it might be that the import/export
is at fault anyway.)
BUG=https://github.com/dart-lang/sdk/issues/25826
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1739553003 .
2016-02-25 11:48:26 -08:00
Paul Berry
7481eff6a8
Add file identifiers to summaries.
...
These should make it easier for summary files to interoperate with
standard FlatBuffer tools.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1738833004 .
2016-02-25 10:36:42 -08:00