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_library_builder; | 5 library fasta.source_library_builder; |
6 | 6 |
7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; | 7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; |
8 | 8 |
9 import '../combinator.dart' show Combinator; | 9 import '../combinator.dart' show Combinator; |
10 | 10 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 int typeCount = types.length; | 448 int typeCount = types.length; |
449 for (T t in types) { | 449 for (T t in types) { |
450 t.resolveIn(scope); | 450 t.resolveIn(scope); |
451 } | 451 } |
452 forEach((String name, Builder member) { | 452 forEach((String name, Builder member) { |
453 typeCount += member.resolveTypes(this); | 453 typeCount += member.resolveTypes(this); |
454 }); | 454 }); |
455 return typeCount; | 455 return typeCount; |
456 } | 456 } |
457 | 457 |
| 458 @override |
458 int resolveConstructors(_) { | 459 int resolveConstructors(_) { |
459 int count = 0; | 460 int count = 0; |
460 forEach((String name, Builder member) { | 461 forEach((String name, Builder member) { |
461 count += member.resolveConstructors(this); | 462 count += member.resolveConstructors(this); |
462 }); | 463 }); |
463 return count; | 464 return count; |
464 } | 465 } |
465 | 466 |
466 List<TypeVariableBuilder> copyTypeVariables( | 467 List<TypeVariableBuilder> copyTypeVariables( |
467 List<TypeVariableBuilder> original); | 468 List<TypeVariableBuilder> original); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 547 } |
547 | 548 |
548 /// Called to register [procedure] as a factory whose types are collected in | 549 /// Called to register [procedure] as a factory whose types are collected in |
549 /// [factoryDeclaration]. Later, once the class has been built, we can | 550 /// [factoryDeclaration]. Later, once the class has been built, we can |
550 /// synthesize type variables on the factory matching the class'. | 551 /// synthesize type variables on the factory matching the class'. |
551 void addFactoryDeclaration( | 552 void addFactoryDeclaration( |
552 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { | 553 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { |
553 factoryDeclarations[procedure] = factoryDeclaration; | 554 factoryDeclarations[procedure] = factoryDeclaration; |
554 } | 555 } |
555 } | 556 } |
OLD | NEW |