Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 2995763003: Fix deferred bug: when type argument is never instantiated (Closed)
Patch Set: makeit conditional to prevent infinite recursion Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library deferred_load; 5 library deferred_load;
6 6
7 import 'common/tasks.dart' show CompilerTask; 7 import 'common/tasks.dart' show CompilerTask;
8 import 'common.dart'; 8 import 'common.dart';
9 import 'compiler.dart' show Compiler; 9 import 'compiler.dart' show Compiler;
10 import 'constants/expressions.dart' show ConstantExpression; 10 import 'constants/expressions.dart' show ConstantExpression;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 collectTypeDependencies(argumentType); 312 collectTypeDependencies(argumentType);
313 } 313 }
314 for (ResolutionDartType argumentType in type.namedParameterTypes) { 314 for (ResolutionDartType argumentType in type.namedParameterTypes) {
315 collectTypeDependencies(argumentType); 315 collectTypeDependencies(argumentType);
316 } 316 }
317 collectTypeDependencies(type.returnType); 317 collectTypeDependencies(type.returnType);
318 } else if (type is ResolutionTypedefType) { 318 } else if (type is ResolutionTypedefType) {
319 elements.add(type.element); 319 elements.add(type.element);
320 collectTypeDependencies(type.unaliased); 320 collectTypeDependencies(type.unaliased);
321 } else if (type is ResolutionInterfaceType) { 321 } else if (type is ResolutionInterfaceType) {
322 elements.add(type.element); 322 if (elements.add(type.element)) {
323 collectTypeDependencies(type.element.supertype);
Siggi Cherem (dart-lang) 2017/08/11 21:34:52 I believe this may be including transitive deps, w
324 }
323 } 325 }
324 } 326 }
325 327
326 /// Collects all direct dependencies of [element]. 328 /// Collects all direct dependencies of [element].
327 /// 329 ///
328 /// The collected dependent elements and constants are are added to 330 /// The collected dependent elements and constants are are added to
329 /// [elements] and [constants] respectively. 331 /// [elements] and [constants] respectively.
330 void collectDependencies(Element element) { 332 void collectDependencies(Element element) {
331 // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been 333 // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been
332 // removed. 334 // removed.
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 1124
1123 bool operator ==(other) { 1125 bool operator ==(other) {
1124 if (other is! _DeclaredDeferredImport) return false; 1126 if (other is! _DeclaredDeferredImport) return false;
1125 return declaration == other.declaration; 1127 return declaration == other.declaration;
1126 } 1128 }
1127 1129
1128 int get hashCode => declaration.hashCode * 17; 1130 int get hashCode => declaration.hashCode * 17;
1129 1131
1130 String toString() => '$declaration'; 1132 String toString() => '$declaration';
1131 } 1133 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698