Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Unified Diff: lib/src/codegen/reify_coercions.dart

Issue 1788973002: Remove code that requires whole-program compile (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/codegen/js_printer.dart ('k') | lib/src/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « lib/src/codegen/js_printer.dart ('k') | lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698