Commit Graph

58 Commits

Author SHA1 Message Date
Brian Wilkerson b7f1a96ae5 Change the way tasks are registered
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2566893002 .
2016-12-11 15:59:46 -08:00
Brian Wilkerson 718a17db85 Revert "Change the way tasks are registered" (TBD)
Review-Url: https://codereview.chromium.org/2564303002 .
2016-12-11 11:32:12 -08:00
Brian Wilkerson 84577c55bb Change the way tasks are registered
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2568723002 .
2016-12-11 11:25:40 -08:00
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Konstantin Shcheglov 09b851c97f Don't perform final fields and top-level variables type propagation.
A similar feature is now implemented in strong mode, and users who
need it, should switch to strong mode.

When we are ready to drop propagated types altogethoer, we could
deprecate or remove UnlinkedVariable.propagatedTypeSlot in IDL.

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

Review URL: https://codereview.chromium.org/2288223003 .
2016-08-29 15:18:12 -07:00
Konstantin Shcheglov 6df5ea27a5 Revert 6ad38498c8 (PARSED_UNIT).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2231473002 .
2016-08-09 10:14:18 -07:00
Konstantin Shcheglov 6ad38498c8 Extract unresolved AST parsing (PARSED_UNIT1) from full parsing, which includes UriBasedDirective(s) resolution.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2229603003 .
2016-08-08 14:45:27 -07:00
Brian Wilkerson 23b02bc351 Add support to the task model for the @required annotation
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1977903002 .
2016-05-13 11:11:48 -07:00
Brian Wilkerson d87f9c09de Update to use the latest version of the plugin package
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1965083002 .
2016-05-11 09:54:29 -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 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
Konstantin Shcheglov 010e0e6b71 Separate CONSTANT_EXPRESSION_RESOLVED flag from RESOLVED_UNITx.
We only need to know that we can eveluate the constant.
In non-summaries world we have the resolved unit anyway.
But in case of summaries we don't, but we know that all the constant
expressions are resynthesized as resolved (even if lazily).

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

Review URL: https://codereview.chromium.org/1673913002 .
2016-02-05 18:04:24 -08:00
Konstantin Shcheglov 217cd8181b Remove unused READY_RESOLVED_UNIT10 and READY_RESOLVED_UNIT11.
...as well as the corresponding tasks that produce them.

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

Review URL: https://codereview.chromium.org/1668993002 .
2016-02-04 13:09:42 -08:00
Brian Wilkerson 032aa11711 Add minimal yaml support to the engine
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1622313003 .
2016-01-25 09:00:56 -08:00
Brian Wilkerson 1f3dabd9c7 Ensure that a complete library element has constants evaluated (issue 24890)
R=danrubel@google.com, eernst@google.com, paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1486663003 .
2015-12-14 07:51:07 -08:00
Brian Wilkerson e94c820411 Revert "Ensure that a complete library element has constants evaluated (issue 24890)"
Review URL: https://codereview.chromium.org/1480603002 .
2015-11-25 07:13:08 -08:00
Brian Wilkerson c8cec941ef Ensure that a complete library element has constants evaluated (issue 24890)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1468293003 .
2015-11-25 06:37:45 -08:00
Konstantin Shcheglov aa9668b264 Propagate types for import/export closure before resolving.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1465303002 .
2015-11-23 12:52:03 -08:00
Konstantin Shcheglov 8c324a5b8d Propagate types of final/const top-level variables and fields.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23001

Review URL: https://codereview.chromium.org/1460213005 .
2015-11-21 09:40:37 -08:00
Konstantin Shcheglov c43f292dd9 Remove IMPORT_EXPORT_SOURCE_CLOSURE and IS_CLIENT results.
This improves warm VM analysis time (i.e. 99% of all analyzis that happens in IDEs) from 7200 ms to 6600 ms.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1417143003 .
2015-10-24 08:35:26 -07:00
Konstantin Shcheglov 4653d9bb76 Replace some LIBRARY_ELEMENTx dependency for closure with READY_LIBRARY_ELEMENTx.
This helps to improve analysis time from about 39100 to 37000 ms.

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

