Commit Graph

8489 Commits

Author SHA1 Message Date
scheglov@google.com 0ec685763a Use TaskInputBuilder to compute import/export source closures.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1045113005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44827 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 22:21:02 +00:00
danrubel@google.com dc8e098a5f do not report _ as unused variable
BUG=dartbug.com/23050
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1040083007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44825 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 21:56:33 +00:00
danrubel@google.com cb0be1b4cf improve parser recovery when top level function is missing parameters
BUG=dartbug.com/23044
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1044383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44822 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 20:49:19 +00:00
scheglov@google.com 08b2d934ed Issue 19929. Record the propagated type into LHS of the assignment.
This is a fix only for https://code.google.com/p/dart/issues/detail?id=19929#c8 ,
not the whole issue.

R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=19929

Review URL: https://codereview.chromium.org//1049303002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44812 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 18:22:40 +00:00
scheglov@google.com 4d230a5d6a GenerateHintsTask - partial implementation.
1. We need to ensure somehow that TypeProvider's types hierarchies are finished.

2. We need aggregating tasks to compute used imported / local elements.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1046193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44809 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 18:14:28 +00:00
paulberry@google.com 53e52f0a31 Implement the new '??' operator in analyzer.
The new operator is only accepted by the tokenizer if the command-line
option "--enable-null-aware-operators" is supplied.

Only static analysis of '??' is implemented.  However, the tests in
tests/language/if_null_*_test.dart will also verify behavior once it
is implemented.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1045553002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44802 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 12:38:12 +00:00
paulberry@google.com 6d505b876b Rework handling of factory redirects in constant evaluation.
This change limits the set of elements that need to be examined in
order to determine the constant evaluation dependency graph.
Previously, when encountering a constant constructor invocation, we
would chase the sequence of factory redirects to a non-redirecting
constructor (being careful to avoid infinite regress in the case of
invalid input), and then mark the invocation as dependent on the
non-redirecting constructor.  Now, we mark the invocation as dependent
on the constructor it immediately references, and mark redirecting
factory constructors as dependent on the constructors they redirect
to.

This is a prerequisite to converting constant evaluation over to the
new task model, since once we're in the new task model there will be
no guarantee that the full sequence of factory redirects has been
resolved at the time we need to compute dependencies.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1043843003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44797 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 21:50:43 +00:00
scheglov@google.com aff371f0a4 Remove directives validation.
I was not able to get to this check, we stop analyzing before it.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1049013002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44795 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 21:41:31 +00:00
scheglov@google.com e6ca587081 Task: Verify Dart.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1041273002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44793 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 21:19:12 +00:00
scheglov@google.com ec7b29d26f GetContentTask should catch exceptions and wrap them into AnalysisExceptions.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1041283002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44792 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 21:16:52 +00:00
paulberry@google.com ad0cce176a Avoid infinite loop if const constructor redirects don't reach a fixed point.
BUG=dartbug.com/23038
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1042963002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44789 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 21:00:36 +00:00
scheglov@google.com 028f13011e Issue 23027. Try to make priority files analyzable.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23027

Review URL: https://codereview.chromium.org//1044463005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44786 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 19:50:10 +00:00
paulberry@google.com 5677e52ad6 Generate warnings for assignment to a type.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1042133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44774 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-30 00:08:17 +00:00
scheglov@google.com 64dd9f59bc Issue 22279. Tweak constants evaluation error messages.
LMK if the new messages are also not good.

R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22279

Review URL: https://codereview.chromium.org//1048463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44772 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-28 03:08:22 +00:00
scheglov@google.com 1dc26d9f06 Issue 23018. Fix for inlining multiline strings with leading whitespaces.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23018

Review URL: https://codereview.chromium.org//1042033002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44771 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-28 02:31:07 +00:00
paulberry@google.com 6fe7a1d39b Scanner/parser support for DEP 9 (null-aware operators).
This adds scanner and parser support for the operators '?.', '??', and
'??='.

Support is not yet enabled--it is only turned on during the unit tests
for the new tokens and AST's.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1043583002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44770 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-28 02:25:32 +00:00
brianwilkerson@google.com e604390ade Gracefully handle IO exceptions while resolving URIs (issue 23023)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1033383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44766 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 23:52:10 +00:00
danrubel@google.com 8f4ac8f16b improve parser recovery for incomplete prefixed identifier in method/function parameter list
BUG=dartbug.com/22526
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1033333003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44760 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 20:05:18 +00:00
scheglov@google.com 7b1edbbdf9 Issue 20144. Reset propagated type if one of the 'if' branches changes it to a different one.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20144

Review URL: https://codereview.chromium.org//1036233006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44754 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 19:13:50 +00:00
brianwilkerson@google.com 32688bf728 Fix the value of multiline strings. This re-applies the changes in 44722 (which was reverted in 44734) and fixes another bug that was uncovered by that change.
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1043473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44752 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 18:26:06 +00:00
scheglov@google.com 281f305c90 Issue 22521. Drop '_J2DAccessor' suffixes.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22521

Review URL: https://codereview.chromium.org//1042453003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44745 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 16:55:52 +00:00
paulberry@google.com 87171553c9 Rename MethodInvocation.period to MethodInvocation.operator.
The name is inaccurate--if the method invocation is part of a cascade,
it is the ".." operator.  It's going to get even more inaccurate when
null-aware operators are added, since it will also be used to
represent "?.".

