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

Side by Side Diff: pkg/compiler/lib/src/serialization/values.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Class hiarchy for semantic wrapping of serializable values. 5 /// Class hiarchy for semantic wrapping of serializable values.
6 6
7 library dart2js.serialization.values; 7 library dart2js.serialization.values;
8 8
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 class ConstantValue implements Value { 62 class ConstantValue implements Value {
63 final ConstantExpression constant; 63 final ConstantExpression constant;
64 final Value id; 64 final Value id;
65 65
66 ConstantValue(this.constant, this.id); 66 ConstantValue(this.constant, this.id);
67 67
68 accept(ValueVisitor visitor, arg) => visitor.visitConstant(this, arg); 68 accept(ValueVisitor visitor, arg) => visitor.visitConstant(this, arg);
69 69
70 String toString() => constant.getText(); 70 String toString() => constant.toDartText();
71 } 71 }
72 72
73 abstract class PrimitiveValue implements Value { 73 abstract class PrimitiveValue implements Value {
74 get value; 74 get value;
75 75
76 String toString() => value.toString(); 76 String toString() => value.toString();
77 } 77 }
78 78
79 class BoolValue extends PrimitiveValue { 79 class BoolValue extends PrimitiveValue {
80 final bool value; 80 final bool value;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 R visitBool(BoolValue value, A arg); 169 R visitBool(BoolValue value, A arg);
170 R visitInt(IntValue value, A arg); 170 R visitInt(IntValue value, A arg);
171 R visitDouble(DoubleValue value, A arg); 171 R visitDouble(DoubleValue value, A arg);
172 R visitString(StringValue value, A arg); 172 R visitString(StringValue value, A arg);
173 R visitObject(ObjectValue value, A arg); 173 R visitObject(ObjectValue value, A arg);
174 R visitMap(MapValue value, A arg); 174 R visitMap(MapValue value, A arg);
175 R visitList(ListValue value, A arg); 175 R visitList(ListValue value, A arg);
176 R visitEnum(EnumValue value, A arg); 176 R visitEnum(EnumValue value, A arg);
177 R visitUri(UriValue value, A arg); 177 R visitUri(UriValue value, A arg);
178 } 178 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/json_serializer.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698