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

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

Issue 2933363003: Add ClosureRepresentationInfo, the new public face of ClosureClassMap (Closed)
Patch Set: . Created 3 years, 6 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/dump_info.dart
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index fcecf0c44d08cf56cf4a2e240b71399ec571e45c..6b039a918039382fdaa4fe1edfb897da4a52baed 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -32,7 +32,7 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
final ClosedWorld closedWorld;
final AllInfo result = new AllInfo();
- final Map<Element, Info> _elementToInfo = <Element, Info>{};
+ final Map<Entity, Info> _elementToInfo = <Entity, Info>{};
final Map<ConstantValue, Info> _constantToInfo = <ConstantValue, Info>{};
final Map<OutputUnit, OutputUnitInfo> _outputToInfo = {};
@@ -65,7 +65,7 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
}
/// Visits [element] and produces it's corresponding info.
- Info process(Element element) {
+ Info process(Entity element) {
// TODO(sigmund): change the visit order to eliminate the need to check
// whether or not an element has been processed.
return _elementToInfo.putIfAbsent(element, () => visit(element));
@@ -214,11 +214,12 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
size: compiler.dumpInfoTask.sizeOf(element));
_elementToInfo[element] = closureInfo;
- ClosureClassMap closureMap = compiler.closureToClassMapper
- .getClosureToClassMapping(element.methodElement);
- assert(closureMap != null && closureMap.closureClassElement == element);
+ ClosureRepresentationInfo closureRepresentation = compiler
+ .closureToClassMapper
+ .getClosureRepresentationInfo(element.methodElement);
+ assert(closureRepresentation.closureClassEntity == element);
- FunctionInfo functionInfo = this.process(closureMap.callElement);
+ FunctionInfo functionInfo = this.process(closureRepresentation.callMethod);
if (functionInfo == null) return null;
closureInfo.function = functionInfo;
functionInfo.parent = closureInfo;

Powered by Google App Engine
This is Rietveld 408576698