Commit Graph

2034 Commits

Author SHA1 Message Date
Konstantin Shcheglov bd270935a5 Check bounds of type parameters of function type aliases.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1967583002 .
2016-05-10 10:49:25 -07:00
Konstantin Shcheglov 038478ea77 Implement 'instantiate to bounds' feature in resynthesizer.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1963593003 .
2016-05-10 09:58:06 -07:00
Konstantin Shcheglov 431e1b5e80 Issue 26427. Refine type of 'T + int' and 'T + double' when 'T extends num'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26427

Review URL: https://codereview.chromium.org/1957953004 .
2016-05-10 09:50:58 -07:00
Brian Wilkerson 61818c95a1 Convert some for-in loops for performance
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1955373003 .
2016-05-09 11:01:16 -07:00
Paul Berry ba61fde1b1 Fix reference sharing in the event that import prefixes are used.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1961753002 .
2016-05-08 19:40:26 -07:00
Paul Berry 6725cece3c Fix AST-based type inference of enum types.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1957973002 .
2016-05-08 15:08:42 -07:00
Paul Berry 90dfbdd7d2 Fix AST summarization of synthetic function types and method tear-offs.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1960933002 .
2016-05-08 11:48:35 -07:00
Paul Berry c00b34b6f3 Fix InstanceFieldResolverVisitor to update element model.
R=leafp@google.com

Review URL: https://codereview.chromium.org/1956973002 .
2016-05-07 06:58:23 -07:00
Paul Berry 839216141a Fix order of output of references with invokeMethodRef.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1955103003 .
2016-05-06 13:48:28 -07:00
Konstantin Shcheglov 4db64c34fe Keep all type arguments in summaries - dynamic or not.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1954203002 .
2016-05-06 12:13:03 -07:00
Paul Berry 45ea3a1938 Fix ast-based serialization of out-of-scope type parameters.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1956473004 .
2016-05-06 11:37:55 -07:00
Brian Wilkerson 8c244f03ad Report when members indirectly inherited through a mixin are not implemented (issue 26411)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1951363003 .
2016-05-06 11:29:44 -07:00
Paul Berry b992be5569 Fix a corner case of inferred types with function-typed parameters.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1950333003 .
2016-05-06 09:54:42 -07:00
Paul Berry 9dada87525 Fix summarization of inferred types which are function-typed params of typedefs.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1961533002 .
2016-05-06 09:30:06 -07:00
Konstantin Shcheglov 5082e6f8f2 Support for NamedExpression(s) as constructor initializer arguments.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1952663006 .
2016-05-05 15:13:20 -07:00
Konstantin Shcheglov 2460938b14 Issue 25914. Fix for compound assignments like 'T += T'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25914

Review URL: https://codereview.chromium.org/1948293003 .
2016-05-05 14:30:39 -07:00
Brian Wilkerson 451547ba27 Do not fail when an enum constant is annotated (issue 26413)
R=jwren@google.com

Review URL: https://codereview.chromium.org/1958433002 .
2016-05-05 13:31:18 -07:00
Konstantin Shcheglov 11b9691b51 Issue 25914. Refine type of 'T + T' when 'T extends num' to 'T' in strong mode.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25914

