Commit Graph

7128 Commits

Author SHA1 Message Date
pq e1fad5cddb Verify that required param constants are accessible outside the declaring lib (#26440).
A test to verify that `required` "details" are accessible in reporting errors found outside of the declaring library.

Follows up on Brian's fix: https://github.com/dart-lang/sdk/commit/23b02bc35112ebb955e006b87b3fbe03c5e071d7.

More context: https://github.com/dart-lang/sdk/issues/26440.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1975383002 .
2016-05-13 14:31:40 -07:00
Paul Berry 4441b97b92 Fix AST-based type inference of top level function tearoffs
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1978483003 .
2016-05-13 08:48:20 -07:00
Brian Wilkerson 44836f8538 Support the name analysis_options.yaml for analysis options files
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1975963002 .
2016-05-13 07:33:06 -07:00
Konstantin Shcheglov fad1ca3460 Update ResolutionCopier to copy TypeArgumentList of invocations.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26368

Review URL: https://codereview.chromium.org/1970053002 .
2016-05-12 08:14:08 -07:00
Brian Wilkerson f2356d0d33 Add API to force the computation of constant values
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1966323002 .
2016-05-12 07:37:08 -07:00
Konstantin Shcheglov b68f3b24a6 Resynthesize _DeferredClassElement lazily.
This reduces DDC analysis time for the test codebase
from 617 ms. to 447 ms, i.e. about 35% down.

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

Review URL: https://codereview.chromium.org/1969943002 .
2016-05-11 17:24:38 -07:00
Paul Berry 70a913f526 Handle more corner cases of closures while doing ast-based summaries.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1968063002 .
2016-05-11 08:41:08 -07:00
Paul Berry f0fd964cd0 First steps toward AST-based type inference involving closures.
Many corner cases remain to be implemented, and are marked with TODO
comments.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1966783003 .
2016-05-10 15:04:25 -07:00
Konstantin Shcheglov c7b18cb575 Remove 'name' from argumentNames and replace with 'argumentsNames' in UnlinkedConstructorInitializer.
You were right - it is not complex at all.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1963213002 .
2016-05-10 13:09:40 -07:00
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
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
Konstantin Shcheglov fef82ec1e8 Update mock SDK 'double'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1956443003 .
2016-05-05 14:12:53 -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 a281a61d82 Replace 'allowTypeParameters' with 'numTypeArguments'.
With the final goal to get rid of it because we will move to providing
type arguments for all type parameters in order to implement the
'instantiate to bounds' feature.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1948123003 .
2016-05-05 10:52:40 -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
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
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
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
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
Konstantin Shcheglov 9e8723b6d2 Skip all local elements when comparing after AST based resynth.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1940003002 .
2016-05-03 12:13:50 -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
Erik Ernst 21a1345fa8 Restored the MirrorsUsed which was removed in CL 1933283002.
The `git cl land` on https://codereview.chromium.org/1915123008 seemed
to give rise to many timeout failures in the dart2js-jsshell columns of
the build bot; that CL was then reverted. However, it turns out to be
the removal of `@MirrorsUsed(metaTargets: 'ReflectiveTest')` in
https://codereview.chromium.org/1933283002 that causes the timeouts
(e.g., it changes an 11sec test run into a 64s test run, which violates
the timeout constraint of 60s on the bot).

BUG=

Review URL: https://codereview.chromium.org/1936963002 .
2016-05-02 10:42:44 +02:00
Konstantin Shcheglov 79ba493ae3 Skip checks of types for local elements, and duplicate them as top-level element tests.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1934813002 .
2016-04-29 17:19:37 -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
Konstantin Shcheglov e9109cd05f Add @assertFailingTest annotation support.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1933283002 .
2016-04-29 11:04:18 -07:00
Brian Wilkerson 974385bb48 Add a failing test for generic tear-offs
R=leafp@google.com

Review URL: https://codereview.chromium.org/1933783002 .
2016-04-29 10:10:10 -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
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