Commit Graph

39 Commits

Author SHA1 Message Date
Brian Wilkerson 1c5d1a56e7 Clean up some hints
Change-Id: I623a4d86912ad0666b75ad519c15c84b24a5b579
Reviewed-on: https://dart-review.googlesource.com/52861
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-26 22:29:06 +00:00
Konstantin Shcheglov c21653c0c4 Regenerate the tasks graph.
TBR

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2837713002 .
2017-04-21 21:21:57 -07:00
Konstantin Shcheglov 3ba8c2df3d Regenerate the task graph.
TBR

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2698703002 .
2017-02-15 10:46:04 -08:00
Paul Berry ab6e74cb1c Regenerate task_dependency_graph after 914a117649
TBR=scheglov@google.com

Review-Url: https://codereview.chromium.org/2631683002 .
2017-01-13 04:17:32 -08: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
Paul Berry 052a6c867d Fix summary handling of unresolved imports, exports, and parts.
Previously this was working for a few use cases by dumb luck, but it
wasn't well tested and became broken by
b29c6bf330.  This CL fixes it for real
and adds tests to verify the fix.

Note that there is a change to how we represent an unresolved
import/export: instead of storing a URI_EXISTS modifier in the element
model, we simply mark the imported library element as synthetic.
(This library element existed anyway; we just weren't marking it as
synthetic).  This makes it easy to tie in with summaries, since it is
easy for the resynthesizer to detect that the library doesn't exist at
the time the library handle is resolved.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2235373003 .
2016-08-12 13:59:51 -07:00
Konstantin Shcheglov 296d81f60a Issue 27053. Record errors in InferStaticVariableTypeTask and include them into unit errors.
R=brianwilkerson@google.com, jmesserly@google.com
BUG=

Review URL: https://codereview.chromium.org/2239613002 .
2016-08-11 09:10:31 -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
Konstantin Shcheglov fa854d41f6 Fix for limited invalidation in the middle, and the unlimited invalidation for an exported library.
Consider libraries `A`, `B`, and `C`, where `C` imports `B`, and `B`
exports `A`. [RESOLVED_UNIT4] of `C` depends on [LIBRARY_ELEMENT4] of
[IMPORTED_LIBRARIES], i.e. `B`. Even though [LIBRARY_ELEMENT4] of `B`
depends on [LIBRARY_ELEMENT3]s of its [EXPORT_SOURCE_CLOSURE] (i.e. `A`
and `B`), [RESOLVED_UNIT4] of `C` sees only [LIBRARY_ELEMENT4] of `B`.

When invalidate results of `B` (but keep results of `C`), we will
invalidate and remove [LIBRARY_ELEMENT4] of `B`, so we lose knowledge
that [RESOLVED_UNIT4] of `C` indirectly depends on `A`.

The solution is do depend on [EXPORT_SOURCE_CLOSURE] of all
[IMPORTED_LIBRARIES] in [RESOLVED_UNIT4] of `C`.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2171673002 .
2016-07-21 07:26:47 -07:00
William Hesse 60db3bd080 Update task_dependency_graph after analyzer change
BUG=

Review URL: https://codereview.chromium.org/2136543002 .
2016-07-08 15:36:31 +02:00
Konstantin Shcheglov 4bae18ae3b Regenerate tasks graph.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2106483002 .
2016-06-27 12:09:00 -07:00
pq ae9a984057 Regen task graph.
BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2023543002 .
2016-05-27 15:02:56 -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
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 8a7b4ea225 Don't use AnalysisContext.exists() in VerifyUnitTask.
Use REFERENCED_SOURCES and MODIFICATION_TIME instead.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1902403005 .
2016-04-20 14:02:01 -07:00
Paul Berry 22369c3e19 Regenerate task dependency graph after c1475a13a0
TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/1903873002 .
2016-04-20 12:26:14 -07:00
Konstantin Shcheglov cd685d96e8 Use single map of Source to modification time.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1899303003 .
2016-04-19 15:50:56 -07:00
Paul Berry 5e3b3f8d50 Regenerate task dependency graph after d3f6c67732
TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/1896153002 .
2016-04-19 08:14:25 -07:00
Konstantin Shcheglov 9cc7f2d936 Fixes for import/export directive resolution and tasks graph.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1854003003 .
2016-04-03 12:19:26 -07: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
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
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 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
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
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 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 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