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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart

Issue 1584543002: dart2js cps: Support inlining constructors with type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status files and unit tests Created 4 years, 11 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/tree_ir/tree_ir_nodes.dart ('k') | tests/co19/co19-dart2js.status » ('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_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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 // TODO(sra): Fix up this. 510 // TODO(sra): Fix up this.
511 return '$object."is-${node.dartType}"'; 511 return '$object."is-${node.dartType}"';
512 } 512 }
513 513
514 String visitCreateBox(CreateBox node) { 514 String visitCreateBox(CreateBox node) {
515 return 'CreateBox'; 515 return 'CreateBox';
516 } 516 }
517 517
518 String visitCreateInstance(CreateInstance node) { 518 String visitCreateInstance(CreateInstance node) {
519 String className = node.classElement.name; 519 String name = '${node.dartType}';
520 String arguments = node.arguments.map(visitExpression).join(', '); 520 String arguments = node.arguments.map(visitExpression).join(', ');
521 return 'CreateInstance $className($arguments)'; 521 return 'CreateInstance $name($arguments)';
522 } 522 }
523 523
524 @override 524 @override
525 String visitReadTypeVariable(ReadTypeVariable node) { 525 String visitReadTypeVariable(ReadTypeVariable node) {
526 return 'Read ${node.variable.element} ${visitExpression(node.target)}'; 526 return 'Read ${node.variable.element} ${visitExpression(node.target)}';
527 } 527 }
528 528
529 @override 529 @override
530 String visitReifyRuntimeType(ReifyRuntimeType node) { 530 String visitReifyRuntimeType(ReifyRuntimeType node) {
531 return 'Reify ${node.value}'; 531 return 'Reify ${node.value}';
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 618 String prefix = v.element == null ? 'v' : '${v.element.name}_';
619 while (name == null || _usedNames.contains(name)) { 619 while (name == null || _usedNames.contains(name)) {
620 name = "$prefix${_counter++}"; 620 name = "$prefix${_counter++}";
621 } 621 }
622 _names[v] = name; 622 _names[v] = name;
623 _usedNames.add(name); 623 _usedNames.add(name);
624 } 624 }
625 return name; 625 return name;
626 } 626 }
627 } 627 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698