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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2780513004: [Kernel] Remove code from the old type propagation. (Closed)
Patch Set: Remove empty status file section Created 3 years, 9 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
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | pkg/kernel/lib/transformations/closure/converter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 6682aa04d4ce35eda322ca5102738009344da494..bb7dd93afa4afd9506fcd6294b6209699a0954d9 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -5,7 +5,6 @@ library kernel.ast_to_text;
import '../ast.dart';
import '../import_table.dart';
-import '../type_propagation/type_propagation.dart';
class Namer<T> {
int index = 0;
@@ -157,25 +156,6 @@ abstract class Annotator {
String annotateField(Printer printer, Field node);
}
-class InferredValueAnnotator implements Annotator {
- const InferredValueAnnotator();
-
- String annotateVariable(Printer printer, VariableDeclaration node) {
- if (node.inferredValue == null) return null;
- return printer.getInferredValueString(node.inferredValue);
- }
-
- String annotateReturn(Printer printer, FunctionNode node) {
- if (node.inferredReturnValue == null) return null;
- return printer.getInferredValueString(node.inferredReturnValue);
- }
-
- String annotateField(Printer printer, Field node) {
- if (node.inferredValue == null) return null;
- return printer.getInferredValueString(node.inferredValue);
- }
-}
-
/// A quick and dirty ambiguous text printer.
class Printer extends Visitor<Null> {
final NameSystem syntheticNames;
@@ -197,7 +177,7 @@ class Printer extends Visitor<Null> {
this.showExternal,
this.showOffsets: false,
this.importTable,
- this.annotator: const InferredValueAnnotator()})
+ this.annotator})
: this.syntheticNames = syntheticNames ?? new NameSystem();
Printer._inner(Printer parent, this.importTable)
@@ -230,16 +210,6 @@ class Printer extends Visitor<Null> {
return '$library::$name';
}
- String getInferredValueString(InferredValue value) {
- if (value.isNothing) return 'Nothing';
- if (value.isAlwaysNull) return 'Null';
- assert(value.baseClass != null);
- String baseName = getClassReference(value.baseClass);
- String baseSuffix = value.isSubclass ? '+' : value.isSubtype ? '*' : '!';
- String bitSuffix = ValueBit.format(value.valueBits);
- return '$baseName$baseSuffix $bitSuffix';
- }
-
static final String emptyNameString = '•';
static final Name emptyName = new Name(emptyNameString);
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | pkg/kernel/lib/transformations/closure/converter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698