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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 1175973005: dart2js cps: Introduce some built-in operators in type propagation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status files 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { 364 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
365 String args = node.arguments.map(formatReference).join(', '); 365 String args = node.arguments.map(formatReference).join(', ');
366 return "CreateInvocationMirror(${node.selector.name}, $args)"; 366 return "CreateInvocationMirror(${node.selector.name}, $args)";
367 } 367 }
368 368
369 visitTypeTest(cps_ir.TypeTest node) { 369 visitTypeTest(cps_ir.TypeTest node) {
370 String value = formatReference(node.value); 370 String value = formatReference(node.value);
371 String args = node.typeArguments.map(formatReference).join(', '); 371 String args = node.typeArguments.map(formatReference).join(', ');
372 return "TypeTest ($value ${node.type} ($args))"; 372 return "TypeTest ($value ${node.type} ($args))";
373 } 373 }
374
375 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
376 String operator = node.operator.toString();
377 String args = node.arguments.map(formatReference).join(', ');
378 return 'ApplyBuiltinOperator $operator ($args)';
379 }
374 } 380 }
375 381
376 /** 382 /**
377 * Invents (and remembers) names for Continuations, Parameters, etc. 383 * Invents (and remembers) names for Continuations, Parameters, etc.
378 * The names must match the conventions used by IR Hydra, e.g. 384 * The names must match the conventions used by IR Hydra, e.g.
379 * Continuations and Functions must have names of form B### since they 385 * Continuations and Functions must have names of form B### since they
380 * are visualized as basic blocks. 386 * are visualized as basic blocks.
381 */ 387 */
382 class Names { 388 class Names {
383 final Map<Object, String> names = {}; 389 final Map<Object, String> names = {};
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 595 }
590 visitIsTrue(cps_ir.IsTrue node) { 596 visitIsTrue(cps_ir.IsTrue node) {
591 unexpectedNode(node); 597 unexpectedNode(node);
592 } 598 }
593 visitIdentical(cps_ir.Identical node) { 599 visitIdentical(cps_ir.Identical node) {
594 unexpectedNode(node); 600 unexpectedNode(node);
595 } 601 }
596 visitInterceptor(cps_ir.Interceptor node) { 602 visitInterceptor(cps_ir.Interceptor node) {
597 unexpectedNode(node); 603 unexpectedNode(node);
598 } 604 }
599
600 visitReadTypeVariable(cps_ir.ReadTypeVariable node) { 605 visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
601 unexpectedNode(node); 606 unexpectedNode(node);
602 } 607 }
603
604 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) { 608 visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) {
605 unexpectedNode(node); 609 unexpectedNode(node);
606 } 610 }
607
608 visitTypeExpression(cps_ir.TypeExpression node) { 611 visitTypeExpression(cps_ir.TypeExpression node) {
609 unexpectedNode(node); 612 unexpectedNode(node);
610 } 613 }
611
612 visitNonTailThrow(cps_ir.NonTailThrow node) { 614 visitNonTailThrow(cps_ir.NonTailThrow node) {
613 unexpectedNode(node); 615 unexpectedNode(node);
614 } 616 }
615
616 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { 617 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
617 unexpectedNode(node); 618 unexpectedNode(node);
618 } 619 }
619
620 visitTypeTest(cps_ir.TypeTest node) { 620 visitTypeTest(cps_ir.TypeTest node) {
621 unexpectedNode(node); 621 unexpectedNode(node);
622 } 622 }
623 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
624 unexpectedNode(node);
625 }
623 } 626 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698