Commit Graph

470 Commits

Author SHA1 Message Date
Paul Berry 9d550c4a0f Begin generating code for summary serialization/deserialization.
The generated code is not yet used.

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

Review URL: https://codereview.chromium.org/1414903005 .
2015-11-04 10:22:42 -08:00
Paul Berry cebb0dfb91 Refactor code for checking that generated files are up to date.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1430723002 .
2015-11-02 10:46:23 -08:00
Paul Berry 06ef697a0b Rework codegen tools to avoid relying on CWD; integrate with task model graph.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1428673004 .
2015-10-29 13:12:44 -07:00
pq 6e7c454037 Task graph re-gen.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1411243009 .
2015-10-25 21:01:01 -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
Brian Wilkerson a4a3053afd Backout earlier change to task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1420113004 .
2015-10-23 09:34:15 -07:00
Konstantin Shcheglov af8c1938dc Regenerate tasks.dot file.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1410363003 .
2015-10-23 08:34:34 -07:00
Paul Berry 7995c8ef1e Replace flags in summary IDL with enums and booleans.
We can let code generation compress these enums and booleans into a flag
integer if necessary to save space.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1415173003 .
2015-10-21 13:50:23 -07:00
Paul Berry ff40c262cf Revert "Add temporary code to debug windows bot failures."
This reverts commit 5b48108e07.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1420533004 .
2015-10-21 11:10:02 -07:00
Paul Berry de54dcbb0a Minor cleanup to analyzer summary IDL.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1413763007 .
2015-10-20 11:51:44 -07:00
Paul Berry fc1f07fe2e Introduce an "idl"-like format description for analyzer summaries.
Not yet used.  This is mostly copied from experiments done earlier in
the year, and is therefore incomplete; I plan to refine this in the
process of fleshing out the implementation and tests.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1410383004 .
2015-10-20 09:09:43 -07:00
Paul Berry 5b48108e07 Add temporary code to debug windows bot failures.
Review URL: https://codereview.chromium.org/1418573004 .
2015-10-20 05:02:12 -07:00
Paul Berry f145f89ccb Create loadLibrary function element eagerly.
Previously we created this element lazily (when requested) but this
didn't work well with the new task model, because creating the element
required calling back into the context and requesting full analysis of
`dart:async` (in order to get access to the Future type), and this
could lead to reentrant task execution.

Now we explicitly create the element in ResolveLibraryTypeNamesTask,
which allows us to get the Future type from the TypeProvider, avoiding
reentrancy.

Fixes #24627.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1405963005 .
2015-10-19 13:34:20 -07:00
Paul Berry 365ea71f78 Fix task model grapher to use package root.
This should avoid errors on the buildbots, which don't run "pub get"
inside pkg/analyzer, and thus don't have a folder pkg/analyzer/packages.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/1414763002 .
2015-10-19 10:08:16 -07:00
Paul Berry c5f4af4df6 Rework task model graphing to work on buildbots.
This CL reworks the task model grapher (formerly at
pkg/analyzer/tool/task_dependency_graph.dart, now at
pkg/analyzer/tool/task_dependency_graph/generate.dart) so that it
works similarly to the code generation in the analysis server.
Namely, the output file is stored in source control
(pkg/analyzer/tool/task_dependency_graph/tasks.dot), and a test run by
the buildbots verifies that it is up to date.  If it is not, the test
outputs the command necessary to update it.

This carries the benefit that:

- Anyone with access to an installation of graphviz can generate the
  task model graph easily from its .dot file.

- Any time a change occurs that affects task model dependencies, a
  test failure will prompt us that we need to generate a new .dot
  file.

- If a change ever occurs that breaks the ability of the task
  dependency grapher to produce the graph, a test failure will prompt
  us.

The downside is that when making a change that affects task model
dependencies, it is now necessary to re-run the script
pkg/analyzer/tool/task_dependency_graph/generate.dart to avoid a test
failure.

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

Review URL: https://codereview.chromium.org/1408743006 .
2015-10-19 09:24:18 -07:00
Brian Wilkerson 3a62346925 Resolve some todos in the graph tool
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1411083002 .
2015-10-19 07:46:05 -07:00
Paul Berry e3970349ba Modify task_dependency_graph.dart to handle extension points.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1402223002 .
2015-10-15 12:10:14 -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
Paul Berry 94471ea0a3 Fix task dependency graph computation.
Previously, when analyzing the analyzer for task dependency graph
computation, we failed to canonicalize Source URIs into "package:"
URIs.  As a result, we failed to properly connect the classes
representing individual classes with the base class AnalysisTask, so
we couldn't find any task classes and produced an empty graph.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1287003006 .
2015-08-12 14:46:32 -07:00
Paul Berry f9fec69a79 Add a tool to generate a graph of tasks and their dependencies.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1235963002 .
2015-07-13 09:41:59 -07:00