Commit Graph

3034 Commits

Author SHA1 Message Date
Brian Wilkerson 65f8d25aa0 Fix more parser bugs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2817873003 .
2017-04-13 09:26:31 -07:00
Brian Wilkerson b277f1023c Fix parser error
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2809213005 .
2017-04-13 06:14:05 -07:00
Konstantin Shcheglov 54f845cfd2 Support for generic function as type arguments in DeclarationResolver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2814223002 .
2017-04-12 13:47:23 -07:00
Brian Wilkerson 23f08ec04a Fix another parser issue with generic function types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2814183002 .
2017-04-12 12:41:54 -07:00
Brian Wilkerson e520fc2a45 More parser fixes for generic function types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2817753002 .
2017-04-12 11:35:21 -07:00
Konstantin Shcheglov 7696ec5f31 Support for using generic function types in other AST structures.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2814063003 .
2017-04-12 10:12:30 -07:00
Brian Wilkerson 492eab84ec Fix parsing of generic function types as return types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2809773005 .
2017-04-12 07:27:39 -07:00
Brian Wilkerson 3dcf0e31c5 Split error code to ease future improvements
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2813553006 .
2017-04-11 13:35:38 -07:00
Brian Wilkerson 0c8b5b8232 Fix a warning
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2817493002 .
2017-04-11 12:08:26 -07:00
Konstantin Shcheglov 38e8b1509e Issue 29109. Resynthesize PrefixElement(s) to fix constants evaluation.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/29109

Review-Url: https://codereview.chromium.org/2815713003 .
2017-04-11 11:28:03 -07:00
Konstantin Shcheglov f0ae30dca5 Fix for summarization of generic function type aliases and support for resynthesizing.
This is based on your CL https://codereview.chromium.org/2808093004/ and
includes fixes for summarization and resynthesis.

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

Review-Url: https://codereview.chromium.org/2814443005 .
2017-04-11 07:07:16 -07:00
Konstantin Shcheglov 07347d84fc Parse type substitution comments /*=T*/ in variable declarations with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2804753003 .
2017-04-07 12:59:02 -07:00
Konstantin Shcheglov ee89054fe9 Issue 29288. When infer new FunctionType, makes its FunctionElement own its ParameterElement(s).
Never share.

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

Review-Url: https://codereview.chromium.org/2799093007 .
2017-04-07 12:21:53 -07:00
Brian Wilkerson 1910147425 Partial fix for generic function types - non-driver case
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2802203003 .
2017-04-07 11:17:37 -07:00
Konstantin Shcheglov 80a935bd76 Fix for parsing named factory constructors with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2803113002 .
2017-04-06 14:11:57 -07:00
Konstantin Shcheglov 8c8a02ab4f Support for parsing native function bodies with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2797343003 .
2017-04-06 14:00:44 -07:00
Konstantin Shcheglov 1b0b94c6e6 Fix for parsing annotations before variables in for-loop with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2797303003 .
2017-04-06 10:59:53 -07:00
Konstantin Shcheglov c9407b4544 Include ':' before constructor separators into AST with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2802753002 .
2017-04-05 13:25:46 -07:00
Adam Barth c25cd4da33 Restrict @immutable checks to instance fields
R=brianwilkerson@google.com, pquitslund@google.com

Review-Url: https://codereview.chromium.org/2805443002 .
2017-04-05 10:50:41 -07:00
Brian Wilkerson c2f599473b Fix generic function types in variable declarations (issue 29237)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2798663003 .
2017-04-05 06:24:25 -07:00
Konstantin Shcheglov a5d8f67ea5 Move tests for parseVariableDeclarationList(), fix for keywords.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2796123002 .
2017-04-04 12:41:41 -07:00
Peter von der Ahé 5fcbc900a6 Prepare for separate setter scope.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2788913002 .
2017-04-04 12:20:16 +02:00
Peter von der Ahé babf66241f Move scope.dart.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2794533002 .
2017-04-04 11:00:43 +02:00
Peter von der Ahé d8304e0c5e Remove unused methods from CL 2793113002.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2795983002 .
2017-04-04 10:38:26 +02:00
Leaf Petersen e121d95b1b Fix missing partial type in downwards map inference.
Fixes https://github.com/dart-lang/sdk/issues/29231 .  Fixes
regression in inference on map literals in which partial types were
being prematurely eliminated during downwards inference.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2795893002 .
2017-04-03 17:03:13 -07:00
Konstantin Shcheglov 35d96bacab Add support for parsing comments with generic parameters /*<K, V>*/ with Fasta.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2795063002 .
2017-04-03 16:27:45 -07:00
Konstantin Shcheglov cd5de6deef Convert constructor initializers in endInitializers() and other tweaks.
R=paulberry@google.com, ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2793113002 .
2017-04-03 11:59:39 -07:00
Brian Wilkerson dd49e79f74 Add context information to driver and add hooks for plugin management
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2795743002 .
2017-04-03 10:13:45 -07:00
Devon Carew 3fd497b510 Ignore some uses of deprecated APIs.
BUG=

