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

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: add status file 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
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 elements.add(type.element);
323 collectTypeDependencies(type.element.supertype);
323 } 324 }
324 } 325 }
325 326
326 /// Collects all direct dependencies of [element]. 327 /// Collects all direct dependencies of [element].
327 /// 328 ///
328 /// The collected dependent elements and constants are are added to 329 /// The collected dependent elements and constants are are added to
329 /// [elements] and [constants] respectively. 330 /// [elements] and [constants] respectively.
330 void collectDependencies(Element element) { 331 void collectDependencies(Element element) {
331 // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been 332 // TODO(johnniwinther): Remove this when [AbstractFieldElement] has been
332 // removed. 333 // removed.
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 1123
1123 bool operator ==(other) { 1124 bool operator ==(other) {
1124 if (other is! _DeclaredDeferredImport) return false; 1125 if (other is! _DeclaredDeferredImport) return false;
1125 return declaration == other.declaration; 1126 return declaration == other.declaration;
1126 } 1127 }
1127 1128
1128 int get hashCode => declaration.hashCode * 17; 1129 int get hashCode => declaration.hashCode * 17;
1129 1130
1130 String toString() => '$declaration'; 1131 String toString() => '$declaration';
1131 } 1132 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | tests/compiler/dart2js_extra/dart2js_extra.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698