Index: lib/src/codegen/reify_coercions.dart |
diff --git a/lib/src/codegen/reify_coercions.dart b/lib/src/codegen/reify_coercions.dart |
index 184aea535919fd290e4d5f7ebec04ab772ff8462..ede5f0745f68f86370bd7888ee38c22210358e14 100644 |
--- a/lib/src/codegen/reify_coercions.dart |
+++ b/lib/src/codegen/reify_coercions.dart |
@@ -7,9 +7,9 @@ import 'package:analyzer/src/generated/ast.dart'; |
import 'package:analyzer/src/generated/element.dart'; |
import 'package:analyzer/src/generated/type_system.dart' |
show StrongTypeSystemImpl; |
-import 'package:logging/logging.dart' as logger; |
+import 'package:analyzer/src/task/strong/info.dart'; |
-import '../info.dart'; |
+import 'package:logging/logging.dart' as logger; |
import 'ast_builder.dart'; |
@@ -43,26 +43,27 @@ class CoercionReifier extends analyzer.GeneralizingAstVisitor<Object> { |
final CoercionManager _cm; |
final TypeManager _tm; |
final VariableManager _vm; |
- final LibraryUnit _library; |
final StrongTypeSystemImpl _typeSystem; |
- CoercionReifier._( |
- this._cm, this._tm, this._vm, this._library, this._typeSystem); |
+ CoercionReifier._(this._cm, this._tm, this._vm, this._typeSystem); |
factory CoercionReifier( |
- LibraryUnit library, StrongTypeSystemImpl typeSystem) { |
+ LibraryElement library, StrongTypeSystemImpl typeSystem) { |
var vm = new VariableManager(); |
- var tm = new TypeManager(library.library.element.enclosingElement, vm); |
+ var tm = new TypeManager(library, vm); |
var cm = new CoercionManager(vm, tm); |
- return new CoercionReifier._(cm, tm, vm, library, typeSystem); |
+ return new CoercionReifier._(cm, tm, vm, typeSystem); |
} |
// This should be the entry point for this class. Entering via the |
// visit functions directly may not do the right thing with respect |
// to discharging the collected definitions. |
// Returns the set of new type identifiers added by the reifier |
- Map<Identifier, NewTypeIdDesc> reify() { |
- _library.partsThenLibrary.forEach(visitCompilationUnit); |
+ Map<Identifier, NewTypeIdDesc> reify(List<CompilationUnit> units) { |
+ units.forEach(visitCompilationUnit); |
+ // TODO(jmesserly): what is going on here? We are dropping these typedefs |
Jennifer Messerly
2016/03/12 01:37:36
Note, I actually fixed this TODO already in: https
|
+ // on the floor. Either they aren't needed when compiling to JS, or we |
+ // need to emit something for them. |
return _tm.addedTypes; |
} |