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

Unified Diff: pkg/front_end/lib/src/fasta/target.dart

Issue 2832353002: Add support for building patched_sdk and platform.dill for dart2js: (Closed)
Patch Set: rebase Created 3 years, 8 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
Index: pkg/front_end/lib/src/fasta/target.dart
diff --git a/pkg/front_end/lib/src/fasta/target.dart b/pkg/front_end/lib/src/fasta/target.dart
index 76f8ad3569a35e62f601ad0a03aa02013056b8a5..d66156b645df721c4862c48e9f146a8ce9a67abd 100644
--- a/pkg/front_end/lib/src/fasta/target.dart
+++ b/pkg/front_end/lib/src/fasta/target.dart
@@ -15,7 +15,18 @@ import 'ticker.dart' show Ticker;
abstract class Target {
final Ticker ticker;
- Target(this.ticker);
+ /// Denotes whether the output of this target will be used for dart2js,
+ /// otherwise it is assumed it will be used for the VM.
+ // TODO(sigmund): investigate better ways to configure this. This is used for
+ // three purposes today: determine how to handle the `native` clauses (which
+ // are different in the vm and dartjs patch-files), determine which libraries
+ // to include when building the sdk, and which transformations to run when
+ // linking a program.
+ final bool forDart2js;
+
+ bool get forVm => !forDart2js;
+
+ Target(this.ticker, this.forDart2js);
/// Instructs this target to include [uri] in its result.
void read(Uri uri);

Powered by Google App Engine
This is Rietveld 408576698