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

Unified Diff: pkg/compiler/lib/src/elements/common.dart

Issue 1402913003: Avoid creating invalid TypeMask.nonNullExact (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years, 2 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 | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | pkg/compiler/lib/src/ssa/codegen.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/common.dart
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index 9d0458229d63dbeddfc38b4cb521c2d630306382..f9c4e59201d82ebf3b347d49a57da339f3e362c6 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -406,13 +406,8 @@ abstract class ClassElementCommon implements ClassElement {
@override
bool implementsInterface(ClassElement intrface) {
- for (DartType implementedInterfaceType in allSupertypes) {
- ClassElement implementedInterface = implementedInterfaceType.element;
- if (identical(implementedInterface, intrface)) {
- return true;
- }
- }
- return false;
+ return this != intrface &&
+ allSupertypesAndSelf.asInstanceOf(intrface) != null;
Johnni Winther 2015/10/13 10:14:55 Optimization
}
@override
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | pkg/compiler/lib/src/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698