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

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

Issue 804333002: Add CoreTypes interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/mirrors_used.dart
diff --git a/pkg/compiler/lib/src/mirrors_used.dart b/pkg/compiler/lib/src/mirrors_used.dart
index 208904edeb8b8e7ddec86332d5eae1a27ef3f694..5c2476c2b84df35b003bbd4c744c6a6f9f22b2a9 100644
--- a/pkg/compiler/lib/src/mirrors_used.dart
+++ b/pkg/compiler/lib/src/mirrors_used.dart
@@ -265,7 +265,8 @@ class MirrorUsageAnalyzer {
List<MirrorUsage> result = <MirrorUsage>[];
for (MetadataAnnotation metadata in tag.metadata) {
metadata.ensureResolved(compiler);
- Element element = metadata.constant.value.computeType(compiler).element;
+ Element element =
+ metadata.constant.value.getType(compiler.coreTypes).element;
if (element == compiler.mirrorsUsedClass) {
result.add(buildUsage(metadata.constant.value));
}
@@ -438,7 +439,7 @@ class MirrorUsageBuilder {
/// Find the first non-implementation interface of constant.
DartType apiTypeOf(ConstantValue constant) {
- DartType type = constant.computeType(compiler);
+ DartType type = constant.getType(compiler.coreTypes);
LibraryElement library = type.element.library;
if (type.isInterfaceType && library.isInternalLibrary) {
InterfaceType interface = type;

Powered by Google App Engine
This is Rietveld 408576698