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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart

Issue 111423003: Add a new node in the inferrer to materialize literal maps. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart (revision 30992)
+++ sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart (working copy)
@@ -170,7 +170,7 @@
bool _VERBOSE = false;
class ContainerTracerVisitor implements TypeInformationVisitor {
- final ContainerTypeInformation container;
+ final ListTypeInformation container;
final TypeGraphInferrerEngine inferrer;
final Compiler compiler;
@@ -183,8 +183,8 @@
// [TypeInformation] that may be [container]. We know [container]
// has been stored in these containers and we must check how
// [container] escapes from these containers.
- final List<ContainerTypeInformation> containersToAnalyze =
- <ContainerTypeInformation>[];
+ final List<ListTypeInformation> containersToAnalyze =
+ <ListTypeInformation>[];
// The current [TypeInformation] in the analysis.
TypeInformation currentUser;
@@ -259,10 +259,14 @@
addNewEscapeInformation(info);
}
- visitContainerTypeInformation(ContainerTypeInformation info) {
+ visitListTypeInformation(ListTypeInformation info) {
containersToAnalyze.add(info);
}
+ visitMapTypeInformation(MapTypeInformation info) {
+ bailout('Stored in a map');
+ }
+
visitConcreteTypeInformation(ConcreteTypeInformation info) {}
visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) {
@@ -279,7 +283,7 @@
}
}
- void analyzeStoredIntoContainer(ContainerTypeInformation container) {
+ void analyzeStoredIntoContainer(ListTypeInformation container) {
inferrer.analyzeContainer(container);
if (container.bailedOut) {
bailout('Stored in a container that bailed out');
@@ -348,8 +352,8 @@
} else if (isAddedToContainer(info)) {
ContainerTypeMask mask = info.receiver.type;
if (mask.allocationNode != null) {
- ContainerTypeInformation container =
- inferrer.types.allocatedContainers[mask.allocationNode];
+ ListTypeInformation container =
+ inferrer.types.allocatedLists[mask.allocationNode];
containersToAnalyze.add(container);
} else {
// The [ContainerTypeMask] is a union of two containers, and
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698