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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_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 dart2js.ir_tracer; 5 library dart2js.ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import 'cps_ir_nodes.dart' as cps_ir hide Function; 8 import 'cps_ir_nodes.dart' as cps_ir hide Function;
9 import '../tracer.dart'; 9 import '../tracer.dart';
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 visitCreateInstance(cps_ir.CreateInstance node) { 311 visitCreateInstance(cps_ir.CreateInstance node) {
312 String className = node.classElement.name; 312 String className = node.classElement.name;
313 String arguments = node.arguments.map(formatReference).join(', '); 313 String arguments = node.arguments.map(formatReference).join(', ');
314 String typeInformation = 314 String typeInformation =
315 node.typeInformation.map(formatReference).join(', '); 315 node.typeInformation.map(formatReference).join(', ');
316 return 'CreateInstance $className ($arguments) <$typeInformation>'; 316 return 'CreateInstance $className ($arguments) <$typeInformation>';
317 } 317 }
318 318
319 visitIdentical(cps_ir.Identical node) {
320 String left = formatReference(node.left);
321 String right = formatReference(node.right);
322 return "Identical($left, $right)";
323 }
324
325 visitInterceptor(cps_ir.Interceptor node) { 319 visitInterceptor(cps_ir.Interceptor node) {
326 return "Interceptor(${formatReference(node.input)})"; 320 return "Interceptor(${formatReference(node.input)})";
327 } 321 }
328 322
329 visitCreateFunction(cps_ir.CreateFunction node) { 323 visitCreateFunction(cps_ir.CreateFunction node) {
330 return "CreateFunction ${node.definition.element.name}"; 324 return "CreateFunction ${node.definition.element.name}";
331 } 325 }
332 326
333 visitGetMutableVariable(cps_ir.GetMutableVariable node) { 327 visitGetMutableVariable(cps_ir.GetMutableVariable node) {
334 String variable = names.name(node.variable.definition); 328 String variable = names.name(node.variable.definition);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 594 }
601 595
602 visitCreateInstance(cps_ir.CreateInstance node) { 596 visitCreateInstance(cps_ir.CreateInstance node) {
603 unexpectedNode(node); 597 unexpectedNode(node);
604 } 598 }
605 599
606 visitIsTrue(cps_ir.IsTrue node) { 600 visitIsTrue(cps_ir.IsTrue node) {
607 unexpectedNode(node); 601 unexpectedNode(node);
608 } 602 }
609 603
610 visitIdentical(cps_ir.Identical node) {
611 unexpectedNode(node);
612 }
613
614 visitInterceptor(cps_ir.Interceptor node) { 604 visitInterceptor(cps_ir.Interceptor node) {
615 unexpectedNode(node); 605 unexpectedNode(node);
616 } 606 }
617 607
618 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { 608 visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
619 unexpectedNode(node); 609 unexpectedNode(node);
620 } 610 }
621 611
622 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { 612 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) {
623 unexpectedNode(node); 613 unexpectedNode(node);
(...skipping 19 matching lines...) Expand all
643 unexpectedNode(node); 633 unexpectedNode(node);
644 } 634 }
645 635
646 @override 636 @override
647 visitForeignCode(cps_ir.ForeignCode node) { 637 visitForeignCode(cps_ir.ForeignCode node) {
648 if (node.continuation != null) { 638 if (node.continuation != null) {
649 addEdgeToContinuation(node.continuation); 639 addEdgeToContinuation(node.continuation);
650 } 640 }
651 } 641 }
652 } 642 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698