Commit Graph

60 Commits

Author SHA1 Message Date
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 f0d249e269 Clean up package imports and library names
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1513643009 .
2015-12-10 08:11:56 -08:00
pq ee310b6aff Options processing API update (#25126).
Updates processing API to accept untyped options maps.

Required to support processing options merged from embedders and local analysis options.

See: https://github.com/dart-lang/sdk/issues/25126

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1506963002 .
2015-12-07 11:27:17 -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
pq 68dc36a3e7 OptionsValidator plugin extension and linter service.
* Adds a new extension point to allow for contributing OptionsValidators.
* Adds a new linter 'service' to server that contributes a lint-aware validator.

You'll notice that the warning code I added is NOT in `errors.dart`.  I did that in anticipation of plugin-specifc warnings living elsewhere.  If that's not the right angle, happy to un-do!

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1418333002 .
2015-10-26 08:50:55 -07: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
pq bf0ba96027 Analysis Options processing task and manager.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1413973003 .
2015-10-20 15:38:55 -07:00
Paul Berry 395b82c041 Fix additional test failures caused by cae05d6bd4
TBR=pquitslund@google.com

Review URL: https://codereview.chromium.org/1403633008 .
2015-10-15 07:06:46 -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
pq e19f10fbec Add context to OptionsProcessor callback API.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1392143002 .
2015-10-08 10:47:06 -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
pq 5dd6a543e7 Plugin manifest parsing.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1366023002 .
2015-09-24 14:53:15 -07:00
pq 72ee80467a ErrorHandler typedef fix.
Lo and behold this harkens back to lint request #1 (https://github.com/dart-lang/linter/issues/1). Could have saved me a headache!

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1367723003 .
2015-09-23 14:39:07 -07:00
pq 7ff04709e7 Plugin config cleanup.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1366663002 .
2015-09-23 10:44:02 -07:00
pq e2ec118554 Plugin config format validation (and tests).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1362033002 .
2015-09-23 09:51:29 -07:00
pq f4c3b30d8a Basic plugin config parsing.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1364493004 .
2015-09-22 17:06:14 -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 24b24a3569 Reformat code to reduce churn
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1322513004 .
2015-09-09 08:19: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
pq 230f594328 Options plugin API.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1175253005.
2015-06-11 10:42:21 -07:00
pq 829f2da883 Type fix.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1181723002.
2015-06-11 10:40:01 -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
Brian Wilkerson 650ac5458d Add plugin support for command-line access
R=pquitslund@google.com

Review URL: https://codereview.chromium.org//1136633007
2015-05-19 14:27:54 -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