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

Unified Diff: pkg/fasta/lib/src/target_implementation.dart

Issue 2634453004: Fasta infrastructure. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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 | « pkg/fasta/lib/src/target.dart ('k') | pkg/fasta/lib/src/ticker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/target_implementation.dart
diff --git a/pkg/fasta/lib/src/target_implementation.dart b/pkg/fasta/lib/src/target_implementation.dart
new file mode 100644
index 0000000000000000000000000000000000000000..b70e0f776090c4612bb60b345d20217d78142920
--- /dev/null
+++ b/pkg/fasta/lib/src/target_implementation.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.target_implementation;
+
+import 'builder/builder.dart' show
+ ClassBuilder,
+ LibraryBuilder;
+
+import 'target.dart' show
+ Target;
+
+import 'ticker.dart' show
+ Ticker;
+
+import 'translate_uri.dart' show
+ TranslateUri;
+
+/// Provides the implementation details used by a loader for a target.
+abstract class TargetImplementation extends Target {
+ final TranslateUri uriTranslator;
+
+ TargetImplementation(Ticker ticker, this.uriTranslator)
+ : super(ticker);
+
+ /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist
+ /// already.
+ LibraryBuilder createLibraryBuilder(Uri uri);
+
+ /// Add the classes extended or implemented directly by [cls] to [set].
+ void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set);
+
+ /// Returns all classes that will be included in the resulting program.
+ List<ClassBuilder> collectAllClasses();
+
+ /// The class [cls] is involved in a cyclic definition. This method should
+ /// ensure that the cycle is broken, for example, by removing superclass and
+ /// implemented interfaces.
+ void breakCycle(ClassBuilder cls);
+
+ Uri translateUri(Uri uri) => uriTranslator.translate(uri);
+}
« no previous file with comments | « pkg/fasta/lib/src/target.dart ('k') | pkg/fasta/lib/src/ticker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698