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

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

Issue 1304383003: dart2js cps: Add path-sensitive types by inserting refinement IR nodes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 5 years, 3 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 String value = formatReference(node.value); 386 String value = formatReference(node.value);
387 return 'SetIndex $object $index $value'; 387 return 'SetIndex $object $index $value';
388 } 388 }
389 389
390 @override 390 @override
391 visitAwait(cps_ir.Await node) { 391 visitAwait(cps_ir.Await node) {
392 String value = formatReference(node.input); 392 String value = formatReference(node.input);
393 String continuation = formatReference(node.continuation); 393 String continuation = formatReference(node.continuation);
394 return 'Await $value $continuation'; 394 return 'Await $value $continuation';
395 } 395 }
396
397 @override
398 visitRefinement(cps_ir.Refinement node) {
399 String value = formatReference(node.value);
400 return 'Refinement $value ${node.type}';
401 }
396 } 402 }
397 403
398 /** 404 /**
399 * Invents (and remembers) names for Continuations, Parameters, etc. 405 * Invents (and remembers) names for Continuations, Parameters, etc.
400 * The names must match the conventions used by IR Hydra, e.g. 406 * The names must match the conventions used by IR Hydra, e.g.
401 * Continuations and Functions must have names of form B### since they 407 * Continuations and Functions must have names of form B### since they
402 * are visualized as basic blocks. 408 * are visualized as basic blocks.
403 */ 409 */
404 class Names { 410 class Names {
405 final Map<Object, String> names = {}; 411 final Map<Object, String> names = {};
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 668
663 @override 669 @override
664 visitForeignCode(cps_ir.ForeignCode node) { 670 visitForeignCode(cps_ir.ForeignCode node) {
665 addEdgeToContinuation(node.continuation); 671 addEdgeToContinuation(node.continuation);
666 } 672 }
667 673
668 @override 674 @override
669 visitAwait(cps_ir.Await node) { 675 visitAwait(cps_ir.Await node) {
670 unexpectedNode(node); 676 unexpectedNode(node);
671 } 677 }
678
679 visitRefinement(cps_ir.Refinement node) {
680 unexpectedNode(node);
681 }
672 } 682 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/insert_refinements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698