Commit Graph

3034 Commits

Author SHA1 Message Date
Brian Wilkerson f3b177e481 Remove references to and uses of MemberMap
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1893313004 .
2016-04-20 07:40:02 -07:00
Brian Wilkerson 9aa64259dc Revert "Remove MemberMap in favor of HashMap"
Review URL: https://codereview.chromium.org/1898193004 .
2016-04-19 12:20:48 -07:00
Brian Wilkerson fb43f1276c Remove MemberMap in favor of HashMap
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1904433003 .
2016-04-19 11:59:44 -07:00
pq 433fd4558d Required params message fix.
Gets rid of the rogue space when no details are provided in the `@Required` constructor.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1897293003 .
2016-04-19 11:21:09 -07:00
Brian Wilkerson bf1fa31c90 Make analyzer more strong mode compliant
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1897713002 .
2016-04-16 12:28:44 -07:00
Brian Wilkerson 3084ceae83 Clean up flags for conditional directives
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1892523002 .
2016-04-14 11:47:28 -07:00
Konstantin Shcheglov 1075e3a32e Clean up reporting HintCode.UNUSED_SHOWN_NAME when a prefixed top-level function is invoked.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1882633002 .
2016-04-12 13:31:40 -07:00
Konstantin Shcheglov 2e4f8a0601 Add missing test suites to the generated/test_all suite.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1878413002 .
2016-04-12 13:18:18 -07:00
pq ac48484a07 Support for @JS() validation (#26225).
See: https://github.com/dart-lang/sdk/issues/26225

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1871103002 .
2016-04-08 13:45:46 -07:00
Konstantin Shcheglov 7ac77cfedf Refine compound assignment type.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1873913002 .
2016-04-08 12:19:23 -07:00
Sam Rawlins c1963b3995 Add an UNUSED_SHOWN_NAMES hint to the analyzer
BUG=https://github.com/dart-lang/sdk/issues/21030
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1863103002 .
2016-04-08 11:44:36 -07:00
Brian Wilkerson 03384b2319 Fix the parser to handle generic type arguments in named constructor invocations (issue 26183)
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1870733002 .
2016-04-07 11:05:19 -07:00
pq 6a430d0730 Validation of @required params (#26182).
See: https://github.com/dart-lang/sdk/issues/26182.

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

Review URL: https://codereview.chromium.org/1863803002 .
2016-04-06 06:09:44 -07:00
Brian Wilkerson f9b575e5b3 More strong mode changes to analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1855643002 .
2016-04-01 18:00:04 -07:00
Konstantin Shcheglov d1104de8db Issue 26096. Explicitly compute the result that ensures that directives are resolved in units.
In the past computing LIBRARY_ELEMENT2 also set elements for directives
in the defining unit AST. But when this unit is flushed and reparsed
we didn't set these directive elements again because LIBRARY_ELEMENT2
is valid. Now resolving directive ASTs to elements is an explicit
dependency.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/26096

Review URL: https://codereview.chromium.org/1854863002 .
2016-04-01 14:00:38 -07:00
Brian Wilkerson 6dae827b70 More strong mode fixes for analyzer
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1842363004 .
2016-04-01 09:35:22 -07:00
Brian Wilkerson e531f01e73 Fix more strong mode errors in analyzer
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1847633002 .
2016-03-31 13:30:04 -07:00
Konstantin Shcheglov 498c77ef51 Issue dartdoc#1124. Get used elements from directive comments.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/dartdoc/issues/1124

Review URL: https://codereview.chromium.org/1850813002 .
2016-03-31 12:42:51 -07:00
Konstantin Shcheglov 05df65f7db Issue 26146. Get next token after '{' or '}' while skipping interpolations.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26146

Review URL: https://codereview.chromium.org/1847093002 .
2016-03-31 10:40:43 -07:00
Konstantin Shcheglov 01c7e120dd Fix for infinite resursion while finding a concrete method.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1846703002 .
2016-03-30 12:35:43 -07:00
Leaf Petersen 4e5bc83285 Better strong mode least upper bound for interface types. Adds some
checks to handle common cases of least upper-bound computations
on type parameters and interface types in a more reasonable way
than the spec lub.

BUG=
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1843453002 .
2016-03-29 16:36:38 -07:00
Paul Berry 8835741088 Fix a corner case of constant evaluation cycle detection.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1841523003 .
2016-03-28 18:50:14 -07:00
Brian Wilkerson deae702994 Format everything in analyzer
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1842563003 .
2016-03-28 18:16:43 -07:00
Brian Wilkerson 513433d514 Sort analyzer sources
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1843473002 .
2016-03-28 17:41:52 -07:00
Konstantin Shcheglov 3899031ff5 When summarize AST, include local variables in loops and try-catch.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1842433002 .
2016-03-28 12:00:01 -07:00
Konstantin Shcheglov f6e4f4c053 Fix for labels and the 'inDeclarationContext' flag.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1839443002 .
2016-03-28 08:44:48 -07:00
Konstantin Shcheglov f175ef0116 Fix for resolveRelativeUri() when the containedUri is absolute.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1835643002 .
2016-03-25 12:53:21 -07:00
Paul Berry 9e52ab17e0 Consolidate duplicate code for resloving URIs.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1831133005 .
2016-03-25 10:37:36 -07:00
Leaf Petersen 77ee054678 Allow values to be returned from implicitly typed function bodied setters.
BUG=
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1827243003 .
2016-03-25 09:55:56 -07:00
Bob Nystrom c55e9ef20b Use GLB for function parameters when doing LUB in strong mode.
R=leafp@google.com

Review URL: https://codereview.chromium.org/1807213005 .
2016-03-23 13:50:49 -07:00
Konstantin Shcheglov c675ba270f Pass AnalysisOptions into SdkCreator, disable changing afterwards.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1830703002 .
2016-03-23 13:11:49 -07:00
Bob Nystrom bf4765009a Better casting of for-in loops.
Generate a cast for each element, so that code like this can be
handled correctly:

  for (String s in <dynamic>["a", "b", "c"]) { ... }

Fixes #25916.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1823793002 .
2016-03-21 16:37:29 -07:00
Brian Wilkerson 5a310a1684 Move constant implementation out of generated
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1816923002 .
2016-03-20 15:07:49 -07:00
Konstantin Shcheglov 8398960fb1 Fix visible range of local variables in 'for' loops.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1798223002 .
2016-03-14 14:43:15 -07:00
Brian Wilkerson 004f45eba7 Warn about deprecated fields (issue 22963)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1797583003 .
2016-03-13 16:51:00 -07:00
Brian Wilkerson d779eee74c Stop reporting use of deprecated members from within deprecated members (issue 25966)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1797593003 .
2016-03-13 13:57:36 -07:00
Brian Wilkerson 4978bd6ac9 Move ResolutionCopier out of generated
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1791953002 .
2016-03-12 10:52:42 -08: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
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
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
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
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