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

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

Issue 1528953002: Tweaks to improve performance of type-inference. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 8fd7e6c9724f481bbbd36bf24bf96d83c1769c63..22adbfa033afd83fd2c540b5b9a643152b80edfd 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -310,6 +310,8 @@ class World implements ClassWorld {
/// Returns `true` if all directly instantiated classes that implement [cls]
/// extend it.
bool hasOnlySubclasses(ClassElement cls) {
+ // TODO(johnniwinther): move this to ClassSet?
+ if (cls == objectClass) return true;
Iterable<ClassElement> subtypes = strictSubtypesOf(cls);
if (subtypes == null) return true;
Iterable<ClassElement> subclasses = strictSubclassesOf(cls);

Powered by Google App Engine
This is Rietveld 408576698