OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 /** | 7 /** |
8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
9 * compiled. | 9 * compiled. |
10 */ | 10 */ |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 loadedLibraries.containsLibrary(DART_MIRRORS)) { | 1327 loadedLibraries.containsLibrary(DART_MIRRORS)) { |
1328 // TODO(johnniwinther): Move computation of dependencies to the library | 1328 // TODO(johnniwinther): Move computation of dependencies to the library |
1329 // loader. | 1329 // loader. |
1330 Uri rootUri = loadedLibraries.rootUri; | 1330 Uri rootUri = loadedLibraries.rootUri; |
1331 Set<String> importChains = new Set<String>(); | 1331 Set<String> importChains = new Set<String>(); |
1332 // The maximum number of full imports chains to process. | 1332 // The maximum number of full imports chains to process. |
1333 final int chainLimit = 10000; | 1333 final int chainLimit = 10000; |
1334 // The maximum number of imports chains to show. | 1334 // The maximum number of imports chains to show. |
1335 final int compactChainLimit = verbose ? 20 : 10; | 1335 final int compactChainLimit = verbose ? 20 : 10; |
1336 int chainCount = 0; | 1336 int chainCount = 0; |
1337 bool limitExceeded = false; | |
1338 loadedLibraries.forEachImportChain(DART_MIRRORS, | 1337 loadedLibraries.forEachImportChain(DART_MIRRORS, |
1339 callback: (Link<Uri> importChainReversed) { | 1338 callback: (Link<Uri> importChainReversed) { |
1340 Link<CodeLocation> compactImportChain = const Link<CodeLocation>(); | 1339 Link<CodeLocation> compactImportChain = const Link<CodeLocation>(); |
1341 CodeLocation currentCodeLocation = | 1340 CodeLocation currentCodeLocation = |
1342 new UriLocation(importChainReversed.head); | 1341 new UriLocation(importChainReversed.head); |
1343 compactImportChain = compactImportChain.prepend(currentCodeLocation); | 1342 compactImportChain = compactImportChain.prepend(currentCodeLocation); |
1344 for (Link<Uri> link = importChainReversed.tail; | 1343 for (Link<Uri> link = importChainReversed.tail; |
1345 !link.isEmpty; | 1344 !link.isEmpty; |
1346 link = link.tail) { | 1345 link = link.tail) { |
1347 Uri uri = link.head; | 1346 Uri uri = link.head; |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 InterfaceType streamType([DartType elementType]) { | 2507 InterfaceType streamType([DartType elementType]) { |
2509 InterfaceType type = streamClass.computeType(compiler); | 2508 InterfaceType type = streamClass.computeType(compiler); |
2510 if (elementType == null) { | 2509 if (elementType == null) { |
2511 return streamClass.rawType; | 2510 return streamClass.rawType; |
2512 } | 2511 } |
2513 return type.createInstantiation([elementType]); | 2512 return type.createInstantiation([elementType]); |
2514 } | 2513 } |
2515 } | 2514 } |
2516 | 2515 |
2517 typedef void InternalErrorFunction(Spannable location, String message); | 2516 typedef void InternalErrorFunction(Spannable location, String message); |
OLD | NEW |