Review URL: https://codereview.chromium.org/1950983004 .
2016-05-05 10:11:39 -07:00
Konstantin Shcheglov 597aaa15a4 Extract 'refineBinaryExpressionType' into TypeSystem.
This remove duplication and is also a preparation for fixing
https://github.com/dart-lang/sdk/issues/25914

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1953043002 .
2016-05-05 09:03:25 -07:00
Paul Berry 23323b27fc Add typedef support to summary linker.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1951173005 .
2016-05-05 07:43:47 -07:00
Konstantin Shcheglov 5e998d1e43 Resolve URIs of parts of imported libraries relative to importing library sources.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1952683002 .
2016-05-04 08:40:42 -07:00
Paul Berry 6a6d635027 Use property accessor elements for type inference rather than top level variable elements.
This makes the behavior of the linker more consistent with the
language spec.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1951833003 .
2016-05-04 08:02:51 -07:00
Brian Wilkerson 08241e9072 More strong mode clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1947813002 .
2016-05-04 07:42:46 -07:00
Paul Berry c6086791e8 Generalize ReferenceableElementForLink to work with explicit getters.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1946933002 .
2016-05-03 21:04:58 -07:00
Paul Berry db2e1df165 Fix a corner case of AST-based type inference with sequences of identifiers separated by '.'.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1949833002 .
2016-05-03 18:48:30 -07:00
Paul Berry e2c51a289d Implement PropertyAccessorElementForLink_Variable.getContainedName().
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1949783002 .
2016-05-03 15:19:10 -07:00
Paul Berry 243e44074c Use property accessor elements for type inference rather than field elements.
This makes the behavior of the linker more consistent with the
language spec.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1938403003 .
2016-05-03 14:50:05 -07:00
Konstantin Shcheglov 6aece2f7a6 Finer grain control over specifying which variables have invalid constant initializers.
As you noticed, we don't need to resynthesize anything if we know that
it is not a valid constant expression in advance. At the same time we
sometimes need to be able to test with both valid and invalid
initializers.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1949603003 .
2016-05-03 14:32:14 -07:00
Konstantin Shcheglov f97f22110f Don't use ClassElementImpl - does not work well with summaries.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1946743002 .
2016-05-03 13:27:21 -07:00
Konstantin Shcheglov e79a2b1774 Implement 'assignToRef' resynthesizing.
The failing tests partially depend on your CL for adding all static
class members, although probably will require some more changes.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1949693002 .
2016-05-03 13:02:56 -07:00
Paul Berry f72f1e00b6 Support references to top level getters in the summary linker.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1944773002 .
2016-05-03 12:22:40 -07:00
Paul Berry 770ee1a744 Include all static class members in UnlinkedPublicName.members.
Previously, we only included names that could be referenced from
consts.  This was a holdover from the initial implemenation, where
summaries only needed to encode information about the expressions used
in valid const declarations.  Now, we also encode information about
expressions needed for type inference, which can refer to any static
class member.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1944023002 .
2016-05-03 12:20:52 -07:00
Brian Wilkerson 132507e95c Fix bug in summary deserialization
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1946723002 .
2016-05-03 12:04:20 -07:00
Paul Berry 8c8d230a79 Support references to static getters in the summary linker.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1944733002 .
2016-05-03 09:08:04 -07:00
Konstantin Shcheglov 339cf06a45 Serialize / resynthesize 'isAsynchronous' and 'isGenerator' flags.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1936403002 .
2016-05-02 14:52:21 -07:00
Konstantin Shcheglov 4c76af4511 Fix for serializing annotations.
Instead of using artificial TypeName nodes we just pass all the required
information. This helps to avoid the situation when we mutate the AST
because we re-parent nodes in annotation.

It would be nice if annotations used the same AST structure as
instance creation :-(

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1943013002 .
2016-05-02 13:54:32 -07:00
Konstantin Shcheglov f56a3c9765 All initializer expressions are serialized, even if not all of them are constants.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1937223002 .
2016-05-02 10:42:35 -07:00
Sam Rawlins 68cadb3e71 Warn about @deprecated positional parameters
BUG=https://github.com/dart-lang/sdk/issues/22975
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1936873002 .
2016-05-02 10:34:35 -07:00
Brian Wilkerson 91e2852659 Remove cast from AstNodeImpl._becomeParentOf
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1939853002 .
2016-05-02 10:21:33 -07:00
Brian Wilkerson df593ddd57 Remove a cast by creating node lists directly
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1934153002 .
2016-05-02 07:54:17 -07:00
Brian Wilkerson 6168024a10 Remove an unnecessary invocation of toString
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1940703002 .
2016-05-02 07:47:03 -07:00
Konstantin Shcheglov 5c6fd2471a Fix a linker test by adding support for 'invokeMethodRef' dep.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1938623002 .
2016-04-29 17:13:09 -07:00
Brian Wilkerson 5245f7dcfc Small improvement to scanner performance
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1935733002 .
2016-04-29 14:15:47 -07:00
Brian Wilkerson 24d23680d1 Use null-aware operators to clean up the code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1933763002 .
2016-04-29 08:48:12 -07:00
Konstantin Shcheglov 0f0b38dab3 Implement stable resolution of generic types without type arguments to their bounds.
R=brianwilkerson@google.com, leafp@google.com
BUG= https://github.com/dart-lang/sdk/issues/26265

Review URL: https://codereview.chromium.org/1927323002 .
2016-04-29 08:25:55 -07:00
Konstantin Shcheglov 68caf7074f Use ErrorReporter in many places.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1932583002 .
2016-04-28 13:58:46 -07:00
Paul Berry dbde8085a1 Remove "@informative" annotation on initializers and local functions.
Given code like this:

var x = (...) => ...;

The inferred type of x is the type of the closure, which is considered
by analyzer to be a local function inside the inside the initializer
expression (which is itself treated as a synthetic function for element
model purposes).  So we can't consider initializers and local functions
to be "informative"; they can affect semantic via inferred types.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1932873002 .
2016-04-28 13:38:17 -07:00
pq 870aa5e4f4 Pubspec-specified analysis configuration (#26359).
Provides support for pubspec-specified analysis configurations.

Context: https://github.com/dart-lang/sdk/issues/26359

TODO:
  * docs
  * CLI support

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1923973004 .
2016-04-28 13:10:45 -07:00
Brian Wilkerson 1601b9b264 Add checks for type bounds on generic methods
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1927103002 .
2016-04-28 12:46:05 -07:00
Brian Wilkerson ee8bb2cea9 Add a (public) utility method to clean-up code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1925173002 .
2016-04-28 10:07:32 -07:00