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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart

Issue 1916053003: Add toStructuredText to ConstantExpression and align method names with ConstantValue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 8 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/compiler/lib/src/constants/values.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
index 185f0119738d7ea6fd550bcc3b7c4f5283115b50..1402b1d87b4c2c9b70de105cac81a7b57b73d854 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
@@ -464,11 +464,11 @@ class ConstantStringifier extends ConstantValueVisitor<String, Null> {
// tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart).
String _failWith(ConstantValue constant) {
- throw 'Stringification not supported for ${constant.toStructuredString()}';
+ throw 'Stringification not supported for ${constant.toStructuredText()}';
}
String visitFunction(FunctionConstantValue constant, _) {
- return '(Function "${constant.unparse()}")';
+ return '(Function "${constant.toDartText()}")';
}
String visitNull(NullConstantValue constant, _) {
@@ -476,19 +476,19 @@ class ConstantStringifier extends ConstantValueVisitor<String, Null> {
}
String visitInt(IntConstantValue constant, _) {
- return '(Int ${constant.unparse()})';
+ return '(Int ${constant.toDartText()})';
}
String visitDouble(DoubleConstantValue constant, _) {
- return '(Double ${constant.unparse()})';
+ return '(Double ${constant.toDartText()})';
}
String visitBool(BoolConstantValue constant, _) {
- return '(Bool ${constant.unparse()})';
+ return '(Bool ${constant.toDartText()})';
}
String visitString(StringConstantValue constant, _) {
- return '(String ${constant.unparse()})';
+ return '(String ${constant.toDartText()})';
}
String visitList(ListConstantValue constant, _) {
@@ -508,7 +508,7 @@ class ConstantStringifier extends ConstantValueVisitor<String, Null> {
}
String visitConstructed(ConstructedConstantValue constant, _) {
- return '(Constructed "${constant.unparse()}")';
+ return '(Constructed "${constant.toDartText()}")';
}
String visitType(TypeConstantValue constant, _) {
@@ -516,11 +516,11 @@ class ConstantStringifier extends ConstantValueVisitor<String, Null> {
}
String visitInterceptor(InterceptorConstantValue constant, _) {
- return '(Interceptor "${constant.unparse()}")';
+ return '(Interceptor "${constant.toDartText()}")';
}
String visitSynthetic(SyntheticConstantValue constant, _) {
- return '(Synthetic "${constant.unparse()}")';
+ return '(Synthetic "${constant.toDartText()}")';
}
String visitDeferred(DeferredConstantValue constant, _) {
« no previous file with comments | « pkg/compiler/lib/src/constants/values.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698