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:front_end/src/fasta/scanner/token.dart' show SymbolToken, Token; | 7 import 'package:front_end/src/fasta/scanner/token.dart' show SymbolToken, Token; |
8 | 8 |
9 import 'package:front_end/src/fasta/type_inference/type_inferrer.dart' | 9 import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart' |
10 show TypeInferrer; | 10 show TypeInferenceEngine; |
11 | 11 |
12 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; | 12 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; |
13 | 13 |
14 import '../combinator.dart' show Combinator; | 14 import '../combinator.dart' show Combinator; |
15 | 15 |
16 import '../errors.dart' show inputError, internalError; | 16 import '../errors.dart' show inputError, internalError; |
17 | 17 |
18 import '../export.dart' show Export; | 18 import '../export.dart' show Export; |
19 | 19 |
20 import '../import.dart' show Import; | 20 import '../import.dart' show Import; |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 return count; | 478 return count; |
479 } | 479 } |
480 | 480 |
481 List<TypeVariableBuilder> copyTypeVariables( | 481 List<TypeVariableBuilder> copyTypeVariables( |
482 List<TypeVariableBuilder> original); | 482 List<TypeVariableBuilder> original); |
483 | 483 |
484 @override | 484 @override |
485 String get fullNameForErrors => name ?? "<library '$relativeFileUri'>"; | 485 String get fullNameForErrors => name ?? "<library '$relativeFileUri'>"; |
486 | 486 |
487 @override | 487 @override |
488 void prepareInitializerInference(TypeInferrer typeInferrer, | 488 void prepareInitializerInference(TypeInferenceEngine typeInferenceEngine, |
489 LibraryBuilder library, ClassBuilder currentClass) { | 489 LibraryBuilder library, ClassBuilder currentClass) { |
490 forEach((String name, Builder member) { | 490 forEach((String name, Builder member) { |
491 member.prepareInitializerInference(typeInferrer, library, currentClass); | 491 member.prepareInitializerInference( |
| 492 typeInferenceEngine, library, currentClass); |
492 }); | 493 }); |
493 } | 494 } |
494 } | 495 } |
495 | 496 |
496 /// Unlike [Scope], this scope is used during construction of builders to | 497 /// Unlike [Scope], this scope is used during construction of builders to |
497 /// ensure types and members are added to and resolved in the correct location. | 498 /// ensure types and members are added to and resolved in the correct location. |
498 class DeclarationBuilder<T extends TypeBuilder> { | 499 class DeclarationBuilder<T extends TypeBuilder> { |
499 final DeclarationBuilder<T> parent; | 500 final DeclarationBuilder<T> parent; |
500 | 501 |
501 final Map<String, Builder> members; | 502 final Map<String, Builder> members; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 /// synthesize type variables on the factory matching the class'. | 579 /// synthesize type variables on the factory matching the class'. |
579 void addFactoryDeclaration( | 580 void addFactoryDeclaration( |
580 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { | 581 ProcedureBuilder procedure, DeclarationBuilder<T> factoryDeclaration) { |
581 factoryDeclarations[procedure] = factoryDeclaration; | 582 factoryDeclarations[procedure] = factoryDeclaration; |
582 } | 583 } |
583 | 584 |
584 Scope toScope(Scope parent) { | 585 Scope toScope(Scope parent) { |
585 return new Scope(members, setters, parent, isModifiable: false); | 586 return new Scope(members, setters, parent, isModifiable: false); |
586 } | 587 } |
587 } | 588 } |
OLD | NEW |