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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_tracer.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) 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_tracer; 5 library tree_ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import '../tracer.dart'; 8 import '../tracer.dart';
9 import 'tree_ir_nodes.dart'; 9 import 'tree_ir_nodes.dart';
10 10
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 String args = formatArguments(node); 410 String args = formatArguments(node);
411 return "oneshot $name($args)"; 411 return "oneshot $name($args)";
412 } 412 }
413 413
414 String visitLiteralList(LiteralList node) { 414 String visitLiteralList(LiteralList node) {
415 String values = node.values.map(visitExpression).join(', '); 415 String values = node.values.map(visitExpression).join(', ');
416 return "list [$values]"; 416 return "list [$values]";
417 } 417 }
418 418
419 String visitConstant(Constant node) { 419 String visitConstant(Constant node) {
420 return "${node.value.toStructuredString()}"; 420 return "${node.value.toStructuredText()}";
421 } 421 }
422 422
423 String visitThis(This node) { 423 String visitThis(This node) {
424 return "this"; 424 return "this";
425 } 425 }
426 426
427 static bool usesInfixNotation(Expression node) { 427 static bool usesInfixNotation(Expression node) {
428 return node is Conditional || 428 return node is Conditional ||
429 node is LogicalOperator || 429 node is LogicalOperator ||
430 node is Assign || 430 node is Assign ||
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 611 String prefix = v.element == null ? 'v' : '${v.element.name}_';
612 while (name == null || _usedNames.contains(name)) { 612 while (name == null || _usedNames.contains(name)) {
613 name = "$prefix${_counter++}"; 613 name = "$prefix${_counter++}";
614 } 614 }
615 _names[v] = name; 615 _names[v] = name;
616 _usedNames.add(name); 616 _usedNames.add(name);
617 } 617 }
618 return name; 618 return name;
619 } 619 }
620 } 620 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | pkg/compiler/lib/src/types/value_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698