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

Unified Diff: pkg/compiler/lib/src/inferrer/node_tracer.dart

Issue 1498643002: Minor cleanup in inferrer folder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/inferrer/node_tracer.dart
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index 371adb52977b2fa807c05225638379bbc3817008..174ae56847196aa705c4c15e42924db8d49ba5d4 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -2,7 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-part of type_graph_inferrer;
+library compiler.src.inferrer.node_tracer;
+
+import '../common/names.dart' show Identifiers;
+import '../compiler.dart' show Compiler;
+import '../elements/elements.dart';
+import '../types/types.dart' show ContainerTypeMask, MapTypeMask;
+import '../util/util.dart' show Setlet;
+
+import 'type_graph_inferrer.dart' show TypeGraphInferrerEngine;
+import 'type_graph_nodes.dart';
+import 'debug.dart' as debug;
// A set of selectors we know do not escape the elements inside the
// list.
@@ -64,6 +74,7 @@ Set<String> doesNotEscapeMapSet = new Set<String>.from(
'keys'
]);
+/// Common logic to trace a value through the type inference graph nodes.
abstract class TracerVisitor<T extends TypeInformation>
implements TypeInformationVisitor {
final T tracedType;
@@ -136,7 +147,7 @@ abstract class TracerVisitor<T extends TypeInformation>
}
void bailout(String reason) {
- if (_VERBOSE) {
+ if (debug.VERBOSE) {
print('Bailing out on $tracedType because: $reason');
}
continueAnalyzing = false;
@@ -202,7 +213,7 @@ abstract class TracerVisitor<T extends TypeInformation>
flow.users.forEach((user) {
if (user is !DynamicCallSiteTypeInformation) return;
if (user.receiver != flow) return;
- if (inferrer._returnsListElementTypeSet.contains(user.selector)) {
+ if (inferrer.returnsListElementTypeSet.contains(user.selector)) {
addNewEscapeInformation(user);
} else if (!doesNotEscapeListSet.contains(user.selector.name)) {
bailout('Escape from a list via [${user.selector.name}]');
« no previous file with comments | « pkg/compiler/lib/src/inferrer/map_tracer.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698