| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 } | 245 } |
| 246 | 246 |
| 247 void finishTypeVariables(ClassBuilder object) { | 247 void finishTypeVariables(ClassBuilder object) { |
| 248 int count = 0; | 248 int count = 0; |
| 249 builders.forEach((Uri uri, LibraryBuilder library) { | 249 builders.forEach((Uri uri, LibraryBuilder library) { |
| 250 count += library.finishTypeVariables(object); | 250 count += library.finishTypeVariables(object); |
| 251 }); | 251 }); |
| 252 ticker.logMs("Resolved $count type-variable bounds"); | 252 ticker.logMs("Resolved $count type-variable bounds"); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void finishNativeMethods() { |
| 256 int count = 0; |
| 257 builders.forEach((Uri uri, LibraryBuilder library) { |
| 258 count += library.finishNativeMethods(); |
| 259 }); |
| 260 ticker.logMs("Finished $count native methods"); |
| 261 } |
| 262 |
| 255 /// Returns all the supertypes (including interfaces) of [cls] | 263 /// Returns all the supertypes (including interfaces) of [cls] |
| 256 /// transitively. Includes [cls]. | 264 /// transitively. Includes [cls]. |
| 257 Set<ClassBuilder> allSupertypes(ClassBuilder cls) { | 265 Set<ClassBuilder> allSupertypes(ClassBuilder cls) { |
| 258 int length = 0; | 266 int length = 0; |
| 259 Set<ClassBuilder> result = new Set<ClassBuilder>()..add(cls); | 267 Set<ClassBuilder> result = new Set<ClassBuilder>()..add(cls); |
| 260 while (length != result.length) { | 268 while (length != result.length) { |
| 261 length = result.length; | 269 length = result.length; |
| 262 result.addAll(directSupertypes(result)); | 270 result.addAll(directSupertypes(result)); |
| 263 } | 271 } |
| 264 return result; | 272 return result; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 ticker.logMs("Built analyzer element model."); | 354 ticker.logMs("Built analyzer element model."); |
| 347 } | 355 } |
| 348 | 356 |
| 349 void computeHierarchy(Program program) { | 357 void computeHierarchy(Program program) { |
| 350 hierarchy = new ClassHierarchy(program); | 358 hierarchy = new ClassHierarchy(program); |
| 351 ticker.logMs("Computed class hierarchy"); | 359 ticker.logMs("Computed class hierarchy"); |
| 352 coreTypes = new CoreTypes(program); | 360 coreTypes = new CoreTypes(program); |
| 353 ticker.logMs("Computed core types"); | 361 ticker.logMs("Computed core types"); |
| 354 } | 362 } |
| 355 } | 363 } |
| OLD | NEW |