Review-Url: https://codereview.chromium.org/2796483002 .
2017-04-03 08:31:00 -07:00
Brian Wilkerson ad54733d46 Convert top-level inference errors to hints
Review-Url: https://codereview.chromium.org/2786993002 .
2017-03-30 12:45:55 -07:00
Kasper Lund 25c6c8811a Take analysis options into account when computing the severity of a strong mode "error".
This allows users to opt into the strong mode hints by turning them into warnings or errors in their analysis options files.

R=leafp@google.com, vsm@google.com
BUG=

Review-Url: https://codereview.chromium.org/2784473004 .
2017-03-30 09:39:38 +02:00
Jennifer Messerly 1c504f8945 Fix #28120, strong mode allows field overrides
Fix #28119, DDC supports field overrides without @virtual
Fix #28801, devirtualize private fields in DDC where possible
Fix #28589, stop supporting @virtual in strong mode

R=leafp@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2781443003 .
2017-03-28 10:26:36 -07:00
Konstantin Shcheglov c41d846ab5 Fix _Required constructor in test.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2779663004 .
2017-03-27 10:02:07 -07:00
Brian Slesinsky ef48584f1f Fix package URI calculation when in third_party but not third_party/dart
In this case we should use a dotted package name, similar to other
packages outside third_party.

Previously, restoreAbsolute() didn't return a package URI at all,
which would result in a relative path being suggested for a
missing import.

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2771323002 .
2017-03-24 16:59:41 -07:00
Konstantin Shcheglov 0adfef9471 Remove trailing semicolons to make the tests pass with Fasta.
The Fasta's unit test checks that the token stream is fully consumed,
i.e. that the next token after the parsed entity is EOF.

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

Review-Url: https://codereview.chromium.org/2772943004 .
2017-03-24 14:34:51 -07:00
Brian Wilkerson 4f28d97ac2 Add error checking for the immutable annotation (issue 27750)
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2775863004 .
2017-03-24 11:56:24 -07:00
Konstantin Shcheglov 713847a71b Parse LabeledStatement and SwitchStatement with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2776743002 .
2017-03-24 11:49:47 -07:00
Konstantin Shcheglov 4f6882d617 Include CompilationUnit begin/endToken(s) with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2776733002 .
2017-03-24 11:47:05 -07:00
Brian Wilkerson ccf768144f More generic function type cases working
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2770143002 .
2017-03-24 08:08:23 -07:00
Konstantin Shcheglov 9b6c63a39d Parse YieldStatement with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2769133004 .
2017-03-23 17:32:26 -07:00
Konstantin Shcheglov 0842fb4b3e Parse RedirectingConstructorInvocation with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2772773003 .
2017-03-23 16:53:34 -07:00
Konstantin Shcheglov 9aea262eb4 Parse FunctionDeclarationStatement(s) with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2770033002 .
2017-03-23 09:29:34 -07:00
Konstantin Shcheglov 9d9267668e Parsed named expressions with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2768083002 .
2017-03-22 13:24:00 -07:00
Konstantin Shcheglov 77c29fb006 Parse SuperConstructorInvocation with Fasta.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2771583002 .
2017-03-22 13:21:24 -07:00
Konstantin Shcheglov 2bf5caed4e Revert "Issue 28580. Relax instantiate to bounds."
This reverts commit ef527a9bde.

Unfortunately I have to do this because there are problems with recursion
and corresponding error reporting. I fell it is better to don't have
the feature than to have it half done :-(

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2769703002 .
2017-03-22 09:17:08 -07:00
Brian Wilkerson 97cc40e0a7 Add strong mode error for mixins defining conflicting private names (issue 28809)
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2738113002 .
2017-03-22 08:42:30 -07:00
Peter von der Ahé 983a47293c Fix IdentifierContext for primary expressions. Also pass IdentifierContext to handleThisExpression and handleSuperExpression.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2768523002 .
2017-03-22 09:39:29 +01:00
Jacob Richman 6d1e3b4a90 Fix analyzer formatter errors.
BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2765153002 .
2017-03-21 21:42:40 -07:00
Konstantin Shcheglov ef527a9bde Issue 28580. Relax instantiate to bounds.
This feature works only with the new analysis driver, because it is
implemented only in summaries linker.

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

Review-Url: https://codereview.chromium.org/2762863002 .
2017-03-21 08:56:28 -07:00
Jennifer Messerly 4f9fff9ebd fix #29108, improve inference error messages
R=leafp@google.com

Review-Url: https://codereview.chromium.org/2757233004 .
2017-03-20 18:12:46 -07:00