|
|
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
Committed: https://github.com/dart-lang/sdk/commit/7671bce82af5452498cc36f0ee7ef720e970f170
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+227 lines, -883 lines) |
Patch |
 |
M |
pkg/analyzer/lib/src/context/context.dart
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/element.dart
|
View
|
|
8 chunks |
+168 lines, -27 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/element_resolver.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/error_verifier.dart
|
View
|
|
5 chunks |
+16 lines, -2 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/resolver.dart
|
View
|
|
8 chunks |
+5 lines, -307 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
|
View
|
|
5 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/plugin/engine_plugin.dart
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/task/dart.dart
|
View
|
|
16 chunks |
+6 lines, -346 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/all_the_rest_test.dart
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
View
|
|
4 chunks |
+19 lines, -12 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/element_test.dart
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/generated/resolver_test.dart
|
View
|
|
3 chunks |
+0 lines, -16 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/src/task/dart_test.dart
|
View
|
|
6 chunks |
+1 line, -166 lines |
0 comments
|
Download
|
Total messages: 4 (1 generated)
|