Review URL: https://codereview.chromium.org/1406923006 .
2015-10-23 14:56:25 -07:00
Konstantin Shcheglov 041e61a0f6 Ensure that RESOLVED_UNITx ready once for every library.
...instead of ensuring this separately for complete closures of every library.

This improves initial analysis performance from about 44 seconds to 39.
This also makes WorkOrder.moveNext less expensive - to about 5.6% during initial analysis.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1412273004 .
2015-10-23 13:25:56 -07:00
pq 6c85fe785a Analysis Options error notifications.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1411013003 .
2015-10-21 09:59:19 -07:00
Paul Berry ec144a055a Fix type of EninePlugin List<ResultDescriptor> getters.
These getters were improperly typed as List<TaskDescriptor>.  Due to the
fact that the underlying lists they were returning were List<dynamic>,
and the fact that new warnings for for-in loops haven't been implemented
yet (see commit 89607f06e9), no warnings
or runtime errors alerted us to the incorrect type.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1406583002 .
2015-10-13 10:45:28 -07:00
Leaf Petersen 4ca8a3f19b Strong mode checker integration. This integrates jmesserly's CL, and adds a task for computing strong mode errors and an annotated unit.
BUG=
R=brianwilkerson@google.com, jmesserly@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1396273004 .
2015-10-13 10:16:35 -07:00
Paul Berry 3ae9e62284 Create a breadcrumb trail for analyzing of task model extensions.
This change paves the way for modifying
pkg/analyzer/tool/task_dependency_graph.dart so that it will be able to
understand the extensibility mechanisms in the task model.
Specifically, it adds the ExtensionPointId annotation, which
task_dependency_graph.dart will be able to use to locate the
TaskDescriptors that are plugged into each task model extension point.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1401543002 .
2015-10-09 11:05:14 -07:00
Leaf Petersen 651221bb82 Resolve ordering issues.
This CL changes the way that the task model does strong mode inference to use the strongly connected components in the import/export graph.  Library cycles are computed and inference is staged by forcing each stage of inference to happen across an entire library cycle at once, and to force all external dependencies of a library cycle to have completed inference before inference for the library cycle can begin.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1386023002 .
2015-10-07 16:14:35 -07:00
pq fe76c6f3c4 Lint support for the new task model.
Related bug: https://github.com/dart-lang/analyzer_cli/issues/64

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1385293002 .
2015-10-06 16:45:45 -07:00
Brian Wilkerson 0f30af628a Fix computation of errors to not run extra tasks
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1370323003 .
2015-09-30 11:55:17 -07:00
Konstantin Shcheglov e878562d35 Add an extension point for contributing to HTML_ERRORS.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1341723003 .
2015-09-14 12:00:39 -07:00
Konstantin Shcheglov 12614041e5 Use contributed ResultDescriptor(s) while computing DART_ERRORS.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1317213004 .
2015-09-09 15:12:41 -07:00
Brian Wilkerson b0b97813f3 Add the task to resolve function bodies
R=leafp@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1326553003 .
2015-09-03 08:08:53 -07:00
Brian Wilkerson de4280fa14 Implement task to infer instance members
R=leafp@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1322983002 .
2015-08-31 14:23:44 -07:00
Brian Wilkerson 1463fb3ff2 Task to infer static variables
R=leafp@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1323653002 .
2015-08-31 11:36:43 -07:00
Brian Wilkerson 7ce07af57e Implement a task to compute the dependencies between static variables
R=leafp@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1320923003 .
2015-08-28 11:42:15 -07:00
Brian Wilkerson c3b12a65ba Add a task to partially resolve a compilation unit
R=leafp@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1321523002 .
2015-08-26 11:22:03 -07:00
Konstantin Shcheglov 597f189eb4 Extension point for WorkManagerFactory(s).
I'm not quite happy that internal classes get into the extension point declaration.
But I guess that because of the nature of the work WorkManager(s) are doing, we have to have significant exposure to internals.