Deprecated getters and setters named "period" are added to avoid
breaking the analyzer API.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1039713002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44744 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 16:38:33 +00:00
scheglov@google.com 3899dd2dcd Issue 23010. Compute constant and report related errors during incremental resolution.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23010

Review URL: https://codereview.chromium.org//1037313002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44743 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 16:29:03 +00:00
brianwilkerson@google.com c95c8299bc Fix NPE in ErrorReporter (issue 22980)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1040573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44739 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 15:40:04 +00:00
brianwilkerson@google.com 8982110eaf Make some results private
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1034423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44738 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 15:37:01 +00:00
ricow@google.com 88380d5708 Revert "Fix value computation for multi-line strings (issue 22993)"
This reverts revision 44722

This is causing test failures:
http://build.chromium.org/p/client.dart/builders/pub-linux-be/builds/11761/steps/pub%20and%20pkg%20%20tests%20failures/logs/stdio

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1038353002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44734 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 13:59:13 +00:00
scheglov@google.com ada62d06d1 Rewrite constants evaluation and checks to avoid using 'is double'.
We have 33 hints because of it.

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

Review URL: https://codereview.chromium.org//1017573004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44724 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 22:45:18 +00:00
paulberry@google.com b073936fd0 Allow "dynamic" as a constant value in analyzer.
BUG=dartbug.com/22989
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1004353006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44723 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 21:50:44 +00:00
brianwilkerson@google.com 117ed251cc Fix value computation for multi-line strings (issue 22993)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1034953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44722 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 21:45:31 +00:00
scheglov@google.com 695b438019 Task: Resolve References.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1038963002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44720 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 19:28:28 +00:00
scheglov@google.com dc0499d075 Task: Resolve Variables.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1031303002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44710 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 14:01:31 +00:00
scheglov@google.com 4b418376fe BuildLibraryConstructorsTask to build all constructors of all library classes.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1031283002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44701 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 21:59:58 +00:00
scheglov@google.com c37839bab1 Extract _ListTaskInputMixin and allow chaining.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1007063005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44698 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 21:23:22 +00:00
scheglov@google.com 247b3edb06 Add toMap / toMapOf / toList
Rename 'inputOf' to 'of'.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1005693007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44690 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 17:54:17 +00:00
paulberry@google.com 6cbfee9bf6 Move "null2" getter from ConstantVisitor to TypeProvider.
ConstantVisitor isn't a very long-lived object, and it's going to get
even shorter-lived in the new task model, so the caching is
ineffective.  Moving the getter to the TypeProvider makes it easier to
get to and improves caching.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1036723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44684 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 15:33:05 +00:00
scheglov@google.com 3e62e9ff67 Task: BuildClassConstructorsTask.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//1029953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44675 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 21:20:15 +00:00
scheglov@google.com 3d8bd5fcb6 Add UNITS and CLASS_ELEMENTS results.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//1034493004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44673 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 18:47:22 +00:00
brianwilkerson@google.com 0491a6ff6b More comment clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1021723008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44670 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 16:06:20 +00:00
scheglov@google.com cc1eaee4e2 Issue 22962. Adding/removing method/accessor body is a declartion mismatch.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22962

Review URL: https://codereview.chromium.org//1024553006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44667 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 14:52:35 +00:00
paulberry@google.com 79af2ba662 Fix constant evaluation of division.
To be consistent with the VM and dart2js implementations, the
analyzer's constant evaluation of a / b should always yield a double,
even if the arguments are ints.  For example, 300 / 2 = 150.0 and 301
/ 2 = 150.5.

BUG=dartbug.com/22937
R=danrubel@google.com

Review URL: https://codereview.chromium.org//1027453003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44645 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 19:36:37 +00:00
scheglov@google.com 5c9110841e Fix hints in the analyzer package.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1026093002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44639 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 17:34:00 +00:00
scheglov@google.com 85db3fbe62 Report separate UNUSED_CATCH_CLAUSE and UNUSED_CATCH_STACK hints.
R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org//1020243004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44635 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 16:41:20 +00:00
brianwilkerson@google.com e568512534 Rename parameters in error_verifier
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1027693005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44633 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 15:12:39 +00:00
danrubel@google.com 03cac10578 improve parser recovery of type argument list
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1025903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44626 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-22 18:33:23 +00:00
scheglov@google.com f2df67f2fe ResolveLibraryTypeNamesTask to force type name resolution in parts.
Also clean ups in other tasks inputs.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1024973002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44623 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-21 01:08:20 +00:00
brianwilkerson@google.com c2231e5f08 Clean up comments in error verifier
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1021083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44619 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 23:02:52 +00:00
paulberry@google.com c16fc96d58 Implement the new definition of flatten() from r44569 in analyzer.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1023903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44603 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 13:29:05 +00:00
brianwilkerson@google.com 56ff9d92e7 Add engine plugin
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1026483002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44589 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 20:08:05 +00:00
paulberry@google.com 3b8c23ce58 Fix static type analysis of function invocation expressions.
BUG=dartbug.com/22916
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1021773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44588 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 19:39:20 +00:00
brianwilkerson@google.com b36c00f15f Temporarily move plugin support
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1027433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44586 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 19:06:22 +00:00