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

Unified Diff: pkg/kernel/lib/target/targets.dart

Issue 2897683002: Move code for instantiating Invocation to Target. (Closed)
Patch Set: Rename vmTarget to targetInfo. Created 3 years, 7 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/kernel/lib/target/flutter.dart ('k') | pkg/kernel/lib/target/vm.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/target/targets.dart
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 4ac768d08ba341e0ff30fbac9f3347f2ca9bddb4..2b1f49194513aaa26822f39588b9b447b1a48813 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -80,6 +80,11 @@ abstract class Target {
/// not to apply these transformations.
void performGlobalTransformations(Program program);
+ /// Builds an expression that instantiates an [Invocation] that can be passed
+ /// to [noSuchMethod].
+ Expression instantiateInvocation(Member target, Expression receiver,
+ String name, Arguments arguments, int offset, bool isSuper);
+
String toString() => 'Target($name)';
}
@@ -93,4 +98,10 @@ class NoneTarget extends Target {
List<String> get extraRequiredLibraries => <String>[];
void performModularTransformations(Program program) {}
void performGlobalTransformations(Program program) {}
+
+ @override
+ Expression instantiateInvocation(Member target, Expression receiver,
+ String name, Arguments arguments, int offset, bool isSuper) {
+ return new InvalidExpression();
+ }
}
« no previous file with comments | « pkg/kernel/lib/target/flutter.dart ('k') | pkg/kernel/lib/target/vm.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698