Also, onAnalysisOptionsChanged() and onSourceFactoryChanged()... these probably are better to implement as streams in InternalAnalysisContext.
Thoughts?

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

Review URL: https://codereview.chromium.org//1311773005 .
2015-08-26 09:45:19 -07:00
Paul Berry 7671bce82a Compute mixin application constructors in the ClassElement.constructors getter.
Previously we computed them during resolution, but this created a
problem: since the set of constructors for a mixin application depends
on the constructors in the superclass, and the superclass might itself
be a mixin application, it might theoretically be necessary to analyze
all files in the transitive import/export closure before it is
possible to compute the set of constructors for a class.  As a result,
in order to produce completion results after a non-incremental change
to file X, we have to re-analyze the entire transitive closure of
files importing or exporting X.  This takes prohibitively long.

This change moves the computation into the ClassElement.constructors
getter.  The computation is not cached, so now a change to file X only
requires rebuilding the element models for files directly importing X
(or directly importing files that contain X in their transitive export
closure).

Since the result of the computation is not cached, this will produce
an increase in analysis time, however since mixin applications are
used so rarely, the performance impact should be negligible.

Fixes #23732.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1215053003.
2015-06-30 07:35:26 -07:00
Paul Berry 21b65e700b Split BuildSourceClosuresTask into two tasks; remove unnecessary computation.
This splits BuildSourceClosuresTask into BuildSourceExportClosureTask,
which produces EXPORT_SOURCE_CLOSURE, and
BuildSourceImportExportClosureTask, which produces
IMPORT_EXPORT_SOURCE_CLOSURE.  IMPORT_SOURCE_CLOSURE is no longer
computed, since it was not being used.

This should reduce the amount of analysis work that needs to be rerun
before we can produce code completions, since we will no longer have
so recompute the import/export source closure (which could potentially
need recomputation for a large number of files) until just prior to
ResolveUnitReferencesTask, which in theory doesn't need to run in
order to produce code completions.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1220743004.
2015-06-29 10:13:09 -07:00
Paul Berry 19d0ea816b Remove BuildFunctionTypeAliasesTask.
There seems to be no reason to do this as a separate step from
ResolveUnitTypeNamesTask.

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

Review URL: https://codereview.chromium.org//1211523003.
2015-06-24 08:08:05 -07:00
Brian Wilkerson c891a348ab Next steps toward HTML support
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1193143002.
2015-06-21 09:21:42 -07:00
Brian Wilkerson cb8b774fef Re-enable and add new HTML support
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1182303006.
2015-06-16 09:52:18 -07:00
Brian Wilkerson 980978c967 Support for parsing HTML in the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1185443002.
2015-06-11 13:24:20 -07:00
Konstantin Shcheglov f584413999 Build LIBRARY_ELEMENT after RESOLVED_UNIT6 for all units in the closure of a library.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1177963002.
2015-06-11 08:05:59 -07:00
paulberry@google.com 130376558f Add a task for computing all constant values in a compilation unit.
R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45719 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 22:18:02 +00:00
scheglov@google.com 73f176d45e Add LIBRARY_ERRORS result.
This result will work as a top-level target for Dart work manager.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45668 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 23:11:13 +00:00
paulberry@google.com e51ffadb87 Add a task to the new task model for computing constant values.
Not yet implemented: proper handling of circular references.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45651 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 19:44:41 +00:00
paulberry@google.com 728e9b3a9e Create a task in the new task model to compute constant dependencies.
This is the first of several planned tasks for constant evaluation.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45624 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 00:36:45 +00:00
brianwilkerson@google.com e8c5b87478 Get computeError working
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45604 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 18:30:40 +00:00