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

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

Issue 22398008: Refactor and reorganize type inference classes before porting ConcreteTypesInferrer to InferrerVisi… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to head and fix imports in tests Created 7 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
Index: sdk/lib/_internal/compiler/implementation/types/container_tracer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/types/container_tracer.dart b/sdk/lib/_internal/compiler/implementation/types/container_tracer.dart
index ab3f99868d74ce800b0ee356fb36b862c139dad3..caf28f09e04093fd083eea472dbea3e954d9f711 100644
--- a/sdk/lib/_internal/compiler/implementation/types/container_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/container_tracer.dart
@@ -12,6 +12,7 @@ import '../util/util.dart' show Link;
import 'simple_types_inferrer.dart'
show InferrerEngine, InferrerVisitor, LocalsHandler;
import 'types.dart';
+import 'inferrer_visitor.dart';
/**
* A set of selector names that [List] implements, that we know do not
@@ -179,7 +180,7 @@ class TracerForConcreteContainer {
/**
* A set of selectors that both use and update the list, for example
- * [: list[0]++; :] or [: list[0] |= 42; :].
+ * [: list[0]++; :] or [: list[0] |= 42; :].
*/
final Set<Selector> constraints = new Set<Selector>();
@@ -326,7 +327,7 @@ class TracerForConcreteContainer {
return analyzedNode == resolved;
} else {
assert(resolved is Element);
- return escapingElements.contains(resolved);
+ return escapingElements.contains(resolved);
}
}
@@ -335,7 +336,8 @@ class TracerForConcreteContainer {
}
}
-class ContainerTracerVisitor extends InferrerVisitor<TypeMask> {
+class ContainerTracerVisitor
+ extends InferrerVisitor<TypeMask, InferrerEngine<TypeMask>> {
final Element analyzedElement;
final TracerForConcreteContainer tracer;
final bool visitingClosure;
@@ -746,7 +748,7 @@ class ContainerTracerVisitor extends InferrerVisitor<TypeMask> {
if (node.expression == null) {
return types.nullType;
}
-
+
TypeMask type;
bool isEscaping = visitAndCatchEscaping(() {
type = visit(node.expression);
@@ -761,7 +763,7 @@ class ContainerTracerVisitor extends InferrerVisitor<TypeMask> {
}
return type;
}
-
+
TypeMask visitForIn(ForIn node) {
visit(node.expression);
Selector iteratorSelector = elements.getIteratorSelector(node);

Powered by Google App Engine
This is Rietveld 408576698