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

Unified Diff: pkg/compiler/lib/src/core_types.dart

Issue 2609063002: Further reduce use of Element in codegen. (Closed)
Patch Set: Created 3 years, 12 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/compiler/lib/src/core_types.dart
diff --git a/pkg/compiler/lib/src/core_types.dart b/pkg/compiler/lib/src/core_types.dart
index 6f70cbb8bc078644ec69f1d09f5b4ab1d097095b..6f2f59fbd8f2642efb4db50551e5415b1a237988 100644
--- a/pkg/compiler/lib/src/core_types.dart
+++ b/pkg/compiler/lib/src/core_types.dart
@@ -199,4 +199,13 @@ abstract class CommonElements {
///
/// If no type argument is provided, the canonical raw type is returned.
InterfaceType streamType([DartType elementType]);
+
+ /// Returns `true` if [element] is a superclass of `String` or `num`.
+ bool isNumberOrStringSupertype(ClassElement element);
+
+ /// Returns `true` if [element] is a superclass of `String`.
+ bool isStringOnlySupertype(ClassElement element);
+
+ /// Returns `true` if [element] is a superclass of `List`.
+ bool isListSupertype(ClassElement element);
}

Powered by Google App Engine
This is Rietveld 408576698