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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.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, 7 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/nodes.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library tree_ir_nodes; 5 library tree_ir_nodes;
6 6
7 import '../constants/values.dart' as values; 7 import '../constants/values.dart' as values;
8 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; 8 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType;
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../io/source_information.dart' show SourceInformation; 10 import '../io/source_information.dart' show SourceInformation;
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 Constant(this.value, {this.sourceInformation}); 289 Constant(this.value, {this.sourceInformation});
290 290
291 Constant.bool(values.BoolConstantValue constantValue) 291 Constant.bool(values.BoolConstantValue constantValue)
292 : value = constantValue, 292 : value = constantValue,
293 sourceInformation = null; 293 sourceInformation = null;
294 294
295 accept(ExpressionVisitor visitor) => visitor.visitConstant(this); 295 accept(ExpressionVisitor visitor) => visitor.visitConstant(this);
296 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitConstant(this, arg); 296 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitConstant(this, arg);
297 297
298 String toString() => 'Constant(value=${value.toStructuredString()})'; 298 String toString() => 'Constant(value=${value.toStructuredText()})';
299 } 299 }
300 300
301 class This extends Expression { 301 class This extends Expression {
302 accept(ExpressionVisitor visitor) => visitor.visitThis(this); 302 accept(ExpressionVisitor visitor) => visitor.visitThis(this);
303 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg); 303 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg);
304 } 304 }
305 305
306 class LiteralList extends Expression { 306 class LiteralList extends Expression {
307 final InterfaceType type; 307 final InterfaceType type;
308 final List<Expression> values; 308 final List<Expression> values;
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 1598
1599 /// Number of uses of the current fallthrough target. 1599 /// Number of uses of the current fallthrough target.
1600 int get useCount => _stack.last.useCount; 1600 int get useCount => _stack.last.useCount;
1601 1601
1602 /// Indicate that a statement will fall through to the current fallthrough 1602 /// Indicate that a statement will fall through to the current fallthrough
1603 /// target. 1603 /// target.
1604 void use() { 1604 void use() {
1605 ++_stack.last.useCount; 1605 ++_stack.last.useCount;
1606 } 1606 }
1607 } 1607 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/nodes.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698