Commit Graph

30 Commits

Author SHA1 Message Date
Leaf Petersen 7d2976c7d5 Add instantiate method on ParameterizedType and InterfaceType,
and deprecate the old substitute4 in favor of instantiate.

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

Review URL: https://codereview.chromium.org/1758913002 .
2016-03-02 15:06:38 -08:00
Konstantin Shcheglov d9bd7f915d Revert collecting defined elements.
We decided to resynthesize local elements from summaries.
This CL rolls back the following CLs:

https://codereview.chromium.org/1687573002
https://codereview.chromium.org/1681493005

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1729523002 .
2016-02-23 09:55:14 -08:00
Paul Berry 7b4cef6902 Fix broken analyzer tests after 56a9c0d9f1.
Review URL: https://codereview.chromium.org/1708623002 .
2016-02-17 08:56:31 -08:00
Konstantin Shcheglov 4a99fe9e18 Collect defined elements together with used elements.
We cannot visit CompilationUnitElement and reach local variables and
functions. So, we need another way to know them while generating hints.

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

Review URL: https://codereview.chromium.org/1687573002 .
2016-02-09 12:44:58 -08:00
Konstantin Shcheglov c174f4c778 Generate tasks.dot for the new tasks structure.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1672323002 .
2016-02-05 18:17:16 -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
Leaf Petersen a34bab7fde Use READY_RESOLVED_UNIT flag for ordering tasks.
Fixes #25271.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1534033004 .
2015-12-18 14:17:52 -08:00
Ivan Posva 7e6d5a579d - Fix more bad uses of Platform.packageRoot.
- Simplify previous fixes.

BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org/1536043002 .
2015-12-18 08:34:07 -08:00
Konstantin Shcheglov e1455ce920 Stop using RESOLVED_UNIT_x for other libraries.
This makes analysis of a command line Hello World application about 20% faster.
Even before summaries :-)

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1531393002 .
2015-12-17 13:57:20 -08:00
Ivan Posva a3f816e75b - Fix usage of Platform.packageRoot.
BUG=

Review URL: https://codereview.chromium.org/1533693003 .
2015-12-17 13:08:19 -08:00
Konstantin Shcheglov 83c1106ffe Compute values of elements a unit constant expressions depend on.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1539623002 .
2015-12-17 11:47:54 -08:00
Brian Wilkerson 2a190aa11a Fix imports within the analyzer package
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1524893002 .
2015-12-14 12:25:41 -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 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
Brian Wilkerson 600fc17de1 Clean-up the registration of plugins
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -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
Paul Berry ce7625a22c Buildbot fixes after 8c324a5b8d
- Regenerate tasks.dot

- Mark a test as passing that previously failed
  (fail_finalPropertyInducingVariable_classMember_instance_unprefixed)

Note that there are three other tests that I would have expected to
start passing as well (see
fail_finalPropertyInducingVariable_classMember_instance_*), but they
still fail.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/1469093002 .
2015-11-23 09:04:43 -08:00
Brian Wilkerson b2728c15a6 Revert "Fix test failures on the bots"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1468623002 .
2015-11-20 14:04:11 -08:00
Brian Wilkerson 6b45d6544c Fix test failures on the bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1467623002 .
2015-11-20 11:48:35 -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 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 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