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

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

Issue 2808763005: Extract OrderedTypeSetBuilderBase from OrderedTypeSetBuilder (Closed)
Patch Set: Created 3 years, 8 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/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
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 1a740e3a04bd1725ea63da02ba6ec05ae989aabe..9a487064383f07ab4c26143b6ced8851db5f0b0d 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -11,6 +11,7 @@ import '../common_elements.dart' show CommonElements;
import '../util/util.dart' show Link;
import 'entities.dart';
import 'elements.dart';
+import 'types.dart';
import 'resolution_types.dart'
show ResolutionDartType, ResolutionInterfaceType, ResolutionFunctionType;
@@ -190,7 +191,7 @@ abstract class CompilationUnitElementCommon implements CompilationUnitElement {}
abstract class ClassElementCommon implements ClassElement {
@override
- Link<ResolutionDartType> get allSupertypes => allSupertypesAndSelf.supertypes;
+ Link<InterfaceType> get allSupertypes => allSupertypesAndSelf.supertypes;
@override
int get hierarchyDepth => allSupertypesAndSelf.maxDepth;
@@ -198,7 +199,7 @@ abstract class ClassElementCommon implements ClassElement {
@override
ResolutionInterfaceType asInstanceOf(ClassElement cls) {
if (cls == this) return thisType;
- return allSupertypesAndSelf.asInstanceOf(cls);
+ return allSupertypesAndSelf.asInstanceOf(cls, cls.hierarchyDepth);
}
@override
@@ -435,9 +436,11 @@ abstract class ClassElementCommon implements ClassElement {
}
@override
- bool implementsInterface(ClassElement intrface) {
- return this != intrface &&
- allSupertypesAndSelf.asInstanceOf(intrface) != null;
+ bool implementsInterface(ClassElement interface) {
+ return this != interface &&
+ allSupertypesAndSelf.asInstanceOf(
+ interface, interface.hierarchyDepth) !=
+ null;
}
@override
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698