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

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: merged 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 c532a4256796de3fd81ce9644fdd3bc2c60e5640..b72144152b0eb56fa3026fffa48ddb30cce74ed7 100644
--- a/lib/src/codegen/reify_coercions.dart
+++ b/lib/src/codegen/reify_coercions.dart
@@ -9,11 +9,11 @@ import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/ast/utilities.dart' show NodeReplacer;
import 'package:analyzer/src/generated/type_system.dart'
show StrongTypeSystemImpl;
+import 'package:analyzer/src/task/strong/info.dart';
import 'package:logging/logging.dart' as logger;
-import '../info.dart';
-import '../utils.dart' show getStaticType;
import 'ast_builder.dart';
+import '../utils.dart' show getStaticType;
final _log = new logger.Logger('dev_compiler.reify_coercions');
@@ -33,17 +33,18 @@ class NewTypeIdDesc {
// This class implements a pass which modifies (in place) the ast replacing
// abstract coercion nodes with their dart implementations.
class CoercionReifier extends analyzer.GeneralizingAstVisitor<Object> {
- final LibraryUnit _library;
final StrongTypeSystemImpl _typeSystem;
- CoercionReifier(this._library, this._typeSystem);
+ CoercionReifier(this._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
- void reify() {
- _library.partsThenLibrary.forEach(visitCompilationUnit);
+ /// 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
+ void reify(List<CompilationUnit> units) {
+ units.forEach(visitCompilationUnit);
}
@override
« 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