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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/glue.dart

Issue 1627333002: Optimize subclass/subtype queries (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Use strictSubtypeCount Created 4 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
Index: pkg/compiler/lib/src/js_backend/codegen/glue.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
index b7d4c2406ab5c2cde92e517fe1cf43a1ff2482e0..46ef1a55726e54bff1e66cd449523faf111ae878 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
@@ -228,8 +228,7 @@ class Glue {
ClassWorld classWorld = _compiler.world;
if (classWorld.isUsedAsMixin(cls)) return true;
- Iterable<ClassElement> subclasses = _compiler.world.strictSubclassesOf(cls);
- return subclasses.any((ClassElement subclass) {
+ return _compiler.world.anyStrictSubclassOf(cls, (ClassElement subclass) {
return !_backend.rti.isTrivialSubstitution(subclass, cls);
});
}

Powered by Google App Engine
This is Rietveld 408576698