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

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

Issue 1204733002: dart2js cps: Make Identical a built-in and add Interceptor to Tree IR. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 return node.dartType.toString(); 508 return node.dartType.toString();
509 } 509 }
510 510
511 @override 511 @override
512 String visitCreateInvocationMirror(CreateInvocationMirror node) { 512 String visitCreateInvocationMirror(CreateInvocationMirror node) {
513 String args = node.arguments.map(visitExpression).join(', '); 513 String args = node.arguments.map(visitExpression).join(', ');
514 return 'CreateInvocationMirror(${node.selector.name}, $args)'; 514 return 'CreateInvocationMirror(${node.selector.name}, $args)';
515 } 515 }
516 516
517 @override 517 @override
518 String visitInterceptor(Interceptor node) {
519 return 'Interceptor(${visitExpression(node.input)})';
520 }
521
522 @override
518 String visitForeignExpression(ForeignExpression node) { 523 String visitForeignExpression(ForeignExpression node) {
519 String arguments = node.arguments.map(visitExpression).join(', '); 524 String arguments = node.arguments.map(visitExpression).join(', ');
520 return 'Foreign "${node.codeTemplate}"($arguments)'; 525 return 'Foreign "${node.codeTemplate}"($arguments)';
521 } 526 }
522 527
523 @override 528 @override
524 String visitApplyBuiltinOperator(ApplyBuiltinOperator node) { 529 String visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
525 String args = node.arguments.map(visitExpression).join(', '); 530 String args = node.arguments.map(visitExpression).join(', ');
526 return 'ApplyBuiltinOperator ${node.operator} ($args)'; 531 return 'ApplyBuiltinOperator ${node.operator} ($args)';
527 } 532 }
(...skipping 17 matching lines...) Expand all
545 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 550 String prefix = v.element == null ? 'v' : '${v.element.name}_';
546 while (name == null || _usedNames.contains(name)) { 551 while (name == null || _usedNames.contains(name)) {
547 name = "$prefix${_counter++}"; 552 name = "$prefix${_counter++}";
548 } 553 }
549 _names[v] = name; 554 _names[v] = name;
550 _usedNames.add(name); 555 _usedNames.add(name);
551 } 556 }
552 return name; 557 return name;
553 } 558 }
554 } 559 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698