| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.source_loader; | 5 library fasta.source_loader; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future; | 8 Future; |
| 9 | 9 |
| 10 import 'dart:io' show | 10 import 'dart:io' show |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 void resolveConstructors() { | 239 void resolveConstructors() { |
| 240 int count = 0; | 240 int count = 0; |
| 241 builders.forEach((Uri uri, LibraryBuilder library) { | 241 builders.forEach((Uri uri, LibraryBuilder library) { |
| 242 count += library.resolveConstructors(null); | 242 count += library.resolveConstructors(null); |
| 243 }); | 243 }); |
| 244 ticker.logMs("Resolved $count constructors"); | 244 ticker.logMs("Resolved $count constructors"); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void finishTypeVariables(ClassBuilder object) { |
| 248 int count = 0; |
| 249 builders.forEach((Uri uri, LibraryBuilder library) { |
| 250 count += library.finishTypeVariables(object); |
| 251 }); |
| 252 ticker.logMs("Resolved $count type-variable bounds"); |
| 253 } |
| 254 |
| 247 /// Returns all the supertypes (including interfaces) of [cls] | 255 /// Returns all the supertypes (including interfaces) of [cls] |
| 248 /// transitively. Includes [cls]. | 256 /// transitively. Includes [cls]. |
| 249 Set<ClassBuilder> allSupertypes(ClassBuilder cls) { | 257 Set<ClassBuilder> allSupertypes(ClassBuilder cls) { |
| 250 int length = 0; | 258 int length = 0; |
| 251 Set<ClassBuilder> result = new Set<ClassBuilder>()..add(cls); | 259 Set<ClassBuilder> result = new Set<ClassBuilder>()..add(cls); |
| 252 while (length != result.length) { | 260 while (length != result.length) { |
| 253 length = result.length; | 261 length = result.length; |
| 254 result.addAll(directSupertypes(result)); | 262 result.addAll(directSupertypes(result)); |
| 255 } | 263 } |
| 256 return result; | 264 return result; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 ticker.logMs("Built analyzer element model."); | 346 ticker.logMs("Built analyzer element model."); |
| 339 } | 347 } |
| 340 | 348 |
| 341 void computeHierarchy(Program program) { | 349 void computeHierarchy(Program program) { |
| 342 hierarchy = new ClassHierarchy(program); | 350 hierarchy = new ClassHierarchy(program); |
| 343 ticker.logMs("Computed class hierarchy"); | 351 ticker.logMs("Computed class hierarchy"); |
| 344 coreTypes = new CoreTypes(program); | 352 coreTypes = new CoreTypes(program); |
| 345 ticker.logMs("Computed core types"); | 353 ticker.logMs("Computed core types"); |
| 346 } | 354 } |
| 347 } | 355 } |
| OLD | NEW |