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

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

Issue 2265473004: Introduce "CommonElements" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cl Created 4 years, 4 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/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/elements.dart
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index e80ea6beef9b2d3d656c6e8670938a5a6dd695e9..1df89f88f544ec912a55c7566b5c0984110e0874 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -675,17 +675,17 @@ class Elements {
}
static bool isNumberOrStringSupertype(Element element, Compiler compiler) {
- LibraryElement coreLibrary = compiler.coreLibrary;
+ LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
return (element == coreLibrary.find('Comparable'));
}
static bool isStringOnlySupertype(Element element, Compiler compiler) {
- LibraryElement coreLibrary = compiler.coreLibrary;
+ LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
return element == coreLibrary.find('Pattern');
}
static bool isListSupertype(Element element, Compiler compiler) {
- LibraryElement coreLibrary = compiler.coreLibrary;
+ LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
return element == coreLibrary.find('Iterable');
}
@@ -794,14 +794,15 @@ class Elements {
static bool isConstructorOfTypedArraySubclass(
Element element, Compiler compiler) {
- if (compiler.typedDataLibrary == null) return false;
+ if (compiler.commonElements.typedDataLibrary == null) return false;
if (!element.isConstructor) return false;
ConstructorElement constructor = element.implementation;
constructor = constructor.effectiveTarget;
ClassElement cls = constructor.enclosingClass;
- return cls.library == compiler.typedDataLibrary &&
+ return cls.library == compiler.commonElements.typedDataLibrary &&
compiler.backend.isNative(cls) &&
- compiler.world.isSubtypeOf(cls, compiler.typedDataClass) &&
+ compiler.world
+ .isSubtypeOf(cls, compiler.commonElements.typedDataClass) &&
compiler.world.isSubtypeOf(cls, compiler.coreClasses.listClass) &&
constructor.name == '';
}
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698