| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 tracer; | 5 library tracer; | 
| 6 | 6 | 
| 7 import 'dart:io'; | 7 import 'dart:io'; | 
| 8 import 'ssa.dart'; | 8 import 'ssa.dart'; | 
| 9 import '../js_backend/js_backend.dart'; | 9 import '../js_backend/js_backend.dart'; | 
| 10 import '../dart2jslib.dart'; | 10 import '../dart2jslib.dart'; | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 43 | 43 | 
| 44   void traceGraph(String name, HGraph graph) { | 44   void traceGraph(String name, HGraph graph) { | 
| 45     if (!traceActive) return; | 45     if (!traceActive) return; | 
| 46     tag("cfg", () { | 46     tag("cfg", () { | 
| 47       printProperty("name", name); | 47       printProperty("name", name); | 
| 48       visitDominatorTree(graph); | 48       visitDominatorTree(graph); | 
| 49     }); | 49     }); | 
| 50   } | 50   } | 
| 51 | 51 | 
| 52   void addPredecessors(HBasicBlock block) { | 52   void addPredecessors(HBasicBlock block) { | 
| 53     if (block.predecessors.isEmpty()) { | 53     if (block.predecessors.isEmpty) { | 
| 54       printEmptyProperty("predecessors"); | 54       printEmptyProperty("predecessors"); | 
| 55     } else { | 55     } else { | 
| 56       addIndent(); | 56       addIndent(); | 
| 57       add("predecessors"); | 57       add("predecessors"); | 
| 58       for (HBasicBlock predecessor in block.predecessors) { | 58       for (HBasicBlock predecessor in block.predecessors) { | 
| 59         add(' "B${predecessor.id}"'); | 59         add(' "B${predecessor.id}"'); | 
| 60       } | 60       } | 
| 61       add("\n"); | 61       add("\n"); | 
| 62     } | 62     } | 
| 63   } | 63   } | 
| 64 | 64 | 
| 65   void addSuccessors(HBasicBlock block) { | 65   void addSuccessors(HBasicBlock block) { | 
| 66     if (block.successors.isEmpty()) { | 66     if (block.successors.isEmpty) { | 
| 67       printEmptyProperty("successors"); | 67       printEmptyProperty("successors"); | 
| 68     } else { | 68     } else { | 
| 69       addIndent(); | 69       addIndent(); | 
| 70       add("successors"); | 70       add("successors"); | 
| 71       for (HBasicBlock successor in block.successors) { | 71       for (HBasicBlock successor in block.successors) { | 
| 72         add(' "B${successor.id}"'); | 72         add(' "B${successor.id}"'); | 
| 73       } | 73       } | 
| 74       add("\n"); | 74       add("\n"); | 
| 75     } | 75     } | 
| 76   } | 76   } | 
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 524   } | 524   } | 
| 525 | 525 | 
| 526   String visitTypeConversion(HTypeConversion node) { | 526   String visitTypeConversion(HTypeConversion node) { | 
| 527     return "TypeConversion: ${temporaryId(node.checkedInput)} to ${node.type}"; | 527     return "TypeConversion: ${temporaryId(node.checkedInput)} to ${node.type}"; | 
| 528   } | 528   } | 
| 529 | 529 | 
| 530   String visitRangeConversion(HRangeConversion node) { | 530   String visitRangeConversion(HRangeConversion node) { | 
| 531     return "RangeConversion: ${node.checkedInput}"; | 531     return "RangeConversion: ${node.checkedInput}"; | 
| 532   } | 532   } | 
| 533 } | 533 } | 
| OLD | NEW | 
|---|