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

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

Issue 2610513005: Use Entity instead of Element in ConstantValue (Closed)
Patch Set: Created 3 years, 12 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/mirrors_used.dart
diff --git a/pkg/compiler/lib/src/mirrors_used.dart b/pkg/compiler/lib/src/mirrors_used.dart
index 3c20fc943592b1384811cee617483d3169287122..2d7a88c25d992a1451ed444f87e7819d0aeb9596 100644
--- a/pkg/compiler/lib/src/mirrors_used.dart
+++ b/pkg/compiler/lib/src/mirrors_used.dart
@@ -21,11 +21,11 @@ import 'elements/elements.dart'
show
ClassElement,
Element,
+ FieldElement,
ImportElement,
LibraryElement,
MetadataAnnotation,
- ScopeContainerElement,
- VariableElement;
+ ScopeContainerElement;
import 'resolution/tree_elements.dart' show TreeElements;
import 'tree/tree.dart' show NamedArgument, NewExpression, Node;
@@ -314,12 +314,12 @@ class MirrorUsageAnalyzer {
/// Convert a [constant] to an instance of [MirrorUsage] using information
/// that was resolved during [MirrorUsageAnalyzerTask.validate].
MirrorUsage buildUsage(ConstructedConstantValue constant) {
- Map<Element, ConstantValue> fields = constant.fields;
+ Map<FieldElement, ConstantValue> fields = constant.fields;
ClassElement cls = compiler.commonElements.mirrorsUsedClass;
- VariableElement symbolsField = cls.lookupLocalMember('symbols');
- VariableElement targetsField = cls.lookupLocalMember('targets');
- VariableElement metaTargetsField = cls.lookupLocalMember('metaTargets');
- VariableElement overrideField = cls.lookupLocalMember('override');
+ FieldElement symbolsField = cls.lookupLocalMember('symbols');
+ FieldElement targetsField = cls.lookupLocalMember('targets');
+ FieldElement metaTargetsField = cls.lookupLocalMember('metaTargets');
+ FieldElement overrideField = cls.lookupLocalMember('override');
return new MirrorUsage(
cachedStrings[fields[symbolsField]],
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel_visitor.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698